|
include('inc_main_menu.php'); ?>
$sql1 = "SELECT * FROM $tb_name WHERE type = 'home'";
$sql_result1 = mysql_query($sql1);
while ($row = mysql_fetch_array($sql_result1))
{
$ID = $row["ID"];
$name = $row["name"];
$description = $row["description"];
echo"$name
$description
"; }
?>
JungleSurf News |
$tmtoday = mktime(0,0,0,date("m"),date("j"),date("Y"));
$tmtoday7 = mktime(0,0,0,date("m"),date("j")-7,date("Y"));
$sql1 = "SELECT * FROM $tb_name WHERE type = 'News' ORDER BY pos";
$sql_result1 = mysql_query($sql1);
$col = '2';
$no_field = '0';
while ($row = mysql_fetch_array($sql_result1))
{
$ID = $row["ID"];
$name = $row["name"];
$namez = str_replace("-xxx", "", $name);
$no_field = $no_field + 1;
echo"
$namez
";
echo"
";
$sql2 = "SELECT * FROM js_news WHERE category='$namez' ORDER BY date DESC LIMIT 5";
$sql_result2 = mysql_query($sql2);
while ($row = mysql_fetch_array($sql_result2))
{
$ID = $row["ID"];
$datez = $row["date"];
$category = $row["category"];
$title = $row["title"];
$datez = explode("-", $datez);
$yeara = $datez[0];
$montha = $datez[1];
$datea = $datez[2];
$date = $datea."-".$montha."-".$yeara;
$tmdate = mktime(0,0,0,$montha,$datea,$yeara);
echo"
$title
";
if ($tmdate > $tmtoday7) {
echo"";
}
echo"
|
|
|
";
}
echo"
|
";
if ($no_field % $col == 0) {
echo" ";
}
}
?>
|
|
|