Initial Landing of update-beta code. Bug 260157. Initial Landing of Developer CP. Bug 254925.

This commit is contained in:
psychoticwolf%carolina.rr.com 2004-10-06 07:10:48 +00:00
Родитель 0b8fba3463
Коммит 715d4d0937
2 изменённых файлов: 124 добавлений и 132 удалений

Просмотреть файл

@ -46,7 +46,7 @@ require"../core/config.php";
<meta http-equiv="Content-Language" content="en"> <meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Style-Type" content="text/css">
<TITLE>Mozilla Update :: Extensions - Add Features to Mozilla Software</TITLE> <TITLE>Mozilla Update :: Themes - Change the Look of Mozilla Software</TITLE>
<?php <?php
include"$page_header"; include"$page_header";
@ -54,7 +54,7 @@ include"$page_header";
<div id="mBody"> <div id="mBody">
<?php <?php
$type = "E"; $type = "T";
if ($_GET["application"]) {$application=$_GET["application"]; } if ($_GET["application"]) {$application=$_GET["application"]; }
$index="yes"; $index="yes";
@ -103,11 +103,11 @@ echo"<SPAN class=\"itemdescription\">$body</SPAN><BR>\n";
</DIV> </DIV>
<div id="mBody"> <div id="mBody">
<h3>What is an Extension?</h3> <h3>What is a Theme?</h3>
<p>Extensions are small add-ons that add new functionality to <?php print(ucwords($application)); ?>. <p>Themes are skins for <?php print(ucwords($application)); ?>, they allow you to change the look and
They can add anything from a toolbar button to a completely new feature. They allow the browser to be customized to fit the feel of the browser and personalize it to your tastes. A theme can simply change the colors of <?php print(ucwords($application)); ?>
personal needs of each user if they need addtional features<?php if ($application !=="mozilla") { ?>, while keeping <?php print(ucwords($application)); ?> small or it can change every piece of the browser appearance.</p>
to download <?php } ?>.</p>
<?php <?php
//Temporary!! Current Version Array Code //Temporary!! Current Version Array Code
@ -120,17 +120,20 @@ $currentver_display = $currentver_display_array[$application];
<!-- Start News Columns --> <!-- Start News Columns -->
<div class="frontcolumn"> <div class="frontcolumn">
<a href="http://www.mozilla.org/news.rdf"><img src="../images/rss.png" width="28" height="16" class="rss" alt="Mozilla News in RSS"></a><h2 style="margin-top: 0;"><a href="showlist.php?category=Newest" title="New Extensions on Mozilla Update">New Additions</a></h2> <a href="http://www.mozilla.org/news.rdf"><img src="../images/rss.png" width="28" height="16" class="rss" alt="Mozilla News in RSS"></a><h2 style="margin-top: 0;"><a href="showlist.php?category=Newest" title="New Extensions on Mozilla Update">New Additions</a></h2>
<span class="newsSubline">New and Updated Extensions</span> <span class="newsSubline">New and Updated Themes</span>
<ul class="news"> <ul class="news">
<?php <?php
$i=0; $i=0;
//MacOSX Specific override for All+Mac themes. Bug 252294
if ($_SESSION["app_os"]=="MacOSX") { $app_os = $_SESSION["app_os"]; } else { $app_os = "ALL"; }
$sql = "SELECT TM.ID, TV.vID, TM.Name, TV.Version, TV.DateAdded $sql = "SELECT TM.ID, TV.vID, TM.Name, TV.Version, TV.DateAdded
FROM `t_main` TM FROM `t_main` TM
INNER JOIN t_version TV ON TM.ID = TV.ID INNER JOIN t_version TV ON TM.ID = TV.ID
INNER JOIN t_applications TA ON TV.AppID = TA.AppID INNER JOIN t_applications TA ON TV.AppID = TA.AppID
INNER JOIN t_os TOS ON TV.OSID = TOS.OSID INNER JOIN t_os TOS ON TV.OSID = TOS.OSID
WHERE `Type` = '$type' AND `AppName` = '$application' AND (`OSName` = '$_SESSION[app_os]' OR `OSName` = 'ALL') AND `approved` = 'YES' ORDER BY `DateAdded` DESC "; WHERE `Type` = '$type' AND `AppName` = '$application' AND `minAppVer_int` <='$currentver' AND `maxAppVer_int` >= '$currentver' AND (`OSName` = '$_SESSION[app_os]' OR `OSName` = '$app_os') AND `approved` = 'YES' ORDER BY `DateAdded` DESC ";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
while ($row = mysql_fetch_array($sql_result)) { while ($row = mysql_fetch_array($sql_result)) {
$i++; $i++;
@ -166,7 +169,7 @@ $sql = "SELECT TM.ID, TV.vID,TM.Name, TV.Version, TM.TotalDownloads, TM.download
FROM `t_main` TM FROM `t_main` TM
INNER JOIN t_version TV ON TM.ID = TV.ID INNER JOIN t_version TV ON TM.ID = TV.ID
INNER JOIN t_applications TA ON TV.AppID = TA.AppID INNER JOIN t_applications TA ON TV.AppID = TA.AppID
WHERE `Type` = '$type' AND `AppName` = '$application' AND `minAppVer_int` <='$currentver' AND `maxAppVer_int` >= '$currentver' AND `downloadcount` > '0' AND `approved` = 'YES' ORDER BY `downloadcount` DESC "; WHERE `Type` = '$type' AND `AppName` = '$application' AND `minAppVer_int` <='$currentver' AND `maxAppVer_int` >= '$currentver' AND `DownloadCount` > '0' AND `approved` = 'YES' ORDER BY `DownloadCount` DESC ";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
while ($row = mysql_fetch_array($sql_result)) { while ($row = mysql_fetch_array($sql_result)) {
$i++; $i++;

Просмотреть файл

@ -65,15 +65,14 @@ $pagetitle = $pagetitles[$_GET["page"]];
<TITLE>Mozilla Update :: Extensions -- More Info: <?php echo"$row[Name]"; if ($pagetitle) {echo" - $pagetitle"; } ?></TITLE> <TITLE>Mozilla Update :: Extensions -- More Info: <?php echo"$row[Name]"; if ($pagetitle) {echo" - $pagetitle"; } ?></TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css"> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
</HEAD>
<BODY>
<?php <?php
include"$page_header"; include"$page_header";
$type = "E"; $type = "E";
$category=$_GET["category"]; $category=$_GET["category"];
include"inc_sidebar.php"; include"inc_sidebar.php";
?> ?>
<DIV id="content">
<?php <?php
//Get Author Data //Get Author Data
$sql2 = "SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `t_main` TM $sql2 = "SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `t_main` TM
@ -87,15 +86,27 @@ ORDER BY `Type` , `Name` ASC ";
$authorids[$row2[UserName]] = $row2["UserID"]; $authorids[$row2[UserName]] = $row2["UserID"];
} }
//Assemble a display application version array
$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
while ($row = mysql_fetch_array($sql_result)) {
$version = $row["Version"];
$subver = $row["SubVer"];
$release = "$row[major].$row[minor]";
if ($row["release"]) {$release = ".$release$row[release]";}
if ($subver !=="final") {$release="$release$subver";}
$appvernames[$release] = $version;
}
//Run Query and Create List //Run Query and Create List
$s = "0"; $s = "0";
$sql = "SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes, TM.TotalDownloads, TA.AppName, TOS.OSName, TP.PreviewURI $sql = "SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TM.TotalDownloads, TM.downloadcount, TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes, TA.AppName, TOS.OSName
FROM `t_main` TM FROM `t_main` TM
INNER JOIN t_version TV ON TM.ID = TV.ID INNER JOIN t_version TV ON TM.ID = TV.ID
INNER JOIN t_applications TA ON TV.AppID = TA.AppID INNER JOIN t_applications TA ON TV.AppID = TA.AppID
INNER JOIN t_os TOS ON TV.OSID = TOS.OSID INNER JOIN t_os TOS ON TV.OSID = TOS.OSID
LEFT JOIN t_previews TP ON TV.vID = TP.vID
WHERE TM.ID = '$_GET[id]' AND `approved` = 'YES' "; WHERE TM.ID = '$_GET[id]' AND `approved` = 'YES' ";
if ($_GET["vid"]) { $sql .=" AND TV.vID = '$_GET[vid]' "; } if ($_GET["vid"]) { $sql .=" AND TV.vID = '$_GET[vid]' "; }
$sql .= "ORDER BY `Name` , `Version` DESC LIMIT 1"; $sql .= "ORDER BY `Name` , `Version` DESC LIMIT 1";
@ -118,22 +129,26 @@ $v++;
$vid = $row["vID"]; $vid = $row["vID"];
if (!$_GET['vid']) {$_GET['vid']=$vid;} if (!$_GET['vid']) {$_GET['vid']=$vid;}
$appname = $row["AppName"]; $appname = $row["AppName"];
$minappver = $row["MinAppVer"]; if ($appvernames[$row["MinAppVer"]]) {$minappver = $appvernames[$row["MinAppVer"]]; } else { $minappver = $row["MinAppVer"]; }
$maxappver = $row["MaxAppVer"]; if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer"]]; } else { $maxappver = $row["MaxAppVer"]; }
$verdateadded = $row["VerDateAdded"]; $verdateadded = $row["VerDateAdded"];
$verdateupdated = $row["VerDateUpdated"]; $verdateupdated = $row["VerDateUpdated"];
$filesize = $row["Size"]; $filesize = $row["Size"];
$notes = $row["Notes"]; $notes = $row["Notes"];
$version = $row["Version"]; $version = $row["Version"];
$uri = $row["URI"]; $uri = $row["URI"];
$previewuri = $row["PreviewURI"];
$downloadcount = $row["TotalDownloads"]; $downloadcount = $row["TotalDownloads"];
$populardownloads = $row["downloadcount"];
$sql3 = "SELECT `PreviewURI`, `caption` from `t_previews` WHERE `ID` = '$id' AND `preview`='YES' LIMIT 1";
$sql_result3 = mysql_query($sql3, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
$row3 = mysql_fetch_array($sql_result3);
$previewuri = $row3["PreviewURI"];
$caption = $row3["caption"];
if ($VerDateAdded > $dateadded) {$dateadded = $VerDateAdded; } if ($VerDateAdded > $dateadded) {$dateadded = $VerDateAdded; }
if ($VerDateUpdated > $dateupdated) {$dateupdated = $VerDateUpdated; } if ($VerDateUpdated > $dateupdated) {$dateupdated = $VerDateUpdated; }
//Turn Authors Array into readable string... //Turn Authors Array into readable string...
$authorcount = count($authors); $authorcount = count($authors);
foreach ($authors as $author) { foreach ($authors as $author) {
@ -146,79 +161,57 @@ if ($authorcount != $n) {$authorstring .=", "; }
$authors = $authorstring; $authors = $authorstring;
unset($authorstring, $n); // Clear used Vars.. unset($authorstring, $n); // Clear used Vars..
//Create Customizeable Timestamp for DateAdded/DateUpdated if ($dateupdated > $dateadded) {
$day=substr($dateadded,8,2); //get the day $timestamp = $dateupdated;
$month=substr($dateadded,5,2); //get the month $datetitle = "Last Update: ";
$year=substr($dateadded,0,4); //get the year } else {
$hour=substr($dateadded,11,2); //get the hour $timestamp = $dateadded;
$minute=substr($dateadded,14,2); //get the minute $datetitle = "Added on: ";
$second=substr($dateadded,17,2); //get the sec }
$datimestamp = strtotime("$year-$month-$day $hour:$minute:$second");
$day=substr($dateupdated,8,2); //get the day $date = date("F d, Y g:i:sa", strtotime("$timestamp"));
$month=substr($dateupdated,5,2); //get the month
$year=substr($dateupdated,0,4); //get the year
$hour=substr($dateupdated,11,2); //get the hour
$minute=substr($dateupdated,14,2); //get the minute
$second=substr($dateupdated,17,2); //get the sec
$dutimestamp = strtotime("$year-$month-$day $hour:$minute:$second");
$dateadded = gmdate("F d, Y g:i:sa", $datimestamp); //gmdate("F d, Y", $datimestamp);
$dateupdated = gmdate("F d, Y g:i:sa", $dutimestamp); //gmdate("F d, Y", $dutimestamp); $datestring = "$datetitle $date";
//Rating //Rating
if (!$rating) { $rating="0"; } if (!$rating) { $rating="0"; }
?> ?>
<DIV class="tabbar"> <H3> <?php ucwords("$application "); ?> Extensions &#187; <?php echo"$row[Name]"; if ($pagetitle) {echo" :: $pagetitle"; } ?></H3>
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid"; ?>">More Info</A></DIV>
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=releases"; ?>">All Releases</A></DIV> <A HREF="?<?php echo"id=$id&vid=$vid"; ?>">More Info</A> |
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=comments"; ?>">Comments</A></DIV> <A HREF="?<?php echo"id=$id&vid=$vid&page=releases"; ?>">All Releases</A> |
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=staffreview"; ?>">Editor Review</A></DIV> <A HREF="?<?php echo"id=$id&vid=$vid&page=comments"; ?>">Comments</A> |
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=opinion"; ?>">My Opinion</A></DIV> <A HREF="?<?php echo"id=$id&vid=$vid&page=staffreview"; ?>">Editor Review</A> |
</DIV> <A HREF="?<?php echo"id=$id&vid=$vid&page=opinion"; ?>">My Opinion</A>
<?php <?php
echo"<DIV class=\"item\">\n"; echo"<DIV id=\"item\">\n";
//echo"<DIV style=\"height: 100px\">"; //Why?!?
if ($previewuri) { if ($previewuri) {
list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); list($width, $height, $type, $attr) = getimagesize("$websitepath"."$previewuri");
echo"<DIV style=\"padding-top: 6px; float: right; padding-right: 0px\">\n";
echo"<IMG SRC=\"$previewuri\" BORDER=0 HEIGHT=$height WIDTH=$width STYLE=\"float: right; padding-right: 5px\" ALT=\"$name preview\">"; echo"<IMG SRC=\"$previewuri\" BORDER=0 HEIGHT=$height WIDTH=$width ALT=\"$name preview - $caption\" TITLE=\"$caption\">\n";
echo"</DIV>\n";
} }
echo"<h5>";
//Upper-Right Side Box
echo"<DIV class=\"liststars\" title=\"$rating of 5 stars\" style=\"font-size: 8pt\"><A HREF=\"moreinfo.php?id=$id&page=comments\">";
for ($i = 1; $i <= floor($rating); $i++) {
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
}
if ($rating>floor($rating)) {
$val = ($rating-floor($rating))*10;
echo"<IMG SRC=\"/images/stars/star_0$val.png\" BORDER=0 ALT=\"\">";
$i++;
}
for ($i = $i; $i <= 5; $i++) {
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
}
echo"</A></DIV>\n";
echo"<DIV class=\"itemtitle\">";
echo"<SPAN class=\"title\"><A HREF=\"moreinfo.php?id=$id&vid=$vid\">$name $version</A></SPAN><BR>"; echo"<SPAN class=\"title\"><A HREF=\"moreinfo.php?id=$id&vid=$vid\">$name $version</A></SPAN><BR>";
echo"<SPAN class=\"authorline\">By $authors</SPAN><br>"; echo"<SPAN class=\"authorline\">By $authors</SPAN>";
echo"</DIV>"; echo"</h5>";
//Description & Version Notes //Description & Version Notes
echo"<SPAN class=\"itemdescription\">"; echo"$description<BR>\n";
echo"$description<BR>"; if ($notes) {echo"<BR>\n$notes<BR>"; }
if ($notes) {echo"$notes"; } echo"<BR>\n";
echo"</SPAN>\n";
//echo"</DIV>\n";
echo"<BR>\n\n";
$page = $_GET["page"]; $page = $_GET["page"];
if (!$page or $page=="general") { if (!$page or $page=="general") {
?> ?>
<DIV class="downloadbox"> <DIV class="downloadbox">
<?php <?php
//Create DateStamp for Version Release Date ($verdateadded) //Create DateStamp for Version Release Date ($verdateadded)
@ -259,7 +252,21 @@ echo"<A HREF=\"install.php/$filename?id=$id&vid=$vid\" TITLE=\"Install $name $ve
} }
echo" echo"
<SPAN class=\"filesize\">&nbsp;&nbsp;$filesize KB, ($time @ $speed"."k)</SPAN></DIV> <SPAN class=\"filesize\">&nbsp;&nbsp;$filesize KB, ($time @ $speed"."k)</SPAN></DIV>
<BR>"; ";
//Icon Bar Modules
echo"<DIV style=\"margin-top: 30px; height: 34px\">";
echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/".strtolower($appname)."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 ALT=\"\">&nbsp;For $appname:<BR>&nbsp;&nbsp;$minappver - $maxappver</DIV>";
if($osname !=="ALL") { echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/".strtolower($osname)."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 ALT=\"\">For&nbsp;$osname<BR>only</DIV>"; }
if ($homepage) {echo"<DIV class=\"iconbar\"><A HREF=\"$homepage\"><IMG SRC=\"/images/home.png\" BORDER=0 HEIGHT=34 WIDTH=34 TITLE=\"$name Homepage\" ALT=\"\">Homepage</A></DIV>";}
echo"<DIV class=\"iconbar\" title=\"$rating of 5 stars\"><A HREF=\"moreinfo.php?id=$id&page=comments\"><IMG SRC=\"/images/ratings.png\" BORDER=0 HEIGHT=34 WIDTH=34 ALT=\"\">Rated<br>&nbsp;&nbsp;$rating of 5</A></DIV>";
echo"</DIV>";
echo"<BR>";
if ($application=="thunderbird") { if ($application=="thunderbird") {
echo"<SPAN style=\"font-size: 10pt; color: #00F\">Extension Install Instructions for Thunderbird Users:</SPAN><BR> echo"<SPAN style=\"font-size: 10pt; color: #00F\">Extension Install Instructions for Thunderbird Users:</SPAN><BR>
<SPAN style=\"font-size: 8pt;\">(1) Right-Click the link above and choose \"Save Link As...\" to Download and save the file to your hard disk.<BR> <SPAN style=\"font-size: 8pt;\">(1) Right-Click the link above and choose \"Save Link As...\" to Download and save the file to your hard disk.<BR>
@ -277,9 +284,10 @@ echo"<LI> <A HREF=\"moreinfo.php?id=$id&vid=$vid&page=releases\">Other Versions<
</UL> </UL>
</DIV> </DIV>
<DIV class="commentbox"> <DIV class="commentbox">
<DIV class="boxheader">User Comments:</DIV> <H3>User Comments:</H3>
<BR>
<?php <?php
$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` DESC LIMIT 1"; $sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` DESC LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
@ -301,8 +309,8 @@ $sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote
$timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); $timestamp = strtotime("$year-$month-$day $hour:$minute:$second");
$commentdate = gmdate("F d, Y g:ia", $timestamp); $commentdate = gmdate("F d, Y g:ia", $timestamp);
echo"<DIV class=\"commenttitlebar\">"; //echo"<DIV class=\"commenttitlebar\">";
echo"<SPAN class=\"commenttitle\">$commenttitle</SPAN>"; echo"<h4>$commenttitle</h4>";
echo"<SPAN class=\"liststars\">"; echo"<SPAN class=\"liststars\">";
for ($i = 1; $i <= $rating; $i++) { for ($i = 1; $i <= $rating; $i++) {
@ -312,7 +320,7 @@ for ($i = $i; $i <= 5; $i++) {
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 WIDTH=16 HEIGHT=16 ALT=\"\">"; echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 WIDTH=16 HEIGHT=16 ALT=\"\">";
} }
echo"</SPAN>"; echo"</SPAN>";
echo"</DIV>"; //echo"</DIV>";
echo"&nbsp;&nbsp;By $commentname<BR>\n"; echo"&nbsp;&nbsp;By $commentname<BR>\n";
echo"&nbsp;<BR>\n"; echo"&nbsp;<BR>\n";
echo"$commentnotes<BR>\n\n"; echo"$commentnotes<BR>\n\n";
@ -332,27 +340,29 @@ echo"</DIV>";
?> ?>
</DIV> </DIV>
<?php
echo"<DIV class=\"baseline\">$datestring | Total Downloads: $downloadcount";
if ($populardownloads > 5 ) {echo" | Downloads this Week: $populardownloads";}
echo"</DIV>\n";
?>
<?php <?php
} else if ($page=="releases") { } else if ($page=="releases") {
echo"<DIV class=\"mipageheading\">"; echo"<h3>All Releases</h3>";
echo"Recent Releases:<BR>";
echo"</DIV>";
$sql = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.URI, TV.Notes, TA.AppName, TOS.OSName $sql = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.URI, TV.Notes, TA.AppName, TOS.OSName
FROM `t_version` TV FROM `t_version` TV
INNER JOIN t_applications TA ON TV.AppID = TA.AppID INNER JOIN t_applications TA ON TV.AppID = TA.AppID
INNER JOIN t_os TOS ON TV.OSID = TOS.OSID INNER JOIN t_os TOS ON TV.OSID = TOS.OSID
WHERE TV.ID = '$_GET[id]' AND `approved` = 'YES' WHERE TV.ID = '$_GET[id]' AND `approved` = 'YES' AND TA.AppName = '$application'
ORDER BY `Version` DESC, `OSName` ASC ORDER BY `Version` DESC, `OSName` ASC
LIMIT 0, 10"; LIMIT 0, 10";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
while ($row = mysql_fetch_array($sql_result)) { while ($row = mysql_fetch_array($sql_result)) {
$vid = $row["vID"]; $vid = $row["vID"];
$minappver = $row["MinAppVer"]; if ($appvernames[$row["MinAppVer"]]) {$minappver = $appvernames[$row["MinAppVer"]]; } else { $minappver = $row["MinAppVer"]; }
$maxappver = $row["MaxAppVer"]; if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer"]]; } else { $maxappver = $row["MaxAppVer"]; }
$filesize = $row["Size"]; $filesize = $row["Size"];
$notes = $row["Notes"]; $notes = $row["Notes"];
$version = $row["Version"]; $version = $row["Version"];
@ -364,17 +374,15 @@ LIMIT 0, 10";
echo"<DIV>"; //Open Version DIV echo"<DIV>"; //Open Version DIV
//Description & Version Notes //Description & Version Notes
echo"<SPAN class=\"itemdescription\">"; echo"<h4><A HREF=\"moreinfo.php?id=$id&vid=$vid\">Version $version</A></h4>\n";
echo"<SPAN class=\"listtitle\"><A HREF=\"moreinfo.php?id=$id&vid=$vid\">Version $version</A></SPAN><br>\n"; if ($notes) {echo"$notes<br><br>\n"; }
if ($notes) {echo"$notes"; }
echo"</SPAN>\n";
//Icon Bar Modules //Icon Bar Modules
echo"<DIV style=\"height: 34px\">"; echo"<DIV style=\"height: 34px\">";
echo"<DIV class=\"iconbar\" style=\"width: 100px;\"><A HREF=\"install.php/$filename?id=$id&vid=$vid\"><IMG SRC=\"/images/download.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"Install $name (Right-Click to Download)\" ALT=\"\">Install</A><BR><SPAN class=\"filesize\">Size: $filesize kb</SPAN></DIV>"; echo"<DIV class=\"iconbar\"><A HREF=\"install.php/$filename?id=$id&vid=$vid\"><IMG SRC=\"/images/download.png\" BORDER=0 HEIGHT=34 WIDTH=34 TITLE=\"Install $name (Right-Click to Download)\" ALT=\"\">Install</A><BR><SPAN class=\"filesize\">Size: $filesize kb</SPAN></DIV>";
echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/".strtolower($appname)."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float: left\" ALT=\"$appname\">&nbsp;Works with:<BR>&nbsp;&nbsp;$minappver - $maxappver</DIV>"; echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/".strtolower($appname)."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 ALT=\"\">&nbsp;For $appname:<BR>&nbsp;&nbsp;$minappver - $maxappver</DIV>";
echo"<DIV class=\"iconbar\" style=\"width: 90px;\"><IMG SRC=\"/images/".strtolower($osname)."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float: left\" ALT=\"\">OS:<BR>"; if($osname=="ALL") {echo"All OSes";} else {echo"$osname";} echo"</DIV>"; if($osname !=="ALL") { echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/".strtolower($osname)."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 ALT=\"\">For&nbsp;$osname<BR>only</DIV>"; }
echo"</DIV>"; echo"</DIV><BR>\n";
echo"</DIV>"; echo"</DIV>";
} }
@ -382,36 +390,25 @@ echo"</DIV>";
//End General Page //End General Page
} else if ($page=="comments") { } else if ($page=="comments") {
//Comments/Ratings Page //Comments/Ratings Page
echo"<DIV class=\"mipageheading\">"; echo"<h3>User Comments:</h3>";
echo"User Comments:<BR>";
echo"</DIV>"; $sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` DESC";
$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` ASC";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
$num_results = mysql_num_rows($sql_result); $num_results = mysql_num_rows($sql_result);
while ($row = mysql_fetch_array($sql_result)) { while ($row = mysql_fetch_array($sql_result)) {
$name = $row["CommentName"]; $name = $row["CommentName"];
$title = $row["CommentTitle"]; $title = $row["CommentTitle"];
$notes = $row["CommentNote"]; $notes = $row["CommentNote"];
$date = $row["CommentDate"]; $date = date("l, F j Y", strtotime($row["CommentDate"]));
$rating = $row["CommentVote"]; $rating = $row["CommentVote"];
echo"<DIV class=\"commenttitlebar\">";
echo"<SPAN class=\"commenttitle\">$title</SPAN>";
echo"<SPAN class=\"liststars\">";
for ($i = 1; $i <= $rating; $i++) { echo"<h4>$title</h4>";
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 WIDTH=16 HEIGHT=16 ALT=\"*\">"; echo"&nbsp;&nbsp;Posted on $date by $name<br>";
}
for ($i = $i; $i <= 5; $i++) {
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 WIDTH=16 HEIGHT=16 ALT=\"\">";
}
echo"</SPAN>";
echo"</DIV>";
echo"$notes<BR>\n\n"; echo"$notes<BR>\n\n";
echo"<DIV class=\"commentfooter\">\n"; echo"<DIV class=\"iconbar\" style=\"padding-left: 20px\" title=\"$rating of 5 stars\"><A HREF=\"moreinfo.php?id=$id&page=comments\"><IMG SRC=\"/images/ratings.png\" BORDER=0 HEIGHT=34 WIDTH=34 ALT=\"\">Rated<br>&nbsp;&nbsp;$rating of 5</A></DIV><BR><BR>";
echo"<SPAN style=\"padding-left: 30px; font-size: 8pt; font-weight: bold\">Posted on $date by $name</SPAN><br>";
echo"</DIV>\n";
} }
if ($num_results=="0") { if ($num_results=="0") {
@ -427,9 +424,7 @@ echo"<DIV style=\"height: 5px;\"></DIV>";
} else if ($page=="staffreview") { } else if ($page=="staffreview") {
//Staff/Editor Review Tab //Staff/Editor Review Tab
echo"<DIV class=\"mipageheading\">"; echo"<h3>Editor Review:</h3>";
echo"Editor Review:<BR>";
echo"</DIV>";
echo"<DIV class=\"reviewbox\">\n"; echo"<DIV class=\"reviewbox\">\n";
$sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `Pick`, TU.UserName FROM `t_reviews` TR $sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `Pick`, TU.UserName FROM `t_reviews` TR
@ -468,11 +463,10 @@ echo"<DIV class=\"commentfooter\">Posted on $posteddate by $username</DIV>\n";
$typename = "extension"; $typename = "extension";
if ($num_results=="0") { if ($num_results=="0") {
echo" echo"
<SPAN style=\"font-weight: bold\">
This $typename has not yet been reviewed.<BR><BR> This $typename has not yet been reviewed.<BR><BR>
To see what other users think of this extension, view the <A HREF=\"moreinfo.php?id=$id&page=comments\">User Comments...</A> To see what other users think of this extension, view the <A HREF=\"moreinfo.php?id=$id&page=comments\">User Comments...</A>
</SPAN>
"; ";
@ -481,15 +475,14 @@ echo"</DIV>\n";
} else if ($page=="opinion") { } else if ($page=="opinion") {
//My Opinion Tab //My Opinion Tab
echo"<DIV class=\"mipageheading\">"; echo"<h3>Your opinion of $name:</h3>";
echo"Your Rating / Feedback:<BR>";
echo"</DIV>";
?> ?>
<?php <?php
if ($_GET["error"]=="norating") { if ($_GET["error"]=="norating") {
echo"<DIV class=\"errorbox\">\n echo"<DIV class=\"errorbox\">\n
Your comment submission had the following error(s), please fix these errors and try again.<br>\n Your comment submission had the following error(s), please fix these errors and try again.<br>\n
&nbsp;&nbsp;&nbsp;Rating field cannot be left blank.<br>\n &nbsp;&nbsp;&nbsp;Rating cannot be left blank.<br>\n
&nbsp;&nbsp;&nbsp;Review/Comments cannot be left blank.<br>\n
</DIV>\n"; </DIV>\n";
} }
?> ?>
@ -514,9 +507,8 @@ Rating:*<BR>
Title:<BR> Title:<BR>
<INPUT NAME="title" TYPE="TEXT" SIZE=30 MAXLENGTH=50><BR> <INPUT NAME="title" TYPE="TEXT" SIZE=30 MAXLENGTH=50><BR>
Review/Comments:<BR> Review/Comments:*<BR>
<TEXTAREA NAME="comments" ROWS=5 COLS=55></TEXTAREA><BR> <TEXTAREA NAME="comments" ROWS=5 COLS=55></TEXTAREA><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="smallfont">No Comment?<INPUT NAME="commententered" TYPE="CHECKBOX" VALUE="FALSE"></SPAN><BR>
<INPUT NAME="submit" TYPE="SUBMIT" VALUE="Post">&nbsp;&nbsp;<INPUT NAME="reset" TYPE="RESET" VALUE="Reset"><BR> <INPUT NAME="submit" TYPE="SUBMIT" VALUE="Post">&nbsp;&nbsp;<INPUT NAME="reset" TYPE="RESET" VALUE="Reset"><BR>
<SPAN class="smallfont">* Required Fields</SPAN> <SPAN class="smallfont">* Required Fields</SPAN>
</FORM> </FORM>
@ -524,10 +516,7 @@ Review/Comments:<BR>
</DIV> </DIV>
<?php <?php
} // End Pages } // End Pages
echo"<DIV class=\"baseline\">";
echo"Date Added: $dateadded | Last Updated: $dateupdated | ";
echo"Total Downloads: $downloadcount<BR>";
echo"</DIV>\n";
echo"</DIV>\n"; echo"</DIV>\n";
echo"<BR>\n"; echo"<BR>\n";
?> ?>