Gb_Big5($_POST[rankx]); $_POST[title]=$code->Gb_Big5($_POST[title]); $_POST[memo]=$code->Gb_Big5($_POST[memo]); $_POST[host]=$code->Gb_Big5($_POST[host]); $_POST['class']=$code->Gb_Big5($_POST['class']); $_POST[admin_name]=$code->Gb_Big5($_POST[admin_name]); $_POST[bbs_title]=$code->Gb_Big5($_POST[bbs_title]); $_POST[super_manager_name]=$code->Gb_Big5($_POST[super_manager_name]); $_POST[admin1]=$code->Gb_Big5($_POST[admin1]); } if($_COOKIE['c_lang']=='GB'){ header("content-Type: text/html; charset=gb2312"); }else{ header("content-Type: text/html; charset=big5"); } $templatez="$template"; $template="template/$template"; include"../$template/log.php"; include("../$template/error.php"); if(!$_GET[seen]){ if(!$_GET[unseen]){ if(!$_GET[panel]){ if(!$_GET[renamego]){ if(!$_GET[dx]){ if(!$_GET[drop]){ if(!$_GET[push]){ if(!$_POST[edit]){ if(!$_GET[unlock]){ if(!$_GET[lock]){ if(!$_GET[top]){ if(!$_GET[back]){ if(!$_GET[delete]){ if(!$_GET[clear]){ if(!extract($_GET) or $_GET[edit] or $_GET[rename] or $_GET[add]){ include"../$template/top.php"; include"../$template/admin_top.php"; include"../$template/admin_main.php"; list($id,$title,$dir,$memo,$host,$secret)=mysql_fetch_array(execute_query("select id,title,dir,memo,host,secret from ${admin_id}_php_visual_board_board where title='$_GET[title]'")); if($_GET[rename])$dest="renamego=$_GET[rename]";else$dest="create=go"; if(!$_GET[edit]){ $c_mode='bbs1'; $c_ban='9'; $c_read='10'; $c_post='9'; $c_post2='9'; $c_edit='9'; $c_editc='9'; $c_vote='9'; $c_lock='9'; $c_link='9'; $c_link_num='2'; $c_com1='9'; $c_com2='9'; $c_com3='9'; $c_reply='9'; $c_poll='9'; $c_post_poll='9'; $c_view='9'; $c_down='9'; $c_html='9'; $c_msn='9'; $c_bbcode='9'; $d_post='9'; $d_post_num='2'; $d_com='9'; $d_com_num='2'; $d_reply='9'; $d_reply_num='2'; $d_poll='9'; $d_poll_num='2'; }else{ include"sub2/$_GET[edit].php"; } if($c_mode==bbs1)$m1="checked"; if($c_mode==bbs2)$m2="checked"; if($c_mode==bill)$m3="checked"; if($c_mode==guest)$m4="checked"; if($c_mode==diary)$m5="checked"; if($c_mode==photo)$m6="checked"; if($c_mode==pds)$m7="checked"; if($c_mode==chat)$m8="checked"; if($c_mode==link)$m9="checked"; if($c_mode==blog)$m10="checked"; if($_GET[rename]) $md="修改分區"; else $md="建立分區"; if(!$_GET[admin2])$_GET[admin2]="$admin_name"; if($secret)$s="checked"; if($_GET[edit]) if($unseen)$u="checked"; if($visible)$v="checked"; if(is_file("./sub2/$_GET[edit].gif")) $logo="

  

   刪除 logo

"; include"../$template/admin_form.php"; } if($_GET[create]==go){ if(!$_POST[dir] or !$_POST[admin2])error("請輸入完整資料!"); unset($admin2); include"sub/dir.php"; if($admin2)$admin2="$admin2<>"; fputs(fopen("sub/dir.php",w),""); list($id)=mysql_fetch_array(execute_query("select id from ${admin_id}_php_visual_board_index order by id DESC")); $id++; execute_query("insert into ${admin_id}_php_visual_board_index values('$id','$_POST[dir]')") or die("無法寫入資料庫!"); header("location:?"); } if($_GET[create2]==go && !$_POST[edit]){ if(!$_POST[title] or !$_POST[memo])error("請輸入完整資料!"); if($_POST[sub]){ list($sup,$sub)=mysql_fetch_array(execute_query("select id,sub from ${admin_id}_php_visual_board_board where title='$_POST[sub]'")); if($sub)$sub="$sub<>"; execute_query("update ${admin_id}_php_visual_board_board set sub='$sub$_POST[title]' where title='$_POST[sub]'") or die("無法寫入資料庫!"); $_POST[sdir]=$_POST[sub]; } list($id)=mysql_fetch_array(execute_query("select id from ${admin_id}_php_visual_board_board order by id DESC")); $id++; if($_POST[notice])$id=999; $ord++; execute_query("insert into ${admin_id}_php_visual_board_board values('$id','$_POST[title]','$_POST[sdir]','$_POST[memo]','$_POST[host]','0','0','','','','$_POST[lock]','$_POST[secret]','$ord','','')") or die("無法寫入資料庫!"); fputs(fopen("sub2/$id.php",w)," "); if($_FILES[logo][tmp_name]) @move_uploaded_file($_FILES[logo][tmp_name],"./sub2/$id.gif"); $create=" create table ${admin_id}_php_visual_board_bbs_$id( id int primary key auto_increment, name varchar(24), pass varchar(24), icon int, email varchar(24), home varchar(24), title varchar(40), memo text, time int, com text, hit int, cnum int, vote int, last_time int, last_name varchar(24), poll text, html int, `lock` int, id2 varchar(24), notice int, id3 varchar(24), keep varchar(40), edit_time int, index(notice) ) "; include"setup.php"; if($manager)$manager.="<>"; fputs(fopen("setup.php",w),""); execute_query("$create") or die("建立資料庫 - ${admin_id}_php_visual_board_bbs_$id 失敗!"); foreach(explode("\n",$_POST[host]) as $name){ execute_query("update ${admin_id}_php_visual_board_member set job='2' where name='$name'") or die("無法寫入資料庫!"); } if($sup)@mkdir("sub/$sup"."_".$id); if(!$_POST[blog]) header("location:?"); else{ execute_query("update ${admin_id}_php_visual_board_member set home='index.php?blog=$id' where id='$_COOKIE[bbs_id]'") or die("更新資料庫失敗!"); setcookie("bbs_home","index.php?blog=$id",time()+2592000,"/bbs/$admin_id"); header("location:index.php?blog=$id"); } } }else{ include"count.php"; $count3-=$_GET[num]; fputs(fopen('count.php',w),""); execute_query("update ${admin_id}_php_visual_board_board set num=\"\",com=\"\",last_time=\"\",last_name=\"\",new=\"\",id2=\"\" where title='$_GET[title]'") or die("無法寫入資料庫!"); execute_query("delete from ${admin_id}_php_visual_board_bbs_$_GET[clear]") or die("無法清空資料表!"); header("location:?"); } }else{ list($sub)=mysql_fetch_array(execute_query("select sub from ${admin_id}_php_visual_board_board where sub like '%$_GET[title]%'")); $sub=str_replace("$_GET[title]<>","",$sub); $sub=str_replace("<>$_GET[title]","",$sub); $sub=str_replace("$_GET[title]","",$sub); execute_query("update ${admin_id}_php_visual_board_board set sub='$sub' where sub like '%$_GET[title]%'") or die("無法寫入資料庫!"); include"count.php"; $count3-=$_GET[num]; fputs(fopen('count.php',w),""); execute_query("delete from ${admin_id}_php_visual_board_board where title='$_GET[title]'") or die("無法寫入資料庫!"); $set=file_get_contents("setup.php"); $set=str_replace("$_GET[delete]%$_GET[delete2]<>","",$set); $set=str_replace("<>$_GET[delete]%$_GET[delete2]","",$set); $set=str_replace("$_GET[delete]%$_GET[delete2]","",$set); fputs(fopen('setup.php',w),$set); @unlink("./sub2/$_GET[delete].gif"); execute_query("drop table ${admin_id}_php_visual_board_bbs_$_GET[delete]") or die("無法刪除資料表 - ! ${admin_id}_php_visual_board_bbs_$_GET[delete]"); header("location:?"); } }else{ list($ord)=mysql_fetch_array(execute_query("select min(ord) from ${admin_id}_php_visual_board_board")); $ord--; execute_query("update ${admin_id}_php_visual_board_board set ord=$ord where title='$_GET[title]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ list($ord)=mysql_fetch_array(execute_query("select max(ord) from ${admin_id}_php_visual_board_board")); $ord++; execute_query("update ${admin_id}_php_visual_board_board set ord=$ord where title='$_GET[title]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ execute_query("update ${admin_id}_php_visual_board_board set `lock`=1 where title='$_GET[title]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ execute_query("update ${admin_id}_php_visual_board_board set `lock`=0 where title='$_GET[title]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ fputs(fopen("sub2/$_POST[id2].php",w)," "); execute_query("update ${admin_id}_php_visual_board_board set title='$_POST[title]',dir='$_POST[sdir]',memo='$_POST[memo]',host='$_POST[host]' where title='$_POST[edit]'") or die("無法寫入資料庫!"); if($manager)$manager.="<>"; include"setup.php"; fputs(fopen("setup.php",w),""); foreach(explode("\n",$_POST[host]) as $name){ execute_query("update ${admin_id}_php_visual_board_member set job='2' where name='$name'") or die("無法寫入資料庫!"); } $_POST[edit]=urlencode($_POST[edit]); $_POST[sdir]=urlencode($_POST[sdir]); if($_FILES[logo][tmp_name]) @move_uploaded_file($_FILES[logo][tmp_name],"./sub2/$_POST[id2].gif"); if($_POST[dl]) @unlink("./sub2/$_POST[id2].gif"); if($_POST[blog]) header("location:index.php?blog=$_POST[id2]"); else header("location:?edit=$_POST[id2]&title=$_POST[edit]&dirn=$_POST[sdir]"); } }else{ list($ord)=mysql_fetch_array(execute_query("select ord from ${admin_id}_php_visual_board_board where title='$_GET[title]'")); $ord+=1; execute_query("update ${admin_id}_php_visual_board_board set ord=$ord where title='$_GET[title]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ list($ord)=mysql_fetch_array(execute_query("select ord from ${admin_id}_php_visual_board_board where title='$_GET[title]'")); $ord-=1; execute_query("update ${admin_id}_php_visual_board_board set ord=$ord where title='$_GET[title]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ @unlink("sub/$_GET[dx].log"); $admin2=file_get_contents("sub/dir.php"); $admin2=str_replace("<>$_GET[dx]%%$_GET[dx2]","",$admin2); $admin2=str_replace("$_GET[dx]%%$_GET[dx2]","",$admin2); fputs(fopen("sub/dir.php",w),$admin2); execute_query("delete from ${admin_id}_php_visual_board_index where dir='$_GET[dx]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ if(!$_POST[dir] or !$_POST[admin2])error("請輸入完整資料!"); $admin2=file_get_contents("sub/dir.php"); $admin2=str_replace("$_GET[renamego]","$_POST[dir]",$admin2); $admin2=str_replace("$_POST[rad]","$_POST[admin2]",$admin2); fputs(fopen("sub/dir.php",w),$admin2); execute_query("update ${admin_id}_php_visual_board_board set dir='$_POST[dir]' where dir='$_GET[renamego]'") or die("無法寫入資料庫!"); execute_query("update ${admin_id}_php_visual_board_index set dir='$_POST[dir]' where dir='$_GET[renamego]'") or die("無法寫入資料庫!"); header("location:?"); } }else{ if($_GET[md]!="go"){ include"../$template/top.php"; if(file_exists("sub/style.css")){ $delz="
  style.css  刪除Style "; } if(file_exists("sub/bar.gif")){ $delx="
  
  刪除Bar "; } if(file_exists("sub/bar2.gif")){ $delxx="
  
  刪除Bar "; } if(file_exists("sub/bar3.gif")){ $delxxx="
  
  刪除menu Bar "; } if(file_exists("sub/banner.gif")){ $del="
  
  刪除Banner "; } if(file_exists("sub/bg.gif")){ $del2="
  
  刪除背景圖片 "; } $rankx=explode("<>",$rankx); for($n=1;$n<=12;$n++){ $ns=$n-1; $rank.=<<
HTML; } if($language=="BIG5") $ls="selected"; if($language=="GB") $ls2="selected"; if(!$list_mode) $lm1="checked"; if($list_mode) $lm2="checked"; include"../$template/admin_setup.php"; }else{ if($_FILES[style]) @move_uploaded_file($_FILES[style][tmp_name],"./sub/style.css"); if($_FILES[bar]) @move_uploaded_file($_FILES[bar][tmp_name],"./sub/bar.gif"); if($_FILES[bar2]) @move_uploaded_file($_FILES[bar2][tmp_name],"./sub/bar2.gif"); if($_FILES[bar3]) @move_uploaded_file($_FILES[bar3][tmp_name],"./sub/bar3.gif"); if($_FILES[image]) @move_uploaded_file($_FILES[image][tmp_name],"./sub/banner.gif"); if($_FILES[bg_image]) @move_uploaded_file($_FILES[bg_image][tmp_name],"./sub/bg.gif"); if($_POST[delz]) @unlink("./sub/style.css"); if($_POST[delx]) @unlink("./sub/bar.gif"); if($_POST[delxx]) @unlink("./sub/bar2.gif"); if($_POST[delxxx]) @unlink("./sub/bar3.gif"); if($_POST[del]) @unlink("./sub/banner.gif"); if($_POST[del2]) @unlink("./sub/bg.gif"); $n=1; while($_POST["rank_$n"]){ if($_POST[rankx])$_POST["rank_$n"]="<>".$_POST["rank_$n"]; $_POST[rankx].=$_POST["rank_$n"]; $n++; } fputs(fopen("setup.php",w),""); header("location:admin.php?panel=go"); } } }else{ @fopen("sub/$_GET[unseen].log",w); header("location:admin.php"); } }else{ @unlink("sub/$_GET[seen].log"); header("location:admin.php"); } }else{ echo "ForBidden 禁止進入!"; exit; } $exe_time2=microtime(); include"../$template/bottom.php"; $RealOutput = ob_get_contents(); @include"../$template/chrc.php"; ob_end_clean(); if($_COOKIE[c_lang]=='GB'){ $code=new CCharset; $RealOutput=$code->Big5_Gb($RealOutput); } echo $RealOutput; ?>