| Server IP : 172.67.187.206 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/news/group/ |
Upload File : |
<?php
session_start();
include("db.php");
if(!isset($_SESSION['username'])){
}else{
$username1 = $_SESSION['username'];
$user1 = $mysqli->query("SELECT * FROM users WHERE username='$username1' LIMIT 1");
$userrow1 = mysqli_fetch_array($user1);
}
$sitesettings = $mysqli->query("SELECT * FROM settings WHERE id='1'");
$settingsrow = mysqli_fetch_array($sitesettings);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<?php
/*$school=$mysqli->escape_string($_GET['school']);
$objConnect = mysql_connect("localhost","root","sesao8@2558") or die("Error Connect to Database");
$objDB = mysql_select_db("news");
mysql_query("SET NAMES UTF8");
$strSQL = "SELECT * FROM posts where cat_id between '71' and '85' ORDER BY id DESC LIMIT 6";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
*/
$sql1= $mysqli->query("SELECT * FROM posts where cat_id between '71' and '85' ORDER BY id DESC LIMIT 6");
echo"<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr>";
$intRows = 0;
while($objResult = mysqli_fetch_array($sql1))
{
$intRows++;
echo "<td>";
?>
<table width="200" border="0" cellpadding="0">
<tr>
<td width="180" height="110" valign="top"><a href="https://news.sesaorb.go.th/story.php?id=<?php echo $objResult["id"];?>" target="_blank">
<?php /*
$today=date("dmY");
$oldday=substr($objResult['image'], 0, 8);
if ($today>=$oldday){
*/ ?>
<?php
if ($objResult['id'] > 4430){
?>
<img src="uploads/<?php echo $objResult["image"];?>" width="200" height="140" border="1" style="border-radius: 5px; border-color:#FFCC00;" alt="<?php echo $objResult["title"];?>">
<?php }else{ ?>
<img src="<?php echo $objResult["image"];?>" width="200" height="140" border="1" style="border-radius: 5px; border-color:#FFCC00;" alt="<?php echo $objResult["title"];?>">
<?php } ?>
</a></td>
</tr>
<tr>
<?php
$rest2 = iconv_substr("$objResult[title]", 0,72,"UTF-8")."";
// $rest2 = substr("$objResult[title]", 0,240);
?>
<td height="50" valign="top" bgcolor="#FF962D"><font size="2" color="#FFFFFF"> <?php echo "$rest2";?>
<?php
$today=date("d-m-Y");
$date_news=$objResult['date'];
$rest2 = substr("$date_news", 0,-9);
$news_day=(strtotime($today)-strtotime($rest2))/(60*60*24);
if($news_day <= 3) { echo "<img src='images/update_news.gif'>";} else { echo "";}
?></font></td>
</tr>
</table>
<?php
echo"</td>";
if(($intRows)%3==0)
{
echo"</tr>";
}
else
{
echo "<td>";
}
}
echo"</tr></table>";
echo "
<table width='100%' border='0'>
<tr>
<td align='right'><a href='https://news.sesaorb.go.th/sesao8_all.html' target='_blank'><img src='images/more_r.png' border='0'></a></td>
</tr>
</table>";
?>
</div>
</body>
</html>