getglobal(); $this->checksess(); $this->isconnect(); $print=""; $edit=""; $border=""; $this->idpage = $idpage; $upfile=1; if($iscon["uppic"] > 1){ if(!$iscon["admin"]) $upfile=""; } if($iscon["user"]){ $and = " and _userid='".$iscon["iduser"]."'"; }elseif($iscon["admin"]){ $and = ""; }else{ refback($iscon["lang"][112]); } $topic = ""; $detail = ""; switch($req){ case"1"; $tbquery = "select * from _infoboardq where _cid='".$cid."' ".$and.""; $query=mysql_db_query($this->dbname, $tbquery); if($result = @mysql_fetch_array($query)){ $qid = $result["_cid"]; $cat = $result["_cat"]; $topic = $result["_topic"]; $detail = $result["_detail"]; $code = $result["_code"]; $pic = $result["_pic"]; $ext = $result["_ext"]; $picformat = $result["_picformat"]; $activeimg = $result["_activeimg"]; $target=1; $edit = true; } break; case"2"; $tbquery = "select * from _infoboarda where _cid='".$cid."' ".$and.""; $query=mysql_db_query($this->dbname, $tbquery); if($result = @mysql_fetch_array($query)){ $qid = $result["_qid"]; $cat = $result["_cat"]; $detail = $result["_detail"]; $code = $result["_code"]; $pic = $result["_pic"]; $ext = $result["_ext"]; $picformat = $result["_picformat"]; $activeimg = $result["_activeimg"]; $target=2; $edit = true; } break; case"3"; $tbquery = "select * from _infoboardi where _cid='".$cid."' and _target='1' ".$and.""; $query=mysql_db_query($this->dbname, $tbquery); if($result = @mysql_fetch_array($query)){ $qid = $result["_qid"]; $cat = $result["_cat"]; $detail = $result["_detail"]; $code = $result["_code"]; $pic = $result["_pic"]; $ext = $result["_ext"]; $picformat = $result["_picformat"]; $activeimg = $result["_activeimg"]; $target=3; $edit = true; } break; case"4"; $tbquery = "select * from _infoboardi where _cid='".$cid."' and _target='2' ".$and.""; $query=mysql_db_query($this->dbname, $tbquery); if($result = @mysql_fetch_array($query)){ $qid = $result["_qid"]; $cat = $result["_cat"]; $detail = $result["_detail"]; $code = $result["_code"]; $pic = $result["_pic"]; $ext = $result["_ext"]; $picformat = $result["_picformat"]; $activeimg = $result["_activeimg"]; $target=3; $edit = true; } break; default; } if(!$edit){ refback($iscon["lang"][123]); } $disabled = " disabled=\"disabled\" "; $cssclass1 = "textdisabled1"; $cssclass2 = "textdisabled2"; $disabled1 = $disabled; $disabled2 = $disabled; $class1=$cssclass2; $class2=$cssclass2; $print =" "; $print.= "\n"; $print.= "
"; if($req == 1){ $print.= "
".$iscon["lang"][124]."
\n"; $print.= "\n"; } $print.= "\n"; $print.= "\n"; $print.= "
 
"; $print.= "\n"; $print.= "
INFOBOARD 8+
\n"; $print.= "
\n"; if($code){ $file="./data/code/".$target."-".$cid.".code"; if(file_exists($file)){ $inputtextarea = "inputcode"; }else{ $inputtextarea = "previewcode"; } $code = stripslashes($code); $print.= "
[".$iscon["lang"][35]."]
\n"; $print.= "\n"; } $format = 1; $impath="./data/pic/"; if($pic){ if($upfile){ if($picformat == 1){ if(file_exists($impath.$pic.".".$ext)){ $print.= $this->showimg($impath, $pic, $ext, $picformat, "100", "", $activeimg, $iscon["checkpic"], ""); } $print.= "\n\n"; $format = 1; }else{ for($i = 2; $i<=9; $i++){ $file=$impath.$pic."-".$i.".".$ext; if(file_exists($file)) $print.= "
\n"; $print.= "\n"; } $format = 2; } } } $print.= "
 
\n"; $print.= "

\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "idpage."\" />\n"; $print.= "

\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.= "
"; return $print; } function switchform($qid, $aid, $page, $color, $req, $pnext){ global $iscon; if($iscon["boardinfo"] > 0) return; $print=""; $this->getglobal(); $this->checksess(); $this->isconnect(); if(!$this->gid) return; if(!$req) return; $captcha =numcaptcha(); $disabled = " disabled=\"disabled\" "; $cssclass1 = "textdisabled1"; $cssclass2 = "textdisabled2"; $postlevel=1; $msg=""; if($iscon["user"]){ $imguser = "./_img/icon/user.png"; if($read = $this->isread("./data/user/banner/".$iscon["user"].".ext.dat")){ $ex = explode("%", $read); $ext = $ex[0]; if(file_exists("./data/user/".$iscon["user"].".".$ext)) $imguser = "./data/user/".$iscon["user"].".".$ext; } $inputname=" \n"; $inputname.= "".$iscon["user"]."\n\n"; $captcharesult = $captcha[1]; $namejava = " ".$iscon["user"].""; }elseif($iscon["admin"]){ $aimg ="./_img/icon/admin.png"; $aext = $this->isread("./data/admin/".$iscon["admin"].".ext.dat"); if($aext){ if(file_exists("./data/admin/".$iscon["admin"].".".$aext)) $aimg = "./data/admin/".$iscon["admin"].".".$aext; } $inputname=" \n"; $inputname.= "".$iscon["admin"]."\n\n"; $captcharesult = $captcha[1]; $namejava = " ".$iscon["admin"].""; }else{ $inputname= "\n"; $captcharesult = ""; $namejava = ""; } switch($req){ case"1"; $disabled1 = ""; if($iscon["idadmin"]) $disabled2 = ""; else $disabled2 = $disabled; $class1=$cssclass1; if($iscon["idadmin"]) $class2=$cssclass1; else $class2=$cssclass2; $onsubmit = "submitQ"; $hidden = "boardq"; if(!$color) $color="FF6600"; $print.= $this->submitQ($captcha, $namejava); break; case"2"; if(!$qid) return; if(!$page) return; if($msg = $this->checklevelform($iscon["alevel"])){ $postlevel=""; } $disabled1 = ""; $disabled2 = $disabled; $class1=$cssclass1; $class2=$cssclass2; $onsubmit = "submitA"; $hidden = "boarda"; if(!$color) $color="CCCCCC"; $print.= $this->submitA($captcha, $namejava); break; case"3"; if(!$qid) return; if(!$page) return; if($msg = $this->checklevelform($iscon["alevel"])){ $postlevel=""; } $disabled1 = $disabled; $disabled2 = $disabled; $class1=$cssclass2; $class2=$cssclass2; $onsubmit = "submitA"; $hidden = "boardi"; if(!$color) $color="CCCCCC"; $print.= $this->submitA($captcha, $namejava); break; case"4"; if(!$aid) return; $qid = $this->fieldselect("_infoboarda", "_qid", "_cid", $aid); if(!$page) return; if($msg = $this->checklevelform($iscon["alevel"])){ $postlevel=""; } $disabled1 = $disabled; $disabled2 = $disabled; $class1=$cssclass2; $class2=$cssclass2; $onsubmit = "submitA"; $hidden = "boardi"; if(!$color) $color="CCCCCC"; $print.= $this->submitA($captcha, $namejava); break; default; return; } $print.= "\n"; $print.= $this->isread("./data/topform.txt"); $print.= "
"; $print.= $this->isread("./data/input1.txt"); if($req == "1"){ $print.= "
".$iscon["lang"][124]."
\n"; $print.= "\n"; } $print.= $this->isread("./data/input2.txt"); $print.= "
".$inputname; $print.= $this->taboption($color, $class1, $class2, $disabled1, $disabled2); $print.= "\n"; $print.= "\n"; $print.= "
"; if($iscon["form_code"]){ $print.= "[".$iscon["lang"][35]."] "; $print.= "    [".$iscon["lang"][36]."]"; }else{ $print.= " "; } $print.= "
"; $print.= "\n"; $print.= "\n"; $print.= "
\n"; $print.= $this->isread("./data/input3.txt"); $print.= $this->tabcaptcha($captcha, $captcharesult); $print.= $this->isread("./data/input4.txt"); if($req == "1"){ $print.= "
".$iscon["lang"][8]."
\n"; $print.= "\n"; $print.= "
 
\n"; $print.= "
\n"; }else{ $print.= "
 
\n"; $print.= "

\n"; $print.= $msg; if($postlevel){ $print.= "gid."\" />\n"; $print.= "\n"; if(($req == "3") || ($req == "4")){ $print.= "\n"; } } $print.= "

\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; $print.="\n"; } $print.= $this->isread("./data/input5.txt"); $print.= "
\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= "\n"; $print.= ""; $print.= $this->isread("./data/buttomform.txt"); return $print; } function icontextbox($string, $count){ global $iscon; for($i=1; $i<=$count;$i++){ $string= eregi_replace ( "", "" , $string); } return $string; } function selectedgroup(){ global $iscon; $print=""; if($data = $this->quegroup()){ if($this->gid){ for($i =0; $igid == $data[0][$i]){ $print.= "\n"; }else{ $print.= "\n"; } } }else{ for($i =0; $i".$data[1][$i]."\n"; } } } return $print; } function tabcaptcha($captcha, $captcharesult){ global $iscon; $print =""; $print.= "
captcha
\n"; $print.= "\n"; return $print; } function taboption($color, $class1, $class2, $disabled1, $disabled2){ global $iscon; $iscon["tabform"] = array($iscon["lang"][30], $iscon["lang"][26], $iscon["lang"][28], $iscon["lang"][29]); $print =""; $print.= "

"; $print.= "
\n"; $print.= "\n"; $print.= "
\n"; $print.= "
 
\n"; $print.= "
\n"; $print.= "
\n"; $print.= "\n"; $print.= "\n"; $print.= "
\n"; $print.= "
\n"; if($iscon["form_album"]){ $print.= "\n"; for($i = 2; $i<=5; $i++){ $print.= "\n"; } $print.= "
\n"; for($i = 6; $i<=9; $i++){ $print.= "\n"; } $print.= "
\n"; $print.= "
Add Picture\n"; } //form_album $print.= "
\n"; $print.= "
 
\n"; $print.= "
\n"; $print.= "
\n"; $print.= "\n"; $print.= "
 
\n"; $print.= "
\n"; $print.= "
\n"; $print.= "\n"; $print.= "".$iscon["lang"][20]."\n"; $print.= " ".$iscon["lang"][32]." \n"; $print.= " ".$iscon["lang"][33]." \n"; $print.= " ".$iscon["lang"][34]." \n"; $print.= "\n"; $print.= "\n"; $print.= "
 
\n"; $print.= "
\n"; $print.= "
\n"; $print.= "
\n"; $print.= "
[".$iscon["lang"][35]."] "; $print.= "    [".$iscon["lang"][36]."]
\n"; $print.= "
\n"; $print.= "
Show Code Example : "; $print.= "\"\"
\n"; $print.= "
\n"; $print.= "
\n"; $print.= "
VDO Code Example : "; $print.= "\"\"
\n"; $print.= "
 
\n"; $print.= "
\n"; return $print; } function submitQ($captcha, $namejava){ global $iscon; $print =" "; return $print; } function submitA($captcha, $namejava){ global $iscon; $print =" "; return $print; } } ?>