Жасурбек, https://johncms.com/forum/index.php?id=965847
manaO'zim tuzib oldim
.gif)
.gif)
<?php
echo '<div class="phdr"><b><center><img style="width: 15px;max-width: 15%;" src="/images/g/news-1.png" alt="Fanatuz.Ru"> BIZNING LOYIHALAR</center></b></div>';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news` WHERE `refid`= 3"), 0);
$kmess ='30';
if ($total) {
$req = mysql_query("SELECT * FROM `cms_news` WHERE `refid`= 3 ORDER BY `time` DESC LIMIT ".$start.", ".$kmess);
$ncount = mysql_fetch_array(mysql_query("SELECT * FROM `cms_news` WHERE `id` ='$id'"));
while($trans_res= mysql_fetch_array($req)){
$comm= mysql_result( mysql_query("select count(*) from `cms_news_comments` where `refid` = '".$trans_res['id']."'"),0);
echo '<div class="menu"><b><div style="float:left;"><span style="background-color:#45962b; color:white; border-radius:2px 2px 2px 2px;padding:3px 3px 2px 3px;"><b>'.(date('H:i ',$trans_res['time'])).'</b></span></div><div style="margin-left:38px;"> <a href="/news/index.php?act=view&id='.$trans_res['id'].'"> '. htmlentities($trans_res['name'],ENT_QUOTES,'UTF-8').'</a><div aligen="left"><div style="color: gray;"><img src="/ico/redo.png" width="16" height="16">O\'qildi:<font color="#0000ff"> '.$trans_res['reads'].'</font></div><span style="float: right;"><img src="/ico/comm.png" width="16" height="16">Fikrlar: <font color="#ff0000"> ' . $comm . '</font></span></div></div><div style="clear: both;"></div></b></div>';
++$i;
}
}
if ($total > $kmess) {
echo '<div class="menu"><center>' . functions::display_pagination('?', $start, $total, $kmess) . '</center></div>';
}
?>$tz = 'Asia/Tashkent';
$timestamp = time();
$dt = new DateTime("now", new DateTimeZone($tz));
$dt->setTimestamp($timestamp);
echo $dt->format('d.m.Y, H:i:s');