dcms
<?php
// remodified by noe
// http://nnetwork.tk
// hargailah privasi orang
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
include_once 'sys/inc/user.php';
only_reg();
$set['title']='tin tức MXH Trực Ninh - Nam Định';
include_once 'sys/inc/thead.php';
if (isset($_GET['sort']) && $_GET['sort'] =='t')$order='order by 'time' desc';
elseif (isset($_GET['sort']) && $_GET['sort'] =='c') $order='order by 'count' desc';
else $order='order by 'time' desc';
echo '<div>';
echo "Tất cả các câu chuyện";
echo '</div>';
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM 'statuse_list' WHERE 'privat' = 0"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
echo "<table class='post'>
";
if($k_post==0)
{
echo " <tr>
";
echo " <td class='p_t'>
";
echo "Không có bài viết !!!<br />";
echo " </td>
";
echo " </tr>
";
}
$res = mysql_query("select * from 'statuse_list' WHERE 'privat' = 0 $order LIMIT $start, $set[p_str];");
while ($statuse = mysql_fetch_array($res)){
if (isset($_GET['tidak']) && isset($user))
{
mysql_query("DELETE FROM 'statuse_like' WHERE 'id_user' = '$user[id]' AND 'id_statuse' = '".intval($_GET['id'])."' LIMIT 1");
}
$ank=get_user($statuse['id_user']);
echo "<tr>";
echo " <td class='icon14'>";echo avatar($ank['id']);
echo "</td><td class='status'>";
echo "<a href='info.php?id=$ank[id]'><b>$ank[nick]</b/></a>";
echo " ".output_text($statuse['msg'])." ";
echo "<br/>";
echo "<font class='time' size='2'>".waktu($statuse['time'])."</font>";
if($statuse['kategori']!=1){
if ($ank['ank_city']!=NULL){echo "<font class='time' size='2'> near $ank[ank_city]</font><br/>
";}
$teman2 = mysql_query("SELECT COUNT(*) FROM 'frends' WHERE ('user' = '$ank[id]' AND 'frend' = '$user[id]') OR ('user' = '$user[id]' AND 'frend' = '$ank[id]') LIMIT 1");
if (isset($user) && $user['id']!=$ank['id'] && mysql_result($teman2, 0)==0)
{
$d1sql = mysql_query("SELECT COUNT(*) FROM 'frends_new' WHERE ('user' = '$user[id]' AND 'to' = '$ank[id]') OR ('user' = '$ank[id]' AND 'to' = '$user[id]') LIMIT 1");
$d2sql = mysql_query("SELECT COUNT(*) FROM 'frends' WHERE ('user' = '$ank[id]' AND 'frend' = '$user[id]') OR ('user' = '$user[id]' AND 'frend' = '$ank[id]') LIMIT 1");
if (isset($user) && $user['id']!=$ank['id'] && mysql_result($d1sql, 0)==0 && mysql_result($d2sql, 0)==0)
{
echo " · <a href='/frend_add.php?id=$ank[id]'>Thêm Bạn</a>";}else{
echo " · <font class='time'>chờ nhận</font>";
}
}
else
{
if (isset($user)){
$anu = mysql_result(mysql_query("SELECT COUNT(*) FROM 'statuse_like' WHERE 'id_statuse' = '$statuse[id]'"),0);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM 'statuse_like' WHERE 'id_statuse' = '$statuse[id]' AND 'id_user' = '$user[id]' LIMIT 1"),0)==0){
if($anu==0){
echo " · <a href='status/suka.php?id=".$statuse['id']."&like'>Thích</a>";} else {
echo " · <a href='status/like_all.php?id=".$statuse['id']."'><img src='status/suka.gif' width='12' height='13'> $anu</a> · <a href='status/suka.php?id=".$statuse['id']."&like'>thích</a>";
}
}
else
{
if($anu==0){
echo " · <a href='status/suka.php?id=".$statuse['id']."&tidak'>Không Thích</a>";} else {
echo " · <a href='/status/like_all.php?id=".$statuse['id']."'><img src='status/suka.gif' width='12' height='13'> $anu</a> · <a href='/status/suka.php?id=".$statuse['id']."&tidak'>Không Thích</a>";
}
}
$cmn=mysql_result(mysql_query("SELECT COUNT(*) FROM 'statuse_komm' WHERE 'id_statuse' = '$statuse[id]'"),0);
if(mysql_result(mysql_query("SELECT COUNT(*) FROM 'statuse_komm' WHERE 'id_statuse' = '$statuse[id]'"),0)==0){
echo " · <a href='list.php?id=".$statuse['id']."'>Bình Luận</a>
";
}else{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM 'statuse_komm' WHERE 'id_statuse' = '$statuse[id]'"),0)==1){
echo " · <a href='list.php?id=".$statuse['id']."'>1 Bình Luận</a>
";
}
else
{
echo " · <a href='list.php?id=".$statuse['id']."'>$cmn Bình Luận</a>
";
}
}
}
}
}
echo " </td>";
echo " </tr>";
}
echo "</table>";
if (isset($_GET['sort'])) $dop="sort=$_GET[sort]&";
else $dop='';
if ($k_page>1)str('?'.$dop.'',$k_page,$page);
echo "<div class='acw apm'><a href='home.php'>Tin Tức Gần Đây</a><br/> <a href='index.php?top'>Top Tin Tức</a><br/></div>";
include_once 'sys/inc/tfoot.php';
?>
Bạn đang đọc truyện trên: AzTruyen.Top