|
From: Greg <ada...@us...> - 2002-02-28 22:00:08
|
Update of /cvsroot/post-nuke/postnuke_official/html/modules/Downloads
In directory usw-pr-cvs1:/tmp/cvs-serv23293/postnuke_official/html/modules/Downloads
Modified Files:
dl-newdownloads.php
Log Message:
pnVarPrepForStore/PrepForDisplay added...
Index: dl-newdownloads.php
===================================================================
RCS file: /cvsroot/post-nuke/postnuke_official/html/modules/Downloads/dl-newdownloads.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** dl-newdownloads.php 26 Feb 2002 01:32:43 -0000 1.13
--- dl-newdownloads.php 28 Feb 2002 21:56:03 -0000 1.14
***************
*** 28,34 ****
// ----------------------------------------------------------------------
! function NewDownloads($newdownloadshowdays) {
global $ModName, $modurl;
! include("header.php");
list($dbconn) = pnDBGetConn();
--- 28,36 ----
// ----------------------------------------------------------------------
! function NewDownloads($newdownloadshowdays)
! {
global $ModName, $modurl;
!
! include 'header.php';
list($dbconn) = pnDBGetConn();
***************
*** 65,69 ****
$allmonthdownloads = $allmonthdownloads + $totaldownloads;
}
! echo "<center><font class=\"pn-title\">"._TOTALNEWDOWNLOADS.":</font> <font class=\"pn-normal\">"._LASTWEEK." - $allweekdownloads / "._LAST30DAYS." - $allmonthdownloads</font><br>"
."<font class=\"pn-title\">"._SHOW.": <a class=\"pn-normal\" href=\"$modurl&req=NewDownloads&newdownloadshowdays=7\">"._1WEEK."</a> - <a class=\"pn-normal\" href=\"$modurl&req=NewDownloads&newdownloadshowdays=14\">"._2WEEKS."</a> - <a class=\"pn-normal\" href=\"$modurl&req=NewDownloads&newdownloadshowdays=30\">"._30DAYS."</a>"
."</font></center><br>";
--- 67,71 ----
$allmonthdownloads = $allmonthdownloads + $totaldownloads;
}
! echo "<center><font class=\"pn-title\">"._TOTALNEWDOWNLOADS.":</font> <font class=\"pn-normal\">"._LASTWEEK." - ".pnVarPrepForDisplay($allweekdownloads)." / "._LAST30DAYS." - ".pnVarPrepForDisplay($allmonthdownloads)."</font><br>"
."<font class=\"pn-title\">"._SHOW.": <a class=\"pn-normal\" href=\"$modurl&req=NewDownloads&newdownloadshowdays=7\">"._1WEEK."</a> - <a class=\"pn-normal\" href=\"$modurl&req=NewDownloads&newdownloadshowdays=14\">"._2WEEKS."</a> - <a class=\"pn-normal\" href=\"$modurl&req=NewDownloads&newdownloadshowdays=30\">"._30DAYS."</a>"
."</font></center><br>";
***************
*** 72,76 ****
$newdownloadshowdays = 7;
}
! echo "<br><center><font class=\"pn-title\">"._DTOTALFORLAST." $newdownloadshowdays "._DAYS.":</font><br><br>";
$allweekdownloads = 0;
for ($counter = 0; $counter < $newdownloadshowdays; $counter++) {
--- 74,78 ----
$newdownloadshowdays = 7;
}
! echo "<br><center><font class=\"pn-title\">"._DTOTALFORLAST." ".pnVarPrepForDisplay($newdownloadshowdays)." "._DAYS.":</font><br><br>";
$allweekdownloads = 0;
for ($counter = 0; $counter < $newdownloadshowdays; $counter++) {
***************
*** 83,87 ****
list($totaldownloads) = $result->fields;
$allweekdownloads = $allweekdownloads + $totaldownloads;
! echo "<strong><big>·</big></strong> <a class=\"pn-normal\" href=\"$modurl&req=NewDownloadsDate&selectdate=$newdownloaddayRaw\">$newdownloadView</a> <font class=\"pn-normal\">($totaldownloads)</font><br>";
}
$counter = 0;
--- 85,89 ----
list($totaldownloads) = $result->fields;
$allweekdownloads = $allweekdownloads + $totaldownloads;
! echo "<strong><big>·</big></strong> <a class=\"pn-normal\" href=\"$modurl&req=NewDownloadsDate&selectdate=$newdownloaddayRaw\">".pnVarPrepForDisplay($newdownloadView)."</a> <font class=\"pn-normal\">(".pnVarPrepForDisplay($totaldownloads).")</font><br>";
}
$counter = 0;
***************
*** 89,96 ****
echo "</center>";
CloseTable();
! include("footer.php");
}
! function NewDownloadsDate($selectdate) {
global $ModName, $modurl;
--- 91,99 ----
echo "</center>";
CloseTable();
! include 'footer.php';
}
! function NewDownloadsDate($selectdate)
! {
global $ModName, $modurl;
***************
*** 116,120 ****
$result = $dbconn->Execute("SELECT count(*) FROM $pntable[downloads_downloads] WHERE {$pntable['downloads_downloads_column']['date']} LIKE '%$newdownloadDB%'");
list($totaldownloads) = $result->fields;
! echo "<font class=\"pn-title\">$dateView - $totaldownloads "._NEWDOWNLOADS."</font>"
."<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"pn-normal\">";
$column = &$pntable['downloads_downloads_column'];
--- 119,123 ----
$result = $dbconn->Execute("SELECT count(*) FROM $pntable[downloads_downloads] WHERE {$pntable['downloads_downloads_column']['date']} LIKE '%$newdownloadDB%'");
list($totaldownloads) = $result->fields;
! echo "<font class=\"pn-title\">".pnVarPrepForDisplay($dateView)." - ".pnVarPrepForDisplay($totaldownloads)." "._NEWDOWNLOADS."</font>"
."<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"pn-normal\">";
$column = &$pntable['downloads_downloads_column'];
***************
*** 141,149 ****
echo "<img src=\"modules/$ModName/images/lwin.gif\" border=\"0\" alt=\"\"> ";
}
! echo "<a class=\"pn-normal\" href=\"$modurl&req=getit&lid=$lid\">$title</a>";
! if(!isset($datetime)) $datetime = ''; // E_ALL warning otherwise
newdownloadgraphic($datetime, $time);
popgraphic($hits);
! if(!isset($transfertitle)) $transfertitle = ''; // E_ALL warning otherwise
detecteditorial($lid, $transfertitle, 1);
echo "<br><font class=\"pn-normal\">"._DESCRIPTION.": $description</font><br>";
--- 144,156 ----
echo "<img src=\"modules/$ModName/images/lwin.gif\" border=\"0\" alt=\"\"> ";
}
! echo "<a class=\"pn-normal\" href=\"$modurl&req=getit&lid=$lid\">".pnVarPrepForDisplay($title)."</a>";
! if(!isset($datetime)) {
! $datetime = '';
! } // E_ALL warning otherwise
newdownloadgraphic($datetime, $time);
popgraphic($hits);
! if(!isset($transfertitle)) {
! $transfertitle = '';
! } // E_ALL warning otherwise
detecteditorial($lid, $transfertitle, 1);
echo "<br><font class=\"pn-normal\">"._DESCRIPTION.": $description</font><br>";
***************
*** 153,158 ****
$datetime = ml_ftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
! echo "<font class=\"pn-normal\">"._VERSION.": $version "._FILESIZE.": ".CoolSize($filesize)."</font><br>";
! echo "<font class=\"pn-normal\">"._ADDEDON.": $datetime "._UDOWNLOADS.": $hits</font>";
$transfertitle = str_replace (" ", "_", $title);
/* voting & comments stats */
--- 160,165 ----
$datetime = ml_ftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
! echo "<font class=\"pn-normal\">"._VERSION.": ".pnVarPrepForDisplay($version)." "._FILESIZE.": ".pnVarPrepForDisplay(CoolSize($filesize))."</font><br>";
! echo "<font class=\"pn-normal\">"._ADDEDON.": ".pnVarPrepForDisplay($datetime)." "._UDOWNLOADS.": ".pnVarPrepForDisplay($hits)."</font>";
$transfertitle = str_replace (" ", "_", $title);
/* voting & comments stats */
***************
*** 163,167 ****
}
if ($downloadratingsummary!="0" || $downloadratingsummary!="0.0") {
! echo " <font class=\"pn-normal\">"._RATING.": $downloadratingsummary ($totalvotes $votestring)</font>";
}
if ($homepage == "") {
--- 170,174 ----
}
if ($downloadratingsummary!="0" || $downloadratingsummary!="0.0") {
! echo " <font class=\"pn-normal\">"._RATING.": ".pnVarPrepForDisplay($downloadratingsummary)." (".pnVarPrepForDisplay($totalvotes)." ".pnVarPrepForDisplay($votestring).")</font>";
}
if ($homepage == "") {
***************
*** 178,182 ****
if (pnSecAuthAction(0, 'Downloads::Item', "$title:$cattitle:$lid", ACCESS_READ)) {
if ($totalcomments != 0) {
! echo " | <a class=\"pn-normal\" href=\"$modurl&req=viewdownloadcomments&lid=$lid&ttitle=$transfertitle\">"._COMMENTS." ($totalcomments)</a>";
}
}
--- 185,189 ----
if (pnSecAuthAction(0, 'Downloads::Item', "$title:$cattitle:$lid", ACCESS_READ)) {
if ($totalcomments != 0) {
! echo " | <a class=\"pn-normal\" href=\"$modurl&req=viewdownloadcomments&lid=$lid&ttitle=$transfertitle\">"._COMMENTS." (".pnVarPrepForDisplay($totalcomments).")</a>";
}
}
***************
*** 184,197 ****
$catergoryid = &$pntable['downloads_categories_column']['cid'];
$result2=$dbconn->Execute("SELECT $titlecolumn FROM $pntable[downloads_categories]
! WHERE $catergoryid = $cid");
detecteditorial($lid, $transfertitle, 0);
echo "<br>";
list($ctitle) = $result2->fields;
! echo "<font class=\"pn-normal\">"._CATEGORY.": $ctitle</font>";
$subcattitlecolumn = &$pntable['downloads_subcategories_column']['title'];
$subcatid = &$pntable['downloads_subcategories_column']['sid'];
$result3=$dbconn->Execute("SELECT $subcattitlecolumn FROM $pntable[downloads_subcategories]
! WHERE $subcatid = $sid");
while(list($stitle) = $result3->fields) {
$result3->MoveNext();
--- 191,204 ----
$catergoryid = &$pntable['downloads_categories_column']['cid'];
$result2=$dbconn->Execute("SELECT $titlecolumn FROM $pntable[downloads_categories]
! WHERE $catergoryid = ".pnVarPrepForStore($cid)."");
detecteditorial($lid, $transfertitle, 0);
echo "<br>";
list($ctitle) = $result2->fields;
! echo "<font class=\"pn-normal\">"._CATEGORY.": ".pnVarPrepForDisplay($ctitle)."</font>";
$subcattitlecolumn = &$pntable['downloads_subcategories_column']['title'];
$subcatid = &$pntable['downloads_subcategories_column']['sid'];
$result3=$dbconn->Execute("SELECT $subcattitlecolumn FROM $pntable[downloads_subcategories]
! WHERE $subcatid = ".pnVarPrepForDisplay($sid)."");
while(list($stitle) = $result3->fields) {
$result3->MoveNext();
***************
*** 203,207 ****
echo "</font></td></tr></table>";
CloseTable();
! include("footer.php");
}
?>
--- 210,214 ----
echo "</font></td></tr></table>";
CloseTable();
! include 'footer.php';
}
?>
|