include("myadmins/class/class.mysql.php"); include("myadmins/include/inc_page.php"); $objSelect= new mysql(); $objLimit= new mysql(); $objCount= new mysql(); $objSort= new mysql(); $perpageCate=10; if($_GET['pageCate']!=""){$pageNumCate=$_GET['pageCate'];}else{$pageNumCate=1;} $condition.=" cate_status='Online'"; //----count page $numrows=$objCount->countRecord('tblmanagement_cate','cate_id',$condition); $arrPageCate=fncPage($numrows,$perpageCate,$pageNumCate); //-----query data $sort=$objSort->sortRecord('tblmanagement_cate','cate','cate_topic',$condition); $limit= " Limit ".$arrPageCate[2].", ".$perpageCate.""; $result=$objLimit->limitRecord('tblmanagement_cate',$condition,$limit,$sort); if($num=mysql_num_rows($result)){ $p=0; while($row=mysql_fetch_array($result)){ $cate_id[$p]=$row['cate_id']; $cate_topic[$p]=$row['cate_name']; $p++; } } if($_GET['cateID']!=""){$cateID=$_GET['cateID'];}else{$cateID=$cate_id[0];} $topicID=$_GET['topicID']; //----query data default $condition=" cate_id='".$cateID."'"; //---------------------------home photo------------------- $rsDataD=$objSelect->selectRecord('tblmanagement_cate',$condition,''); $rowD=mysql_fetch_array($rsDataD); //----query topic detail $condition=" topic_id='".$topicID."'"; $condition.=" and topic_status='Online'"; //---------------------------home photo------------------- $rsData=$objSelect->selectRecord('tblmanagement_topic',$condition,''); $row=mysql_fetch_array($rsData); if($row['topic_cover_re']!=""){ $facebook_image='imgadmins/management_cover/'.$row['topic_cover_re']; }else{ $facebook_image='imgadmins/comming/191x102.gif'; } $link_like=$_SERVER['PHP_SELF'].'?topicID='.$topicID;//'http://www.thailandtourismcouncil.org/home.php'; $link_share=$_SERVER['PHP_SELF'].'?topicID='.$topicID;//'http://www.thailandtourismcouncil.org/home.php'; ?>