//Include_once( "webboard_array.codecolor.php" ); // Default Bgcolor
$iStrID = $_GET[id];
$SQLUpdate = "Update " . _MySQLDbPrefix . "cms_news ".
"Set post_show = (post_show+1) ".
"Where news_id = " . $iStrID;
$SQL = "Select * ".
"From " . _MySQLDbPrefix . "cms_news ".
"Where news_id = " . $iStrID . " ".
" And news_status = '1' ".
_MySQLDbLockingReads;
//echo $SQL;
$SQL1 = "Select ans_description , ".
" ans_name , ans_email , ".
" ans_picture , ans_picture_align , ".
" ans_date_time ".
"From " . _MySQLDbPrefix . "news_answer ".
"Where news_id = " . $iStrID . " ".
" And ans_status = '1' ".
"Order By ans_id_pk ".
_MySQLDbLockingReads;
$Conn = MySQL_Connect( _MySQLServer , _MySQLUser , _MySQLPass ) Or Die ( _MySQLDieConn );
MySQL_Select_Db( _MySQLDb , $Conn ) Or Die ( _MySQLDieDb );
$RS = MySQL_Query( $SQLUpdate , $Conn ) Or Die ( _MySQLDieSQL . MySQL_Error() );
$RS= mysql_query($SQL);
$row = mysql_fetch_array($RS);
$news_title = $row[news_title];
$news_answer = $row[news_answer];
$news_desc = $row[news_desc ];
$news_datetime = $row[news_datetime];
$news_picture_icon = $row[news_picture_icon];
$post_show = $row[post_show];
$post_answer = $row[post_answer];
MySQL_Free_Result( $RS );
MySQL_Close( $Conn );
// Get No
$vStrNo = $iStrSymbol . Substr( "00000" . $iStrID , Strlen( "00000" . $iStrID ) - 6 , 6 );
// Get DateTime
//$vStrDateTime = "(" . ShowDateFromDatabase( $post_date_time , "DateTime" , $vStrLang ) . ")";
?>
=$news_title?>
[
= $vStrNo?>
] |
=$news_desc?>
|
//= " (เข้าดู " . $post_show . " | ตอบ " . $post_answer . ") " . $vStrDateTime . " " . $vStrIconInformDelete?>
|
|
Include_once( "get_category.id.sql.where.php" );
/*
$badfile = "../_modules/rudeword.txt";
$baddata = fopen($badfile,"r") ;
$wordban = fgets($baddata,filesize($badfile)) ;
fclose($baddata);
$wb = explode("|",$wordban);
*/
if($news_answer=="Y")
{
$SQL1 = "Select ans_description , ".
" ans_name , ans_email , ".
" ans_date_time,username ".
"From " . _MySQLDbPrefix . "cms_news_answer ".
"Where post_id_pk = " . $iStrID . " ".
" And ans_status = '1' And is_active is NULL ".
"Order By ans_id_pk ".
_MySQLDbLockingReads;
//echo $SQL1;
$Conn = MySQL_Connect( _MySQLServer , _MySQLUser , _MySQLPass ) Or Die ( _MySQLDieConn );
MySQL_Select_Db( _MySQLDb , $Conn ) Or Die ( _MySQLDieDb );
$RS= mysql_query($SQL1);
while($row = mysql_fetch_array($RS)){
$post_description = $row[ans_description];
/*for($i=0;$i 0){
$rowm = mysql_fetch_array($RSm);
$impictureb = $rowm[imemberpicture];
MySQL_Free_Result( $RSm );
}else{
$impictureb = "";
}
// Get No
$vStrNo = $iStrSymbol . Substr( "00000" . $iStrID , Strlen( "00000" . $iStrID ) - 6 , 6 );
// Get Email
$vStrEmail = "";
If ( ! Is_Null( $post_email ) ) {
$post_email = Trim( $post_email );
$vStrEmail = "" . $post_name . "";
}else{
$vStrEmail=$post_name;
}
// End
// Get DateTime
//$vStrDateTime = "(" . ShowDateFromDatabase( $post_date_time , "DateTime" , $vStrLang ) . ")";
// Get Icon Inform Delete
$vStrQryInformDelete = "inform.delete.php?cat=" . $iStrCat . "&id=" . $iStrID . "&symbol=" . $iStrSymbol . "&title=" . $post_title;
$vStrIconInformDelete = " ";
// End
?>
ความคิดเห็น |
=$vStrEmail?>
if( $impictureb != ""){ ?>
$size = getimagesize("http://www.tarad.com/_tarad/img-lib/impicture/".$impictureb);
$h = $size[1];
$nw= 80;
$w = $size[0];
$nh = ($nw*$h)/$w;
?>
echo $post_date_time ;//. " " . $vStrIconInformDelete?>
}?>
|
= $vStrPicture . str_replace(" "," ",str_replace("\n"," ",$post_description)) ?>
|
}///end while
MySQL_Close( $Connm );
MySQL_Free_Result( $RS );
MySQL_Close( $Conn );
?>
|