define(
array(
left_Main => "left_main.tpl", //显示具体文章主模板
left_row => "left_row.tpl" //循环主题
)
);
$tpl->define_dynamic ( "row", "left_row" );
$colinfo=fdPermitColumn($loginlast);
$sql="select id,fdName,fdIsColumn from $bbscolumn where fdParent=0 and (( fdIsClose=1 and fdIsPublic=1 ) or ( id in (".$colinfo."))) order by fdOrderId desc,id asc";
$result=$DB_web->query($sql);
$rows_num=$DB_web->num_Rows($result);
for($i=6;$i<$rows_num+6;$i++)
{
$row=$DB_web->fetch_array($result);
//$sql2 = "select id,fdName from $bbscolumn where fdParent='".$row[id]."' and ((( fdIsClose=1 and fdIsPublic=1 ) or ( id in (".$colinfo."))) or ( fdIsClose=1 and fdIsPublic=0 )) order by fdOrderId desc,id asc";
$sql2 = "select id,fdName from $bbscolumn where fdParent='".$row[id]."' and ((( fdIsClose=1 and fdIsPublic=1 ) or ( id in (".$colinfo.")))) order by fdOrderId desc,id asc";
$result2=$DB_web->query($sql2);
$rowsNum = $DB_web->num_Rows($result2);
$return='';
for( $j=0 ; $j< $rowsNum; $j++)
{
$rowchild = $DB_web->fetch_array($result2);
$return.="$rowchild[fdName]
";
}
if($row[fdIsColumn]) //栏目
{
$tpl->assign(
array(
mainurl => "href='".(($bbsColumnFlage)?"bbscolumn.php":"showcolumn.php")."?fdColumnId=$row[id]' target='mainbody'",
mainname => $row[fdName],
countid => $i,
left_sub_row => $return
)
);
} else {//类别
$tpl->assign(
array(
mainurl => "href='###'",
mainname => $row[fdName],
countid => $i,
left_sub_row => $return
)
);
}
$tpl->parse(212,".row"); //解析循环的单元
}
// 获取用户个性定义数据
$sql = "SELECT * FROM $bbsselfhood WHERE fdLogin='$loginstr'";
$rlt = $DB_web->query($sql);
if ($DB_web->num_rows($rlt)==1) {
$row = $DB_web->fetch_array($rlt);
if ($row[fdCollection]==0) {
$startcoll = "";
}
if ($row[fdRegister]==0) {
$startreg = "";
}
if ($row[fdStar]==0) {
$startstar = "";
}
if ($row[fdSelfHome]==0) {
$startmyhome = "";
}
if ($row[fdDoCollect]==0) {
$startdocoll = "";
}
if ($row[fdFriend]==0) {
$startfriend = "";
}
if ($row[fdPM]==0) {
$startpm = "";
}
if ($row[fdGetPass]==0) {
$startgetpass = "";
}
if ($row[fdModify]==0) {
$startmodify = "";
}
if ($row[fdStat]==0) {
$startstat = "";
}
if ($row[fdOnline]==0) {
$startonline = "";
}
if ($row[fdSearch]==0) {
$startsearch = "";
}
if ($row[fdForum]==0) {
$startforum = "";
}
if ($row[fdAdmin]==0) {
$startadmin = "";
}
if ($row[fdBadFriend]==0) {
$startbadfriend = "";
}
if ($row[fdUserSort]==0) {
$startusersort = "";
}
if ($row[fdListUser]==0) {
$startlistuser = "";
}
if ($row[fdNewUser]==0) {
$startnewuser = "";
}
}
$tpl->assign(
array(
startcoll => $startcoll,
endcoll => $endcoll,
startreg => $startreg,
endreg => $endreg,
startstar => $startstar,
endstar => $endstar,
startmyhome => $startmyhome,
endmyhome => $endmyhome,
startdocoll => $startdocoll,
enddocoll => $enddocoll,
startfriend => $startfriend,
endfriend => $endfriend,
startpm => $startpm,
endpm => $endpm,
startgetpass => $startgetpass,
endgetpass => $endgetpass,
startmodify => $startmodify,
endmodify => $endmodify,
startstat => $startstat,
endstat => $endstat,
startonline => $startonline,
endonline => $endonline,
startsearch => $startsearch,
endsearch => $endsearch,
startforum => $startforum,
endforum => $endforum,
startadmin => $startadmin,
startbadfriend => $startbadfriend,
endbadfriend => $endbadfriend,
startusersort => $startusersort,
endusersort => $endusersort,
startlistuser => $startlistuser,
endlistuser => $endlistuser,
startnewuser => $startnewuser,
endnewuser => $endnewuser,
endadmin => $endadmin,
JSCODE => $javascriptcode,
sitename => "",
fdUrl => $fdUrl,
leftadvertise => "",
)
);
$tpl->parse(left_main, "left_row");
$tpl->parse(left_main, "left_Main");
$tpl->FastPrint(); //显示结果
}////判断是不是论坛关闭
else
{
?>
}
?>