Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kaip padaryti kad įeitu į kategorijas?

Parašė ex-it· 2008 Gru. 30 23:12:15
#7

Tai tada ziurek kodas

if (!isset($cat_id)) {
openside("Siuntiniu kategorijos");
   $result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
   $rows = dbrows($result);
   if ($rows != 0) {
      $counter = 0; $columns = 2;
      while ($data = dbarray($result)) {
         if ($counter != 0 && ($counter % $columns == 0)) echo "";
         $num = dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
         echo "<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat_id']."'>".$data['download_cat_name']."</a> <span class='small2'>($num)</span>";
         echo "<br>" ;
         $counter++;
      }
      echo "";
   } else {
      echo "<center><br>\n".$locale['430']."<br><br></center>\n";
   }
closeside();
}