Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Del article.php + news_cats.php

Parašė ramon· 2008 Rugp. 25 00:08:26
#25

<?php

opentable("Naujienu meniu");
     echo"<b><br><center>naujienos mIRC</center></b>";
$id = "news_cat_id='10' || news_cat_id='12' || news_cat_id='6'";
$uzklausa_a = "SELECT * FROM ".DB_PREFIX."news_cats WHERE $id ORDER BY news_cat_id ASC";

$a = dbquery($uzklausa_a);

while ($b = dbarray($a)) {

$uzklausa_b = "SELECT news_id, COUNT(news_id) as naujienu  FROM ".DB_PREFIX."news WHERE news_cat='".$b['news_cat_id']."' GROUP BY news_cat";
$c = dbquery($uzklausa_b);

while ($d = dbarray($c)) echo $b['news_cat_name']." (<b>".$d['naujienu']."</b>) <Br>";
}
     echo"<b><br><center>Kitos naujienos</center></b>";
$id2 = "news_cat_id='4' || news_cat_id='9' || news_cat_id='2'";
$uzklausa_c = "SELECT * FROM ".DB_PREFIX."news_cats WHERE $id2 ORDER BY news_cat_id ASC";

$e = dbquery($uzklausa_c);

while ($f = dbarray($e)) {

$uzklausa_d = "SELECT news_id, COUNT(news_id) as naujienu  FROM ".DB_PREFIX."news WHERE news_cat='".$f['news_cat_id']."' GROUP BY news_cat";
$g = dbquery($uzklausa_d);

while ($h = dbarray($g)) echo $f['news_cat_name']." (<b>".$h['naujienu']."</b>) <Br>";
}
closetable();

?>