Gb_Big5($_POST[name]); $_POST[title]=$code->Gb_Big5($_POST[title]); $_POST[memo]=$code->Gb_Big5($_POST[memo]); $_POST[subject_memo]=$code->Gb_Big5($_POST[subject_memo]); $_POST[poll]=$code->Gb_Big5($_POST[poll]); } $template="template/$template"; include"../$template/log.php"; include("../$template/error.php"); include"../$template/ban.php"; function execute_query($sql){ global $sql_num; $sql_num++; return mysql_query($sql); } if($_FILES){ foreach($_FILES as $FILES){ if($FILES[size]>600000) error("Àɮפj¤p¶W¥X­­¨î!"); } } if($_GET[unlock] or $_GET[lock] or $_GET[edc] or $_GET[ed]){ @include"sub/dir.php"; list($dir)=mysql_fetch_array(mysql_query("select dir from ${admin_id}_php_visual_board_board where id=$_GET[id]")); foreach(explode("<>",$admin2) as $array){ list($d,$admin2)=explode("%%",$array); if($d==$dir)break; } } if($_GET[id])@include"sub2/$_GET[id].php"; if(!$_COOKIE[bbs_level])$_COOKIE[bbs_level]=10; if(!$_GET[id] && $_POST[id])$_GET[id]=$_POST[id]; if($_POST && !$_GET[search] && !$_GET[order] && !$_GET[poll]){ foreach($_POST as $key=>$value){ if(!get_magic_quotes_gpc()) $_POST[$key]=addslashes($value); } if(!$_POST[name] or !$_POST[email] or !$_POST[pass] or !$_POST[memo] or !$_POST[title]) error("½Ð¿é¤J§¹¾ã¸ê®Æ!"); if($_POST[subject_icon]) $_POST[title]="$_POST[subject_icon][subject_icon]$_POST[title]"; if($_POST[subject_memo]) $_POST[title]="$_POST[subject_memo][subject_memo]$_POST[title]"; $time=gettimeofday(); if($_COOKIE[posted_subject]==$_POST[title] && $_COOKIE[bbs_level]!=1){ error("¦¹¥DÃD¤w¸gµo°e¹L¤F!"); } if(strstr($_COOKIE[posted_memo],$_POST[memo]) && $_COOKIE[bbs_level]!=1){ error("¦¹¤å³¹¤w¸gµo°e¹L¤F!"); } if($_COOKIE[posted]+30>=$time[sec] && $_COOKIE[bbs_level]!=1){ error("½Ðµ¥«Ý30¬í¦Aµo©«!"); } if($_POST[name]){ $s2=mysql_query("select DISTINCT id from ${admin_id}_php_visual_board_member where name='$_POST[name]' and pass!='$_POST[pass]'") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ - ${admin_id}_php_visual_board_member!"); if(mysql_num_rows($s2)){ error("¦¹¼ÊºÙ¤w³Q¨Ï¥Î ©Î ±K½X¿ù»~ !"); } } if($_POST[email]){ $s2=mysql_query("select DISTINCT id from ${admin_id}_php_visual_board_member where email='$_POST[email]' and pass!='$_POST[pass]'") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ - ${admin_id}_php_visual_board_member!"); if(mysql_num_rows($s2)){ error("¦¹¹q¶l¦a§}¤w³Q¨Ï¥Î ©Î ±K½X¿ù»~ !"); } } if($_POST[home]){ $s2=mysql_query("select DISTINCT id from ${admin_id}_php_visual_board_member where home='$_POST[home]' and pass!='$_POST[pass]'") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ - ${admin_id}_php_visual_board_member!"); if(mysql_num_rows($s2)){ error("¦¹ºô¯¸¦a§}¤w³Q¨Ï¥Î ©Î ±K½X¿ù»~ !"); } } setcookie("posted",$time[sec],0,"/bbs/$admin_id"); setcookie("posted_subject",$_POST[title],0,"/bbs/$admin_id"); setcookie("posted_memo",substr($_POST[memo],0,100),0,"/bbs/$admin_id"); } if(!is_file("sub/dir.php")) fopen("sub/dir.php",w); if(!is_file("create.php")){ fopen("sub/dir.php",w); if(!is_dir("bbs_count")) @mkdir("bbs_count",0777); if(!is_dir("member_upload")){ @mkdir("member_upload",0777); } if(!is_dir("sub2")){ @mkdir("sub2",0777); } } include('count.php'); if(!$_COOKIE[bbs_visitor] && !$_COOKIE[bbs_id]){ setcookie(bbs_visitor,$_SERVER[REMOTE_ADDR],0,"/bbs/$admin_id"); $_COOKIE[bbs_visitor]=$_SERVER[REMOTE_ADDR]; } if(!$day){ $day=date(d); $peak=0; }else{ if($day!=date(d)){ foreach(explode("<>",$bank) as $bankx){ list($i,$d)=explode("%%",$bankx); $bank=str_replace("$i%%$d","$i%%".($d+$d*$give/100),$bank); } function update($bank){ include"setup.php"; fputs(fopen("setup.php",w),""); } update($bank); if($peak<$nowd)$peak=$nowd; $day=date(d); $nowd=0; } } if(!$_COOKIE[bbs_view]){ setcookie(bbs_view,time(),0,"/bbs/$admin_id"); $count++; $nowd++; fputs(fopen('count.php',w),""); } $class=array(); $main=array(); function getbbs(){ global $class,$main,$find,$admin_id; if($_GET[dir])$where="where dir='$_GET[dir]'"; $sql=execute_query("select id,title,dir,memo,host,num,com,last_time,last_name,new,`lock`,secret,id2,sub from ${admin_id}_php_visual_board_board $where order by ord DESC"); while(list($id,$title,$dir,$memo,$host,$num,$com,$last_time,$last_name,$new,$lock,$secret,$id2,$sub)=mysql_fetch_array($sql)){ if(!in_array($dir,$class)){ $class[]=$dir; } $main[]=array($id,$title,$dir,$memo,$host,$num,$com,$last_time,$last_name,$new,$lock,$secret,$id2,$sub); $main2[]=array($id,$title,$dir); } setcookie("bbs_class",@implode("<>",$class),0,"/bbs/$admin_id"); if($main2) foreach($main2 as $main3) $mainx[]=@implode("<>",$main3); setcookie("bbs_main",@implode("%",$mainx),0,"/bbs/$admin_id"); } function jump(){ global $admin_id,$template; include"../$template/select.php"; $class=array(); $d=array(); if(!$_COOKIE[bbs_class]){ $sql=execute_query("select id,title,dir from ${admin_id}_php_visual_board_board order by ord DESC"); while(list($id,$title,$dir)=mysql_fetch_array($sql)){ if(!in_array($dir,$class)){ $class[]=$dir; } $main[]=array($id,$title,$dir); } }else{ $class=explode("<>",$_COOKIE[bbs_class]); $mainx=explode("%",$_COOKIE[bbs_main]); foreach($mainx as $mainx) $main[]=explode("<>",$mainx); } foreach($class as $class){ foreach($main as $main2){ list($id,$title,$dir)=$main2; if($id==$_GET[id]) $s="selected"; else $s=""; if($dir==$class){ include"../$template/jump.php"; } } } include"sub2/$_GET[id].php"; include"../$template/class.php"; } if($_GET[id]) include"sub2/$_GET[id].php"; if($_COOKIE[bbs_level]<=$c_ban && !$_GET[read] && !$_GET['new']) $ban=<< HTML; include"../$template/rank.php"; function down($str){ global $template; if(preg_match("/\[down\]/",$str)) $link= preg_replace("/(.*)\[down\](.+)\[\/down\](.*)/s","\\2",$str); if($link){ $link=str_replace(".","\.",$link); $link=str_replace("/","\/",$link); $link=str_replace("?","\?",$link); $data=@file_get_contents("sub/file.php"); if(preg_match("/(.*)<$link>(.+)<$link>(.*)/",$data)){ $down=preg_replace("/(.*)<$link>(.+)<$link>(.*)/","\\2",$data); } if(!$down)$down=0; $str= preg_replace("/\[down\](.+)\[\/down\]/"," \\1     ( Hit : $down )",$str); } return $str; } function downz($str,$n){ global $template; if(preg_match("/\[down/",$str)) $link= preg_replace("/(.*)\[down$n+\](.+)\[\/down$n+\](.*)/s","\\2",$str); if($link){ $link=str_replace(".","\.",$link); $link=str_replace("/","\/",$link); $link=str_replace("?","\?",$link); $data=@file_get_contents("sub/file.php"); if(preg_match("/(.*)<$link>(.+)<$link>(.*)/",$data)){ $down=preg_replace("/(.*)<$link>(.+)<$link>(.*)/","\\2",$data); } if(!$down)$down=0; $str= preg_replace("/\[down$n+\](.+)\[\/down$n+\]/U"," \\1     ( Hit : $down )",$str); } return $str; } function auto($var){ global $subject_memo,$template,$c_link,$c_link_num; $str=$var; include"../$template/msn.php"; if($pass!=$_COOKIE[bbs_pass]) $str=preg_replace("/\[s\](.+)\[\/s\]/","",$str); include"../$template/swap.php"; include"../$template/auto.php"; if(preg_match("/(.+)\[subject_memo\]/",$str)){ $str=explode("[subject_memo]",$str); $subject_memo=$str[0]; $str=$str[1]; } if($c_link>=$_COOKIE[bbs_level]){ $str=down($str); for($n=1;$n<=$c_link_num;$n++) $str=downz($str,$n); }else{ $str=preg_replace("/\[down[0-9]*\].*\[\/down[0-9]*\]/s","**********Åv­­¤£¨¬************",$str); } $str= preg_replace("/(.+)\[subject_icon\]/","  ",$str); $str= preg_replace("/\[color=([a-z]+|#[0-9]{6})\](.+)\[\/color\]/iUs","\\2",$str); $str= preg_replace("/\[size=([0-9]{1,2})\](.+)\[\/size\]/iUs","\\2",$str); $str= preg_replace("/\[wmv\](.+)\[\/wmv\]/iUs","",$str); $str= preg_replace("/\[move\](.+)\[\/move\]/iUs","\\1",$str); $str= preg_replace("/\[fly\](.+)\[\/fly\]/iUs","\\1",$str); // ¹Ï¤ù¦Û°Ê³sµ²È¯ $photo_png_pattern = "/(mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/(.[^ \n\<\"\']+\.png)/U"; $str = preg_replace($photo_png_pattern,"",$str); // ¹Ï¤ù¦Û°Ê³sµ²È¯ $photo_bmp_pattern = "/(mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/(.[^ \n\<\"\']+\.bmp)/U"; $str = preg_replace($photo_bmp_pattern,"",$str); // ¹Ï¤ù¦Û°Ê³sµ²È¯ $photo_jpg_pattern = "/(mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/(.[^ \n\<\"\']+\.jpg)/U"; $str = preg_replace($photo_jpg_pattern,"",$str); // ¹Ï¤ù¦Û°Ê³sµ²È¯ $photo_gif_pattern = "/(mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/(.[^ \n\<\"\']+\.gif)/U"; $str = preg_replace($photo_gif_pattern,"",$str); // ºô§}¦Û°Ê³sµ² $homepage_pattern = "/
(mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/([^ \n\r\"\'<>]+)/"; $str = preg_replace($homepage_pattern,"
\\1://\\2",$str); $homepage_pattern = "/^(mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/([^ \n\r\"\'<>]+)/"; $str = preg_replace($homepage_pattern,"\\1://\\2",$str); $homepage_pattern = "/ (mms|http|HTTP|ftp|FTP|telnet|TELNET)\:\/\/([^ \n\r\"\'<>]+)/"; $str = preg_replace($homepage_pattern," \\1://\\2",$str); // ¹q¶l¦Û°Ê³sµ²È¯ $email_pattern = "/ ([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)/i"; $str = preg_replace($email_pattern," \\1@\\2\n",$str); $str=str_replace("&","&",$str); return $str; } $php_visual_board_bbs="${admin_id}_php_visual_board_bbs_$_GET[id]"; if($_COOKIE['c_lang']=='GB'){ header("content-Type: text/html; charset=gb2312"); }else{ header("content-Type: text/html; charset=big5"); } if(!extract($_GET) or $_GET[mainclass] or $_GET[author] or $_GET[keep] or $_GET[c_lang] or $_GET[bbs_template]){ if(!file_exists("create.php")){ $create=" create table ${admin_id}_php_visual_board_board( id int primary key auto_increment, title varchar(40), dir varchar(24), memo varchar(40), host text, num int, com int, last_time int, last_name varchar(24), new varchar(40), `lock` int, secret int, ord int, id2 varchar(24), sub varchar(24) ) "; $create2=" create table ${admin_id}_php_visual_board_index( id int primary key auto_increment, dir varchar(24) ) "; execute_query("$create") or die("«Ø¥ß¸ê®Æ®w-php_visual_board_board¥¢±Ñ!"); execute_query("$create2") or die("«Ø¥ß¸ê®Æ®w-php_visual_board_index¥¢±Ñ!"); fopen("create.php",w); } include"../$template/top.php"; if(!$_COOKIE[bbs_view])$_COOKIE[bbs_view]=time(); $last=date("Y-m-d H:i:s",$_COOKIE[bbs_view]); $now_time=date("H:i:s"); include"../$template/forum_head.php"; if($_COOKIE[bbs_level]<10){ $message=@file_get_contents("new/".date(d)); foreach(explode("\n",$message) as $message){ list($title,$name)=explode("<>",$message); $title=auto($title); $titlez=str_replace(" ","",strip_tags($title)); if($name==$_COOKIE[bbs_name]) $MEMO.="    $title"; } } if(!$MEMO)$MEMO="NO"; $table_name=mysql_list_tables("$db_name"); while($table=mysql_fetch_row($table_name)) if($table[0]=="${admin_id}_php_visual_board_bbs_999")$find=1; if($find){ $sql=execute_query("select id,title from ${admin_id}_php_visual_board_bbs_999 order by last_time DESC"); while(list($id,$title)=mysql_fetch_array($sql)){ $title=auto($title); $notice.=" $title                "; } } include"../$template/notice.php"; function show(){ getbbs(); $d=array(); global $class,$main,$template,$list_mode; $root=$class; foreach($root as $root){ if(!is_file("sub/$root.log")){ foreach($main as $main2){ list($id,$title,$dir,$memo,$host,$num,$com,$last_time,$last_name,$new,$lock,$secret,$id2,$sub)=$main2; @require"sub2/$id.php"; if($dir==$root && $dir){ if(!in_array($root,$d)){ $d[]=$root; include"../$template/forum_top.php"; } $new=preg_replace("/\[.+\]/","",$new); if(!$unseen){ if(date("Y-m-d")==date("Y-m-d",$last_time)) $topic="boardh"; elseif($unseen) $topic="boardx"; else $topic="board"; if($lock) $topic="boards"; $hostx=urlencode($host); if($secret){ $topic="boardx"; $host=" "; }else{ if(!$host) $host=""; else foreach(explode("\n",$host) as $var) $host.=" "; } if($last_time) $last_time=date("Y-m-d H:i:s",$last_time); if($last_name){ if(file_exists("member_icon/$id2.gif") && $id2) $last_name=""; else if($id2)$last_name="$last_name"; $to="By $last_name "; }else{ unset($to); unset($last_time); } $titlex=urlencode($title); $dirx=urlencode($dir); if($_GET[author])$author="&mybbs=$_COOKIE[bbs_name]"; if($_GET[keep])$mycache="&mycache=$_COOKIE[bbs_name]"; if($sub)$sub="&sub=$sub"; $num2=$num+1; include"../$template/forum_main.php"; } } } if(!$list_mode && $root)include"../$template/forum_bottom.php"; } } if($list_mode)include"../$template/forum_bottom.php"; } show(); function p($now){ global $now; $data=@file_get_contents("bbs_count/log.txt"); list($time,$member,$visitor,$p,$pt)=explode("%",$data); $w=fopen("bbs_count/log.txt","w"); flock($w,2); if($now>$p){ $p=$now; $pt=time(); } fputs($w,"$time%$member%$visitor%$p%$pt"); flock($w,3); fclose($w); return array($p,$pt); } if(!is_file("bbs_count/log.txt")){ $w=fopen("bbs_count/log.txt","w"); } $w=fopen("bbs_count/log.txt",r); flock($w,1); $data=@fread($w,100000); clearstatcache(); fclose($w); list($time,$member,$visitor,$p,$pt)=explode("%",$data); if($member){ if($_COOKIE[bbs_id]){ if(!@eregi("$_COOKIE[bbs_name]",$member)){ $member.="<>$_COOKIE[bbs_name]"; } } } if($visitor && !$_COOKIE[bbs_id]){ if(!@eregi("$_COOKIE[bbs_visitor]",$visitor)){ $visitor.="<>$_COOKIE[bbs_visitor]"; } } $s=gettimeofday(void); if($time){ if(($s[sec]-$time)>=30){ $time="$s[sec]"; $member=""; $visitor=""; } }else{ $time="$s[sec]"; } if(!$member && $_COOKIE[bbs_id]){ $member=$_COOKIE[bbs_name]; } if(!$visitor && !$_COOKIE[bbs_id]){ $visitor="$_COOKIE[bbs_visitor]"; } $w=fopen("bbs_count/log.txt","w"); flock($w,2); fputs($w,"$time%$member%$visitor%$p%$pt"); flock($w,3); fclose($w); $w=fopen("bbs_count/log.txt",r); flock($w,1); $data=@fread($w,100000); clearstatcache(); fclose($w); list($time,$member,$visitor,$p,$pt)=explode("%",$data); if($member){ $member=explode("<>",$member); $mnow=count($member); foreach($member as $member){ foreach(explode("<>",$manager) as $var){ foreach(explode("%",$var) as $var){ foreach(explode("\n",$var) as $var){ if($var==$member){ $check=1; break; } } } } @require"sub/dir.php"; foreach(explode("<>",$admin2) as $array){ list($d,$admin2)=explode("%%",$array); if($member==$admin2){ $admin2_check=1; break; } } if($member==$admin_name){ $job="½×¾ÂºÞ²z­û"; }elseif($member==$admin1){ $job="°ÆºÞ²z­û"; }elseif($admin2_check){ $job="¤À°Ïª©¥D"; }elseif($member==$super_manager_name){ $job="¶W¯Åª©¥D"; }elseif($check){ $job="ª©¥D"; }else{ $job="·|­û"; } $online[visitor].="$job  $member  "; } } if($visitor){ $visitor=explode("<>",$visitor); $vnow=count($visitor); foreach($visitor as $visitor) $online[visitor].="³X«È  ³X«È  "; } if(!$vnow)$vnow=0; if(!$mnow)$mnow=0; $now=$mnow+$vnow; list($p,$pt)=p($now); $pt=date("Y-m-d/H:i:s",$pt); if(date("Y-m-d")!=date("Y-m-d",$new_member_time)) $new_member="¼ÈµL"; include"../$template/forum_info.php"; }else{ if(!$_GET[quotec] && !$_GET[quote] && !$_GET[post] && !$_GET[del] && !$_GET[delc] && !$_POST[name] && !$_GET[vote] && !$_GET[ed] && !$_GET[edc] && !$_GET[add] && !$_GET[lock] && !$_GET[unlock] && !$_GET[down] && !$_GET[poll] && !$_GET[opinion]){ if($c_read<$_COOKIE[bbs_level]) error("©êºp,Åv­­¤£°÷!"); if(!$_GET[read] && !$_GET['new']){ if($c_mode!="blog") include"../$template/top.php"; else include"../$template/blog_top.php"; } if(!is_file("bbs_count/$_GET[id].txt")){ $w=fopen("bbs_count/$_GET[id].txt","w"); } $w=fopen("bbs_count/$_GET[id].txt",r); flock($w,1); $data=@fread($w,100000); clearstatcache(); fclose($w); list($time,$memberx,$visitor)=explode("%",$data); if($memberx){ if($_COOKIE[bbs_id]){ if(!@eregi("$_COOKIE[bbs_name]",$memberx)){ $memberx.="<>$_COOKIE[bbs_name]"; } } } if($visitor && !$_COOKIE[bbs_id]){ if(!@eregi("$_COOKIE[bbs_visitor]",$visitor)){ $visitor.="$_COOKIE[bbs_visitor]"; } } $s=gettimeofday(void); if($time){ if(($s[sec]-$time)>=30){ $time="$s[sec]"; $memberx=""; $visitor=""; } }else{ $time="$s[sec]"; } if(!$memberx && $_COOKIE[bbs_id]){ $memberx=$_COOKIE[bbs_name]; } if(!$visitor && !$_COOKIE[bbs_id]){ $visitor="$_COOKIE[bbs_visitor]"; } $w=fopen("bbs_count/$_GET[id].txt","w"); flock($w,2); fputs($w,"$time%$memberx%$visitor"); flock($w,3); fclose($w); $w=fopen("bbs_count/$_GET[id].txt",r); flock($w,1); $data=@fread($w,100000); clearstatcache(); fclose($w); list($time,$memberx,$visitor)=explode("%",$data); if($memberx){ $memberx=explode("<>",$memberx); $mnow=count($memberx); foreach($memberx as $memberx){ foreach(explode("<>",$manager) as $var){ foreach(explode("%",$var) as $var){ foreach(explode("\n",$var) as $var){ if($var==$memberx){ $check=1; break; } } } } @require"sub/dir.php"; foreach(explode("<>",$admin2) as $array){ list($d,$admin2)=explode("%%",$array); if($memberx==$admin2){ $admin2_check=1; break; } } if($memberx==$admin_name){ $job="½×¾ÂºÞ²z­û"; }elseif($memberx==$admin1){ $job="°ÆºÞ²z­û"; }elseif($admin2_check){ $job="¤À°Ïª©¥D"; }elseif($memberx==$super_manager_name){ $job="¶W¯Åª©¥D"; }elseif($check){ $job="ª©¥D"; }else{ $job="·|­û"; } $online[visitor].="$job  $memberx  "; } } if($visitor){ $visitor=explode("<>",$visitor); $vnow=count($visitor); foreach($visitor as $visitor) $online[visitor].="³X«È³X«È  "; } if(!$vnow)$vnow=0; if(!$mnow)$mnow=0; $now=$mnow+$vnow; if($_GET[search]){ if(!$_POST[scope])$_POST[scope]="title"; if($_GET[scope])$_POST[scope]=$_GET[scope]; if(!$_POST[key]){ $_POST[key]=str_replace("[","\[","$_GET[key]"); $_POST[key]=str_replace("]","\]","$_POST[key]"); } $search="where binary $_POST[scope] like '%$_POST[key]%'"; } if($_GET[num]==""){ if($_GET[mybbs]){$author="and name='$_GET[mybbs]'";$author2="where name='$_GET[mybbs]'";} if($_GET[mycache]){$mycache="and binary keep like'$_GET[mycache]'";$mycache2="where binary keep like'$_GET[mycache]'";} list($t)=mysql_fetch_array(execute_query("select id from $php_visual_board_bbs $search $author2 $mycache2 order by id DESC")); }else{ $t=$_GET[num]; } $_GET[page]=$_GET[page2]; if($_GET[page1]=="") $_GET[page1]=$t; if($_GET[page2]=="") $_GET[page2]=$t-($per-1); if($_GET[search]){ $search="and binary $_POST[scope] like '%$_POST[key]%'"; } $where="where id between '$_GET[page2]' and '$_GET[page1]'"; if(!$_POST[order])$_POST[order]=$_GET[order]; if(!$_POST[order2])$_POST[order2]=$_GET[order2]; if($_POST[order2]){ $DESC=$_POST[order2]; $by="$_POST[order]"; }else{ $DESC="DESC"; $by="last_time"; } if(!$_GET[read] && !$_GET['new']){ if($secret){ foreach(explode("\n",$msn) as $var) if($_COOKIE[bbs_name]==$var)$allow=1; if(!$allow)ban("Åv­­¤£¨¬"); } if($_POST[c_mode])$c_mode=$_POST[c_mode]; if($_GET[c_mode])$c_mode=$_GET[c_mode]; if(!$_GET[page_num])$_GET[page_num]=1; if($c_mode=="chat") echo" "; if($_GET[page_num]==1 or !$_GET[page_num])$n="notice DESC,"; if($visible)$v=",memo"; $s=execute_query("select id,name,icon,email,home,title,time,com,hit,cnum,vote,last_time,last_name,poll,html,`lock`,id2,id3,notice$v from $php_visual_board_bbs $where $search $author $mycache order by $n$by $DESC") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); if(!$_GET[title]){ $sql=execute_query("select DISTINCT title,dir,host,num,com from ${admin_id}_php_visual_board_board where id='$_GET[id]'"); list($title,$dir,$host,$num,$com)=mysql_fetch_array($sql); }else{ $title=urldecode($_GET[title]); $dir=urldecode($_GET[dir]); $host=urldecode($_GET[host]); $titlex=urlencode($title); $dirx=urlencode($dir); $hostx=urlencode($host); $numx=$_GET[num]; $comx=$_GET[com]; $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); $_GET[title]=urlencode($_GET[title]); } if(!$host) $com_host="©Û¸u¤¤"; else foreach(explode("\n",$host) as $var) $com_host.="$var"; if($c_mode==blog) include"../$template/blog_info.php"; else include"../$template/bbs_info.php"; if(!$_GET[page] && $c_mode!="blog") include"../$template/online.php"; if($_GET[sub]){ $sz=execute_query("select id,title,memo,host,num,com,last_time,last_name,new,`lock`,secret,id2,sub from ${admin_id}_php_visual_board_board order by ord DESC") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); while(list($id,$title,$memo,$host,$num,$com,$last_time,$last_name,$new,$lock,$secret,$id2,$sub)=@mysql_fetch_array($sz)) $sw[]=array($id,$title,$memo,$host,$num,$com,$last_time,$last_name,$new,$lock,$secret,$id2,$sub); $sub=explode("<>",$_GET[sub]); include"../$template/bbs_sub.php"; foreach($sub as $sub){ foreach($sw as $sw2){ list($id,$title,$memo,$host,$num,$com,$last_time,$last_name,$new,$lock,$secret,$id2,$subx)=$sw2; if($sub==$title){ if(date("Y-m-d")==date("Y-m-d",$last_time)) $topic="boardh"; else $topic="board"; if($lock) $topic="boards"; if($secret) $topic="boardx"; if($last_time) $last_time=date("Y-m-d H:i:s",$last_time); if($last_name){ if(file_exists("member_icon/$id2.gif") && $id2 && $last_name) $last_name=""; $to="By $last_name "; }else{ unset($to); unset($last_time); } $hostx=$host; if($subx)$subx="&sub=$subx"; if(!$host) $host=""; else foreach(explode("\n",$host) as $var) $host.=" "; if($_GET[author])$author="&mybbs=$_COOKIE[bbs_name]"; if($_GET[keep])$mycache="&mycache=$_COOKIE[bbs_name]"; $titlex=urlencode($_GET[title]); $dirx=urlencode($_GET[dir]); $hostx=urlencode($_GET[host]); include"../$template/forum_main.php"; } } } include"../$template/forum_bottom.php"; } if($c_mode==guest){ include"../$template/guest_form.php"; } if($c_mode==bbs1) include"../$template/bbs_top.php"; elseif($c_mode==diary or $c_mode==photo) include"../$template/bbs3_top.php"; elseif($c_mode!=guest) include"../$template/bbs2_top.php"; if($c_mode==blog) include"../$template/blog.php"; while(list($id,$name,$icon,$email,$home,$title,$time,$com,$hit,$cnum,$vote,$last_time,$last_name,$poll,$html,$lock,$id2,$id3,$notice,$memo)=@mysql_fetch_array($s)){ $name2=$name; if(date("Y-n-d",$time)=="$_GET[y]-$_GET[m]-$_GET[d]" or !$_GET[y]){ if(preg_match("/\[.+ [0-9]+\]/",$title))unset($memo); unset($i); unset($f); if(is_dir("sub/$time")){ $d=@opendir("sub/$time"); while($fx=readdir($d)){ if(strrchr($fx,".")==".gif")$i=1; if(strrchr($fx,".")==".zip")$f=1; } closedir($d); } if($i)$image="  ";else$image=""; if($f)$file="  ";else$file=""; $date=date("Y-m-d H:i:s",$time); unset($topic); unset($topic2); unset($topic3); unset($page); if(date("Y-m-d")==date("Y-m-d",$last_time) && $com) $topic="new"; if(date("Y-m-d")==date("Y-m-d",$time) && date("Y-m-d")==date("Y-m-d",$last_time) && $com) $topic="new2"; if($notice==1) $topic2=" ¸m³» : "; if($notice==2) $topic2=" ºëµØ : "; if($cnum>=50 && $topic!="new") $topic="hot"; if($cnum>=50 && $topic=="new") $topic="hot2"; if(!$topic) $topic="topic"; if($lock) $topic="lock"; if($poll) $topic3.=""; if(file_exists("member_icon/$id3.gif") && $id3 && $name)$name=""; else if($id3)$name="$name"; if(file_exists("member_icon/$id2.gif") && $id2 && $last_name)$last_name=""; else if($id2)$last_name="$last_name"; if($memo)$memo=auto($memo); $title=auto($title); $total=ceil($cnum/$per2); for($n=0;$n<$total;$n++){ if($n==0) $page="  <<"; $n2=$n+1; $page.="  $n2"; if($n==$total-1) $page.="  >>"; } if($page) $page="  ¤À­¶Åã¥Ü$page"; if($c_mode==bbs1) include"../$template/bbs_main.php"; elseif($c_mode==diary or $c_mode==photo) include"../$template/diary.php"; elseif($c_mode=="blog") include"../$template/blog_main.php"; else include"../$template/bbs2_main.php"; } } if($c_mode==diary or $c_mode==bbs1 or $c_mode==photo) include"../$template/bbs_button.php"; if($c_mode!="blog") jump(); } if($_GET[read] or $_GET['new']){ if($c_mode!="blog") include"../$template/top.php"; else include"../$template/blog_top.php"; if(!$_GET[title]){ $sql=execute_query("select DISTINCT title,dir,host,num,com from ${admin_id}_php_visual_board_board where id='$_GET[id]'"); list($title,$dir,$host,$num,$com)=mysql_fetch_array($sql); }else{ $title=urldecode($_GET[title]); $dir=urldecode($_GET[dir]); $host=urldecode($_GET[host]); } if(!$host) $com_host="©Û¸u¤¤"; else foreach(explode("\n",$host) as $var) $com_host.="$var"; $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); $_GET[title]=urlencode($_GET[title]); if($c_mode==blog) include"../$template/blog_info.php"; else include"../$template/bbs_info.php"; if($c_mode!="blog") include"../$template/online.php"; include"../$template/bbs_read_button.php"; if(!$_GET['new'])$w="where id=$_GET[read]";else$w="order by last_time DESC"; $s=execute_query("select id,name,icon,email,home,title,memo,time,com,`lock`,edit_time,html,poll,cnum from $php_visual_board_bbs $w") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); list($id,$name,$icon,$email,$home,$title,$memo,$time,$com,$lock,$edit_time,$html,$poll,$cnum)=mysql_fetch_array($s); $total=ceil($cnum/$per2); for($n=0;$n<$total;$n++){ if($n==0) $page="  <<"; $n2=$n+1; $page.="  $n2"; if($n==$total-1) $page.="  >>"; } echo $list_page="  ¤À­¶Åã¥Ü  ¤À­¶$page"; $time2=$time; $date=date("Y-m-d H:i:s",$time); if($_GET[q])$q_memo="[quote] $name ¦b $date ªºµoªí : $memo [/quote]"; if($id){ $hit++; strip_tags($name); strip_tags($email); strip_tags($home); strip_tags($title); $subject=auto($title); if(!$html)$memo=htmlspecialchars($memo); if(!$_GET[read])$_GET[read]=$id; if(!$_COOKIE["bbs_hit_$_GET[id]_$_GET[read]"]){ if(!$_GET['new']) $values=" update $php_visual_board_bbs set hit='$hit' where id=$_GET[read] "; else $values=" update $php_visual_board_bbs set hit='$hit' where id=$id "; execute_query("$values") or die("µLªk§ó·s¸ê®Æ®w!"); setcookie("bbs_hit_$_GET[id]_$_GET[read]","1",time()+2592000,"/bbs/$admin_id"); } $where="name='$name'"; foreach(explode("&|&",$com) as $var){ list($name2)=explode("^|^",$var); if(!strstr($where,"name='$name2'")) $where.="or name='$name2'"; } $s=execute_query("select id,name,time,sign,level,art,point,memo,dollars,job from ${admin_id}_php_visual_board_member where $where") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); while(list($id,$namex,$time,$sign,$level,$art,$point,$memox,$dollars,$job)=mysql_fetch_array($s)){ $member[$namex]=array($id,$time,$sign,$level,$art,$point,$memox,$dollars,$job); } if(!$me[$name] && $member[$name]){ list($id,$time,$sign,$level,$art,$point,$memox,$dollars,$job)=$member[$name]; @require"sub/dir.php"; foreach(explode("<>",$admin2) as $array){ list($d,$admin2)=explode("%%",$array); if($member==$admin2){ $admin2_check=1; break; } } if($name==$admin_name){ $job="½×¾ÂºÞ²z­û ½×¾ÂºÞ²z­û"; }elseif($member==$admin1){ $job="°ÆºÞ²z­û °ÆºÞ²z­û"; }elseif($admin2_check){ $job="¤À°Ïª©¥D ¤À°Ïª©¥D"; }elseif($job==1){ $job="¶W¯Åª©¥D ¶W¯Åª©¥D"; }elseif($job){ $job="ª©¥D ª©¥D"; }else{ $job="·|­û ·|­û"; } $reg_date=date("Y-m-d",$time); unset($state); $star=st($point); $dir=opendir('bbs_count'); while($file=readdir($dir)){ if(!preg_match("/^\./",$file)) if(preg_match("/$name/",file_get_contents("bbs_count/$file"))){ $state="¦b½u"; break; } } $sex=preg_replace("/.*\[sex\](.*)\[sex\].+/s","\\1",$memox); $from=preg_replace("/.+\[from\](.+)\[from\].+/s","\\1",$memox); $day=preg_replace("/.+\[day\](.+)\[day\].+/s","\\1",$memox); $month=preg_replace("/.+\[month\](.+)\[month\].+/s","\\1",$memox); $headz=preg_replace("/.+\[head\](.*)\[head\]/s","\\1",$memox); if($headz && !$fx)$head=$headz; $memoz[$name]="­Ó¤H¤¶²Ð :\n".preg_replace("/\[.+\].+\[.+\]/","",$memox); if(!$state)$state="Â÷½u"; closedir($dir); if(file_exists("./member_photo/$id.gif")) $photo=""; else $photo=""; $ms[$name]=auto($sign); if($name!=$admin_name){ if(!$level){ $level="³Ì°ª"; $top=""; } if($level==1) $top="  "; if($level==2) $top="  "; if($level==3) $top="  "; if($level==4) $top="  "; if($level==5) $top="  "; if($level==6) $top="  "; if($level==7) $top="  "; if($level==8 && $sex=="¤k") $top="  "; if($level==8 && $sex=="¨k") $top="  "; } $me[$name]="   $photo
$top  $head
 $star
  ©Ê§O : $sex
  µ¥¯Å : $level   ¿n¤À : $point
   $dollars
  ¤å³¹ : $art
  ¨­¥÷ : $job
  ª`¥U : $reg_date
  ª¬ºA : $state
  ¥Í¤é : $month ¤ë $day ¤é
  ¨Ó¦Û : $from "; } $memo=auto($memo); if(!is_file("sub/file.php"))fopen("sub/file.php",w); $d=@opendir("sub/$time2"); while($d2=@readdir($d)){ if(preg_match("/\.gif$/i",$d2)){ if($c_view>=$_COOKIE[bbs_level]) $memo.="

   "; } } @closedir($d); $dn=1; $d=@opendir("sub/$time2"); while($d2=@readdir($d)){ if(preg_match("/\.zip$/i",$d2)){ $data=@file_get_contents("sub/file.php"); $d2="$time2~$d2"; $down_num=preg_replace("/(.*)<$d2>(.+)<$d2>(.*)/","\\2",$data); if(!$down_num)$down_num=0; if($c_down>=$_COOKIE[bbs_level]) $memo.="

      ªþ¥ó¤U¸ü : $dn        ¤U¸ü¦¸¼Æ : $down_num "; $dn++; } } @closedir($d); if(!$memo)$memo="®¨®¨¸Ü ... "; $pre=$id+1; $next=$id-1; if($_GET[font_size])$memo="$memo"; $id=$_GET[read]; if(!$lock) $lock_set="Âê©w"; else $lock_set="¸ÑÂê"; list(,$poll_mode)=explode("<>",$poll); if($poll){ if($poll_mode==1){ $poll_mode="[ ³æ¿ï ]"; $mode='radio'; }else{ $poll_mode="[ ½Æ¿ï ]"; $mode='checkbox'; $choicex=1; } preg_match_all("/\[.+\](.+)\[.+\]/U",$poll,$poll); foreach($poll[1] as $poll_point){ $poll_total_point+=$poll_point; } $pl2=$poll[1]; $pl=$poll[0]; unset($poll); $n=0; foreach($pl as $poll2){ if($poll_total_point) $pt=$pl2[$n]/$poll_total_point*100; $poll_item=preg_replace("/\[(.+)\].+\[.+\]/U",'\\1',$poll2); if(!$choicex)$choice="choice";else$choice="choice_$n"; if(!$_COOKIE["bbs_choice_$_GET[id]_$_GET[read]"]){ $choice_box=""; $box=1; } $ptx=$pt-20; if(!$pl2[$n])$pl2[$n]=0; $poll_menu.="   $choice_box  $poll_item      $pl2[$n]    ( $pt% )"; $n++; } if($box) $poll_box=" "; else $poll_box=" §ë²¼¦¸¼Æ : $poll_total_point "; } if(!$poll_mode) $sub="ÃD¥Ø"; else $sub="§ë²¼"; if(!$_GET[read]) $_GET[read]=$id; if($_COOKIE[bbs_jobx]==1 or $_COOKIE[bbs_name]==$admin_name) if($id3 && $name!=$_COOKIE[bbs_name]) $add=<< HTML; if($_COOKIE[bbs_name]!=$name or $_COOKIE["bbs_paid_$_GET[read]"]){ if(!$_GET[read])$_GET[read]=$idzx; if(strstr($title,"µ¹«ü©w·|­û")){ $give=explode(" ",$title); if($_COOKIE[bbs_name]!=$give[1]) ban("¥u¦³ $give[1] ¤~¥i¥HÆ[¬Ý"); } if(strstr($title,"»Ýªþ¿n¤À")){ $ban_points=preg_replace("/.*\[»Ýªþ¿n¤À (\d+)\].*/","\\1",$title); if(!$_GET[paid]) $memo="

»Ýªþ¿n¤À : $ban_points
«ö¦¹Ä~Äò
"; else{ list($point)=mysql_fetch_array(execute_query("select point from ${admin_id}_php_visual_board_member where name='$_COOKIE[bbs_name]'")); if($point<$ban_points) ban("¨S¦³¨¬°÷ªº¿n¤À"); $point-=$ban_points; execute_query("update ${admin_id}_php_visual_board_member set point=$point where name='$_COOKIE[bbs_name]'") or die("µLªk¼g¤J¸ê®Æ®w!"); list($point)=mysql_fetch_array(execute_query("select point from ${admin_id}_php_visual_board_member where name='$name'")); $point+=$ban_points; execute_query("update ${admin_id}_php_visual_board_member set point=$point where name='$name'") or die("µLªk¼g¤J¸ê®Æ®w!"); setcookie("bbs_paid_$_GET[read]",1,time()+2592000,"/bbs/$admin_id"); } } if(strstr($title,"©Ò»Ý¿n¤À")){ $ban_point=preg_replace("/.*\[©Ò»Ý¿n¤À (\d+)].*/","\\1",$title); if($_COOKIE[bbs_point]<$ban_point) ban("Åv­­¤£¨¬"); } if(strstr($title,"»Ýªþª÷¹ô")){ $ban_dollars=preg_replace("/.*\[»Ýªþª÷¹ô (\d+)\].*/","\\1",$title); if(!$_GET[paid]) $memo="
»Ýªþª÷¹ô : $ban_dollars
«ö¦¹Ä~Äò
"; else{ list($dollars)=mysql_fetch_array(execute_query("select dollars from ${admin_id}_php_visual_board_member where name='$_COOKIE[bbs_name]'")); if($dollars<$ban_dollars) ban("¨S¦³¨¬°÷ªºª÷¹ô"); $dollars-=$ban_dollars; execute_query("update ${admin_id}_php_visual_board_member set dollars=$dollars where name='$_COOKIE[bbs_name]'") or die("µLªk¼g¤J¸ê®Æ®w!"); list($dollars)=mysql_fetch_array(execute_query("select dollars from ${admin_id}_php_visual_board_member where name='$name'")); $dollars+=$ban_dollars; execute_query("update ${admin_id}_php_visual_board_member set dollars=$dollars where name='$name'") or die("µLªk¼g¤J¸ê®Æ®w!"); setcookie("bbs_paid_$_GET[read]",1,time()+2592000,"/bbs/$admin_id"); } } if(strstr($title,"µ¥¯Å")){ $ban_level=preg_replace("/.*\[©Ò»Ýµ¥¯Å 1].*/","1",$title); $ban_level=preg_replace("/.*\[©Ò»Ýµ¥¯Å (\d+) - 1].*/","\\1",$ban_level); if($_COOKIE[bbs_level]>$ban_level) ban("Åv­­¤£¨¬"); } } if(!$_COOKIE["bbs_act_$_GET[id]"] && strstr($memo,"[comment]")) $memo=preg_replace("/\[comment\].+\[\/comment\]/s","********¦^´_«á¤~¥i¥HÆ[¬Ý********",$memo); if($edit_time) $edit_time=date("Y-m-d H:i:s",$edit_time); $sign=$ms[$name]; include"../$template/bbs_read.php"; if($com){ if(!$_GET[com_page]) include"../$template/bbs_back2.php"; $no=0; $cp=$_GET[com_page]*$per2; $com=explode("&|&",$com); for(;$cp<$_GET[com_page]*$per2+$per2;$cp++){ $nc=$cp+1; if(!$com[$cp])break; list($name,$pass,$icon,$email,$home,$title,$memo,$time,$html)=explode("^|^",$com[$cp]); $date=date("Y-m-d H:i:s",$time); if($_GET["nc_$nc"])$q_memo="[quote] $name ¦b $date ªºµoªí : $memo [/quote]"; if(!$html)$memo=htmlspecialchars($memo); $memo=auto($memo); $d=@opendir("sub2/$time"); while($d2=@readdir($d)){ if(preg_match("/\.gif$/i",$d2)){ if($c_view>=$_COOKIE[bbs_level]) $memo.="

   "; } } @closedir($d); $dn=1; if(!is_file("sub2/file.php"))fopen("sub2/file.php",w); $d=@opendir("sub2/$time"); while($d2=@readdir($d)){ if(preg_match("/\.zip$/i",$d2)){ $data=@file_get_contents("sub2/file.php"); $d2="$time~$d2"; $down_num=preg_replace("/(.*)<$d2>(.+)<$d2>(.*)/","\\2",$data); if(!$down_num)$down_num=0; if($c_down>=$_COOKIE[bbs_level]) $memo.="

      ªþ¥ó¤U¸ü : $dn        ¤U¸ü¦¸¼Æ : $down_num "; $dn++; } } @closedir($d); strip_tags($name); strip_tags($email); strip_tags($home); strip_tags($title); $subject=auto($title); if(!$memo)$memo="®¨®¨¸Ü ... "; if(!$me[$name]){ @require"sub/dir.php"; foreach(explode("<>",$admin2) as $array){ list($d,$admin2)=explode("%%",$array); if($member==$admin2){ $admin2_check=1; break; } } list($id,$time,$sign,$level,$art,$point,$memox,$dollars,$job)=$member[$name]; if($time){ $reg_date=date("Y-m-d",$time); $star=st($point); if($name==$admin_name){ $job="½×¾ÂºÞ²z­û ½×¾ÂºÞ²z­û"; }elseif($member==$admin1){ $job="°ÆºÞ²z­û °ÆºÞ²z­û"; }elseif($admin2_check){ $job="¤À°Ïª©¥D ¤À°Ïª©¥D"; }elseif($job==1){ $job="¶W¯Åª©¥D ¶W¯Åª©¥D"; }elseif($job){ $job="ª©¥D ª©¥D"; }else{ $job="·|­û ·|­û"; } unset($state); $dir=opendir('bbs_count'); while($file=readdir($dir)){ if(!preg_match("/^\./",$file)) if(preg_match("/$name/",file_get_contents("bbs_count/$file"))){ $state="¦b½u"; break; } } closedir($dir); $sex=preg_replace("/.*\[sex\](.*)\[sex\].+/s","\\1",$memox); $from=preg_replace("/.+\[from\](.+)\[from\].+/s","\\1",$memox); $day=preg_replace("/.+\[day\](.+)\[day\].+/s","\\1",$memox); $month=preg_replace("/.+\[month\](.+)\[month\].+/s","\\1",$memox); $headz=preg_replace("/.+\[head\](.*)\[head\]/s","\\1",$memox); $memoz[$name]="­Ó¤H¤¶²Ð :\n".preg_replace("/\[.+\].+\[.+\]/","",$memox); if($headz && !$fx)$head=$headz; if(!$state)$state="Â÷½u"; if(file_exists("./member_photo/$id.gif")) $photo=""; else $photo=""; $ms[$name]=auto($sign); if($name!=$admin_name){ if(!$level){ $level="³Ì°ª"; $top=""; } if($level==1) $top="  "; if($level==2) $top="  "; if($level==3) $top="  "; if($level==4) $top="  "; if($level==5) $top="  "; if($level==6) $top="  "; if($level==7) $top="  "; if($level==8 && $sex=="¤k") $top="  "; if($level==8 && $sex=="¨k") $top="  "; } $me[$name]="   $photo
$top   $head
  $star
  ©Ê§O : $sex
  µ¥¯Å : $level   ¿n¤À : $point
   $dollars
  ¤å³¹ : $art
  ¨­¥÷ : $job
  ª`¥U : $reg_date
  ª¬ºA : $state
  ¥Í¤é : $month ¤ë $day ¤é
  ¨Ó¦Û : $from "; } } if($_GET[font_size])$memo="$memo"; $comz=$com_page+1; $id=$_GET[read]; $sign=$ms[$name]; include"../$template/bbs_com.php"; $no++; } } include"../$template/bbs_back.php"; } echo <<"); setcookie("bbs_name",$_POST[name],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_pass",$_POST[pass],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_home",$_POST[home],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_icon",$_POST[icon],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_act_$_GET[id]","1",time()+2592000,"/bbs/$admin_id"); setcookie("bbs_art",$art,time()+2592000,"/bbs/$admin_id"); setcookie("bbs_point",$point,time()+2592000,"/bbs/$admin_id"); $n=0; while($_FILES["p_$n"][name]){ @mkdir("./sub2/".mktime()."",0777); move_uploaded_file($_FILES["p_$n"][tmp_name],"./sub2/".mktime()."/"."p_$n.gif"); $n++; } $n=0; while($_FILES["f_$n"][name]){ @mkdir("./sub2/".mktime()."",0777); move_uploaded_file($_FILES["f_$n"][tmp_name],"./sub2/".mktime()."/"."f_$n.zip"); $n++; } $_GET[com]++; $_GET[title]=urlencode($_GET[title]); $_GET[dir]=urlencode($_GET[dir]); $_GET[host]=urlencode($_GET[host]); if(!$_GET[guest]) header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_POST[rnum]"); else header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]"); } if($_GET[quote]){ list($title,$memo,$com)=mysql_fetch_array(execute_query("select title,memo,com from $php_visual_board_bbs where id=$_GET[quote]")); } if($_GET[ed]){ list($name,$passx,$title,$memo,$poll,$html,$time)=mysql_fetch_array(execute_query("select name,pass,title,memo,poll,html,time from $php_visual_board_bbs where id=$_GET[ed]")); foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[ed]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($passx!=$_COOKIE[bbs_pass] && !$check && $_COOKIE[bbs_pass]!=$super_manager_pass && $_COOKIE[bbs_pass]!=$admin_pass && $_COOKIE[bbs_name]!=$admin1 && $_COOKIE[bbs_name]!=$admin2) error("±K½X¤£¥¿½T,½Ð­«·sµn¿ý!"); } if($_GET[quotec]){ list($title,$memo,$com)=mysql_fetch_array(execute_query("select title,memo,com from $php_visual_board_bbs where id=$_GET[quotec]")); } if($_GET[edc]){ list($pass,$title,$memo,$coms)=mysql_fetch_array(execute_query("select pass,title,memo,com from $php_visual_board_bbs where id=$_GET[edc]")); $com=explode("&|&",$coms); $c=$_GET[ed2]; list($name,$passx,$icon,$email,$home,$title,$memo,$time,$html)=explode("^|^",$com[$c]); foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[edc]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($passx!=$_COOKIE[bbs_pass] && !$check && $_COOKIE[bbs_pass]!=$super_manager_pass && $_COOKIE[bbs_pass]!=$admin_pass && $_COOKIE[bbs_name]!=$admin1 && $_COOKIE[bbs_name]!=$admin2) exit("±K½X¤£¥¿½T,½Ð­«·sµn¿ý!"); } if($_GET[delc]){ list($coms)=mysql_fetch_array(execute_query("select com from $php_visual_board_bbs where id=$_GET[delc]")); $com=explode("&|&",$coms); $c=$_GET[del2]; list($name,$pass,$icon,$email,$home,$title,$memo,$time)=explode("^|^",$com[$c]); foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[delc]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($pass==$_COOKIE[bbs_pass] or $check or $_COOKIE[bbs_pass]==$super_manager_pass){ $d=@opendir("sub2/$time"); while($d2=@readdir($d)){ @unlink("sub2/$time/".$d2); } @closedir($d); @rmdir("./sub2/$time"); $coms=str_replace("$com[$c]&|&","",$coms); $coms=str_replace("&|&$com[$c]","",$coms); $coms=str_replace("$com[$c]","",$coms); list($com)=mysql_fetch_array(execute_query("select cnum from $php_visual_board_bbs where id=$_GET[delc]")); $com--; execute_query("update $php_visual_board_bbs set cnum=$com where id=$_GET[delc]") or die("µLªk¼g¤J¸ê®Æ®w - $php_visual_board_bbs!"); execute_query("update $php_visual_board_bbs set com=\"$coms\" where id=$_GET[delc]") or die("µLªk§ó·s¸ê®Æ®w - $php_visual_board_bbs!"); list($com)=mysql_fetch_array(execute_query("select com from ${admin_id}_php_visual_board_board where id=$_GET[id]")); $com--; execute_query("update ${admin_id}_php_visual_board_board set com=$com where id=$_GET[id]") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_board!"); if($_COOKIE[bbs_id]){ list($art,$point)=mysql_fetch_array(execute_query("select art,point from ${admin_id}_php_visual_board_member where name='$_COOKIE[bbs_name]'")); $art--; $point--; execute_query("update ${admin_id}_php_visual_board_member set art='$art',point=$point where name='$_COOKIE[bbs_name]'") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_member!"); } setcookie("bbs_art",$art,time()+2592000,"/bbs/$admin_id"); setcookie("bbs_point",$point,time()+2592000,"/bbs/$admin_id"); include('count.php'); $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); $count3--; fputs(fopen('count.php',w),""); $_GET[com]--; header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[delc]"); }else{ error("±K½X¿ù»~!"); } } if($_GET[del]){ $s=execute_query("select pass from $php_visual_board_bbs where id=$_GET[del]") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); list($pass)=mysql_fetch_array($s); foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[del]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($pass==$_COOKIE[bbs_pass] or $check or $_COOKIE[bbs_pass]==$super_manager_pass or $_COOKIE[bbs_name]==$admin_name){ execute_query("delete from $php_visual_board_bbs where id=$_GET[del]") or die("µLªk§ó·s¸ê®Æ®w!"); list($num,$cnum)=mysql_fetch_array(execute_query("select num,com from ${admin_id}_php_visual_board_board where id=$_GET[id]")); $num--; $cnum--; $s=execute_query("select last_name,last_time,title,id2 from $php_visual_board_bbs order by id DESC") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ - $php_visual_board_bbs!"); list($namex,$timex,$titlex,$id2x)=@mysql_fetch_array($s); execute_query("update ${admin_id}_php_visual_board_board set num='$num',com='$cnum',last_time='$timex',last_name='$namex',new='$titlex',id2='$id2x' where id=$_GET[id]") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_board!"); if($_COOKIE[bbs_id]){ list($art,$point)=mysql_fetch_array(execute_query("select art,point from ${admin_id}_php_visual_board_member where name='$_COOKIE[bbs_name]'")); $art--; $point--; execute_query("update ${admin_id}_php_visual_board_member set art='$art',point='$point' where name='$_COOKIE[bbs_name]'") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_member!"); } setcookie("bbs_art",$art,time()+2592000,"/bbs/$admin_id"); setcookie("bbs_point",$point,time()+2592000,"/bbs/$admin_id"); $d=@opendir("sub/$get[date]"); while($d2=@readdir($d)){ @unlink("sub/$get[date]/".$d2); } @closedir($d); @rmdir("./sub/$get[date]"); include('count.php'); $count3--; $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); fputs(fopen('count.php',w),""); $_GET[num]--; header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$cnum"); }else{ error("±K½X¿ù»~!"); } } if($_GET[ed] && $_POST[name]){ list($pass,$title,$memo,$get[date],$com,$hit,$cnum,$vote,$last_time,$last_name,$poll)=mysql_fetch_array(execute_query("select pass,title,memo,time,com,hit,cnum,vote,last_time,last_name,poll from $php_visual_board_bbs where id=$_GET[ed]")); foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[ed]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($pass==$_COOKIE[bbs_pass] or $check or $_COOKIE[bbs_pass]==$super_manager_pass){ $n=0; for(;$n<100000;){ if($_POST["pdel_$n"]) unlink("./sub/".$get[date]."/"."p_$n.gif"); $n++; } $n=0; for(;$n<100000;){ if($_POST["fdel_$n"]) unlink("./sub/".$get[date]."/"."f_$n.zip"); $n++; } $n=0; while($_FILES["p_$n"][name]){ mkdir("./sub/$get[date]",0777); move_uploaded_file($_FILES["p_$n"][tmp_name],"./sub/".$get[date]."/"."p_$n.gif"); $n++; } $n=0; while($_FILES["f_$n"][name]){ mkdir("./sub/$get[date]",0777); move_uploaded_file($_FILES["f_$n"][tmp_name],"./sub/".$get[date]."/"."f_$n.zip"); $n++; } @rmdir("./sub/$get[date]"); if($_POST[poll] && !$_POST[poll_mode]) error("½Ð¿ï¾Ü§ë²¼Ãþ«¬!"); if($_POST[poll]){ list($a,$b)=explode("<>",$poll); $poll=$a; preg_match_all("/\[.+\](.+)\[.+\]/U",$a,$a); foreach($a[0] as $a){ $pa[]=preg_replace("/\[(.+)\].+\[.+\]/U",'\\1',$a); } $n=0; foreach(explode("
",$_POST[poll]) as $_POST[poll]){ if($pa[$n]) $poll=str_replace("[$pa[$n]]","[$_POST[poll]]",$poll); else $poll.="[$_POST[poll]]0[$_POST[poll]]"; $n++; } $poll.="<>$_POST[poll_mode]"; } $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); if($_POST[move]){ @unlink("sub/$_POST[id].php"); @unlink("sub/$_POST[move].php"); list($time,$com,$hit,$cnum,$vote,$last_time,$last_name,$id2,$id3,$keep,$edit_time)=@mysql_fetch_array(execute_query("select time,com,hit,cnum,vote,last_time,last_name,id2,id3,keep,edit_time from $php_visual_board_bbs where id=$_GET[ed]")) or die("µLªk¼g¤J¸ê®Æ®w - $php_visual_board_bbs!"); execute_query("insert into ${admin_id}_php_visual_board_bbs_$_POST[move] values('','$_POST[name]','$_POST[pass]','$_POST[icon]','$_POST[email]','$_POST[home]','$_POST[title]','$_POST[memo]','$time','$com','$hit','$cnum','$vote','$last_time','$last_name','$poll','$_POST[html]','$_POST[lock]','$id2','$_POST[notice]','$id3','$keep','$edit_time')") or die("µLªk¼g¤J¸ê®Æ®w - $php_visual_board_bbs!"); execute_query("delete from $php_visual_board_bbs where id=$_GET[ed]") or die("µLªk§ó·s¸ê®Æ®w!"); list($num,$com)=mysql_fetch_array(execute_query("select num,com from ${admin_id}_php_visual_board_board where id=$_GET[id]")); $num--; $s=execute_query("select last_name,last_time,title,id2 from $php_visual_board_bbs order by id DESC") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ - $php_visual_board_bbs!"); list($namex,$timex,$titlex,$id2x)=@mysql_fetch_array($s); $cnum1=$com-$cnum; execute_query("update ${admin_id}_php_visual_board_board set num=$num,com=$cnum1,last_time='$timex',last_name='$namex',new='$titlex',id2='$id2x' where id=$_GET[id]") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_board!"); list($num,$com)=mysql_fetch_array(execute_query("select num,com from ${admin_id}_php_visual_board_board where id=$_POST[move]")); $num++; $s=execute_query("select last_name,last_time,title,id2 from ${admin_id}_php_visual_board_bbs_$_POST[move] order by id DESC") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ - $php_visual_board_bbs!"); list($namex,$timex,$titlex,$id2x)=@mysql_fetch_array($s); $cnum2=$com+$cnum; execute_query("update ${admin_id}_php_visual_board_board set num=$num,com=$cnum2,last_time='$timex',last_name='$namex',new='$titlex',id2='$id2x' where id=$_POST[move]") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_board!"); list($t,$d,$h)=@mysql_fetch_array(execute_query("select title,dir,host from ${admin_id}_php_visual_board_board where id=$_POST[move]")); header("location:?id=$_POST[move]&new=view&num=$num&title=$t&dir=$d&host=$h&com=$cnum2"); }else{ $t=time(); execute_query("update $php_visual_board_bbs set title='$_POST[title]',memo='$_POST[memo]',html='$_POST[html]',notice='$_POST[notice]',poll='$poll',edit_time='$t' where id=$_GET[ed]") or die("µLªk§ó·s¸ê®Æ®w!"); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[ed]"); } }else{ error("±K½X¿ù»~!"); } } if($_GET[opinion]){ $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); if($_COOKIE[bbs_jobx]!=1 && $_COOKIE[bbs_level]!=1)error("Åv­­¤£¨¬°÷!"); $s=execute_query("select name from $php_visual_board_bbs where id='$_GET[read]'") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); list($name)=mysql_fetch_array($s); execute_query("update ${admin_id}_php_visual_board_member set point=point+$_GET[opinion_num] where name='$name'") or die("µLªk§ó·s¸ê®Æ®w!"); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[read]"); } if($_GET[down]){ if($c_down<$_COOKIE[bbs_level]) error("©êºp,Åv­­¤£°÷!"); if(!$_GET[sub])$_GET[sub]='sub'; $data=@file_get_contents("$_GET[sub]/file.php"); $_GET[downz]=str_replace("/","\/",$_GET[down]); $_GET[downz]=str_replace("?","\?",$_GET[downz]); if(preg_match("/<$_GET[downz]>(.+)<$_GET[downz]>/",$data)){ $replace=preg_replace("/(.*)<$_GET[downz]>(.+)<$_GET[downz]>(.*)/","\\2",$data); $replace++; fputs(fopen("$_GET[sub]/file.php",w),preg_replace("/<$_GET[downz]>.+<$_GET[downz]>/","<$_GET[down]>$replace<$_GET[down]>",$data)); }else{ fputs(fopen("$_GET[sub]/file.php",w),"$data<$_GET[down]>1<$_GET[down]>"); } if($_GET[dir]){ $_GET[down]=str_replace("~","/",$_GET[down]); header("location:$_GET[sub]/$_GET[down]"); }else{ header("location:$_GET[down]"); } } if($_GET[poll]){ if($c_poll<$_COOKIE[bbs_level]) error("©êºp,Åv­­¤£°÷!"); setcookie("bbs_choice_$_GET[id]_$_GET[poll]",1,time()+2592000,"/bbs/$admin_id"); list($poll)=mysql_fetch_array(execute_query("select poll from $php_visual_board_bbs where id=$_GET[poll]")); $poll_point=preg_replace("/(.*)\[$_POST[choice]\](.+)\[$_POST[choice]\](.*)/","\\2",$poll)+1; $poll=preg_replace("/\[$_POST[choice]\](.+)\[$_POST[choice]\]/U","[$_POST[choice]]".$poll_point."[$_POST[choice]]",$poll); $n=0; while($n<=50){ $_POST[choice]=$_POST["choice_$n"]; $poll_point=preg_replace("/(.*)\[$_POST[choice]\](.+)\[$_POST[choice]\](.*)/","\\2",$poll)+1; $poll=preg_replace("/\[$_POST[choice]\](.+)\[$_POST[choice]\]/U","[$_POST[choice]]".$poll_point."[$_POST[choice]]",$poll); $n++; } $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); execute_query("update $php_visual_board_bbs set poll='$poll' where id=$_GET[poll]") or die("µLªk§ó·s¸ê®Æ®w!"); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[poll]"); } if($_GET[vote]){ $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); if($c_vote<$_COOKIE[bbs_level]) error("©êºp,Åv­­¤£°÷!"); list($vote)=mysql_fetch_array(execute_query("select vote from $php_visual_board_bbs where id=$_GET[vote]")); $vote=$vote+1; execute_query("update $php_visual_board_bbs set vote='$vote' where id=$_GET[vote]") or die("µLªk§ó·s¸ê®Æ®w!"); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[vote]"); } if($_GET[lock]){ $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); if($c_lock<$_COOKIE[bbs_level]) error("©êºp,Åv­­¤£°÷!"); $s=execute_query("select pass from $php_visual_board_bbs where id=$_GET[lock]") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); list($pass)=mysql_fetch_array($s); if($pass!=$_COOKIE[bbs_pass] && $_COOKIE[bbs_pass]!=$super_manager_pass && $_COOKIE[bbs_pass]!=$admin_pass && $_COOKIE[bbs_name]!=$admin1 && $_COOKIE[bbs_name]!=$admin2) error("±K½X¿ù»~!"); execute_query("update $php_visual_board_bbs set `lock`='$_GET[lock]' where id=$_GET[lock]") or die("µLªk§ó·s¸ê®Æ®w!"); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[lock]"); } if($_GET[unlock]){ $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); if($c_lock<$_COOKIE[bbs_level]) error("©êºp,Åv­­¤£°÷!"); $s=execute_query("select pass from $php_visual_board_bbs where id=$_GET[unlock]") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); list($pass)=mysql_fetch_array($s); if($pass!=$_COOKIE[bbs_pass] && $_COOKIE[bbs_pass]!=$super_manager_pass && $_COOKIE[bbs_pass]!=$admin_pass && $_COOKIE[bbs_name]!=$admin1 && $_COOKIE[bbs_name]!=$admin2) error("±K½X¿ù»~!"); execute_query("update $php_visual_board_bbs set `lock`='' where id=$_GET[unlock]") or die("µLªk§ó·s¸ê®Æ®w!"); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[unlock]"); } if($_GET[edc] && $_POST[name]){ list($coms)=mysql_fetch_array(execute_query("select com from $php_visual_board_bbs where id=$_GET[edc]")); $com=explode("&|&",$coms); $ed2=$_GET[ed2]; list($name,$pass,$icon,$email,$home,$title,$memo,$get[date])=explode("^|^",$com[$ed2]); foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[edc]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($pass==$_COOKIE[bbs_pass] or $check or $_COOKIE[bbs_pass]==$super_manager_pass){ $com2="$_POST[name]^|^$_POST[pass]^|^$_POST[icon]^|^$_POST[email]^|^$_POST[home]^|^$_POST[title]^|^$_POST[memo]^|^$get[date]^|^$_POST[html]"; $coms=str_replace("$com[$ed2]","$com2",$coms); if($pass==$_COOKIE[bbs_pass] or $check){ execute_query("update $php_visual_board_bbs set com='$coms' where id=$_GET[edc]") or die("µLªk§ó·s¸ê®Æ®w!"); $n=0; for(;$n<100000;){ if($_POST["pdel_$n"]) unlink("./sub2/".$get[date]."/"."p_$n.gif"); $n++; } $n=0; for(;$n<100000;){ if($_POST["fdel_$n"]) unlink("./sub2/".$get[date]."/"."f_$n.zip"); $n++; } $n=0; while($_FILES["p_$n"][name]){ mkdir("./sub2/$get[date]",0777); move_uploaded_file($_FILES["p_$n"][tmp_name],"./sub2/".$get[date]."/"."p_$n.gif"); $n++; } $n=0; while($_FILES["f_$n"][name]){ mkdir("./sub2/$get[date]",0777); move_uploaded_file($_FILES["f_$n"][tmp_name],"./sub2/".$get[date]."/"."f_$n.zip"); $n++; } @rmdir("./sub2/$get[date]"); $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&read=$_GET[edc]"); }else{ error("±K½X¿ù»~!"); } } } if($_GET[post] && !$_POST[rnum]){ if($_GET[get]){ include"../$template/post.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; exit; } list($lock)=mysql_fetch_array(execute_query("select `lock` from ${admin_id}_php_visual_board_board where id='$_GET[id]'")); if($lock)error("¥»°Q½×°Ï¬°°ßŪ,¸T¤îµoªí¤å³¹!"); $n=0; while($_FILES["p_$n"][name]){ @mkdir("./sub/".mktime()."",0777); move_uploaded_file($_FILES["p_$n"][tmp_name],"./sub/".mktime()."/"."p_$n.gif"); $n++; } $n=0; while($_FILES["f_$n"][name]){ @mkdir("./sub/".mktime()."",0777); move_uploaded_file($_FILES["f_$n"][tmp_name],"./sub/".mktime()."/"."f_$n.zip"); $n++; } if($_COOKIE[bbs_id]) $id2="$_COOKIE[bbs_id]"; $s=execute_query("select id from $php_visual_board_bbs order by id DESC") or die("¬d¸ß¸ê®Æ®w¥¢±Ñ!"); list($id)=mysql_fetch_array($s); $p=$_POST[poll]; if($_POST[poll]){ unset($poll); foreach(explode("
",$_POST[poll]) as $_POST[poll]){ $poll.="[$_POST[poll]]0[$_POST[poll]]"; } $poll.="<>$_POST[poll_mode]"; } $first=1; foreach(explode("[next]",$_POST[memo]) as $POST){ $time=time(); if(!$first){ list(,$_POST[title],$_POST[memo])=explode("
",$POST); }else{ $_POST[memo]=$POST; unset($first); } $id++; execute_query("insert into $php_visual_board_bbs values('$id','$_POST[name]','$_POST[pass]','$_POST[icon]','$_POST[email]','$_POST[home]','$_POST[title]','$_POST[memo]','$time','','0','0','0','$time','$_POST[name]','$poll','$_POST[html]','','$id2','$_POST[notice]','$_COOKIE[bbs_id]','','')") or die("µLªk¼g¤J¸ê®Æ®w - $php_visual_board_bbs!"); } list($num)=mysql_fetch_array(execute_query("select num from ${admin_id}_php_visual_board_board where id=$_GET[id]")); $num++; execute_query("update ${admin_id}_php_visual_board_board set num=$num,last_time=$time,last_name='$_POST[name]',new='$_POST[title]',id2='$_COOKIE[bbs_id]' where id=$_GET[id]") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_board!"); if($_COOKIE[bbs_id]){ list($art,$point)=mysql_fetch_array(execute_query("select art,point from ${admin_id}_php_visual_board_member where name='$_POST[name]'")); $art++; $point++; execute_query("update ${admin_id}_php_visual_board_member set art='$art',point=$point where name='$_POST[name]'") or die("µLªk¼g¤J¸ê®Æ®w - ${admin_id}_php_visual_board_member!"); } setcookie("bbs_name",$_POST[name],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_pass",$_POST[pass],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_email",$_POST[email],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_home",$_POST[home],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_icon",$_POST[icon],time()+2592000,"/bbs/$admin_id"); setcookie("bbs_art",$art,time()+2592000,"/bbs/$admin_id"); setcookie("bbs_point",$point,time()+2592000,"/bbs/$admin_id"); include('count.php'); $count3++; fputs(fopen('count.php',w),""); $_GET[num]++; $_GET[title]=urlencode($_GET[title]); $_GET[host]=urlencode($_GET[host]); $_GET[dir]=urlencode($_GET[dir]); if(!$_GET[guest]) header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]&new=view"); else header("location:?id=$_GET[id]&num=$_GET[num]&title=$_GET[title]&dir=$_GET[dir]&host=$_GET[host]&com=$_GET[com]"); } function poster($t,$title,$memo){ if(!$_COOKIE[bbs_level])$_COOKIE[bbs_level]=10; require"sub2/$_GET[id].php"; global $html,$q_memo,$manager,$template; if($q_memo)$memo=$q_memo; if(!$_GET[read]){ if($c_post2>=$_COOKIE[bbs_level]) $ts=" "; for($n=$t;$n>=1;$n--){ if($_GET[read]==$n) $s="selected"; else $s=""; $ts.=" "; } }else{ $ts=""; } $_COOKIE[bbs_icon]=($_COOKIE[bbs_icon])?"$_COOKIE[bbs_icon]":"1"; $_Cookie[bbs_icon]=$_COOKIE[bbs_icon]; $a=($_Cookie[bbs_icon]==1)?"selected":"noselected"; $b=($_Cookie[bbs_icon]==2)?"selected":"noselected"; $c=($_Cookie[bbs_icon]==3)?"selected":"noselected"; $d=($_Cookie[bbs_icon]==4)?"selected":"noselected"; $e=($_Cookie[bbs_icon]==5)?"selected":"noselected"; $f=($_Cookie[bbs_icon]==6)?"selected":"noselected"; $g=($_Cookie[bbs_icon]==7)?"selected":"noselected"; $h=($_Cookie[bbs_icon]==8)?"selected":"noselected"; $i=($_Cookie[bbs_icon]==9)?"selected":"noselected"; if($_GET[ed]){ $values="ed=$_GET[ed]"; }elseif($_GET[edc]){ $values="edc=$_GET[edc]&ed2=$_GET[ed2]"; }else{ $values="post=go"; } if($html)$set="checked"; if($_COOKIE[bbs_name]==$admin_name) $notice='¸m³» '; foreach(explode("<>",$manager) as $var){ $var=str_replace("$_GET[id]%","",$var); foreach(explode("\n",$var) as $var){ if($var==$_COOKIE[bbs_name] && $var){ $check=1; break; } } if($check) break; } if($check or $_COOKIE[bbs_name]==$admin_name) $notice.='ºëµØ '; if(!$_GET[att])$_GET[att]=1; $add=$_GET[att]+1; if($c_mode!=guest && $c_mode!=blog){ include"../$template/bbs_form.php"; } } if(!$_GET[edc] && !$_GET[ed] && $_GET[read] && !$_GET['quote'] or $_GET['new']){ $title="Re : ".$title; unset($memo); } if($_GET['quote'] or $_GET['quotec']){ $title="Re : ".$title; $memo="[quote]".$memo."[/quote]"; } if(!$_GET[ed] && !$_GET[add] && !$_GET[edc] && !$_GET[replyc] && !$_GET[reply]){ poster($t,$title,$memo); }elseif($_GET[ed]){ if($c_edit>=$_COOKIE[bbs_level]){ if($c_mode!="blog"){ include"../$template/top.php"; include"../$template/bbs_info.php"; }else{ include"../$template/blog_top.php"; include"../$template/blog_info.php"; } include"../$template/edit.php"; } else error("©êºp,Åv­­¤£°÷!"); }elseif($_GET[edc]){ if($c_editc>=$_COOKIE[bbs_level]){ if($c_mode!="blog"){ include"../$template/top.php"; include"../$template/bbs_info.php"; }else{ include"../$template/blog_top.php"; include"../$template/blog_info.php"; } include"../$template/editc.php"; } else error("©êºp,Åv­­¤£°÷!"); }elseif($_GET[reply]){ if($c_reply>=$_COOKIE[bbs_level]){ if($c_mode!="blog"){ include"../$template/top.php"; include"../$template/bbs_info.php"; }else{ include"../$template/blog_top.php"; include"../$template/blog_info.php"; } include"../$template/reply.php"; } else error("©êºp,Åv­­¤£°÷!"); }elseif($_GET[replyc]){ if($c_reply>=$_COOKIE[bbs_level]){ if($c_mode!="blog"){ include"../$template/top.php"; include"../$template/bbs_info.php"; }else{ include"../$template/blog_top.php"; include"../$template/blog_info.php"; } include"../$template/replyc.php"; } else error("©êºp,Åv­­¤£°÷!"); }else{ if($c_com3>=$_COOKIE[bbs_level]) include"../$template/add.php"; else error("©êºp,Åv­­¤£°÷!"); } if($_GET[id] && !$_GET['new'] && !$_GET[read] && !$_GET[edc] && !$_GET[ed] && !$_GET[quote] && !$_GET[quotec] && !$_GET[add]) if($c_mode!="blog") include"../$template/bbs_folder.php"; } $exe_time2=microtime(); include"../$template/bottom.php"; $RealOutput = str_replace("","New Messages : $MEMO",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; ?>

Powered By PHP Visual Board v1.0 © 2005.. PBBS GROUP