'; exit(); //-----------------------------*/ function commentList(){ $sql="select * from bhr_comment where article_id='$_GET[id]' and status='1'"; //$result=mysql_query("SET NAMES UTF8"); if(!$result=mysql_query($sql)){ echo "Error:".$sql; } /*while($row=mysql_fetch_array($result)){ echo $row["comment"]; }*/ return $result; } //----------------------------------------------*/ function insComment(){ $date_add=date("d-m-Y"); $sql="insert into bhr_comment(name,comment,article_id,date_add)values('$_POST[name]','$_POST[comment]','$_POST[article_id]','$date_add')"; //$result=mysql_query("SET NAMES UTF8"); if(!$result=mysql_query($sql)){ echo "Error:".$sql; } return $result; } //----------------------------------------------*/ if($_POST["article_id"]){ insComment(); echo ""; } //-----------------------------------------------*/ /*function getPageContenlera($table_contentrela,$table_content,$datenow,$limit){ $sql="select $table_contentrela.*, $table_content.* from $table_content "; $sql.=" INNER JOIN $table_contentrela ON ($table_contentrela.conid = $table_content.id) "; $sql.=" where $table_content.online='y' and $table_content.startdate<='$datenow' and $table_content.enddate>='$datenow' and $table_content.mains='y' "; echo $sql; if($catsubid!=""){ $sql.=" and $table_contentrela.catsubid='$catsubid'"; } if($catsubid1!=""){ $sql.=" and $table_contentrela.catsubid1='$catsubid1'"; } $sql.=" group by $table_content.id ORDER BY $table_content.id desc "; if(!$result=mysql_query($sql)){ echo "Error:".$sql; } $total=mysql_num_rows($result); printf("?????????????? %d ?????? / ",$total); printf("????????? $limit ??????
",$totalp); /* ?????????? */ //$page = ceil($total/$limit); //echo $page; // ??? record ?????? ??????? ???????????????????????? /* ???????? ???? ?????????? ??????? ???? ??????????????? 3 ?????????????? 1 2 3 */ /*for($i=1;$i<=$page;$i++){ if($_GET['page']==$i){ //???????? page ?? ??? ??????????? echo "[$i]"; //????? ??????? ?????????? 1 }else{ echo "[$i]"; //????? ??????? ?????????? 2 } } return $result; } //-----------------------------------------------*/ $check=commentList(); $total=mysql_num_rows($check); ?> ?????????????????????? BANGKOK HEALTH RESEARCH CENTER BANGKOK HOSPITAL GROUP