[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* PHP-NUKE: Web Portal System */ 5 /* =========================== */ 6 /* */ 7 /* Copyright (c) 2005 by Francisco Burzi */ 8 /* http://phpnuke.org */ 9 /* */ 10 /* This program is free software. You can redistribute it and/or modify */ 11 /* it under the terms of the GNU General Public License as published by */ 12 /* the Free Software Foundation; either version 2 of the License. */ 13 /************************************************************************/ 14 15 if ( !defined('BLOCK_FILE') ) { 16 Header("Location: ../index.php"); 17 die(); 18 } 19 20 global $cat, $language, $prefix, $multilingual, $currentlang, $db; 21 22 if ($multilingual == 1) { 23 $querylang = "AND (alanguage='$currentlang' OR alanguage='')"; /* the OR is needed to display stories who are posted to ALL languages */ 24 } else { 25 $querylang = ""; 26 } 27 $result = $db->sql_query("SELECT catid, title FROM ".$prefix."_stories_cat ORDER BY title"); 28 $numrows = $db->sql_numrows($result); 29 if ($numrows == 0) { 30 return; 31 } else { 32 $boxstuff = "<span class=\"content\">"; 33 while ($row = $db->sql_fetchrow($result)) { 34 $catid = intval($row['catid']); 35 $title = filter($row['title'], "nohtml"); 36 $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_stories WHERE catid='$catid' $querylang LIMIT 1")); 37 if ($numrows > 0) { 38 if ($cat == 0 AND !$a) { 39 $boxstuff .= "<strong><big>·</big></strong> <b>"._ALLCATEGORIES."</b><br>"; 40 $a = 1; 41 } elseif ($cat != 0 AND !$a) { 42 $boxstuff .= "<strong><big>·</big></strong> <a href=\"modules.php?name=News\">"._ALLCATEGORIES."</a><br>"; 43 $a = 1; 44 } 45 46 if ($cat == $catid) { 47 $boxstuff .= "<strong><big>·</big></strong> <b>$title</b><br>"; 48 } else { 49 $boxstuff .= "<strong><big>·</big></strong> <a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title</a><br>"; 50 } 51 } 52 } 53 $boxstuff .= "</span>"; 54 $content = $boxstuff; 55 } 56 57 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |