2)$se_pic.=$row['gp']."','";//$picall[$row['gp']]=$row['mm'];
}
$result = mysql_db_query($dbname,"SELECT * FROM homepage");
if(mysql_num_rows($result)>0){
$row = mysql_fetch_array($result);
$sms=$row[sms];
$flashnews=$row[flashnews];
$logoindex=$row[logo];
$bannerindex=$row[banner];
$bgindex=$row[bgbody];
$bgbottom=$row[bgfoot];
$animation=$row[animate];
}
$strSQL = "SELECT * FROM content where no NOT IN(".$se_pic."') and group_id<3 ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 12; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"]){$Page=1;}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
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;}
$strSQL .=" order by no desc LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
?>
if(mysql_num_rows($objQuery)>0){$i=0;
while($objResult = mysql_fetch_array($objQuery)){
$i++; $in++;
$no=$objResult[no];
$open=$objResult[open];
$titles=iconv("tis-620","utf-8",$objResult[titles]);
$contentdata=substr($objResult[contents],0,300);
$picnews=$objResult[picnews];
$detail=html2txt($contentdata); $detail=str_replace(" ","",$detail);
$detail= trim($detail);
$detail= substr($detail,0,100);
$contentdata=substr($objResult[contents],0,300);
$picnews=$objResult[picnews];
$senddate= myDateToThaihomchoo($objResult[date_news]);
$detail=html2txt($contentdata);
$detail=str_replace(" ","",$detail);
$detail= trim($detail);
$detail= substr($detail,0,100);
$detail=iconv("tis-620","utf-8",$detail);
// if( $in==1)echo"
"; background-image:url(\"getimg.php?per=1.2&img=$imx\");
if( $in==1)echo" ";
echo" ";
echo "
";
echo" $titles ";
echo " [ เมื่อ: ".$senddate."] อ่าน: $open ";
if( $in==3){echo" "; $in=0;}
/*
$i++;
$no=$objResult[no];
$open=$objResult[open];
$titles=$objResult[titles];
$contentdata=substr($objResult[contents],0,300);
$picnews=$objResult[picnews];
$senddate= myDateToThai($objResult[date_news]);
$detail=html2txt($contentdata);
$detail=str_replace(" ","",$detail);
$detail= trim($detail);
$detail= substr($detail,0,100);
if($i==1)echo"";
echo "
 $detail.. More เมื่อ $senddate อ่าน $open ครั้ง
";
if($i==4){echo" ";$i=0;};
*/
}
} if($in>0){echo"";$in=0;};
?>
|