<?php //---------------------------用户自定义标签函数文件 function echolistlink($curpro,$eachfont,$eachvalue,$selcss="",$initfont="不限"){ global $public_r; $classid=(integer)$_GET['classid'];//列表动态 if($classid==0){//列表静态 $classid="[!--self.classid--]"; } if($classid==0){//列表静态 $strlink="<a href=\"\" class=\"{$selcss}\">".$initfont."</a>"; $arfont=explode("|",$eachfont); $count=count($arfont); $arvalue=explode("|",$eachvalue); for($i=0;$i<$count;$i++){ $strlink.="<a href=\"".$public_r['newsurl']."e/action/ListInfo.php?classid={$classid}&ph=1&{$curpro}=".urlencode($arvalue[$i])."\">".$arfont[$i]."</a>"; } }else{//列表动态 $arfont=explode("|",$eachfont); $count=count($arfont); $arvalue=explode("|",$eachvalue); $curvalue=$_GET[$curpro]; $querystringext=""; foreach($_GET as $variable => $value){ if($variable!="totalnum" && $variable!="page" && $variable!="start" && $variable!="andor" && $variable!=$curpro && $variable!="classid" && $variable!="ph" && $variable!="enews" && $variable!="id" && $variable!="mid" && $varialbe!="bclassid"){ $querystringext=($querystringext."&".$variable."=".urlencode($value)); } } if($curvalue==""){ $tmpclass=" class=\"{$selcss}\""; }else{ $tmpclass=""; } $strlink="<a href=\"".$public_r['newsurl']."e/action/ListInfo.php?classid={$classid}&ph=1&{$curpro}=".$querystringext."\"".$tmpclass.">".$initfont."</a>"; for($i=0;$i<$count;$i++){ $url=$public_r['newsurl']."e/action/ListInfo.php?classid={$classid}&ph=1&{$curpro}=".urlencode($arvalue[$i]).$querystringext; if($curvalue==$arvalue[$i]){ $curlink=" class=\"{$selcss}\""; }else{ $curlink=""; } $strlink.="<a href=\"".$url."\"".$curlink.">".$arfont[$i]."</a>"; } } echo $strlink; } ?>
|