Parašė pokemonu_karalius· 2010 Sau. 24 15:01:13
#2
if (!isset($cat_id)) {
openside(Kategorijos);
$result = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE ".groupaccess('article_cat_access')." ORDER BY article_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
$num = dbcount("(article_cat)", "articles", "article_cat='".$data['article_cat_id']."'");
echo "<p style='margin:5px;' ><span class='small2'><img src='".THEME."images/bullet.gif'> <a href='articles.php?cat_id=".$data['article_cat_id']."'>".$data['article_cat_name']."</a> (Straipsnių: $num)<br></P></span>";
echo "</td>\n";
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['401']."<br><br>\n</center>\n";
}
closeside();
} else {
$res = 0;
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['article_cat_access'])) {
$res = 1;
$rows = dbcount("(article_id)", "articles", "article_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."articles WHERE article_cat='$cat_id' ORDER BY ".$cdata['article_cat_sorting']." LIMIT $rowstart,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['article_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " ";
} else {
$new = "";
}
//
}
if ($rows > 15) echo "";
} else {
}
}
}
}
Truputį aptvarkiau.. bet.. Paspaudus kokią kategoriją panelė pradingsta, gal galit padaryti ,kad nepradingtų? :]
Redagavo pokemonu_karalius· 2010 Sau. 24 15:01:17