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-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
include"$page_header";
@ -54,7 +54,7 @@ include"$page_header";
<div id="mBody">
<?php
$type = "E";
$type = "T";
if ($_GET["application"]) {$application=$_GET["application"]; }
$index="yes";
@ -103,11 +103,11 @@ echo"<SPAN class=\"itemdescription\">$body</SPAN><BR>\n";
</DIV>
<div id="mBody">
<h3>What is an Extension?</h3>
<p>Extensions are small add-ons that add new functionality to <?php print(ucwords($application)); ?>.
They can add anything from a toolbar button to a completely new feature. They allow the browser to be customized to fit the
personal needs of each user if they need addtional features<?php if ($application !=="mozilla") { ?>, while keeping <?php print(ucwords($application)); ?> small
to download <?php } ?>.</p>
<h3>What is a Theme?</h3>
<p>Themes are skins for <?php print(ucwords($application)); ?>, they allow you to change the look and
feel of the browser and personalize it to your tastes. A theme can simply change the colors of <?php print(ucwords($application)); ?>
or it can change every piece of the browser appearance.</p>
<?php
//Temporary!! Current Version Array Code
@ -120,17 +120,20 @@ $currentver_display = $currentver_display_array[$application];
<!-- Start News Columns -->
<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>
<span class="newsSubline">New and Updated Extensions</span>
<span class="newsSubline">New and Updated Themes</span>
<ul class="news">
<?php
$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
FROM `t_main` TM
INNER JOIN t_version TV ON TM.ID = TV.ID
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
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 ";
INNER JOIN t_version TV ON TM.ID = TV.ID
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
INNER JOIN t_os TOS ON TV.OSID = TOS.OSID
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);
while ($row = mysql_fetch_array($sql_result)) {
$i++;
@ -166,7 +169,7 @@ $sql = "SELECT TM.ID, TV.vID,TM.Name, TV.Version, TM.TotalDownloads, TM.download
FROM `t_main` TM
INNER JOIN t_version TV ON TM.ID = TV.ID
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);
while ($row = mysql_fetch_array($sql_result)) {
$i++;

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

@ -65,15 +65,14 @@ $pagetitle = $pagetitles[$_GET["page"]];
<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">
</HEAD>
<BODY>
<?php
include"$page_header";
$type = "E";
$category=$_GET["category"];
include"inc_sidebar.php";
?>
<DIV id="content">
<?php
//Get Author Data
$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"];
}
//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
$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
INNER JOIN t_version TV ON TM.ID = TV.ID
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
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' ";
if ($_GET["vid"]) { $sql .=" AND TV.vID = '$_GET[vid]' "; }
$sql .= "ORDER BY `Name` , `Version` DESC LIMIT 1";
@ -118,22 +129,26 @@ $v++;
$vid = $row["vID"];
if (!$_GET['vid']) {$_GET['vid']=$vid;}
$appname = $row["AppName"];
$minappver = $row["MinAppVer"];
$maxappver = $row["MaxAppVer"];
if ($appvernames[$row["MinAppVer"]]) {$minappver = $appvernames[$row["MinAppVer"]]; } else { $minappver = $row["MinAppVer"]; }
if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer"]]; } else { $maxappver = $row["MaxAppVer"]; }
$verdateadded = $row["VerDateAdded"];
$verdateupdated = $row["VerDateUpdated"];
$filesize = $row["Size"];
$notes = $row["Notes"];
$version = $row["Version"];
$uri = $row["URI"];
$previewuri = $row["PreviewURI"];
$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 ($VerDateUpdated > $dateupdated) {$dateupdated = $VerDateUpdated; }
//Turn Authors Array into readable string...
$authorcount = count($authors);
foreach ($authors as $author) {
@ -146,79 +161,57 @@ if ($authorcount != $n) {$authorstring .=", "; }
$authors = $authorstring;
unset($authorstring, $n); // Clear used Vars..
//Create Customizeable Timestamp for DateAdded/DateUpdated
$day=substr($dateadded,8,2); //get the day
$month=substr($dateadded,5,2); //get the month
$year=substr($dateadded,0,4); //get the year
$hour=substr($dateadded,11,2); //get the hour
$minute=substr($dateadded,14,2); //get the minute
$second=substr($dateadded,17,2); //get the sec
$datimestamp = strtotime("$year-$month-$day $hour:$minute:$second");
if ($dateupdated > $dateadded) {
$timestamp = $dateupdated;
$datetitle = "Last Update: ";
} else {
$timestamp = $dateadded;
$datetitle = "Added on: ";
}
$day=substr($dateupdated,8,2); //get the day
$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");
$date = date("F d, Y g:i:sa", strtotime("$timestamp"));
$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
if (!$rating) { $rating="0"; }
?>
<DIV class="tabbar">
<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>
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=comments"; ?>">Comments</A></DIV>
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=staffreview"; ?>">Editor Review</A></DIV>
<DIV class="tab"><A HREF="?<?php echo"id=$id&vid=$vid&page=opinion"; ?>">My Opinion</A></DIV>
</DIV>
<H3> <?php ucwords("$application "); ?> Extensions &#187; <?php echo"$row[Name]"; if ($pagetitle) {echo" :: $pagetitle"; } ?></H3>
<A HREF="?<?php echo"id=$id&vid=$vid"; ?>">More Info</A> |
<A HREF="?<?php echo"id=$id&vid=$vid&page=releases"; ?>">All Releases</A> |
<A HREF="?<?php echo"id=$id&vid=$vid&page=comments"; ?>">Comments</A> |
<A HREF="?<?php echo"id=$id&vid=$vid&page=staffreview"; ?>">Editor Review</A> |
<A HREF="?<?php echo"id=$id&vid=$vid&page=opinion"; ?>">My Opinion</A>
<?php
echo"<DIV class=\"item\">\n";
//echo"<DIV style=\"height: 100px\">"; //Why?!?
echo"<DIV id=\"item\">\n";
if ($previewuri) {
list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri");
echo"<IMG SRC=\"$previewuri\" BORDER=0 HEIGHT=$height WIDTH=$width STYLE=\"float: right; padding-right: 5px\" ALT=\"$name preview\">";
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 ALT=\"$name preview - $caption\" TITLE=\"$caption\">\n";
echo"</DIV>\n";
}
//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"<h5>";
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"</DIV>";
echo"<SPAN class=\"authorline\">By $authors</SPAN>";
echo"</h5>";
//Description & Version Notes
echo"<SPAN class=\"itemdescription\">";
echo"$description<BR>";
if ($notes) {echo"$notes"; }
echo"</SPAN>\n";
echo"$description<BR>\n";
if ($notes) {echo"<BR>\n$notes<BR>"; }
echo"<BR>\n";
//echo"</DIV>\n";
echo"<BR>\n\n";
$page = $_GET["page"];
if (!$page or $page=="general") {
?>
<DIV class="downloadbox">
<?php
//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"
<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") {
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>
@ -277,9 +284,10 @@ echo"<LI> <A HREF=\"moreinfo.php?id=$id&vid=$vid&page=releases\">Other Versions<
</UL>
</DIV>
<DIV class="commentbox">
<DIV class="boxheader">User Comments:</DIV>
<BR>
<H3>User Comments:</H3>
<?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_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");
$commentdate = gmdate("F d, Y g:ia", $timestamp);
echo"<DIV class=\"commenttitlebar\">";
echo"<SPAN class=\"commenttitle\">$commenttitle</SPAN>";
//echo"<DIV class=\"commenttitlebar\">";
echo"<h4>$commenttitle</h4>";
echo"<SPAN class=\"liststars\">";
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"</SPAN>";
echo"</DIV>";
//echo"</DIV>";
echo"&nbsp;&nbsp;By $commentname<BR>\n";
echo"&nbsp;<BR>\n";
echo"$commentnotes<BR>\n\n";
@ -332,27 +340,29 @@ echo"</DIV>";
?>
</DIV>
<?php
echo"<DIV class=\"baseline\">$datestring | Total Downloads: $downloadcount";
if ($populardownloads > 5 ) {echo" | Downloads this Week: $populardownloads";}
echo"</DIV>\n";
?>
<?php
} else if ($page=="releases") {
echo"<DIV class=\"mipageheading\">";
echo"Recent Releases:<BR>";
echo"</DIV>";
echo"<h3>All Releases</h3>";
$sql = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.URI, TV.Notes, TA.AppName, TOS.OSName
FROM `t_version` TV
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
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
LIMIT 0, 10";
$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)) {
$vid = $row["vID"];
$minappver = $row["MinAppVer"];
$maxappver = $row["MaxAppVer"];
if ($appvernames[$row["MinAppVer"]]) {$minappver = $appvernames[$row["MinAppVer"]]; } else { $minappver = $row["MinAppVer"]; }
if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer"]]; } else { $maxappver = $row["MaxAppVer"]; }
$filesize = $row["Size"];
$notes = $row["Notes"];
$version = $row["Version"];
@ -364,17 +374,15 @@ LIMIT 0, 10";
echo"<DIV>"; //Open Version DIV
//Description & Version Notes
echo"<SPAN class=\"itemdescription\">";
echo"<SPAN class=\"listtitle\"><A HREF=\"moreinfo.php?id=$id&vid=$vid\">Version $version</A></SPAN><br>\n";
if ($notes) {echo"$notes"; }
echo"</SPAN>\n";
echo"<h4><A HREF=\"moreinfo.php?id=$id&vid=$vid\">Version $version</A></h4>\n";
if ($notes) {echo"$notes<br><br>\n"; }
//Icon Bar Modules
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\"><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\" 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>";
echo"</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 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>"; }
echo"</DIV><BR>\n";
echo"</DIV>";
}
@ -382,36 +390,25 @@ echo"</DIV>";
//End General Page
} else if ($page=="comments") {
//Comments/Ratings Page
echo"<DIV class=\"mipageheading\">";
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` ASC";
echo"<h3>User Comments:</h3>";
$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` DESC";
$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);
while ($row = mysql_fetch_array($sql_result)) {
$name = $row["CommentName"];
$title = $row["CommentTitle"];
$notes = $row["CommentNote"];
$date = $row["CommentDate"];
$date = date("l, F j Y", strtotime($row["CommentDate"]));
$rating = $row["CommentVote"];
echo"<DIV class=\"commenttitlebar\">";
echo"<SPAN class=\"commenttitle\">$title</SPAN>";
echo"<SPAN class=\"liststars\">";
for ($i = 1; $i <= $rating; $i++) {
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 WIDTH=16 HEIGHT=16 ALT=\"*\">";
}
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"<h4>$title</h4>";
echo"&nbsp;&nbsp;Posted on $date by $name<br>";
echo"$notes<BR>\n\n";
echo"<DIV class=\"commentfooter\">\n";
echo"<SPAN style=\"padding-left: 30px; font-size: 8pt; font-weight: bold\">Posted on $date by $name</SPAN><br>";
echo"</DIV>\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>";
}
if ($num_results=="0") {
@ -427,9 +424,7 @@ echo"<DIV style=\"height: 5px;\"></DIV>";
} else if ($page=="staffreview") {
//Staff/Editor Review Tab
echo"<DIV class=\"mipageheading\">";
echo"Editor Review:<BR>";
echo"</DIV>";
echo"<h3>Editor Review:</h3>";
echo"<DIV class=\"reviewbox\">\n";
$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";
if ($num_results=="0") {
echo"
<SPAN style=\"font-weight: bold\">
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>
</SPAN>
";
@ -481,15 +475,14 @@ echo"</DIV>\n";
} else if ($page=="opinion") {
//My Opinion Tab
echo"<DIV class=\"mipageheading\">";
echo"Your Rating / Feedback:<BR>";
echo"</DIV>";
echo"<h3>Your opinion of $name:</h3>";
?>
<?php
if ($_GET["error"]=="norating") {
echo"<DIV class=\"errorbox\">\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";
}
?>
@ -514,9 +507,8 @@ Rating:*<BR>
Title:<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>
&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>
<SPAN class="smallfont">* Required Fields</SPAN>
</FORM>
@ -524,10 +516,7 @@ Review/Comments:<BR>
</DIV>
<?php
} // 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"<BR>\n";
?>