0) && ($_POST["save"]!="") && ($_POST["rpid"]>0 ) ) { $sql=mysql_query("select * from ans_webboard where id='".$_POST["rpid"]."' and member_id='".$_SESSION[m_id]."' "); $rparr=mysql_fetch_array($sql); if($_SESSION[m_id]==$rparr[2]) { $edit=2; $imgsinf = explode("@",$rparr[8]); $imgsurl = explode("@",$rparr[7]); $oldpic= $rparr[4]; } } if($edit>0) { require_once './canvasResize/webboard.inc.php'; if(isset($_POST["iminfo1"])) { if($_FILES["file1"]["size"]<=205000 || strlen($_POST['file1_resized']) > 0) { $file1 = saveImageToWebboard('file1', date("U")); $iminfo1 = addslashes($_POST["iminfo1"]."@".$imgsinf[1]."@".$imgsinf[2]."@".$imgsinf[3]."@".$imgsinf[4]); $upimgcommand2= " imginfo='".$iminfo1."' "; if($file1!="") { @unlink("board-img/".$oldpic); $upimgcommand= " img='".$file1."' , "; } } } if(isset($_POST["iminfo2"])) { if($_FILES["file2"]["size"]<=205000 || strlen($_POST['file2_resized']) > 0) { $file1 = saveImageToWebboard('file2', date("U")+2); $iminfo1 = addslashes($imgsinf[0]."@".$_POST["iminfo2"]."@".$imgsinf[2]."@".$imgsinf[3]."@".$imgsinf[4]); $upimgcommand2= " img2='".$file1."@".$imgsurl[1]."@".$imgsurl[2]."@".$imgsurl[3]."' "; if($file1!="") { @unlink("board-img/".$imgsurl[0]); $upimgcommand= " imginfo='$iminfo1' , "; } } } if(isset($_POST["iminfo3"])) { if($_FILES["file3"]["size"]<=205000 || strlen($_POST['file3_resized']) > 0) { $file1 = saveImageToWebboard('file3', date("U")+3); $iminfo1 = addslashes($imgsinf[0]."@".$imgsinf[1]."@".$_POST["iminfo3"]."@".$imgsinf[3]."@".$imgsinf[4]); $upimgcommand2= " img2='".$imgsurl[0]."@".$file1."@".$imgsurl[2]."@".$imgsurl[3]."' "; if($file1!="") { @unlink("board-img/".$imgsurl[1]); $upimgcommand= " imginfo='$iminfo1' , "; } } } if(isset($_POST["iminfo4"])) { if($_FILES["file4"]["size"]<=205000 || strlen($_POST['file4_resized']) > 0) { $file1 = saveImageToWebboard('file4', date("U")+4); $iminfo1 = addslashes($imgsinf[0]."@".$imgsinf[1]."@".$imgsinf[2]."@".$_POST["iminfo4"]."@".$imgsinf[4]); $upimgcommand2= " img2='".$imgsurl[0]."@".$imgsurl[1]."@".$file1."@".$imgsurl[3]."' "; if($file1!="") { @unlink("board-img/".$imgsurl[2]); $upimgcommand= " imginfo='$iminfo1' , "; } } } if(isset($_POST["iminfo5"])) { if($_FILES["file5"]["size"]<=205000 || strlen($_POST['file5_resized']) > 0) { $file1 = saveImageToWebboard('file5', date("U")+5); $iminfo1 = addslashes($imgsinf[0]."@".$imgsinf[1]."@".$imgsinf[2]."@".$imgsinf[3]."@".$_POST["iminfo5"]); $upimgcommand2= " img2='".$imgsurl[0]."@".$imgsurl[1]."@".$imgsurl[2]."@".$file1."' "; if($file1!="") { @unlink("board-img/".$imgsurl[3]); $upimgcommand= " imginfo='$iminfo1' , "; } } } if($edit==1) mysql_query("update webboard set ".$upimgcommand.$upimgcommand2." where id='".$rBOARD[0]."' "); elseif($edit==2) mysql_query("update ans_webboard set ".$upimgcommand.$upimgcommand2." where id='".$_POST["rpid"]."' "); echo ""; exit; } $new_view=$rBOARD[7]+1; $upd_view=mysql_query("UPDATE webboard SET view='$new_view' WHERE id='$topic_id'") or die("ERROE $upd_view"); ?> "; $metaog=0; if($rBOARD[5]!="") { echo " "; $metaog++; } if($metaog<3) { $ogpicarr = explode("@",$rBOARD[12]); for($i=0; $i "; $metaog++; } } } if($metaog<3) { $sql = mysql_query("select img from ans_webboard where topic_id='".$rBOARD[0]."' and img!='' order by id asc limit 1"); $ogim = @mysql_result($sql,0); if($ogim) { echo " "; } } ?> current_page = 1; $this->mid_range = 7; $this->items_per_page = $this->default_ipp; $this->url_next = $this->url_next; } function paginate() { if(!is_numeric($this->items_per_page) OR $this->items_per_page <= 0) $this->items_per_page = $this->default_ipp; $this->num_pages = ceil($this->items_total/$this->items_per_page); if($this->current_page < 1 Or !is_numeric($this->current_page)) $this->current_page = 1; if($this->current_page > $this->num_pages) $this->current_page = $this->num_pages; $prev_page = $this->current_page-1; $next_page = $this->current_page+1; if($this->num_pages > 10) { $this->return .= (($this->current_page != 1 And $this->items_total >= 10)) ? "url_next.$prev_page."\">« ก่อนหน้า\n":"« ก่อนหน้า\n"; $this->start_range = $this->current_page - floor($this->mid_range/2); $this->end_range = $this->current_page + floor($this->mid_range/2); if($this->start_range <= 0) { $this->end_range += abs($this->start_range)+1; $this->start_range = 1; } if($this->end_range > $this->num_pages) { $this->start_range -= $this->end_range-$this->num_pages; $this->end_range = $this->num_pages; } $this->range = range($this->start_range,$this->end_range); for($i=1;$i<=$this->num_pages;$i++) { if($this->range[0] > 2 And $i == $this->range[0]) $this->return .= " ... "; if($i==1 Or $i==$this->num_pages Or in_array($i,$this->range)) { $this->return .= ($i == $this->current_page And $_GET['Page'] != 'All') ? "num_pages\" class=\"current\" href=\"#\">$i ":"num_pages\" href=\"".$this->url_next.$i."\">$i "; } if($this->range[$this->mid_range-1] < $this->num_pages-1 And $i == $this->range[$this->mid_range-1]) $this->return .= " ... "; } $this->return .= (($this->current_page != $this->num_pages And $this->items_total >= 10) And ($_GET['Page'] != 'All')) ? "url_next.$next_page."\">ถัดไป »\n":"ถัดไป »\n"; } else { for($i=1;$i<=$this->num_pages;$i++) { $this->return .= ($i == $this->current_page) ? "$i ":"url_next.$i."\">$i "; } } $this->low = ($this->current_page-1) * $this->items_per_page; $this->high = ($_GET['ipp'] == 'All') ? $this->items_total:($this->current_page * $this->items_per_page)-1; $this->limit = ($_GET['ipp'] == 'All') ? "":" LIMIT $this->low,$this->items_per_page"; } function display_pages() { return $this->return; } } ?>
หน้าแรก » »

"; } } ?>

".$imgsinf[0]."
"; if($_SESSION[m_id]==$rBOARD[1]) { if( ($_GET["editpic"]==1) && (!$_GET["rpid"]) ) { echo "
รูปภาพ
ข้อความใต้รูป
"; }else echo ""; if($rBOARD[5]!="") echo "แก้ไขรูป"; else echo "เพิ่มรูป"; echo "
"; } ?>

".$imgsinf[$ii]."

"; ///////////////// if($_SESSION[m_id]==$rBOARD[1]) { if( ($_GET["editpic"]==$II) && (!$_GET["rpid"]) ) { echo "
รูปภาพ
ข้อความใต้รูป
"; }else echo "แก้ไขรูป
"; } //////////////// echo "
***") ; // ข้อความที่ต้องการแทนที่คำหยาบ $sql = "select * from ban_word "; $dbquery = mysql_query($sql); $num_rows = mysql_num_rows($dbquery); $msg=stripslashes($rBOARD[4]); $i=0; while ($i < $num_rows) { $result= mysql_fetch_array($dbquery); $msg= eregi_replace ("$result[word]" ,$wordchange ,$msg ); $i++; } if($_SESSION[m_id]==$rBOARD[1]) echo "แก้ไขข้อความ

"; echo $msg ; ?>
เมื่อ โดย
อ่าน ตอบ
 
ความคิดเห็น
"; } } } ?>

".$imgsinf[0]."
"; } if($_SESSION[m_id]==$objResult[2]) { if( ($_GET["editpic"]==1) && ($_GET["rpid"]>0) && ($_GET["rpid"]==$objResult[0]) ) { echo "
รูปภาพ
ข้อความใต้รูป
"; }else echo ""; if($objResult[4]!="") echo "แก้ไขรูป"; else echo "เพิ่มรูป"; echo "
"; } ?>

"; ///////////////// if($_SESSION[m_id]==$objResult[2]) { if( ($_GET["editpic"]==$II) && ($_GET["rpid"]>0) && ($_GET["rpid"]==$objResult[0]) ) { echo "
รูปภาพ
ข้อความใต้รูป
"; }else echo "แก้ไขรูป
"; } //////////////// echo "".$imgsinf[$ii]."
***") ; // ข้อความที่ต้องการแทนที่คำหยาบ $sql = "select * from ban_word "; $dbquery = mysql_query($sql); $num_rows = mysql_num_rows($dbquery); $message=$objResult[3]; $i=0; while ($i < $num_rows) { $result= mysql_fetch_array($dbquery); $message= eregi_replace ("$result[word]" ,$wordchange ,$message ); $i++; } if($_SESSION[m_id]==$objResult[2]) echo "แก้ไขข้อความ

"; echo stripslashes($message) ; ?>
 
โดย เมื่อ ตอบกระทู้ ลบ
items_total = $Num_Rows; $pages->mid_range = 10; $pages->current_page = $Page; $pages->default_ipp = $Per_Page; $pages->url_next = $_SERVER["PHP_SELF"]."?QueryString=value&topic_id=$topic_id&cate_id=$cate_id&member_id=$member_id&Page="; $pages->paginate(); echo $pages->display_pages() ?>
700) || ( $width[1]>700) ) { if($width[0]>=$width[1]) { $dstH = (int) (($thumbwidth*$width[1])/$width[0]); $dstW = $thumbwidth; } else { $dstW = (int) (($thumbwidth*$width[0])/$width[1]); $dstH = $thumbwidth; } if(function_exists('ImageCreateFromJPEG')) makeThumb( $picture,"$folder/$picturename",$dstW,$dstH ); else copy($picture,"$folder/$picturename"); }else copy($picture,"$folder/$picturename"); } elseif( $picture_type=="image/gif" ) { $picturename = $pn.".gif"; copy($picture,"$folder/$picturename"); } return $picturename; } function makeThumb( $scrFile, $dstFile, $dstW, $dstH ) { $im = ImageCreateFromJPEG( $scrFile ); $srcW = ImageSX( $im ); $srcH = ImageSY( $im ); if(function_exists('ImageCreatetruecolor')) $ni = ImageCreatetruecolor( $dstW, $dstH ); else $ni = ImageCreate( $dstW, $dstH ); ImageCopyResized( $ni, $im, 0, 0, 0, 0, $dstW, $dstH, $srcW, $srcH ); ImageJPEG( $ni, $dstFile, 90 ); } function lendesc($dat) { $dat = strip_tags($dat); $dat = str_replace(" "," ",$dat); $dat = str_replace(" "," ",$dat); $dat = explode(" ",$dat); for($i=0; $i=160){ $data .= "."; break; } } return stripslashes($data); } ?>