Trang liên kết |
Thành viên
|
|
Nội dung |
include("header.htm");
include("connect.php");
if($lng=="")
$lng="vn";
if($u!="")
$sql3="select * from users_ql where danghoatdong='1' and user='$u'";
else
$sql3="select * from users_ql where danghoatdong='1' order by nhom asc";
if($u=="admin")
$sql3="select * from users_ql where danghoatdong='1' order by nhom asc";
$result3=mysql_query($sql3);
$num_results3=mysql_num_rows($result3);
for($jj=0; $jj<$num_results3;$jj++)
{ //nhom
$row3=mysql_fetch_array($result3);
echo " ".$row3["ten"]." \n";
if($lng=="en")
$sql1="select user,stt, tenen as ten, link from menu_new where hienthi='1' and user='".$row3["user"]."' order by thutu";
else
$sql1="select user,stt, tenvn as ten, link from menu_new where hienthi='1' and user='".$row3["user"]."' order by thutu";
$result1=mysql_query($sql1);
$num_results1=mysql_num_rows($result1);
for($j=0; $j<$num_results1;$j++)
{
$row1=mysql_fetch_array($result1);
echo "";
//sub menu
if($lng=="en")
$sql4="select stt,stt_sub, tenen as ten, Link,user from submenu where hienthi='1' and user='".$row3["user"]."' and stt='$sttsub' order by thutu";
else
$sql4="select stt,stt_sub,tenvn as ten, Link,user from submenu where hienthi='1' and user='".$row3["user"]."' and stt='$sttsub' order by thutu";
// echo $sql4;
$result4=mysql_query($sql4);
$num_results4=mysql_num_rows($result4);
if($num_resutls4>=0)
{
echo "\n";
for($j4=0; $j4<$num_results4;$j4++)
{
$row4=mysql_fetch_array($result4);
if(substr($row4["Link"],0,4)=="http") //if co http truoc
echo "- ".$row4["ten"]."
";
else
echo "- ".$row4["ten"]."
";
//hien th tieu de noi dung
if($lng!="en")
$sql="select id,tieudevn as tieude,ngay,user from noidung where nhom='".$row4["stt_sub"]."' and hienthi='1' and user='".$row4["user"]."' order by sapxep ";
else
$sql="select id,tieudeen,user as tieude,ngay from noidung where nhom='".$row4["stt_sub"]."' and hienthi='1' and user='".$row4["user"]."' order by sapxep";
// echo $sql;
$result=mysql_query($sql);
$num_results=mysql_num_rows($result);
for( $i=0; $i <$num_results;$i++)
{
$row=mysql_fetch_array($result);
echo " ".$row["tieude"]." \n";
}
}
//end for
echo " \n";
}//end for
}//end if
}//nhom
mysql_close();
?>
.
|
|