■ 網站欄目管理
query("insert into auto_dir values(0,'$AUTOUSERID','0','0','$dirname','$mxuhao','$mod')"); } //////////////////////新增二級目錄 if($step=="newsc"){ if($maintype!='2' && $maintype!='1'){ sendback("對不起,只有文字型和圖文型的主欄目才能建立二級欄目!建議查看幫助!"); } if($dirname==""){ sendback("對不起,您沒有填寫新增二級欄目的名稱!"); } $msql->query("select id from auto_con where dirid='$parentid'"); if($msql->next_record()){ sendback("對不起,主欄目下已有內容,請移動或刪除主欄目下的內容後才能建立二級欄目"); } $msql->query("insert into auto_dir values(0,'$AUTOUSERID','$parentid','0','$dirname','$scxuhao','$sctype')"); $msql->query("update auto_dir set ifson='1' where dirid='$parentid'"); } //////////////////////修改二級目錄 if($step=="modsc"){ if($cc=="刪"){ $msql->query("select id from auto_con where dirid='$scdirid'"); if($msql->next_record()){ sendback("對不起,該欄目下有內容,不能刪除。請移動或刪除此欄目下的內容"); } $msql->query("delete from auto_dir where dirid='$scdirid' and userid='$AUTOUSERID'"); $msql->query("select dirid from auto_dir where parentid='$parentid' and userid='$AUTOUSERID'"); if($msql->next_record()){ }else{ $fsql->query("update auto_dir set ifson='0' where dirid='$parentid' and userid='$AUTOUSERID'"); } }elseif($cc=="↓"){ $msql->query("update auto_dir set xuhao=xuhao+1 where dirid='$scdirid' and userid='$AUTOUSERID'"); }elseif($cc=="↑"){ $msql->query("update auto_dir set xuhao=xuhao-1 where dirid='$scdirid' and userid='$AUTOUSERID'"); }else{ if($dirname==""){ sendback("對不起,二級欄目的名稱必須填寫!"); } $msql->query("update auto_dir set dirname='$dirname',mod='$sctype' where dirid='$scdirid' and userid='$AUTOUSERID'"); } } //////////////////////修改主目錄 if($step=="modmain"){ if($cc=="刪"){ $msql->query("select id from auto_con where dirid='$dirid'"); if($msql->next_record()){ sendback("對不起,該主欄目下有內容,不能刪除。請移動或刪除此欄目下的內容"); } $msql->query("select dirid from auto_dir where parentid='$dirid'"); if($msql->next_record()){ sendback("對不起,該主欄目下有二級欄目,不能刪除。請先刪除二級欄目"); } if($oldmaintype=="0" || $oldmaintype=="3" ){ sendback("對不起,不能刪除主頁或聯絡表單"); } $msql->query("delete from auto_dir where dirid='$dirid' and userid='$AUTOUSERID'"); }elseif($cc=="↓"){ $msql->query("update auto_dir set xuhao=xuhao+1 where dirid='$dirid' and userid='$AUTOUSERID'"); }elseif($cc=="↑"){ $msql->query("update auto_dir set xuhao=xuhao-1 where dirid='$dirid' and userid='$AUTOUSERID'"); }else{ if($dirname==""){ sendback("對不起,主欄目的名稱必須填寫!"); } if($oldmaintype=='0' && $oldmaintype!=$maintype){ sendback("對不起,主頁型欄目只能修改名稱,不能修改類型,否則你的網站就沒有主頁了!"); } if($oldmaintype=='3' && $oldmaintype!=$maintype){ sendback("對不起,聯絡表單欄目只能修改名稱,不能修改類型,否則你的網站就沒有聯絡表單功能了!"); } if($oldmaintype!='0' && $maintype=='0'){ sendback("對不起,你已經有主頁型的主欄目了,網站不需要兩個主頁"); } if($oldmaintype!='3' && $maintype=='3'){ sendback("對不起,你已經有聯絡表單欄目了,不需要兩個聯絡表單欄目"); } $msql->query("update auto_dir set dirname='$dirname',mod='$maintype' where dirid='$dirid' and userid='$AUTOUSERID'"); } } ?>
query("select * from auto_dir where userid='$AUTOUSERID' and parentid='0' and mod!='101' and mod!='102' order by xuhao"); while($msql->next_record()){ $dirname=$msql->f('dirname'); $dirid=$msql->f('dirid'); $mxuhao=$msql->f('xuhao'); $oldmaintype=$msql->f('mod'); $sel[$oldmaintype]="selected"; ?>
主欄目名
欄目類型
排序
二級欄目名
欄目類型
排序
"> "> "> query("select * from auto_dir where userid='$AUTOUSERID' and parentid='$dirid' order by xuhao"); while($fsql->next_record()){ $dirname=$fsql->f('dirname'); $scdirid=$fsql->f('dirid'); $oldsctype=$fsql->f('mod'); $scxuhao=$msql->f('xuhao'); $sc[$oldsctype]="selected"; ?>
"> "> ">
"> "> ">

">
 

">
">

欄 目 管 理 操 作 簡 要 說 明
上表中間一列是主欄目管理[簡稱「主欄目列」],右側一列是二級欄目管理[簡稱「二級欄目列」]。
修改主欄目名稱
在主欄目列中,把原主欄目名稱改成合適你的名稱,按下「改」
增加主欄目
在主欄目列下方的「新增」一格中,填寫需要增加的主欄目名稱,按下「新增」
主欄目排序修改
按相應主欄目後面的「↑」「↓」,可以調整排列順序
增加二級欄目
在二級欄目列的「新增」一格中,填寫需要增加的二級欄目名稱,按下「新增」
修改二級欄目名稱
在二級欄目列中,把原二級欄目名稱改成合適你的名稱,按下「改」
二級欄目排序修改
按相應二級欄目後面的「↑」「↓」,可以調整排列順序