01 |
Copy to ClipboardLiehuo.Net Codes引用的内容:[www.veryhuo.com] |
04 |
function GetOptionList($selid=0,$userCatalog=0,$channeltype=0) |
06 |
global $OptionArrayList,$channels,$dsql; |
08 |
$dsql->SetQuery("Select id,typename From `dede_channeltype` "); |
11 |
while($row = $dsql->GetObject()) $channels[$row->id] = $row->typename; |
13 |
$OptionArrayList = ""; |
18 |
$row = $dsql->GetOne("Select id,typename,ispart,channeltype From `dede_arctype` where id='$selid'"); |
19 |
if($row['ispart']==1) $OptionArrayList .= "<option value='".$row['id']."'class='option1' selected='selected'>".$row['typename']."(封面频道)</option>\r\n"; |
20 |
else $OptionArrayList .= "<option value='".$row['id']."'selected='selected'>".$row['typename']."</option>\r\n"; |
25 |
{ $query = "Select id,typename,ispart,channeltype From `dede_arctype` where ispart<>2 And id='$userCatalog' "; } |
27 |
{ $query = "Select id,typename,ispart,channeltype From `dede_arctype` where ispart<>2 And reid=0 order by sortrank asc "; } |
29 |
$dsql->SetQuery($query); |
32 |
while($row=$dsql->GetObject()) |
34 |
if($row->ispart==1) $OptionArrayList .= "<option value='".$row->id."' class='option1'>".$row->typename."(封面频道)</option>\r\n"; |
35 |
else if($row->ispart==2) $OptionArrayList .=""; |
36 |
else if($row->channeltype!=$channeltype && $channeltype!=0) $OptionArrayList .= "<option value='".$row->id."' class='option2'>".$row->typename."(".$channels[$row->channeltype].")</option>\r\n"; |
37 |
else $OptionArrayList .= "<option value='".$row->id."' class='option3'>".$row->typename."</option>\r\n"; |
38 |
LogicGetOptionArray($row->id,"─",$channeltype,$dsql); |
42 |
return $OptionArrayList; |
44 |
function LogicGetOptionArray($id,$step,$channeltype,&$dsql) |
46 |
global $OptionArrayList,$channels; |
47 |
$dsql->SetQuery("Select id,typename,ispart,channeltype From `dede_arctype` where reid='".$id."' And ispart<>2 order by sortrank asc"); |
49 |
while($row=$dsql->GetObject($id)) |
51 |
if($row->ispart==1) $OptionArrayList .= "<option value='".$row->id."' class='option1'>$step".$row->typename."(封面频道)</option>\r\n"; |
52 |
else if($row->ispart==2) $OptionArrayList .=""; |
53 |
else if($row->channeltype!=$channeltype && $channeltype!=0) $OptionArrayList .=''; |
54 |
else $OptionArrayList .= "<option value='".$row->id."' class='option3'>$step".$row->typename."</option>\r\n"; |
55 |
LogicGetOptionArray($row->id,$step."─",$channeltype,$dsql); |
|