View Single Post
  #4 (permalink)  
Old 04-15-2003, 09:22 PM
GorGonDo GorGonDo is offline
Junior Member
 
Join Date: Mar 2003
Location: Denmark
Posts: 40
Send a message via MSN to GorGonDo
Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* PHP All Info Block by: SlimBrady                                     */
/* http://unitedgamerz.net                                              */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
if (eregi("block-All_Info.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $multilingual, $currentlang, $db;

if ($multilingual == 1) {
    $querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
    $querylang = "";
}
$content = "<table width=\"100%\" border=\"0\">";
$content .= "<tr><td align=\"left\">Headlines:
";
$sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,10";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
    $sid = $row[sid];
    $title = $row[title];
    $comtotal = $row[comments];
    $counter = $row[counter];
    $content .= "<big>&</big>&<a href=\"modules.php?name=News&file=article&sid=$sid\">$title</a>
";
}
$content .= "<big>&</big>&<a href=\"modules.php?name=News\">More News...</td>";
?>
<?php


if (eregi("block-All_Info.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

global $prefix, $dbi;

$a = 1;
$result = sql_query("select lid, title from ".$prefix."_downloads_downloads order by hits DESC limit 0,5", $dbi);
	$content .= "<td valign=\"top\">Top Downloads:
";
while(list($lid, $title) = sql_fetch_row($result, $dbi)) {
    $title2 = ereg_replace("_", " ", $title);
    $content .= "<big>&</big>&$a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title\">$title2</a>
";
	$a++;
}
$content .= "
";
?>
<?php
if (eregi("block-All_Info.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

global $prefix, $dbi;

$a = 1;
$result2 = sql_query("select lid, title from ".$prefix."_downloads_downloads order by date DESC limit 0,5", $dbi);
	$content .= "New Downloads:
";
while(list($lid3, $title3) = sql_fetch_row($result2, $dbi)){
	$title4 = ereg_replace("_", " ", $title3);
	$content .= "<big>&</big>&$a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid3&title=$title3\">$title4</a>
";
    $a++;
	}
	$content .= "</table></td></tr>";
	?>
Reply With Quote