Parašė bruzgis· 2008 Rugp. 6 16:08:29
#8
nzn gal veiks, netestavau
openside('Naujienø raðytojai');
$result = dbquery("SELECT * FROM ".DB_PREFIX."users WHERE user_level > 101 ORDER BY user_level DESC, user_name");
while($data = dbarray($result)) {
echo "<img src='".THEME."images/bullet.gif'>Administratorius <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a> paraðë <b>".dbcount("(news_id)", "news", "news_name='".$data['user_id']."'")."</b> naujienas<br>";
}
closeside();
Nu veikia puikiai, tik galima pridėt, jeigu naujienu neparases tai jo ir nerodytu;
openside('Naujienø raðytojai');
$result = dbquery("SELECT * FROM ".DB_PREFIX."users WHERE user_level > 101 ORDER BY user_level DESC, user_name");
while($data = dbarray($result)) {
if (dbcount("(news_id)", "news", "news_name='".$data['user_id']."'") != 0) echo "<img src='".THEME."images/bullet.gif'>Administratorius <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a> paraðë <b>".dbcount("(news_id)", "news", "news_name='".$data['user_id']."'")."</b> naujienas<br>";
}
closeside();
Redagavo bruzgis· 2008 Rugp. 6 16:08:20