$sqlt="select * from wb_topic where id=".$ids;
$resultt = @mysql_query($sqlt);
$rowt= @mysql_fetch_array($resultt);
$numread=$rowt["countread"]+1;
$sql="update wb_topic set countread=$numread ";
$sql=$sql." where id=$ids";
@@mysql_query($sql);
$strurlyoutube=str_replace("watch?v=","v/",$rowt["urlyoutube"]);
?>
หัวข้อ :
โดย :
if($rowt["nameuser"]!=""){?>
IP:
?>
}?>
|
|
|
$sql="select * from wb_answer where idtopic=".$ids;
$Per_Page =100;
if(!$Page)
$Page=1;
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$result = @mysql_query($sql);
$Page_start = ($Per_Page*$Page)-$Per_Page;
$Num_Rows = @mysql_num_rows($result);
$Numalll = @mysql_num_rows($result);
if($Num_Rows<=$Per_Page)
$Num_Pages =1;
else if(($Num_Rows % $Per_Page)==0)
$Num_Pages =($Num_Rows/$Per_Page) ;
else
$Num_Pages =($Num_Rows/$Per_Page) +1;
$Num_Pages = (int)$Num_Pages;
if(($Page>$Num_Pages) || ($Page<0))
print "จำนวน $Page มากกว่า $Num_Pages ยังไม่มีข้อความ";
$sql .= " Order by id LIMIT $Page_start , $Per_Page";
$result = @mysql_query($sql);
if($Page!="" && $Page!="1")
{
$loopon=$Per_Page*($Page-1);
}
else
{
$loopon=0;
}
While($row= @mysql_fetch_array($result)){
$loopon=$loopon+1;
$contents = $row["content"];
$datecreates = $row["datecreate"];
$pic = $row["pic"];
$strurlyoutube2=str_replace("watch?v=","v/",$row["urlyoutube"]);
$ysd=substr($datecreates,0,4);
$msd=substr($datecreates,5,2);
$dsd=substr($datecreates,8,2);
$tms=substr($datecreates,11,8);
$showdates=$dsd.'/'.$msd.'/'.($ysd+543)." ".$tms;
?>
ความคิดเห็นที่
if($_SESSION["permisssionmembersnaresphotography"]=="1"){?>
}?>
จากคุณ :
// echo ' ';
// print_r($user_info['groups']);
//echo ' ';
//echo $user_info['groups'][0];
?>
- [
] if($row["nameuser"]!=""){?> IP: }?>
|
|
}?>
if($Num_Pages>1)
{
if($Prev_Page)
{
echo " ‹ หน้าแรก";
echo " ‹";
}
else
{
echo " ‹ หน้าแรก";
echo " ‹";
}
$chumpages=$Page-5;
if($chumpages>0)
{
$iloop=$chumpages;
}
else
{
$iloop=1;
}
$endpages=$Page+5;
if($endpages>$Num_Pages)
{
$endpages=$Num_Pages;
}
for($i=$iloop; $i<=$endpages; $i++){
if($i != $Page)
{
echo " $i";
}
else
{
echo " $i";
}
}
if($Page!=$Num_Pages)
{
echo " ›";
echo " หน้าสุดท้าย ›";
}
else
{
echo " ›";
echo "หน้าสุดท้าย ›";
}
}
?> |
if($_SESSION["usermemsnaresphotography"]!="" && $ids!=""){?>
}
?>
|
|
|