diff --git a/mozilla/webtools/update/about/index.php b/mozilla/webtools/update/about/index.php index 49d02e12770..8d91acecc38 100644 --- a/mozilla/webtools/update/about/index.php +++ b/mozilla/webtools/update/about/index.php @@ -39,33 +39,32 @@ - - - - - -Mozilla Update :: Frequently Asked Questions + + + + + Mozilla Update :: Frequently Asked Questions - - - -

Frequently Asked Questions

+ +
+ +

Frequently Asked Questions

$title\n"; +echo"

$title

\n"; echo"$text\n"; } ?> - +
diff --git a/mozilla/webtools/update/core/commenthelpful.php b/mozilla/webtools/update/core/commenthelpful.php index d66b3bff5fa..5cfca73e4b7 100755 --- a/mozilla/webtools/update/core/commenthelpful.php +++ b/mozilla/webtools/update/core/commenthelpful.php @@ -41,7 +41,7 @@ require"../core/config.php"; //Check and see if the CommentID/ID is valid. -$sql = "SELECT `ID`, `CommentID` FROM `t_feedback` WHERE `ID` = '".escape_string($_GET[id])."' AND `CommentID`='".escape_string($_GET["commentid"])."' LIMIT 1"; +$sql = "SELECT `ID`, `CommentID` FROM `feedback` WHERE `ID` = '".escape_string($_GET[id])."' AND `CommentID`='".escape_string($_GET["commentid"])."' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); if(mysql_num_rows($sql_result)=="0") { unset($_GET["id"],$_GET["commentid"],$id,$commentid); @@ -64,7 +64,7 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys } //Get Data for the Comment Record as it stands. -$sql = "SELECT `helpful-yes`,`helpful-no`,`helpful-rating` FROM `t_feedback` WHERE `CommentID` = '$commentid' LIMIT 1"; +$sql = "SELECT `helpful-yes`,`helpful-no`,`helpful-rating` FROM `feedback` WHERE `CommentID` = '$commentid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); $row = mysql_fetch_array($sql_result); $helpful_yes = $row["helpful-yes"]; @@ -88,7 +88,7 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys $helpful_rating = ($helpful_no/$total)*-100; } } - $sql = "UPDATE `t_feedback` SET `helpful-yes`='$helpful_yes',`helpful-no`='$helpful_no',`helpful-rating`='$helpful_rating' WHERE `CommentID`='$commentid' LIMIT 1"; + $sql = "UPDATE `feedback` SET `helpful-yes`='$helpful_yes',`helpful-no`='$helpful_no',`helpful-rating`='$helpful_rating' WHERE `CommentID`='$commentid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); diff --git a/mozilla/webtools/update/core/config.php b/mozilla/webtools/update/core/config.php index 66efc736844..f9a3f2b7c8b 100644 --- a/mozilla/webtools/update/core/config.php +++ b/mozilla/webtools/update/core/config.php @@ -44,9 +44,9 @@ include"dbconfig.php"; // Include Database Server Configuration File // General Website Configuration Variables -$websitepath = "D:/Websites/update/mozilla/webtools/update"; // Local Path to Site Files -$repositorypath = "D:/Websites/update/mozilla/webtools/update/files/"; //Path to XPI/JAR Respository -$sitehostname = "mozillaupdate.psychoticwolf.net"; // DNS Hostname +$websitepath = "/opt/update-beta"; // Local Path to Site Files +$repositorypath = "/opt/update-beta/files/"; //Path to XPI/JAR Respository +$sitehostname = $_SERVER["SERVER_NAME"]; // DNS Hostname, ex. "update.mozilla.org" $ftpurl = "http://ftp.mozilla.org/pub/mozilla.org"; // URL to FTP site // Page Header and Footer Path Variables @@ -64,6 +64,4 @@ $time_start = getmicrotime(); include"inc_guids.php"; // GUID --> AppName Handler include"inc_global.php"; // Global Functions - Variable Cleanup include"inc_browserdetection.php"; //Browser Detection - App Variable Handling -//include"sessionconfig.php"; //Start Session - ?> diff --git a/mozilla/webtools/update/core/inc_browserdetection.php b/mozilla/webtools/update/core/inc_browserdetection.php index 853762c4503..9aee303bf6c 100644 --- a/mozilla/webtools/update/core/inc_browserdetection.php +++ b/mozilla/webtools/update/core/inc_browserdetection.php @@ -40,11 +40,7 @@ //$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.6a) Gecko/20030122"; //$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.4a) Gecko/20030305"; //$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7b) Gecko/20040302"; -//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Lightninglizard/0.8"; -//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040322 Nuclearunicorn/0.8.0+ (Firefox/0.8.0+ rebrand)"; -//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9"; //$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3"; -//$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040818 Firefox/0.9.1+"; //$_SERVER["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"; @@ -76,9 +72,9 @@ if ($_GET["version"]=="auto-detect") {$_GET["version"]="";}//Clear Version For A break; } -$application = $_GET["application"]; -$app_version = $_GET["version"]; -$OS = $_GET["os"]; +$application = escape_string($_GET["application"]); +$app_version = escape_string($_GET["version"]); +$OS = escape_string($_GET["os"]); //print("$application, $app_version, $OS
\n"); @@ -139,7 +135,7 @@ if (!$application) { $application="firefox"; } //Default App is Firefox //App_Version //Get Max Version for Application Specified if (!$app_version) { - $sql = "SELECT `major`,`minor`,`release`,`SubVer` FROM `t_applications` WHERE `AppName` = '$application' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC LIMIT 1"; + $sql = "SELECT `major`,`minor`,`release`,`SubVer` FROM `applications` WHERE `AppName` = '$application' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $release = "$row[major].$row[minor]"; @@ -156,7 +152,7 @@ if (!$app_version) { //Check for Internal Versioning for the $app_version - $sql = "SELECT `int_version`,`major`,`minor`,`release`,`SubVer` FROM `t_applications` WHERE `AppName`='$application' AND `int_version` IS NOT NULL ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; + $sql = "SELECT `int_version`,`major`,`minor`,`release`,`SubVer` FROM `applications` WHERE `AppName`='$application' AND `int_version` IS NOT NULL ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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)) { $release = "$row[major].$row[minor]"; diff --git a/mozilla/webtools/update/core/inc_footer.php b/mozilla/webtools/update/core/inc_footer.php index 999460e5f13..17e110d9500 100644 --- a/mozilla/webtools/update/core/inc_footer.php +++ b/mozilla/webtools/update/core/inc_footer.php @@ -36,43 +36,17 @@ // // ***** END LICENSE BLOCK ***** ?> - -
- +
+ - -";print_r($_SESSION); echo"
\n"; -//echo"Current application data: $application - $app_version - $OS "; -//} - - -return; - -//Site Timer Counter :: Debug-Mode Item Only -$time_end = getmicrotime(); -//Returns in format: sss.mmmuuunnnppp ;-) -// m = millisec, u=microsec, n=nansec, p=picosec -$time = round($time_end - $time_start,"6"); - -echo"
© 2004 The Mozilla Organization"; if ($_SESSION["debug"]=="true") {echo" | Page Created in $time seconds"; } echo" | Terms of Use | Top
"; //Debug Time - -if ($pos !== false) { -echo"\n"; -} -?> diff --git a/mozilla/webtools/update/core/inc_global.php b/mozilla/webtools/update/core/inc_global.php index 0420570a864..c74f5246b08 100644 --- a/mozilla/webtools/update/core/inc_global.php +++ b/mozilla/webtools/update/core/inc_global.php @@ -63,27 +63,19 @@ foreach ($_GET as $key => $val) { $_GET["$key"] = htmlentities(str_replace("\\","",strip_tags($_GET["$key"]))); } -//Set Debug Mode session Variable -if ($_GET["debug"]=="true") {$_SESSION["debug"]=$_GET["debug"]; } else if ($_GET["debug"]=="false") {unset($_SESSION["debug"]);} - // Bug 250596 Fixes for incoming $_GET variables. if ($_GET["application"]) { $_GET["application"] = escape_string(strtolower($_GET["application"])); -$sql = "SELECT AppID FROM `t_applications` WHERE `AppName` = '".ucwords(strtolower($_GET["application"]))."' LIMIT 1"; +$sql = "SELECT AppID FROM `applications` WHERE `AppName` = '".ucwords(strtolower($_GET["application"]))."' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)===0) {unset($_GET["application"]);} } -//if ($_GET["version"]) { -//$sql = "SELECT AppID FROM `t_applications` WHERE `Release` = '$_GET[version]' LIMIT 1"; -// $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); -// if (mysql_num_rows($sql_result)===0) {unset($_GET["application"]);} -//} if ($_GET["category"] AND $_GET["category"] !=="All" AND $_GET["category"] !=="Editors Pick" AND $_GET["category"] !=="Popular" AND $_GET["category"] !=="Top Rated" AND $_GET["category"] !=="Newest") { -$sql = "SELECT CatName FROM `t_categories` WHERE `CatName` = '".escape_string(ucwords(strtolower($_GET["category"])))."' LIMIT 1"; +$sql = "SELECT CatName FROM `categories` WHERE `CatName` = '".escape_string(ucwords(strtolower($_GET["category"])))."' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)===0) {unset($_GET["category"]);} } @@ -99,10 +91,9 @@ function page_error($reason, $custom_message) { global $page_header, $page_footer; echo"Mozilla Update :: Error\n"; - echo"\n"; include"$page_header"; - + echo"
"; echo"

Mozilla Update :: Error

\n"; echo"\n"; echo"Mozilla Update has encountered an error and is unable to fulfill your request. Please try your request again later. If the @@ -111,7 +102,7 @@ function page_error($reason, $custom_message) { Error $reason: $custom_message

   «« Go Back to Previous Page"; echo"
\n"; - + echo"
\n"; include"$page_footer"; echo"\n\n"; exit; @@ -119,7 +110,7 @@ function page_error($reason, $custom_message) { function writeFormKey() { - $sql = "SELECT UserPass FROM t_userprofiles WHERE UserID = '".$_SESSION["uid"]."'"; + $sql = "SELECT UserPass FROM userprofiles WHERE UserID = '".$_SESSION["uid"]."'"; $res = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($res); echo "\n"; @@ -128,7 +119,7 @@ function writeFormKey() function checkFormKey() { $key = $_POST["formkey"]; - $sql = "SELECT UserPass FROM t_userprofiles WHERE UserID = '".$_SESSION["uid"]."'"; + $sql = "SELECT UserPass FROM userprofiles WHERE UserID = '".$_SESSION["uid"]."'"; $res = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($res); if ($key != md5($row["UserPass"])) @@ -148,12 +139,14 @@ function uriparams() { global $app_version, $application, $items_per_page, $category, $OS, $uriparams_skip; $uriparams = ""; - if ($application and $uriparams_skip !="application") { $uriparams .="application=$application"; } - if ($app_version) { $uriparams .="&version=$app_version"; } - if ($OS) { $uriparams .="&os=$OS"; } - if ($category and $uriparams_skip !="category") { $uriparams .="&category=$category"; } - if ($items_per_page) { $uriparams .="&numpg=$items_per_page"; } - + if ($application and $uriparams_skip !="application") { $uriparams .="application=$application&"; } + if ($app_version and $uriparams_skip !="application") { $uriparams .="version=$app_version&"; } + if ($OS) { $uriparams .="os=$OS&"; } + if ($category and $uriparams_skip !="category") { $uriparams .="category=$category&"; } + if ($items_per_page) { $uriparams .="numpg=$items_per_page"; } + if (substr($uriparams, -1)==";") { + $uriparams = substr($uriparams,0,strlen($uriparams)-5); + } return $uriparams; } diff --git a/mozilla/webtools/update/core/inc_header.php b/mozilla/webtools/update/core/inc_header.php index 9a9134193d7..7a731b9c049 100644 --- a/mozilla/webtools/update/core/inc_header.php +++ b/mozilla/webtools/update/core/inc_header.php @@ -37,52 +37,74 @@ // ***** END LICENSE BLOCK ***** ?> - - - - - - - - - - - - + + + + + + + + + + + + + + - +
- + +
Visit Mozilla.org
- -Firefox: application=firefox">Extensions application=firefox">Themes Search Plugins | -Thunderbird: application=thunderbird">Extensions application=thunderbird">Themes | -Mozilla Suite: application=mozilla">Extensions application=mozilla">Themes - - \ No newline at end of file + + +
\ No newline at end of file diff --git a/mozilla/webtools/update/core/install.php b/mozilla/webtools/update/core/install.php index 3f41117a69b..a96e4e9f592 100755 --- a/mozilla/webtools/update/core/install.php +++ b/mozilla/webtools/update/core/install.php @@ -41,7 +41,7 @@ require"../core/config.php"; //Get Full Information for the file requested. $uri = escape_string(str_replace(" ","+",$_GET["uri"])); -$sql = "SELECT `vID`, TM.ID, `URI` FROM `t_version` TV INNER JOIN `t_main` TM ON TM.ID=TV.ID WHERE `URI`='$uri' LIMIT 1"; +$sql = "SELECT `vID`, TM.ID, `URI` FROM `version` TV INNER JOIN `main` TM ON TM.ID=TV.ID WHERE `URI`='$uri' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="0") { exit("Invalid URI cannot Continue"); @@ -63,29 +63,29 @@ $maxlife = date("YmdHis", mktime(date("H"), date("i")-10, date("s"), date("m"), $remote_addr = $_SERVER["REMOTE_ADDR"]; } -$sql = "SELECT `dID` FROM `t_downloads` WHERE `ID`='$id' AND `vID`='$vid' AND `user_ip`='$remote_addr' AND `user_agent` = '$_SERVER[HTTP_USER_AGENT]' AND `date`>'$maxlife' AND `type`='download' LIMIT 1"; +$sql = "SELECT `dID` FROM `downloads` WHERE `ID`='$id' AND `vID`='$vid' AND `user_ip`='$remote_addr' AND `user_agent` = '$_SERVER[HTTP_USER_AGENT]' AND `date`>'$maxlife' AND `type`='download' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="0") { //Insert a record of this download for the next 10 minutes anyway. :-) $today=date("YmdHis"); - $sql = "INSERT INTO `t_downloads` (`ID`,`date`,`vID`, `user_ip`, `user_agent`, `type`) VALUES ('$id','$today','$vid', '$remote_addr', '$_SERVER[HTTP_USER_AGENT]', 'download');"; + $sql = "INSERT INTO `downloads` (`ID`,`date`,`vID`, `user_ip`, `user_agent`, `type`) VALUES ('$id','$today','$vid', '$remote_addr', '$_SERVER[HTTP_USER_AGENT]', 'download');"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Cleanup the Individual Downloads part of the table for old records - $sql = "DELETE FROM `t_downloads` WHERE `date`<'$maxlife' AND `type`='download'"; + $sql = "DELETE FROM `downloads` WHERE `date`<'$maxlife' AND `type`='download'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $today=date("Ymd")."000000"; //Per day download tracking -- Record hits for this day in the record (if it doesn't exist create it) - $sql = "SELECT `dID` FROM `t_downloads` WHERE `ID`='$id' AND `date`='$today' AND `type`='count' LIMIT 1"; + $sql = "SELECT `dID` FROM `downloads` WHERE `ID`='$id' AND `date`='$today' AND `type`='count' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="0") { - $sql = "INSERT INTO `t_downloads` (`ID`,`date`,`downloadcount`,`type`) VALUES ('$id','$today','1','count');"; + $sql = "INSERT INTO `downloads` (`ID`,`date`,`downloadcount`,`type`) VALUES ('$id','$today','1','count');"; } else { $row = mysql_fetch_array($sql_result); - $sql = "UPDATE `t_downloads` SET `downloadcount`=downloadcount+1 WHERE `dID`='$row[dID]' LIMIT 1"; + $sql = "UPDATE `downloads` SET `downloadcount`=downloadcount+1 WHERE `dID`='$row[dID]' LIMIT 1"; } $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); @@ -94,22 +94,22 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys //Download Statistic Management Code -- Maintain the last 7 days record count $mindate = date("Ymd", mktime(0, 0, 0, date("m"), date("d")-7, date("Y")))."000000"; $downloadcount="0"; - $sql = "SELECT `downloadcount` FROM `t_downloads` WHERE `ID`='$id' AND `date`>='$mindate' AND `type`='count' ORDER BY `date` DESC"; + $sql = "SELECT `downloadcount` FROM `downloads` WHERE `ID`='$id' AND `date`>='$mindate' AND `type`='count' ORDER BY `date` 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)) { $downloadcount = $downloadcount+$row["downloadcount"]; } //Update the 7 day count in the main record. - $sql = "UPDATE `t_main` SET `downloadcount`='$downloadcount' WHERE `ID`='$id' LIMIT 1"; + $sql = "UPDATE `main` SET `downloadcount`='$downloadcount' WHERE `ID`='$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Update the total downloadcount in the main record. - $sql = "UPDATE `t_main` SET `TotalDownloads`=TotalDownloads+1 WHERE `ID`='$id' LIMIT 1"; + $sql = "UPDATE `main` SET `TotalDownloads`=TotalDownloads+1 WHERE `ID`='$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Clean up the Counts per day for >8 days. - $sql = "DELETE FROM `t_downloads` WHERE `ID`='$id' AND `date`<'$mindate' AND `type`='count'"; + $sql = "DELETE FROM `downloads` WHERE `ID`='$id' AND `date`<'$mindate' AND `type`='count'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } diff --git a/mozilla/webtools/update/core/postfeedback.php b/mozilla/webtools/update/core/postfeedback.php index 6057b44cb3e..6e837cd2c44 100644 --- a/mozilla/webtools/update/core/postfeedback.php +++ b/mozilla/webtools/update/core/postfeedback.php @@ -41,7 +41,7 @@ require"../core/config.php"; //Check and see if the ID/vID is valid. -$sql = "SELECT TM.ID, TV.vID FROM `t_main` TM INNER JOIN `t_version` TV ON TM.ID=TV.ID WHERE TM.ID = '".escape_string($_POST[id])."' AND `vID`='".escape_string($_POST["vid"])."' LIMIT 1"; +$sql = "SELECT TM.ID, TV.vID FROM `main` TM INNER JOIN `version` TV ON TM.ID=TV.ID WHERE TM.ID = '".escape_string($_POST[id])."' AND `vID`='".escape_string($_POST["vid"])."' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); if(mysql_num_rows($sql_result)=="0") { unset($_POST["id"],$_POST["vid"],$id,$vid); @@ -76,9 +76,9 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys //Compile Info about What Version of the item this comment is about. -$sql = "SELECT TV.Version, `OSName`, `AppName` FROM `t_version` TV - INNER JOIN `t_os` TOS ON TOS.OSID=TV.OSID - INNER JOIN `t_applications` TA ON TA.AppID=TV.AppID +$sql = "SELECT TV.Version, `OSName`, `AppName` FROM `version` TV + INNER JOIN `os` TOS ON TOS.OSID=TV.OSID + INNER JOIN `applications` TA ON TA.AppID=TV.AppID WHERE TV.ID = '$id' AND TV.vID='$vid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); $row = mysql_fetch_array($sql_result); @@ -98,18 +98,18 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys //Check the Formkey against the DB, and see if this has already been posted... $formkey = escape_string($_POST["formkey"]); $date = date("Y-m-d H:i:s", mktime(0, 0, 0, date("m"), date("d")-1, date("Y"))); -$sql = "SELECT `CommentID` FROM `t_feedback` WHERE `formkey` = '$formkey' AND `CommentDate`>='$date'"; +$sql = "SELECT `CommentID` FROM `feedback` WHERE `formkey` = '$formkey' AND `CommentDate`>='$date'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); if (mysql_num_rows($sql_result)=="0") { //FormKey doesn't exist, go ahead and add their comment. - $sql = "INSERT INTO `t_feedback` (`ID`, `CommentName`, `CommentVote`, `CommentTitle`, `CommentNote`, `CommentDate`, `commentip`, `email`, `formkey`, `VersionTagline`) VALUES ('$id', '$name', '$rating', '$title', '$comments', NOW(NULL), '$remote_addr', '$email', '$formkey', '$versiontagline');"; + $sql = "INSERT INTO `feedback` (`ID`, `CommentName`, `CommentVote`, `CommentTitle`, `CommentNote`, `CommentDate`, `commentip`, `email`, `formkey`, `VersionTagline`) VALUES ('$id', '$name', '$rating', '$title', '$comments', NOW(NULL), '$remote_addr', '$email', '$formkey', '$versiontagline');"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Get Rating Data and Create $ratingarray $date = date("Y-m-d H:i:s", mktime(0, 0, 0, date("m"), date("d")-30, date("Y"))); - $sql = "SELECT ID, CommentVote FROM `t_feedback` WHERE `ID` = '$id' AND `CommentDate`>='$date' AND `CommentVote` IS NOT NULL"; + $sql = "SELECT ID, CommentVote FROM `feedback` WHERE `ID` = '$id' AND `CommentDate`>='$date' AND `CommentVote` IS NOT NULL"; $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)) { $ratingarray[$row[ID]][] = $row["CommentVote"]; @@ -129,7 +129,7 @@ if (mysql_num_rows($sql_result)=="0") { } - $sql = "UPDATE `t_main` SET `Rating`='$rating' WHERE `ID`='$id' LIMIT 1"; + $sql = "UPDATE `main` SET `Rating`='$rating' WHERE `ID`='$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } diff --git a/mozilla/webtools/update/core/reportcomment.php b/mozilla/webtools/update/core/reportcomment.php index 3e3eaeeb837..f3477680fba 100755 --- a/mozilla/webtools/update/core/reportcomment.php +++ b/mozilla/webtools/update/core/reportcomment.php @@ -41,7 +41,7 @@ require"../core/config.php"; //Check and see if the CommentID/ID is valid. -$sql = "SELECT `ID`, `CommentID` FROM `t_feedback` WHERE `ID` = '".escape_string($_GET[id])."' AND `CommentID`='".escape_string($_GET["commentid"])."' LIMIT 1"; +$sql = "SELECT `ID`, `CommentID` FROM `feedback` WHERE `ID` = '".escape_string($_GET[id])."' AND `CommentID`='".escape_string($_GET["commentid"])."' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); if(mysql_num_rows($sql_result)=="0") { unset($_GET["id"],$_GET["commentid"],$id,$commentid); @@ -62,7 +62,7 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys } //Set Flag on the Comment Record - $sql = "UPDATE `t_feedback` SET `flag`='YES' WHERE `CommentID`='$commentid' LIMIT 1"; + $sql = "UPDATE `feedback` SET `flag`='YES' WHERE `CommentID`='$commentid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); @@ -74,8 +74,6 @@ if ($_GET["type"]=="E") { } $return_path="$type/moreinfo.php?id=$id&vid=$vid&".uriparams()."&page=comments&pageid=$_GET[pageid]#$commentid"; -//header("Location: http://$sitehostname/$return_path"); -//exit; ?> diff --git a/mozilla/webtools/update/css/base/content.css b/mozilla/webtools/update/css/base/content.css index dbb355f16b1..a011fd9d73c 100755 --- a/mozilla/webtools/update/css/base/content.css +++ b/mozilla/webtools/update/css/base/content.css @@ -1,492 +1,96 @@ -/* mozilla.org Base Styles - * maintained by fantasai - * (classes defined in the Markup Guide - http://mozilla.org/contribute/writing/markup ) - */ -/* Suggested order: - * display - * list-style - * position - * float - * clear - * width - * height - * margin - * padding - * border - * background - * color - * font - * text-decoration - * text-align - * vertical-align - * white-space - * other text - * content - * - */ +body, td, th, h3, input { /* redundant rules for bad browsers */ + font-family: verdana, sans-serif; + font-size: x-small; + voice-family: "\"}\""; + voice-family: inherit; + font-size: small; +} -/* TOC: - Random HTML Styles - Forms - General Structure - Navigation - Quotations - Comments and Other Asides - Emphasis - Computers - General - Code - Examples and Figures - Q and A (FAQ) - Tables - Headers - Meta - Specific to Products Pages -*/ -/* Random HTML Styles */ +body { + color: #333; + line-height: 140%; +} - dt { - font-weight: bold; - } - - dd { - margin: 0 0 1em 1em; - } - - li { - margin-top: 0.2em; - margin-bottom: 0.2em; - } - - sup { - font-size: 70%; - } +a:link { color: #039; } +a:visited { color: #609; } +a:hover { color: #333; } +a:active { color: #000; } - form { - margin: 0; - display: inline; - } +#mBody li { padding-bottom: 0.5em; } - label { - font-weight: bold; - } +.sidebar_content > h1,.sidebar_content > h2,.sidebar_content > h3,.sidebar_content > h4,.sidebar_content > h5,.sidebar_content > h6,.sidebar > h1,.sidebar_general > h2,.sidebar_general > h3,.sidebar_general > h4,.sidebar_general > h5,.sidebar_general > h6 { + margin-top: 0; +} - .deepLevel #mainContent :link img, - .deepLevel #mainContent :visited img { - border: medium solid; - } +.sidebar_right { + margin-left: 65%; +} -/* General Structure */ - - .subtitle { - font-style: italic; - } +.sidebar_general ul { + margin-left: 0; + padding-left: 20px; +} - div.para { - margin: 1em 0; - } +.sidebar_general li { + padding: 0.2em 0; +} - div.section { - display: block; - padding-left: 3%; - } +img.imgright { + float: right; +} - div.section > h2, - div.section > h3, - div.section > h4, - div.section > h5, - div.section > h6 { - margin-left: -1.3%; - } - - .imgright { - float: right; - margin: 0 0 2em 2em; - } - - .first { - margin-top: 0; /* For IE not understanding first:child */ - } +img { + border: 0; +} -/* Navigation */ +dt { + font-weight: bold; +} - :link img, - :visited img { - border: 0; - } +dd { + margin: 0 0 1em 1em; +} - .ex-ref { - font-style: italic; - } +.skipLink { + position: absolute; + left: -1200px; + width: 990px; +} - dl.toc dt { - margin-top: 1em; - font-size: 110%; - } - dl.toc p { - margin: 0; - text-indent: 1em; - } - dl.toc p:first-child { - text-indent: 0; - } - dl.toc > dd { - margin-left: 1em; - } +.hide { + display: none; +} - ol.toc ol { - list-style-type: circle; - } - ol.toc > li > ol { - font-size: 90%; - } +ul.compact { + margin-left: 0; + padding-left: 20px; +} - ul.snav {/* section navigation or short navigation, whichever you prefer */ - margin: 0.7em 10%; - padding: .2em; - text-align: center; - } - ul.snav > li { - list-style-type: none; - margin: 0; - padding: 0; - } - ul.snav > li { - display: inline; - } - ul.snav > li:before { - content: " | "; - } - ul.snav > li:first-child:before { - content: ""; - } +img.rss { + float: right; + margin: 0; + padding: 4px 4px 0 0; +} - a.cont { - display: block; - margin-right: 0; - text-align: right; - } - -/* Quotations */ - - blockquote > address { - padding-left: 1em; - text-indent: -1em; - } - blockquote > address:before { - content: "\2015"; - } - - div.quote, - div.epigraph { - margin: 1em; - } - div.quote q, - div.epigraph q { - display: block; - margin: 0 .5em; - text-indent: -0.5em; - } - div.quote cite, - div.epigraph cite { - display: block; - padding: 0 1em; - text-align: right; - text-indent: -1em; - } - div.quote cite:before, - div.epigraph cite:before { - content: "\2015"; - } - - blockquote.epigraph, - div.epigraph q { - font-style: italic; - text-align: right; - } - blockquote.epigraph em, - div.epigraph q em { - font-style: normal; - } - blockquote.epigraph address, - div.epigraph cite { - font-style: normal; - } - -/* Comments and other Asides */ - - .note { - font-style: italic; - } - .note:before { - content: "Note: "; - } - - .remark { - font-size: smaller; - } - .remark:before { - content: "["; - } - .remark:after { - content: "]"; - } - - .sidenote { - /* clear: both; */ - margin: 0.75em 0.5em; - padding: 0.2em; - border: 1px solid; - - /* Block NS4 from floating */ /*/*/ - float: right; - width: 30%; - min-width: 15em; - /* */ - } - /* Reduce main header sizes */ - .sidenote h1 {font-size: 1.40em;} - .sidenote h2 {font-size: 1.25em;} - .sidenote h3 {font-size: 1.10em;} - - .key-point > h1:first-child, - .key-point > h2:first-child, - .key-point > h3:first-child, - .key-point > h4:first-child, - .key-point > h5:first-child, - .key-point > h6:first-child { - margin-top: 0; - } - -/* Emphasis */ - - /* em, strong */ - - strong.stronger { - font-style: italic; - font-weight: bold; - } - - strong.very-strong { - font-weight: bold; - text-transform: uppercase; - } - - *.important, - div.important, - p.important { - margin: 1em; - padding: 0.1em; - border: solid #F00; - font-size: larger; - } - -/* Computers - General */ - - pre.screen { - overflow: auto; - margin: 1em 0.5em; - padding: 0.2em; - border: solid 1px; - font-family: monospace; - white-space: pre; - } - - div.screen { - margin: 1em .5em; - padding: 0.2em; - border: solid 1px; - } - - span.application { - font-style: italic; - } - - kbd.command, - code.command { - white-space: pre; - } - - code.filename { - font-style: italic; - white-space: nowrap; - } - -/* Code */ - - code { - white-space: pre; - } - - pre.code { - overflow: auto; - margin: 1em .5em; - padding: .2em; - border: solid 1px; - } - - pre.code .remark { - font-size: 1em; - font-style: italic; - } - - /* turn off content generation */ - pre.code .remark:before, - pre.code .remark:after, - pre.code .note:before { - content: ""; - } - - -/* Examples and Figures */ - - .example { - margin: 1em 3%; - padding: .25em; - border: solid; - } - .example:before { - display: block; - font-weight: bold; - content: "Example"; - } - .example[title]:before { - content: "Example: " attr(title); - } - - pre.bad, - div.bad { - border: dashed red 3px; - } - .bad.example:before { - content: "Incorrect Example"; - } - .bad.example[title]:before { - content: "Incorrect Example: " attr(title); - } - - pre.good, - div.good { - border: double lime 3px; - } - .good.example:before { - content: "Correct Example"; - } - .good.example[title]:before { - content: "Correct Example: " attr(title); - } - - .figure, - .screenshot { - display: block; - margin: .75em auto; - } - .screenshot[title]:after, - .figure[title]:after { - display: block; - margin: 0 8% .05em; - font-style: italic; - font-size: small; - text-align: right; - content: attr(title); - } - - .co, - .callout { - text-decoration: underline; - } - -/* Q and A (FAQ) */ - - .qandaset .question { - font-size: large; - font-weight: bold; - } - - .qandaset .answer { - margin-top: 1em; - } - -/* Tables */ - - table.data { - border-collapse: collapse; - margin: 0.5em auto; - border: 1px solid; - } - - table.data caption { - margin: 1em auto 0.2em; - font-size: small; - font-style: italic; - text-align: center; - } - - table.data th, - table.data td { - padding: 0.2em; - border: 1px solid; - } - -/* Meta */ - - address { - text-align: right; - } - .author { - margin-bottom: 1em; - text-align: left; - } +.first { margin-top: 0.2em; } +.requires img { + vertical-align: middle; +} /* Headers */ - #mainContent > h1:first-child, - #mainContent > h2:first-child, - #mainContent > h3:first-child, - #mainContent > h4:first-child, - #mainContent > h5:first-child, - #mainContent > h6:first-child, - #side > h1:first-child, - #side > h2:first-child, - #side > h3:first-child, - #side > h4:first-child, - #side > h5:first-child, - #side > h6:first-child { - margin-top: 0; - } - - -/* Specific to Products Pages */ - -.productlist { - margin: 0; - padding: 0 0 0 5px; -} - -.productlist li { - clear: left; - list-style: none; - padding: 0 0 1em 0; - margin-left: 0; -} - -.productlist h3 { - margin: 0 0 0.2em 0; -} - -.productlist img { - float: left; - margin: 0 0.5em 1em 0; - display: auto; -} - -/* Random Stuff That Needs To Be Cleaned Up / Deprecated */ - -.flLeft { - float: left; - margin: 5px 10px 5px 0; -} -.flRight { - float: right; - margin: 5px 0 5px 10px; -} +#mainContent > h1:first-child, +#mainContent > h2:first-child, +#mainContent > h3:first-child, +#mainContent > h4:first-child, +#mainContent > h5:first-child, +#mainContent > h6:first-child, +#side > h1:first-child, +#side > h2:first-child, +#side > h3:first-child, +#side > h4:first-child, +#side > h5:first-child, +#side > h6:first-child { + margin-top: 0; +} \ No newline at end of file diff --git a/mozilla/webtools/update/css/base/template.css b/mozilla/webtools/update/css/base/template.css index 0b6c054c578..dc29c653d48 100755 --- a/mozilla/webtools/update/css/base/template.css +++ b/mozilla/webtools/update/css/base/template.css @@ -1,104 +1,130 @@ -/* mozilla.org Base Template Styles - * Initial Design by Dave Shea - * Severely tweaked by David Baron - * Reorganized by fantasai - * Large Changes for new Cavendish default by Daniel Burka and Steven Garrity - */ +body { + min-width: 700px; + margin: 0 30px 2em 30px; +} -/* Basic Structure */ - body { - min-width: 610px; - margin: 20px; - } +#container { + max-width: 70em; + margin: 0 auto; +} - #container { - max-width: 70em; - margin: 0 auto; - } - - #mBody { - /* clear: both; */ - padding: 0 0 1em 0; - } +#mBody { + clear: both; + padding: 1em 0; +} - #side { - float: left; - width: 23%; - margin-bottom: 1em; - } +.sidebar_content { + width: 60%; + float: left; +} - #mainContent { - margin-left: 25%; - } - .nomenu #mainContent { - margin-left: 0; - } - .bodyleft { - margin-left: 25% ! important - } - #mainContent.right { - float: left; - width: 62%; - margin-bottom: 1em; - margin-left: 0; - } - - #side.right { - float: none; - width: auto; - margin-left: 65%; - } +#footer { + clear: both; +} -/* Header */ +#side { + float: left; + width: 23%; + margin-bottom: 1em; +} - #header { margin-bottom: 1em; } - #header ul { - margin: 0 0 1em 0; - padding: 0; - } - - #header li { - display: inline; - padding: 0 20px 0 0; - margin: 0; - white-space: nowrap; - } +#mainContent { + margin-left: 25%; +} +.nomenu #mainContent { + margin-left: 0; +} +.bodyleft { + margin-left: 25% ! important +} +#mainContent.right { + float: left; + width: 62%; + margin-bottom: 1em; + margin-left: 0; +} + +#side.right { + float: none; + width: auto; + margin-left: 65%; +} + +p.security-update { + padding-left: 35px; + background: url(../../images/security-update.png) no-repeat; + margin-top: 0; + min-height: 30px; +} /* Sidebar */ - #getcd { - margin: 1em 0 0 45px; - } +#nav:before { + line-height: 0.1; + font-size: 1px; + background: transparent url("../../images/menu_tr.gif") no-repeat top right; + margin: 0; + height: 9px; + display: block; + border-bottom: 1px solid #ddd; + content: url("../../images/key-point_tl.gif"); +} +#nav { + background: #E0E9E9 url("../../images/menu_back.gif") right repeat-y; +} +#nav:after { + display: block; + padding-top: 0; + line-height: 0.1; + font-size: 1px; + content: url("../../images/key-point_bl.gif"); + margin: 0 0 0 0; + height: 8px; + background: transparent url("../../images/menu_br.gif") scroll no-repeat bottom right ; + border-top: 1px solid #fff; +} -/* Footer */ +#nav, #nav ul { + margin: 0; + padding: 0; + list-style: none; +} +#nav { + margin-bottom: 1em; +} +#nav li { + display: inline; + padding: 0; + margin: 0; +} - #footer { - /* clear: both; */ - margin-top: 1em; - } - - #footer ul { - margin: 0 0 1em 0; - padding: 0; - } - - #footer li { - display: inline; - padding: 0 20px 0 0; - margin: 0; - white-space: nowrap; - } - - #footer p { - margin: 0.6em 0; - } +#nav li span { /* used for un-linked menu items */ + display: block; + padding: 6px 10px; + font-weight: bold; + color: #666; +} -/*accessibility tweaks*/ - .skipLink { - position: absolute; - left: -999px; - width: 990px; - } - hr.hide { - display: none; - } +#nav li span#configParent, #nav li span #configuration { + display: inline; + font-weight: normal; + padding: 0; +} + +#nav li a { + display: block; + padding: 6px 10px; + text-decoration: none; + background: #EDF2F2; + border-bottom: 1px solid #ddd; + border-top: 1px solid #fff; + border-right: 1px solid #ddd; +} + +#nav li a:hover { + background: #E0E9E9; +} + +#nav ul li span,#nav ul li a { + padding: 4px 8px 4px 20px; +} \ No newline at end of file diff --git a/mozilla/webtools/update/css/cavendish/content.css b/mozilla/webtools/update/css/cavendish/content.css index 82684c01dea..5182e90ee3a 100755 --- a/mozilla/webtools/update/css/cavendish/content.css +++ b/mozilla/webtools/update/css/cavendish/content.css @@ -1,349 +1,197 @@ -/* mozilla.org MezzoTan Content Styles - * Initial Design by Dave Shea - * Reorganized and Expanded to include Markup Reference classes by fantasai - */ -/* Suggested order: - * display - * list-style - * position - * float - * clear - * width - * height - * margin - * padding - * border - * background - * color - * font - * text-decoration - * text-align - * vertical-align - * white-space - * other text - * content - * - */ +#mBody h2 { + font: 140% arial,helvetica,verdana,sans-serif; + border-bottom: 1px solid #ccc; + margin-bottom: 0; +} -/* TOC: - Body - Random HTML Styles - Forms - General Structure - Navigation - Quotations - Comments and Other Asides - Emphasis - Computers - General - Code - Examples and Figures - Q and A (FAQ) - Tables - Meta -*/ +#mBody h3 { + font: 120% arial,helvetica,verdana,sans-serif; + border-bottom: 1px solid #ccc; + margin-bottom: 0; +} -/* Body */ +#mBody h1 { + font: 180% arial,helvetica,sans-serif; + border-bottom: 1px solid #ccc; + margin-bottom: 0; +} - body { - background: #fff; - } +.key-point:before { + line-height: 0.1; + font-size: 1px; + background: transparent url("../../images/key-point_tr.gif") no-repeat top right; + margin: -15px -15px 0 -15px; + height: 15px; + display: block; + border: none; + content: url("../../images/key-point_tl.gif"); +} +.key-point { + background: #EFF8CE url("../../images/key-point_back.gif") right repeat-y; + padding: 15px; + margin-top: 18px; +} +.key-point:after { + display: block; + padding-top: 15px; + line-height: 0.1; + font-size: 1px; + content: url("../../images/key-point_bl.gif"); + margin: -15px; + height: 8px; + background: transparent url("../../images/key-point_br.gif") scroll no-repeat bottom right ; +} - #mainContent, #side { - background: #fff; - line-height: 1.3; /* value other than 'normal' needed for WinIE */ - } - .deepLevel #mainContent { - line-height: 1.4; - } +#header form #submit { + font-size: 100%; + padding: 1px; + font-family: tahoma, arial, sans-serif; +} -/* Random HTML Styles */ +#header form #q { + width: 90px; + font-size: 100%; + font-weight: normal; + border: 1px solid #9097A2; + padding: 2px; + font-family: tahoma, arial, sans-serif; +} - hr { - height: 1px; - background-color: #000; - color: #000; - margin: 2em 0; - } +#sectionsearch { + font-size: 100%; + font-weight: normal; + font-family: tahoma, arial, sans-serif; +} - input[type="submit"] { - font-weight: bold; - } +.popularlist { + font-size: 85%; +} -/* General Structure */ - body, td, th, input { /* redundant rules for bad browsers */ - font-family: verdana, sans-serif; - font-size: x-small; - voice-family: "\"}\""; - voice-family: inherit; - font-size: small; - } +.popularlist span { + color: #666; + white-space: nowrap; +} - h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.2em 0; - border-bottom: 1px solid #ccc; - font-family: arial, verdana, sans-serif; - } +.install a { + background: url(../../images/install.png) no-repeat; + padding: 3px 0 8px 30px; + display: block; + text-decoration: none; +} - #header h1 { border: 0; } +.install a strong { + text-decoration: underline; +} - h1 { font-size: 160%; font-weight: normal; } - h2 { font-size: 150%; font-weight: normal; } - h3 { font-size: 120%; } - h4 { font-size: 100%; } - h5 { font-size: 90%; } - h6 { font-size: 90%; border: 0; } - -/* Navigation */ +.install-box { + width: 18em; +} - a:link { color: #039; } - a:visited { color: #636; } - a:hover { color: #333; } - a:active { color: #000; } +#opinions h4 { + margin: 0; +} -/* Quotations */ +.opinions-date { + font-size: 85%; + margin: 0 0 0.5em 0; +} +.opinions-date a { + text-decoration: none; + color: #666; +} -/* Comments and other Asides */ +.opinions-date a:hover { + text-decoration: underline; +} - .note { - color: #666; - font-style: normal; - } - - .remark { - color: #666; - } - - .sidenote { - border: #666; - } +.opinions-text { + margin: 0; +} - .key-point:before { - line-height: 0.1; - font-size: 1px; - background: transparent url("../../images/key-point_tr.gif") no-repeat top right; - margin: -15px -15px 0 -15px; - height: 15px; - display: block; - border: none; - content: url("../../images/key-point_tl.gif"); - } - .key-point { - background: #e4ecec url("../../images/key-point_back.gif") right repeat-y; - padding: 15px; - margin-bottom: 1em; - } - .key-point:after { - display: block; - /* clear: both; */ - padding-top: 15px; - line-height: 0.1; - font-size: 1px; - content: url("../../images/key-point_bl.gif"); - margin: -15px; - height: 8px; - background: transparent url("../../images/key-point_br.gif") scroll no-repeat bottom right ; - } - - .key-point h2, .key-point h3, .key-point h4, .key-point h5 { - border: none; - margin-top: 0; - } - - .news dt { - font-weight: normal; - color: #666; - } - .news dt a { - font-weight: bold; - } - - ul.compact { - margin-left: 0; - padding-left: 20px; - } - -/* Emphasis */ +.opinions-rating img { + vertical-align: middle; +} -/* Computers - General */ +.rating { + float: right; + font-size: 85%; + font-weight: bold; +} - kbd { - margin: 0.1em; - padding: 0.1em; - border: 1px #ccc; - } +.rating img { + vertical-align: middle; +} - kbd.command, - code.command { - color: #6B5839; - } +.more-links { + margin: 0.5em 0 0 0; + padding: 0; +} -/* Code */ +.more-links li { + display: inline; + margin: 0; + padding: 5px; +} - pre.code { - margin: 0.1em; - padding: 0.1em; - background: #EEECF6; - } - - code > em, - code > strong, - pre.code > em, - pre.code > strong { - font-style: normal; - } +.screenshot { + float: right; + background: #fff; + padding: 0 0 2em 2em; +} -/* Examples and Figures */ +.screenshot a { + text-align: center; + display: block; +} - div.example { - border-color: #554FA0; - } - div.example::before { - color: #666; - } +/* Remaining Original Update Styles */ -/* Tables */ +.item { + border: #D2D6D6 1px solid; + padding-left: 5px; + padding-right: 6px; + MARGIN-bottom: 10px; + -moz-border-radius: 10px; +} - table.data { - border-style: none hidden; - } - - table.data thead { - background: #EEECF6; - } +.item a { + color: #00129c; + text-decoration: none; +} +.item a:visited { + color: #00129c; + text-decoration: none; +} +.item a:hover { + color: #fc5900; +} - table.data th, - table.data td { - border: 1px dotted #D6CCBD; - } - - tr.odd { - background: #F5F5F5; - } +.iconbar { + padding-right: 15px; + float: left; + width: auto; + height: 34px; + text-align: top; +} -/* Meta */ +.iconbar img { + float:left; +} - address { - color: #666; - } +.iconbar a { + text-decoration: none; +} -/* Product Specific CSS */ - - .productlist h3 { - border: none; - } +.selected a, .selected a:visited { + color: #fc5900; +} - .key-point h3 { - margin: 0; - } - - #product-desc h2 { - text-indent: -700em; - height: 25px; - line-height: 2px; - font-size: 2px; - } - - #product-desc p { - padding-left: 170px; - } - - #product-side { - margin-left: 65%; - } - - #product-side ul { - margin-left: 0; - padding-left: 20px; - } - - #product-side li { - padding-bottom: 0.2em; - } - - #product-desc { - padding: 40px 0 25px 0; - color: #4C5C5C; - width: 60%; - float: left; - line-height: 140%; - } - - .product-firefox { - background: url("../../images/product-firefox-screen.png") no-repeat; - } - .product-thunderbird { - background: url("../../images/product-thunderbird-screen.png") no-repeat; - } - .product-camino { - background: url("../../images/product-camino-screen.png") no-repeat; - } - .product-mozilla { - background: url("../../images/product-mozilla-screen.png") no-repeat; - } - - .download h3 { - color: #1D9101; - font-weight: bold; - margin: 0; - font-size: 140%; - } - - .download h3 a:link, - .download h3 a:visited, - .download h3 a:active { - color: #1D9101; - } - - .download h3 a:hover { - color: #156B01; - } - - .download:before { - line-height: 0.1; - font-size: 1px; - margin: -15px -15px 0 -15px; - height: 15px; - display: block; - border: none; - content: url("../../images/download_tl.gif"); - } - .download { - background: #C4EFA1 url("../../images/download_back.gif") top right no-repeat; - padding: 15px 45px 15px 15px; - margin-bottom: 0.5em; - } - .download:after { - display: block; - padding-top: 15px; - line-height: 0.1; - font-size: 1px; - content: url("../../images/download_bl.gif"); - margin: -10px -45px -15px -15px; - height: 8px; - background: transparent url("../../images/download_br.gif") scroll no-repeat bottom right ; - } - - .shop:before { - line-height: 0.1; - font-size: 1px; - margin: -15px -15px 0 -15px; - height: 15px; - display: block; - border: none; - content: url("../../images/shop_tl.gif"); - } - .shop { - background: #C0DCDC url("../../images/shop_back.gif") top right no-repeat; - padding: 15px 70px 15px 15px; - } - .shop:after { - display: block; - padding-top: 15px; - line-height: 0.1; - font-size: 1px; - content: url("../../images/shop_bl.gif"); - margin: -10px -70px -15px -15px; - height: 8px; - background: transparent url("../../images/shop_br.gif") scroll no-repeat bottom right ; - } +.baseline { + margin-top: 5px; + border-top: #ccc 1px solid; + padding: 3px; + padding-left: 10px; + font-size: 8pt; + color: #333; +} \ No newline at end of file diff --git a/mozilla/webtools/update/css/cavendish/template.css b/mozilla/webtools/update/css/cavendish/template.css index d58637c37dd..1edebc13d25 100755 --- a/mozilla/webtools/update/css/cavendish/template.css +++ b/mozilla/webtools/update/css/cavendish/template.css @@ -1,265 +1,152 @@ -/* mozilla.org Cavendish Template Styles - * Initial Design by Daniel Burka and Steven Garrity -*/ +body { + background: #fff url("../../images/body_back.gif") repeat-x; +} -/* Basic Structure */ - body { - background: #fff url("../../images/body_back.gif") repeat-x; - } +#footer { + border-top: 1px solid #666; + margin: 2em 0; + padding: 1em 0; + text-align: center; +} -/* Header */ +#footer ul { + margin: 0; + padding: 0; + list-style: none; +} - #header { - background: #455372 url("../../images/header_bl.png") bottom left repeat-x; - position: relative; - min-height: 39px; - height: 5em; - padding: 0; - voice-family: "\"}\""; - voice-family: inherit; - height: 3em; - padding: 15px 0; - } #ignored {} - - #header h1 { - position: absolute; - top: 0; - left: 0; - margin: 0; - font-size: 2px; - background: url("../../images/header_tl.gif") no-repeat; - height: 8px; - z-index: 100; /* above the UL */ - } - #header h1 a { - display: block; - width: 204px; - height: 55px; - background: transparent url("../../images/header_logo.gif") no-repeat; - text-indent: -700em; - text-decoration: none; - } - #header ul { - width: auto; - position: absolute; - bottom: 0; - right: 0; - margin: 0; - padding: 0 15px 0 0; - list-style: none; - background: url("../../images/header_br.gif") no-repeat bottom right; - z-index: 90; /* below the H1 */ - } - #header li { - float: right; - background: transparent url("../../images/header_tab.gif") 100% -600px no-repeat; - padding: 0 6px 0 0; - margin: 0 1px 0 0; - border-bottom: 1px solid #515358; - } - #header ul a { - float: left; - display: block; - padding: 4px 4px 4px 10px; - background: transparent url("../../images/header_tab.gif") 0% -600px no-repeat; - font-weight: bold; - color: #fff; - text-decoration: none; - } - #header ul li:hover a { background-position: 0% -400px; } - #header ul li:hover { background-position: 100% -400px; } - - body.sectionAbout li#menu_aboutus, - body.sectionProducts li#menu_products, - body.sectionSupport li#menu_support, - body.sectionDevelopers li#menu_developers { - background-position: 100% -200px; - } - - body.sectionAbout li#menu_aboutus a, - body.sectionProducts li#menu_products a, - body.sectionSupport li#menu_support a, - body.sectionDevelopers li#menu_developers a { - background-position: 0% -200px; - color: #039; - } - - body.sectionAbout li#menu_aboutus, - body.sectionProducts li#menu_products, - body.sectionSupport li#menu_support, - body.sectionDevelopers li#menu_developers { - border-bottom: 1px solid #fff; - } - - body.sectionAbout li#menu_aboutus:hover, - body.sectionProducts li#menu_products:hover, - body.sectionSupport li#menu_support:hover, - body.sectionDevelopers li#menu_developers:hover { - background-position: 100% 0%; - } - - body.sectionAbout li#menu_aboutus:hover a, - body.sectionProducts li#menu_products:hover a, - body.sectionSupport li#menu_support:hover a, - body.sectionDevelopers li#menu_developers:hover a { - background-position: 0% 0%; - color: #333; - } - -/* Search Field */ +#footer li { + display: inline; +} - #header form { - position: absolute; - top: 0; - right: 0; - padding: 12px 20px 0 0; - background: url("../../images/header_tr.gif") no-repeat top right; - margin: 0; /* need for IE Mac */ - text-align: right; /* need for IE Mac */ - white-space: nowrap; /* for Opera */ - } - #header form label { color: #fff; font-size: 85%; } - #header form input { font-size: 85%; } - - #header form #submit { - font-size: 85%; - background: #6A7389; - color: #fff; - padding: 1px 4px; - border-right: 1px solid #283043; - border-bottom: 1px solid #283043; - border-top: 1px solid #9097A2; - border-left: 1px solid #9097A2; - } - - #header form #q { - width: 170px; - font-size: 85%; - border: 1px solid #9097A2; - background: #D9DBE1; - padding: 2px; - } - #header form #q:hover, #header form #q:focus { - background: #fff; - } +#footer span,#footer a { + white-space: nowrap; + padding: 0 1em; +} -/* Sidebar */ +#footer p span,#footer p a { + white-space: nowrap; + padding: 0 0.3em; +} - #nav:before { - line-height: 0.1; - font-size: 1px; - background: transparent url("../../images/menu_tr.gif") no-repeat top right; - margin: 0; - height: 9px; - display: block; - border-bottom: 1px solid #ddd; - content: url("../../images/key-point_tl.gif"); - } - #nav { - background: #E0E9E9 url("../../images/menu_back.gif") right repeat-y; - } - #nav:after { - display: block; - /* clear: both; */ - padding-top: 0; - line-height: 0.1; - font-size: 1px; - content: url("../../images/key-point_bl.gif"); - margin: 0 0 0 0; - height: 8px; - background: transparent url("../../images/menu_br.gif") scroll no-repeat bottom right ; - border-top: 1px solid #fff; - } - - #nav, #nav ul { - margin: 0; - padding: 0; - list-style: none; - } - #nav { - margin-bottom: 1em; - } - #nav li { - fdisplay: inline; /* need for IE spacing issue */ - padding: 0; - margin: 0; - } - - #nav li span { /* used for un-linked menu items */ - display: block; - padding: 6px 10px; - font-weight: bold; - color: #666; - } +#footer span a { + padding: 0; +} - #nav li span#configParent, #nav li span #configuration { - display: inline; - font-weight: normal; - padding: 0; - } - - #nav li a { - display: block; - padding: 6px 10px; - text-decoration: none; - background: #EDF2F2; - border-bottom: 1px solid #ddd; - border-top: 1px solid #fff; - border-right: 1px solid #ddd; - } +#footer p,#footer p a { + color: #666; +} - #nav li a:hover { - background: #E0E9E9; - } - - #nav li li a { - padding: 4px 8px 4px 20px; - } - - #oN { - background-color: #E0E9E9; - } - #oN:hover { - background-color: #C6DCDC; - } +#footer p a:hover { + color: #000; +} -/* Footer */ +/* Site Header */ - #footer { - border-top: 1px solid #666; - margin: 2em 0; - padding: 1em 0; - text-align: center; - } - - #footer ul { - margin: 0; - padding: 0; - list-style: none; - } - - #footer li { - display: inline; - } - - #footer span,#footer a { - white-space: nowrap; - padding: 0 1em; - } - - #footer p span,#footer p a { - white-space: nowrap; - padding: 0 0.3em; - } - - #footer span a { - padding: 0; - } - - #footer p,#footer p a { - color: #666; - } - - #footer p a:hover { - color: #000; - } +#header { + clear: both; +} + +#header h1 { + height: 46px; + margin: 0; + font-size: 2px; + position: relative; + top: 7px; +} +#header h1 a,#header h1 a:hover { + display: block; + width: 250px; + height: 46px; + background: url("../../images/title.gif") no-repeat; + text-indent: -700em; + text-decoration: none; +} + +#key-title { /* fixes background issue in IE6 */ + position: relative; +} + +#header ul { + position: absolute; + right: 0; + top: 6px; + margin-left: 200px; + font-family: tahoma, arial, sans-serif; +} + +#header li { + float: left; + list-style: none; + padding-left: 1em; + font-size: 85%; + font-weight: bold; +} + +#header dl { + margin: 0 1em 0 0; + padding: 4px 0 4px 40px; + float: left; + min-height: 35px; +} +#header #menu-firefox { + background: url("../../images/s-firefox.png") no-repeat 0 8px; +} +#header #menu-thunderbird { + background: url("../../images/s-thunderbird.png") no-repeat 0 8px; +} +#header #menu-mozillasuite { + background: url("../../images/s-mozillasuite.png") no-repeat 0 8px; + margin-right: 0; +} + +#header dt { + font-size: 85%; +} +#header dd { + margin: 0; +} + +#key-menu:before { + line-height: 0.1; + font-size: 1px; + background: transparent url("../../images/key-menu_tr.gif") no-repeat top right; + margin: -8px -8px 0 -8px; + height: 8px; + display: block; + border: none; + content: url("../../images/key-menu_tl.gif"); +} +#key-menu { + background: #B2C1C8 url("../../images/key-menu_back.gif") right top no-repeat; + padding: 8px; +} +#key-menu:after { + display: block; + clear: both; + padding-top: 8px; + line-height: 0.1; + font-size: 1px; + content: url("../../images/key-menu_bl.gif"); + margin: -8px; + height: 8px; + background: transparent url("../../images/key-menu_br.gif") scroll no-repeat bottom right ; +} + +.ie-clear-menu { /* needed to clear floats in IE */ + clear: both; + height: 5px; + font-size: 2px; +} + +#mozilla-org a { + float: right; + display: block; + text-indent: -5000em; + width: 110px; + height: 25px; + text-decoration: none; + background: url(../../images/mozilla-org.gif) no-repeat; +} + +/* End Site Header */ \ No newline at end of file diff --git a/mozilla/webtools/update/css/print.css b/mozilla/webtools/update/css/print.css index 99c5b3f50cb..e69de29bb2d 100755 --- a/mozilla/webtools/update/css/print.css +++ b/mozilla/webtools/update/css/print.css @@ -1,84 +0,0 @@ -/* mozilla.com print css -by dave shea, http://www.mezzoblue.com/ */ - -/*html elements*/ -body { - background: #fff; - font: 12pt Verdana,Sans-serif; -} - -a img { - border: 0; -} -form { - margin: 0; - display: inline; -} -label, input { - font-weight: bold; -} -h1, h2, h3, h4, h5, h6 { - margin: 0; -} -h1 { - font-size: 120%; - color: #955322; -} -h2 { - font-size: 110%; - color: #B26C38; -} -h2 a:visited { - text-decoration: none; -} -h3 { - color: #EC361D; - font-size: 110%; -} -h4 { - font-size: 110%; - color: #666; -} -h5 { - font-size: 100%; - color: #955322; -} -h6 { - color: #EC361D; - font-size: 100%; -} - -p, li, dt, dd { - font-size: 92%; -} -p { - line-height: 150%; -} -sup { - font-size: 70%; -} -a:link, a:visited { - color: #554FA0; - font-weight: bold; - text-decoration: none; -} - -dt.im { - float: left; -} - -#mainContent a:link:after, #mainContent a:visited:after { - content: " (" attr(href) ") "; - font-size: 70%; - color: #000; -} -#mainContent a[href^="/"]:after { - content: " (http://www.mozilla.org" attr(href) ") "; -} - -#tools, #search, #ad, #bn, #int, .skipLink, #brd { - display: none; -} -#header + hr { - display: none; -} diff --git a/mozilla/webtools/update/database/mozillaupdate.sql b/mozilla/webtools/update/database/mozillaupdate.sql index c3fb909b38f..ceefabfc470 100644 --- a/mozilla/webtools/update/database/mozillaupdate.sql +++ b/mozilla/webtools/update/database/mozillaupdate.sql @@ -36,14 +36,13 @@ # # ***** END LICENSE BLOCK ***** - -- phpMyAdmin SQL Dump --- version 2.6.0-rc1 +-- version 2.6.0 -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Sep 12, 2004 at 05:07 AM --- Server version: 4.0.18 +-- Generation Time: Dec 07, 2004 at 02:18 AM +-- Server version: 4.0.21 -- PHP Version: 4.3.8 -- -- Database: `mozillaupdate` @@ -52,51 +51,64 @@ -- -------------------------------------------------------- -- --- Table structure for table `t_applications` +-- Table structure for table `applications` -- -CREATE TABLE `t_applications` ( +CREATE TABLE `applications` ( `AppID` int(11) NOT NULL auto_increment, `AppName` varchar(30) NOT NULL default '', - `Version` varchar(10) NOT NULL default '', + `Version` varchar(15) NOT NULL default '', `major` int(3) NOT NULL default '0', `minor` int(3) NOT NULL default '0', `release` int(3) NOT NULL default '0', `build` int(14) NOT NULL default '0', - `SubVer` enum('a','b','final','','+') NOT NULL default 'final', + `SubVer` varchar(5) NOT NULL default 'final', `GUID` varchar(50) NOT NULL default '', + `int_version` varchar(5) default NULL, + `public_ver` enum('YES','NO') NOT NULL default 'YES', + `shortname` char(2) NOT NULL default '', PRIMARY KEY (`AppID`), KEY `AppName` (`AppName`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=25 ; +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_approvallog` +-- Table structure for table `approvallog` -- -CREATE TABLE `t_approvallog` ( +CREATE TABLE `approvallog` ( `LogID` int(5) NOT NULL auto_increment, `ID` varchar(11) NOT NULL default '', `vID` varchar(11) NOT NULL default '', `UserID` varchar(11) NOT NULL default '', `action` varchar(255) NOT NULL default '', `date` datetime NOT NULL default '0000-00-00 00:00:00', + `Installation` enum('','YES','NO') NOT NULL default '', + `Uninstallation` enum('','YES','NO') NOT NULL default '', + `NewChrome` enum('','YES','NO') NOT NULL default '', + `AppWorks` enum('','YES','NO') NOT NULL default '', + `VisualErrors` enum('','YES','NO') NOT NULL default '', + `AllElementsThemed` enum('','YES','NO') NOT NULL default '', + `CleanProfile` enum('','YES','NO') NOT NULL default '', + `WorksAsDescribed` enum('','YES','NO') NOT NULL default '', + `TestBuild` varchar(255) default NULL, + `TestOS` varchar(255) default NULL, `comments` text NOT NULL, PRIMARY KEY (`LogID`), KEY `ID` (`ID`), KEY `vID` (`vID`), KEY `UserID` (`UserID`), KEY `UserID_2` (`UserID`) -) TYPE=InnoDB AUTO_INCREMENT=430 ; +) TYPE=InnoDB; -- -------------------------------------------------------- -- --- Table structure for table `t_authorxref` +-- Table structure for table `authorxref` -- -CREATE TABLE `t_authorxref` ( +CREATE TABLE `authorxref` ( `ID` int(11) NOT NULL default '0', `UserID` int(11) NOT NULL default '0', KEY `ID` (`ID`), @@ -106,24 +118,25 @@ CREATE TABLE `t_authorxref` ( -- -------------------------------------------------------- -- --- Table structure for table `t_categories` +-- Table structure for table `categories` -- -CREATE TABLE `t_categories` ( +CREATE TABLE `categories` ( `CategoryID` int(11) NOT NULL auto_increment, `CatName` varchar(30) NOT NULL default '', `CatDesc` varchar(100) NOT NULL default '', `CatType` enum('E','T','P') NOT NULL default 'E', + `CatApp` varchar(25) NOT NULL default '', PRIMARY KEY (`CategoryID`) -) TYPE=InnoDB AUTO_INCREMENT=28 ; +) TYPE=InnoDB; -- -------------------------------------------------------- -- --- Table structure for table `t_categoryxref` +-- Table structure for table `categoryxref` -- -CREATE TABLE `t_categoryxref` ( +CREATE TABLE `categoryxref` ( `ID` int(11) NOT NULL default '0', `CategoryID` int(11) NOT NULL default '0', KEY `IDIndex` (`ID`,`CategoryID`), @@ -133,10 +146,10 @@ CREATE TABLE `t_categoryxref` ( -- -------------------------------------------------------- -- --- Table structure for table `t_downloads` +-- Table structure for table `downloads` -- -CREATE TABLE `t_downloads` ( +CREATE TABLE `downloads` ( `dID` int(11) NOT NULL auto_increment, `ID` varchar(5) NOT NULL default '', `date` varchar(14) default NULL, @@ -145,33 +158,35 @@ CREATE TABLE `t_downloads` ( `user_ip` varchar(15) NOT NULL default '', `user_agent` text NOT NULL, `type` enum('count','download') NOT NULL default 'download', - PRIMARY KEY (`dID`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=3 ; + PRIMARY KEY (`dID`), + KEY `type` (`type`), + KEY `date` (`date`) +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_faq` +-- Table structure for table `faq` -- -CREATE TABLE `t_faq` ( +CREATE TABLE `faq` ( `id` int(3) NOT NULL auto_increment, `index` varchar(5) NOT NULL default '1', - `alias` varchar(12) NOT NULL default '', + `alias` varchar(20) NOT NULL default '', `title` varchar(150) NOT NULL default '', `text` text NOT NULL, `lastupdated` timestamp(14) NOT NULL, `active` enum('YES','NO') NOT NULL default 'YES', PRIMARY KEY (`id`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=7 ; +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_feedback` +-- Table structure for table `feedback` -- -CREATE TABLE `t_feedback` ( +CREATE TABLE `feedback` ( `CommentID` int(11) NOT NULL auto_increment, `ID` int(11) NOT NULL default '0', `CommentName` varchar(100) default NULL, @@ -180,17 +195,25 @@ CREATE TABLE `t_feedback` ( `CommentNote` text, `CommentDate` datetime NOT NULL default '0000-00-00 00:00:00', `commentip` varchar(15) NOT NULL default '', + `email` varchar(128) NOT NULL default '', + `formkey` varchar(160) NOT NULL default '', + `helpful-yes` int(6) NOT NULL default '0', + `helpful-no` int(6) NOT NULL default '0', + `helpful-rating` varchar(4) NOT NULL default '', + `VersionTagline` varchar(255) NOT NULL default '', + `flag` varchar(8) NOT NULL default '', PRIMARY KEY (`CommentID`), - KEY `ID` (`ID`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=15487 ; + KEY `ID` (`ID`), + KEY `CommentDate` (`CommentDate`) +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_main` +-- Table structure for table `main` -- -CREATE TABLE `t_main` ( +CREATE TABLE `main` ( `ID` int(11) NOT NULL auto_increment, `GUID` varchar(50) NOT NULL default '', `Name` varchar(100) NOT NULL default '', @@ -198,48 +221,63 @@ CREATE TABLE `t_main` ( `DateAdded` datetime NOT NULL default '0000-00-00 00:00:00', `DateUpdated` datetime NOT NULL default '0000-00-00 00:00:00', `Homepage` varchar(200) default NULL, - `Description` varchar(255) NOT NULL default '', + `Description` text NOT NULL, `Rating` varchar(4) NOT NULL default '0', `downloadcount` int(15) NOT NULL default '0', `TotalDownloads` int(18) NOT NULL default '0', + `devcomments` text NOT NULL, PRIMARY KEY (`ID`), + UNIQUE KEY `Name` (`Name`), KEY `Type` (`Type`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=218 ; +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_os` +-- Table structure for table `os` -- -CREATE TABLE `t_os` ( +CREATE TABLE `os` ( `OSID` int(11) NOT NULL auto_increment, `OSName` varchar(20) NOT NULL default '', PRIMARY KEY (`OSID`), UNIQUE KEY `OSName` (`OSName`) -) TYPE=InnoDB AUTO_INCREMENT=7 ; +) TYPE=InnoDB; + +-- +-- Dumping data for table `os` +-- + +INSERT INTO `os` (`OSID`, `OSName`) VALUES (1, 'ALL'); +INSERT INTO `os` (`OSID`, `OSName`) VALUES (4, 'BSD'); +INSERT INTO `os` (`OSID`, `OSName`) VALUES (2, 'Linux'); +INSERT INTO `os` (`OSID`, `OSName`) VALUES (3, 'MacOSX'); +INSERT INTO `os` (`OSID`, `OSName`) VALUES (6, 'Solaris'); +INSERT INTO `os` (`OSID`, `OSName`) VALUES (5, 'Windows'); -- -------------------------------------------------------- -- --- Table structure for table `t_previews` +-- Table structure for table `previews` -- -CREATE TABLE `t_previews` ( +CREATE TABLE `previews` ( `PreviewID` int(11) NOT NULL auto_increment, `PreviewURI` varchar(200) NOT NULL default '', - `vID` int(11) NOT NULL default '0', + `ID` int(5) NOT NULL default '0', + `caption` varchar(255) NOT NULL default '', + `preview` enum('YES','NO') NOT NULL default 'NO', PRIMARY KEY (`PreviewID`), - KEY `vID` (`vID`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=24 ; + KEY `ID` (`ID`) +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_reviews` +-- Table structure for table `reviews` -- -CREATE TABLE `t_reviews` ( +CREATE TABLE `reviews` ( `rID` int(11) NOT NULL auto_increment, `ID` int(11) NOT NULL default '0', `AppID` int(11) NOT NULL default '0', @@ -253,15 +291,15 @@ CREATE TABLE `t_reviews` ( KEY `ID` (`ID`), KEY `AppID` (`AppID`), KEY `AuthorID` (`AuthorID`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=3 ; +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_userprofiles` +-- Table structure for table `userprofiles` -- -CREATE TABLE `t_userprofiles` ( +CREATE TABLE `userprofiles` ( `UserID` int(11) NOT NULL auto_increment, `UserName` varchar(100) NOT NULL default '', `UserEmail` varchar(100) NOT NULL default '', @@ -270,17 +308,19 @@ CREATE TABLE `t_userprofiles` ( `UserMode` enum('A','E','U','D') NOT NULL default 'U', `UserTrusted` enum('TRUE','FALSE') NOT NULL default 'FALSE', `UserEmailHide` tinyint(1) NOT NULL default '1', + `UserLastLogin` datetime NOT NULL default '0000-00-00 00:00:00', + `ConfirmationCode` varchar(32) default NULL, PRIMARY KEY (`UserID`), UNIQUE KEY `UserEmail` (`UserEmail`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=142 ; +) TYPE=InnoDB PACK_KEYS=0; -- -------------------------------------------------------- -- --- Table structure for table `t_version` +-- Table structure for table `version` -- -CREATE TABLE `t_version` ( +CREATE TABLE `version` ( `vID` int(11) NOT NULL auto_increment, `ID` int(11) NOT NULL default '0', `Version` varchar(30) NOT NULL default '0', @@ -295,54 +335,54 @@ CREATE TABLE `t_version` ( `DateUpdated` datetime NOT NULL default '0000-00-00 00:00:00', `URI` varchar(255) NOT NULL default '', `Notes` text, - `approved` enum('YES','NO','?') NOT NULL default '?', + `approved` enum('YES','NO','?','DISABLED') NOT NULL default '?', PRIMARY KEY (`vID`), KEY `ID` (`ID`), KEY `AppID` (`AppID`), KEY `OSID` (`OSID`), KEY `Version` (`Version`) -) TYPE=InnoDB PACK_KEYS=0 AUTO_INCREMENT=558 ; +) TYPE=InnoDB PACK_KEYS=0; -- -- Constraints for dumped tables -- -- --- Constraints for table `t_authorxref` +-- Constraints for table `authorxref` -- -ALTER TABLE `t_authorxref` - ADD CONSTRAINT `0_125` FOREIGN KEY (`ID`) REFERENCES `t_main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT `0_126` FOREIGN KEY (`UserID`) REFERENCES `t_userprofiles` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE `authorxref` + ADD CONSTRAINT `0_125` FOREIGN KEY (`ID`) REFERENCES `main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, + ADD CONSTRAINT `0_126` FOREIGN KEY (`UserID`) REFERENCES `userprofiles` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE; -- --- Constraints for table `t_categoryxref` +-- Constraints for table `categoryxref` -- -ALTER TABLE `t_categoryxref` - ADD CONSTRAINT `0_128` FOREIGN KEY (`ID`) REFERENCES `t_main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT `0_129` FOREIGN KEY (`CategoryID`) REFERENCES `t_categories` (`CategoryID`) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE `categoryxref` + ADD CONSTRAINT `0_128` FOREIGN KEY (`ID`) REFERENCES `main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, + ADD CONSTRAINT `0_129` FOREIGN KEY (`CategoryID`) REFERENCES `categories` (`CategoryID`) ON DELETE CASCADE ON UPDATE CASCADE; -- --- Constraints for table `t_feedback` +-- Constraints for table `feedback` -- -ALTER TABLE `t_feedback` - ADD CONSTRAINT `0_131` FOREIGN KEY (`ID`) REFERENCES `t_main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE `feedback` + ADD CONSTRAINT `0_131` FOREIGN KEY (`ID`) REFERENCES `main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE; -- --- Constraints for table `t_previews` +-- Constraints for table `previews` -- -ALTER TABLE `t_previews` - ADD CONSTRAINT `0_133` FOREIGN KEY (`vID`) REFERENCES `t_version` (`vID`) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE `previews` + ADD CONSTRAINT `previews_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE; -- --- Constraints for table `t_reviews` +-- Constraints for table `reviews` -- -ALTER TABLE `t_reviews` - ADD CONSTRAINT `0_135` FOREIGN KEY (`ID`) REFERENCES `t_main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT `0_136` FOREIGN KEY (`AppID`) REFERENCES `t_applications` (`AppID`) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE `reviews` + ADD CONSTRAINT `0_135` FOREIGN KEY (`ID`) REFERENCES `main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, + ADD CONSTRAINT `0_136` FOREIGN KEY (`AppID`) REFERENCES `applications` (`AppID`) ON DELETE CASCADE ON UPDATE CASCADE; -- --- Constraints for table `t_version` +-- Constraints for table `version` -- -ALTER TABLE `t_version` - ADD CONSTRAINT `0_139` FOREIGN KEY (`ID`) REFERENCES `t_main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, - ADD CONSTRAINT `0_140` FOREIGN KEY (`AppID`) REFERENCES `t_applications` (`AppID`) ON DELETE CASCADE ON UPDATE CASCADE; +ALTER TABLE `version` + ADD CONSTRAINT `0_139` FOREIGN KEY (`ID`) REFERENCES `main` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE, + ADD CONSTRAINT `version_ibfk_1` FOREIGN KEY (`AppID`) REFERENCES `applications` (`AppID`) ON UPDATE CASCADE; diff --git a/mozilla/webtools/update/developers/additem.php b/mozilla/webtools/update/developers/additem.php index f374222a010..fcd4f2135cd 100755 --- a/mozilla/webtools/update/developers/additem.php +++ b/mozilla/webtools/update/developers/additem.php @@ -59,8 +59,8 @@ $chmod_result = chmod("$uploadedfile", 0644); //Make the file world readable. pr //If this was legacy mode, we're coming back from step1b so the file wasn't just submitted and we need to just pick it up again. if ($_POST["legacy"]=="TRUE") { -$filename = $_POST["filename"]; -$filesize = $_POST["filesize"]; +$filename = escape_string($_POST["filename"]); +$filesize = escape_string($_POST["filesize"]); $uploadedfile="$websitepath/files/temp/$filename"; } $zip = zip_open("$uploadedfile"); @@ -149,7 +149,7 @@ $description = $manifestdata[description]; //Check GUID for validity/existance, if it exists, check the logged in author for permission -$sql = "SELECT ID, GUID from `t_main` WHERE `GUID` = '$manifestdata[id]' LIMIT 1"; +$sql = "SELECT ID, GUID from `main` WHERE `GUID` = '".escape_string($manifestdata[id])."' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="1") { // echo"This is a updated extension... Checking author data...
\n"; @@ -157,7 +157,7 @@ $sql = "SELECT ID, GUID from `t_main` WHERE `GUID` = '$manifestdata[id]' LIMIT 1 $row = mysql_fetch_array($sql_result); $item_id = $row["ID"]; if ($_POST["legacy"]=="TRUE") {$item_id = $_POST["existingitems"]; } - $sql = "SELECT `UserID` from `t_authorxref` WHERE `ID`='$item_id' AND `UserID` = '$_SESSION[uid]' LIMIT 1"; + $sql = "SELECT `UserID` from `authorxref` WHERE `ID`='$item_id' AND `UserID` = '$_SESSION[uid]' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="1" or ($_SESSION["level"]="admin" or $_SESSION["level"]="editor")) { // echo"This extension belongs to the author logged in
\n"; @@ -177,7 +177,7 @@ foreach ($manifestdata[targetapplication] as $key=>$val) { //echo"$key -- $val[minversion] $val[maxversion]
\n"; $i=0; - $sql = "SELECT `AppName`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `GUID`='$key' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; + $sql = "SELECT `AppName`, `major`, `minor`, `release`, `SubVer` FROM `applications` WHERE `GUID`='$key' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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++; @@ -202,8 +202,6 @@ $i=0; } } -//echo"
"; print_r($versioncheck); echo"
\n"; - if ($versioncheck[errors]=="true") { echo"Errors were encountered during install.rdf checking...
\n"; die("Aborting..."); @@ -213,8 +211,7 @@ if ($versioncheck[errors]=="true") { } else { -//echo"install.rdf is not present, use legacy mode...
\n"; -//header("Location: http://$_SERVER[HTTP_HOST]/developers/additem.php?function=step1b&filename=$filename"); + echo"

Add Step 1b: Legacy Item Data Entry: ($filename)

\n"; ?> @@ -226,11 +223,11 @@ echo"

Add Step 1b: Legacy Item Data Entry: ($filename)

\n"; > Update to: \n"; } echo"\n"; echo"\n"; - $sql2 = "SELECT `AppName`,`GUID` FROM `t_applications` GROUP BY `AppName` ORDER BY `AppName` ASC"; + $sql2 = "SELECT `AppName`,`GUID` FROM `applications` GROUP BY `AppName` ORDER BY `AppName` ASC"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row2 = mysql_fetch_array($sql_result2)) { $appname = $row2["AppName"]; @@ -377,7 +374,7 @@ if (($mode=="new" or $mode=="update") and (strtolower($appname) !="mozilla" or $ echo"
Incompatable with Legacy Extensions (Requires install.rdf)"; } else { -$sql = "SELECT `version`,`major`,`minor`,`release`,`SubVer` FROM `t_applications` WHERE `AppName` = '$appname' ORDER BY `major` ASC, `minor` ASC, `release` ASC, `SubVer` ASC"; +$sql = "SELECT `version`,`major`,`minor`,`release`,`SubVer` FROM `applications` WHERE `AppName` = '$appname' ORDER BY `major` ASC, `minor` ASC, `release` ASC, `SubVer` ASC"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); echo"\n"; //exit; //Verify that there's at least one min/max app value pair... - $sql = "SELECT `AppName`,`AppID` FROM `t_applications` GROUP BY `AppName` ORDER BY `AppName` ASC"; + $sql = "SELECT `AppName`,`AppID` FROM `applications` GROUP BY `AppName` ORDER BY `AppName` ASC"; $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)) { $appname = $row["AppName"]; @@ -436,12 +433,12 @@ echo"\n"; } //Author List -- Autocomplete and Verify, if no valid authors, kill add.. otherwise, autocomplete/prompt - $authors = $_POST["authors"]; + $authors = escape_string($_POST["authors"]); $authors = explode(", ","$authors"); foreach ($authors as $author) { if (strlen($author)<2) {continue;} //Kills all values that're too short.. $a++; - $sql = "SELECT `UserID`,`UserEmail` FROM `t_userprofiles` WHERE `UserEmail` LIKE '$author%' ORDER BY `UserMode`, `UserName` ASC"; + $sql = "SELECT `UserID`,`UserEmail` FROM `userprofiles` WHERE `UserEmail` LIKE '$author%' ORDER BY `UserMode`, `UserName` ASC"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $numresults = mysql_num_rows($sql_result); while ($row = mysql_fetch_array($sql_result)) { @@ -473,22 +470,22 @@ if ($_POST["name"] AND $_POST["type"] AND $_POST["authors"] AND $updateauthors ! echo"
\n"; //Phase One, Main Data -$name = $_POST["name"]; -$homepage = $_POST["homepage"]; -$description = $_POST["description"]; -$item_id = $_POST["item_id"]; -$guid = $_POST["guid"]; -$type = $_POST["type"]; +$name = escape_string($_POST["name"]); +$homepage = escape_string($_POST["homepage"]); +$description = escape_string($_POST["description"]); +$item_id = escape_string($_POST["item_id"]); +$guid = escape_string($_POST["guid"]); +$type = escape_string($_POST["type"]); //Check to ensure tha the name isn't already taken, if it is, throw an error and halt. -$sql = "SELECT `Name` from `t_main` WHERE `Name`='$name' and `GUID` != '$guid'"; +$sql = "SELECT `Name` from `main` WHERE `Name`='$name' and `GUID` != '$guid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="0") { if ($_POST["mode"]=="update") { -$sql = "UPDATE `t_main` SET `Name`='$name', `Homepage`='$homepage', `Description`='$description', `DateUpdated`=NOW(NULL) WHERE `ID`='$item_id' LIMIT 1"; +$sql = "UPDATE `main` SET `Name`='$name', `Homepage`='$homepage', `Description`='$description', `DateUpdated`=NOW(NULL) WHERE `ID`='$item_id' LIMIT 1"; } else { -$sql = "INSERT INTO `t_main` (`GUID`, `Name`, `Type`, `Homepage`,`Description`,`DateAdded`,`DateUpdated`) VALUES ('$guid', '$name', '$type', '$homepage', '$description', NOW(NULL), NOW(NULL));"; +$sql = "INSERT INTO `main` (`GUID`, `Name`, `Type`, `Homepage`,`Description`,`DateAdded`,`DateUpdated`) VALUES ('$guid', '$name', '$type', '$homepage', '$description', NOW(NULL), NOW(NULL));"; } $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) {echo"Updating/Adding record for $name...
\n"; @@ -516,25 +513,28 @@ if ($sql_result) {echo"Updating/Adding record for $name...
\n"; //Get ID for inserted row... if we don't know it already if (!$_POST[item_id] and $_POST["mode"] !=="update") { - $sql = "SELECT `ID` FROM `t_main` WHERE `GUID`='$_POST[guid]' AND `Name`='$_POST[name]' LIMIT 1"; +$name = escape_string($_POST["name"]); +$guid = escape_string($_POST["guid"]); + + $sql = "SELECT `ID` FROM `main` WHERE `GUID`='$guid' AND `Name`='$name' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $id = $row["ID"]; } else { - $id = $_POST["item_id"]; + $id = escape_string($_POST["item_id"]); } //Phase 2 -- Commit Updates to AuthorXref tables.. with the ID and UserID. if ($updateauthors != "false") { //Remove Current Authors - $sql = "DELETE FROM `t_authorxref` WHERE `ID` = '$id'"; + $sql = "DELETE FROM `authorxref` WHERE `ID` = '$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Add New Authors based on $authorids sort($authorids); foreach ($authorids as $authorid) { - $sql = "INSERT INTO `t_authorxref` (`ID`, `UserID`) VALUES ('$id', '$authorid');"; + $sql = "INSERT INTO `authorxref` (`ID`, `UserID`) VALUES ('$id', '$authorid');"; $result = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } if ($result) { echo"Authors added...
\n"; } @@ -545,11 +545,11 @@ if ($updateauthors != "false") { unset($authors); //Clear from Post.. -// Phase 3, t_categoryxref +// Phase 3, categoryxref if (!$_POST["categories"]) { //No Categories defined, need to grab one to prevent errors... - $sql = "SELECT `CategoryID` FROM `t_categories` WHERE `CatType`='$type' AND `CatName`='Miscellaneous' LIMIT 1"; + $sql = "SELECT `CategoryID` FROM `categories` WHERE `CatType`='$type' AND `CatName`='Miscellaneous' LIMIT 1"; $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)) { $_POST["categories"] = array("$row[CategoryID]"); @@ -558,22 +558,22 @@ if (!$_POST["categories"]) { } //Delete Current Category Linkages... - $sql = "DELETE FROM `t_categoryxref` WHERE `ID` = '$id'"; + $sql = "DELETE FROM `categoryxref` WHERE `ID` = '$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Add New Categories from $_POST["categories"] foreach ($_POST["categories"] as $categoryid) { - $sql = "INSERT INTO `t_categoryxref` (`ID`, `CategoryID`) VALUES ('$id', '$categoryid');"; + $sql = "INSERT INTO `categoryxref` (`ID`, `CategoryID`) VALUES ('$id', '$categoryid');"; $result = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } if ($result) {echo"Categories added...
\n"; } -//Phase 4, t_version rows +//Phase 4, version rows //Construct Internal App_Version Arrays $i=0; -$sql = "SELECT `AppName`, `int_version`, `major`, `minor`, `release`, `SubVer`, `shortname` FROM `t_applications` ORDER BY `AppName`, `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; +$sql = "SELECT `AppName`, `int_version`, `major`, `minor`, `release`, `SubVer`, `shortname` FROM `applications` ORDER BY `AppName`, `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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++; @@ -587,7 +587,7 @@ $sql = "SELECT `AppName`, `int_version`, `major`, `minor`, `release`, `SubVer`, $app_shortname[strtolower($appname)] = $row["shortname"]; } - $sql2 = "SELECT `AppName`,`AppID` FROM `t_applications` GROUP BY `AppName` ORDER BY `AppName` ASC"; + $sql2 = "SELECT `AppName`,`AppID` FROM `applications` GROUP BY `AppName` ORDER BY `AppName` ASC"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row2 = mysql_fetch_array($sql_result2)) { $appname = $row2["AppName"]; @@ -603,33 +603,33 @@ if (!$minappver_int) {$minappver_int = $minappver;} if (!$maxappver_int) {$maxappver_int = $maxappver;} -$version = $_POST["version"]; -$osid = $_POST["osid"]; -$filesize = $_POST["filesize"]; +$version = escape_string($_POST["version"]); +$osid = escape_string($_POST["osid"]); +$filesize = escape_string($_POST["filesize"]); $uri = ""; //we don't have all the parts to set a uri, leave blank and fix when we do. -$notes = $_POST["notes"]; +$notes = escape_string($_POST["notes"]); //If a record for this item's exact version, OS, and app already exists, find it and delete it, before inserting - $sql3 = "SELECT `vID` from `t_version` TV INNER JOIN `t_applications` TA ON TA.AppID=TV.AppID WHERE `OSID`='$osid' AND `AppName` = '$appname' AND TV.Version='$version' ORDER BY `vID` ASC"; + $sql3 = "SELECT `vID` from `version` TV INNER JOIN `applications` TA ON TA.AppID=TV.AppID WHERE `OSID`='$osid' AND `AppName` = '$appname' AND TV.Version='$version' ORDER BY `vID` ASC"; $sql_result3 = mysql_query($sql3, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row = mysql_fetch_array($sql_result3)) { - $sql = "DELETE FROM `t_version` WHERE `vID`='$row[vID]' LIMIT 1"; + $sql = "DELETE FROM `version` WHERE `vID`='$row[vID]' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"Warning! A version Record already exists for this item's Application/OS/Version combination. Deleting.
\n"; } } -$sql = "INSERT INTO `t_version` (`ID`, `Version`, `OSID`, `AppID`, `MinAppVer`, `MinAppVer_int`, `MaxAppVer`, `MaxAppVer_int`, `Size`, `URI`, `Notes`, `DateAdded`, `DateUpdated`) VALUES ('$id', '$version', '$osid', '$appid', '$minappver', '$minappver_int', '$maxappver', '$maxappver_int', '$filesize', '$uri', '$notes', NOW(NULL), NOW(NULL));"; +$sql = "INSERT INTO `version` (`ID`, `Version`, `OSID`, `AppID`, `MinAppVer`, `MinAppVer_int`, `MaxAppVer`, `MaxAppVer_int`, `Size`, `URI`, `Notes`, `DateAdded`, `DateUpdated`) VALUES ('$id', '$version', '$osid', '$appid', '$minappver', '$minappver_int', '$maxappver', '$maxappver_int', '$filesize', '$uri', '$notes', NOW(NULL), NOW(NULL));"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) {echo"Added $name version $version for $appname
\n"; $apps_array[]=$app_shortname[strtolower($appname)];} -$sql = "SELECT `vID` from `t_version` WHERE `id` = '$id' ORDER BY `vID` DESC LIMIT 1"; +$sql = "SELECT `vID` from `version` WHERE `id` = '$id' ORDER BY `vID` DESC LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $vid_array[] = $row["vID"]; } } -$sql = "SELECT `OSName` FROM `t_os` WHERE `OSID`='$osid' LIMIT 1"; +$sql = "SELECT `OSName` FROM `os` WHERE `OSID`='$osid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $osname = $row["OSName"]; @@ -664,13 +664,13 @@ $uri = str_replace("$repositorypath/approval/","http://$sitehostname/developers/ //echo"$newfilename ($oldpath) ($newpath) ($uri)
\n"; foreach ($vid_array as $vid) { - $sql = "UPDATE `t_version` SET `URI`='$uri' WHERE `vID`='$vid'"; + $sql = "UPDATE `version` SET `URI`='$uri' WHERE `vID`='$vid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } //Approval Queue //Check if the item belongs to the user, (special case for where admins are trusted, the trust only applies to their own work.) - $sql = "SELECT `UserID` from `t_authorxref` WHERE `ID`='$id' AND `UserID` = '$_SESSION[uid]' LIMIT 1"; + $sql = "SELECT `UserID` from `authorxref` WHERE `ID`='$id' AND `UserID` = '$_SESSION[uid]' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)=="1" AND $_SESSION["trusted"]=="TRUE") { //User is trusted and the item they're modifying inheirits that trust. @@ -691,7 +691,7 @@ $userid = $_SESSION["uid"]; if (!$vid_array) { $vid_array = array(); } foreach ($vid_array as $vid) { -$sql = "INSERT INTO `t_approvallog` (`ID`, `vID`, `UserID`, `action`, `date`, `comments`) VALUES ('$id', '$vid', '$userid', '$action', NOW(NULL), '$comments');"; +$sql = "INSERT INTO `approvallog` (`ID`, `vID`, `UserID`, `action`, `date`, `comments`) VALUES ('$id', '$vid', '$userid', '$action', NOW(NULL), '$comments');"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } diff --git a/mozilla/webtools/update/developers/appmanager.php b/mozilla/webtools/update/developers/appmanager.php index cda736b342b..30adbda2da6 100755 --- a/mozilla/webtools/update/developers/appmanager.php +++ b/mozilla/webtools/update/developers/appmanager.php @@ -30,18 +30,18 @@ if (!$function) { if ($_POST["submit"]=="Add Application" or $_POST["submit"]=="Add Version") { echo"

Processing Add Request, please wait...

\n"; - $appname = $_POST["appname"]; - $guid = $_POST["guid"]; - $shortname = $_POST["shortname"]; - $version = $_POST["version"]; - $major = $_POST["Major"]; - $minor = $_POST["Minor"]; - $release = $_POST["Release"]; - $subver = $_POST["SubVer"]; - $public_ver = $_POST["public_ver"]; + $appname = escape_string($_POST["appname"]); + $guid = escape_string($_POST["guid"]); + $shortname = escape_string($_POST["shortname"]); + $version = escape_string($_POST["version"]); + $major = escape_string($_POST["Major"]); + $minor = escape_string($_POST["Minor"]); + $release = escape_string($_POST["Release"]); + $subver = escape_string($_POST["SubVer"]); + $public_ver = escape_string($_POST["public_ver"]); if (checkFormKey()) { - $sql = "INSERT INTO `t_applications` (`AppName`, `GUID`, `shortname`, `Version`, `major`, `minor`, `release`,`SubVer`,`public_ver`) VALUES ('$appname','$guid','$shortname','$version', '$major','$minor','$release','$subver','$public_ver')"; + $sql = "INSERT INTO `applications` (`AppName`, `GUID`, `shortname`, `Version`, `major`, `minor`, `release`,`SubVer`,`public_ver`) VALUES ('$appname','$guid','$shortname','$version', '$major','$minor','$release','$subver','$public_ver')"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"The application $appname $version has been successfully added."; @@ -52,7 +52,7 @@ if (!$function) {

Manage Application List

     Show Versions for: MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); while ($row = mysql_fetch_array($sql_result)) { @@ -91,7 +91,7 @@ $sql = "SELECT `AppName` from `t_applications` GROUP BY `AppName` ORDER BY `AppN Processing update request, please wait...\n"; - $sql = "UPDATE `t_applications` SET `AppName`='$appname', `major`='$major', `minor`='$minor', `release`='$release', `SubVer`='$subver',`Version`='$version', `public_ver`='$public_ver' WHERE `appid`='$appid'"; + $sql = "UPDATE `applications` SET `AppName`='$appname', `major`='$major', `minor`='$minor', `release`='$release', `SubVer`='$subver',`Version`='$version', `public_ver`='$public_ver' WHERE `appid`='$appid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"Your update to $appname $version has been successful.
"; } } } else if ($_POST["submit"] == "Delete Version") { - $appid=$_POST["appid"]; - $appname = $_POST["AppName"]; - $version = $_POST["version"]; + $appid= escape_string($_POST["appid"]); + $appname = escape_string($_POST["AppName"]); + $version = escape_string($_POST["version"]); echo"

Processing delete request, please wait...

\n"; - $sql = "DELETE FROM `t_applications` WHERE `appid`='$_POST[appid]'"; + $sql = "DELETE FROM `applications` WHERE `appid`='$appid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"You've successfully deleted the application '$appname $version'
"; @@ -155,9 +155,9 @@ Public Version: Yes: } } -if (!$appid) { $appid = $_POST["appid"]; } +if (!$appid) { $appid = escape_string($_POST["appid"]); } // Show Edit Form - $sql = "SELECT * FROM `t_applications` WHERE `appid` = '$appid' LIMIT 1"; + $sql = "SELECT * FROM `applications` WHERE `appid` = '$appid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); @@ -223,6 +223,10 @@ SubVer: diff --git a/mozilla/webtools/update/developers/approval.php b/mozilla/webtools/update/developers/approval.php index 3cfddd5936d..c1c54361727 100755 --- a/mozilla/webtools/update/developers/approval.php +++ b/mozilla/webtools/update/developers/approval.php @@ -36,29 +36,27 @@ echo"

Processing changes to approval queue, please wait...

\n"; //echo"
"; print_r($_POST); echo"
\n"; for ($i=1; $_POST["maxvid"]>=$i; $i++) { -$type = $_POST["type_$i"]; -$testos = $_POST["testos_$i"]; -$testbuild = $_POST["testbuild_$i"]; -$comments = $_POST["comments_$i"]; -$approval = $_POST["approval_$i"]; -$file = $_POST["file_$i"]; +$type = escape_string($_POST["type_$i"]); +$testos = escape_string($_POST["testos_$i"]); +$testbuild = escape_string($_POST["testbuild_$i"]); +$comments = escape_string($_POST["comments_$i"]); +$approval = escape_string($_POST["approval_$i"]); +$file = escape_string($_POST["file_$i"]); -if ($_POST["installation_$i"]) { $installation = $_POST["installation_$i"]; } else { $installation = "NO";} -if ($_POST["uninstallation_$i"]) { $uninstallation = $_POST["uninstallation_$i"]; } else { $uninstallation = "NO";} -if ($_POST["appworks_$i"]) { $appworks = $_POST["appworks_$i"]; } else { $appworks = "NO";} -if ($_POST["cleanprofile_$i"]) { $cleanprofile = $_POST["cleanprofile_$i"]; } else { $cleanprofile = "NO";} +if ($_POST["installation_$i"]) { $installation = escape_string($_POST["installation_$i"]); } else { $installation = "NO";} +if ($_POST["uninstallation_$i"]) { $uninstallation = escape_string($_POST["uninstallation_$i"]); } else { $uninstallation = "NO";} +if ($_POST["appworks_$i"]) { $appworks = escape_string($_POST["appworks_$i"]); } else { $appworks = "NO";} +if ($_POST["cleanprofile_$i"]) { $cleanprofile = escape_string($_POST["cleanprofile_$i"]); } else { $cleanprofile = "NO";} if ($type=="E") { -if ($_POST["newchrome_$i"]) { $newchrome = $_POST["newchrome_$i"]; } else { $newchrome = "NO";} -if ($_POST["worksasdescribed_$i"]) { $worksasdescribed = $_POST["worksasdescribed_$i"]; } else { $worksasdescribed = "NO";} +if ($_POST["newchrome_$i"]) { $newchrome = escape_string($_POST["newchrome_$i"]); } else { $newchrome = "NO";} +if ($_POST["worksasdescribed_$i"]) { $worksasdescribed = escape_string($_POST["worksasdescribed_$i"]); } else { $worksasdescribed = "NO";} } else if ($type=="T") { -if ($_POST["visualerrors_$i"]) { $visualerrors = $_POST["visualerrors_$i"]; } else { $visualerrors = "NO";} -if ($_POST["allelementsthemed_$i"]) { $allelementsthemed = $_POST["allelementsthemed_$i"]; } else { $allelementsthemed = "NO";} +if ($_POST["visualerrors_$i"]) { $visualerrors = escape_string($_POST["visualerrors_$i"]); } else { $visualerrors = "NO";} +if ($_POST["allelementsthemed_$i"]) { $allelementsthemed = escape_string($_POST["allelementsthemed_$i"]); } else { $allelementsthemed = "NO";} } if ($approval !="noaction") { -//echo"$i - $file $testos $testbuild $comments $approval
\n"; -//echo"$type - $installation $uninstallation $appworks $cleanprofile $newchrome $worksasdescribed $visualerrors $allelementsthemed
\n"; if ($type=="T") { if ($approval=="YES") { @@ -85,8 +83,8 @@ if ($type=="T") { } //Approval for this file was successful, print the output message. -$name = $_POST["name_$i"]; -$version = $_POST["version_$i"]; +$name = escape_string($_POST["name_$i"]); +$version = escape_string($_POST["version_$i"]); if ($approval_result) { if ($approval=="YES") { echo"$name $version was granted approval
\n"; @@ -110,9 +108,9 @@ if ($approval_result) { $j) { $authors .=", "; } } $categories = ""; $j=""; - $sql2 = "SELECT `CatName` from `t_categoryxref` TCX INNER JOIN `t_categories` TC ON TCX.CategoryID = TC.CategoryID WHERE TCX.ID='$row[ID]' ORDER BY `CatName` ASC"; + $sql2 = "SELECT `CatName` from `categoryxref` TCX INNER JOIN `categories` TC ON TCX.CategoryID = TC.CategoryID WHERE TCX.ID='$row[ID]' ORDER BY `CatName` ASC"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row2 = mysql_fetch_array($sql_result2)) { $j++; $categories .="$row2[CatName]"; if (mysql_num_rows($sql_result2) > $j) { $categories .=", "; } } - $sql2 = "SELECT `UserName`,`UserEmail`,`date` FROM `t_approvallog` TA INNER JOIN `t_userprofiles` TU ON TA.UserID = TU.UserID WHERE `ID`='$row[ID]' AND `vID`='$row[vID]' and `action`='Approval?' ORDER BY `date` DESC LIMIT 1"; + $sql2 = "SELECT `UserName`,`UserEmail`,`date` FROM `approvallog` TA INNER JOIN `userprofiles` TU ON TA.UserID = TU.UserID WHERE `ID`='$row[ID]' AND `vID`='$row[vID]' and `action`='Approval?' ORDER BY `date` DESC LIMIT 1"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row2 = mysql_fetch_array($sql_result2); if ($row2[date]) {$date = $row2[date]; } else { $date = $row[DateUpdated]; } @@ -155,7 +153,7 @@ WHERE `approved` = '?' GROUP BY TV.URI ORDER BY TV.DateUpdated ASC"; } echo"\n"; echo"\n"; echo" + + + + diff --git a/mozilla/webtools/update/developers/categorymanager.php b/mozilla/webtools/update/developers/categorymanager.php index ae97ff19008..8b4be1b01b5 100755 --- a/mozilla/webtools/update/developers/categorymanager.php +++ b/mozilla/webtools/update/developers/categorymanager.php @@ -28,19 +28,19 @@ if (!$function) { MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } } ?>

Manage Category List

     Show Categories for Application: "Extensions", "T"=>"Themes","P"=>"Plugins"); - $sql1 = "SELECT `CatType`, `CatApp` FROM `t_categories` WHERE `CatApp`='$application' GROUP BY `CatType` ORDER BY `CatType`"; + $sql1 = "SELECT `CatType`, `CatApp` FROM `categories` WHERE `CatApp`='$application' GROUP BY `CatType` ORDER BY `CatType`"; $sql_result1 = mysql_query($sql1, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row = mysql_fetch_array($sql_result1)) { $type = ucwords($row["CatType"]); @@ -72,7 +72,7 @@ $typenames = array("E"=>"Extensions", "T"=>"Themes","P"=>"Plugins"); Type:
Version:*
OS*
Filename:$filename ($filesize"."kb)
Target Application(s):
Works with: "; - $sql3 = "SELECT `shortname`, `MinAppVer`, `MaxAppVer` FROM `t_version` TV INNER JOIN `t_applications` TA ON TV.AppID = TA.AppID WHERE `URI`='$row[URI]' ORDER BY `AppName` ASC"; + $sql3 = "SELECT `shortname`, `MinAppVer`, `MaxAppVer` FROM `version` TV INNER JOIN `applications` TA ON TV.AppID = TA.AppID WHERE `URI`='$row[URI]' ORDER BY `AppName` ASC"; $sql_result3 = mysql_query($sql3, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row3 = mysql_fetch_array($sql_result3)) { echo"".ucwords($row3[shortname])." $row3[MinAppVer]-$row3[MaxAppVer] \n"; @@ -166,16 +164,16 @@ WHERE `approved` = '?' GROUP BY TV.URI ORDER BY TV.DateUpdated ASC"; //Approval Form for this Extension Item echo"
\n"; - echo"Install? \n"; - echo"Uninstall? \n"; - echo"App Works? \n"; - echo"Clean Profile? \n"; + echo"Install?\n"; + echo"Uninstall?\n"; + echo"App Works? \n"; + echo"Clean Profile?\n"; if ($type=="E") { - echo"New Chrome? \n"; - echo"Works? \n"; + echo"New Chrome?\n"; + echo"Works?\n"; } else if ($type=="T") { - echo"Visual Errors? \n"; - echo"Theme Complete? \n"; + echo"Visual Errors?\n"; + echo"Theme Complete?\n"; } echo"
\n"; @@ -234,7 +232,7 @@ TD { font-size: 8pt } Comments:
"0") { @@ -398,6 +398,10 @@ echo"MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while ($row = mysql_fetch_array($sql_result)) { @@ -75,18 +75,18 @@ if (!$function) { Processing your update, please wait...\n"; - $title = $_POST["title"]; - $index = $_POST["index"]; - $alias = $_POST["alias"]; - $text = $_POST["text"]; - $active = $_POST["active"]; - $id = $_POST["id"]; + $title = escape_string($_POST["title"]); + $index = escape_string($_POST["index"]); + $alias = escape_string($_POST["alias"]); + $text = escape_string($_POST["text"]); + $active = escape_string($_POST["active"]); + $id = escape_string($_POST["id"]); if (checkFormKey()) { - $sql = "UPDATE `t_faq` SET `title`='$title', `index`='$index', `alias`='$alias', `text`='$text', `active`='$active' WHERE `id`='$id'"; + $sql = "UPDATE `faq` SET `title`='$title', `index`='$index', `alias`='$alias', `text`='$text', `active`='$active' WHERE `id`='$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"Your update to '$title', has been successful.
"; @@ -95,10 +95,10 @@ if (!$function) { } else if ($_POST["submit"] == "Delete Entry") { echo"

Processing, please wait...

\n"; - $id = $_POST["id"]; - $title = $_POST["title"]; + $id = escape_string($_POST["id"]); + $title = escape_string($_POST["title"]); if (checkFormKey()) { - $sql = "DELETE FROM `t_faq` WHERE `id`='$id'"; + $sql = "DELETE FROM `faq` WHERE `id`='$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); if ($sql_result) { echo"You've successfully deleted the FAQ Entry '$title'."; @@ -110,7 +110,7 @@ if (!$function) { } // Show Edit Form - $sql = "SELECT * FROM `t_faq` WHERE `id` = '$id' LIMIT 1"; + $sql = "SELECT * FROM `faq` WHERE `id` = '$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("
MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); ?> @@ -125,7 +125,7 @@ if (!$function) { //List of Entry Index for User Convienience echo"Existing Index Reference:
"; //List of Entry Index for User Convienience echo"
Existing Index Reference:
No Comments are Currently Flagged for Editor } else {} ?> + + + + diff --git a/mozilla/webtools/update/developers/createaccount.php b/mozilla/webtools/update/developers/createaccount.php index 7f2fe0846fc..4d8c8e8ade5 100755 --- a/mozilla/webtools/update/developers/createaccount.php +++ b/mozilla/webtools/update/developers/createaccount.php @@ -1,7 +1,7 @@ - + Mozilla Update :: Create An Account @@ -15,7 +15,7 @@ if (!$function or $function=="step1") {
-

Create an Account

+

Create an Account

Joining Mozilla Update is easy just fill out the form below and click the join button. @@ -58,7 +58,7 @@ Joining Mozilla Update is easy just fill out the form below and click the join b
-

Already Have an Account?

+

Already Have an Account?

If you already have signed-up for an account, you don't need to sign-up again. Just use your e-mail address and password and login.

If you don't remember the password for your acconut, you can recover a forgotten password.

@@ -67,14 +67,14 @@ Joining Mozilla Update is easy just fill out the form below and click the join b } else if ($function=="step2") { echo"

Processing New Account Request, Please Wait...

\n"; //Gather and Filter Data from the Submission Form -if ($_POST["email"]==$_POST["emailconfirm"]) {$email = $_POST["email"];} else { $errors="true"; $emailvalid="no";} -if ($_POST["password"]==$_POST["passwordconfirm"]) {$password = $_POST["password"];} else { $errors="true"; $passwordvalid="no"; } -if ($_POST["name"]) { $name = $_POST["name"]; } else { $errors="true"; $namevalid="no"; } -$website = $_POST["website"]; +if ($_POST["email"]==$_POST["emailconfirm"]) {$email = escape_string($_POST["email"]);} else { $errors="true"; $emailvalid="no";} +if ($_POST["password"]==$_POST["passwordconfirm"]) {$password = escape_string($_POST["password"]);} else { $errors="true"; $passwordvalid="no"; } +if ($_POST["name"]) { $name = escape_string($_POST["name"]); } else { $errors="true"; $namevalid="no"; } +$website = escape_string($_POST["website"]); //Check e-mail address and see if its already in use. if ($emailvalid !="no") { -$sql = "SELECT `UserEmail` from `t_userprofiles` WHERE `UserEmail`='$email' LIMIT 1"; +$sql = "SELECT `UserEmail` from `userprofiles` WHERE `UserEmail`='$email' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result)>"0") {$errors="true"; $emailvalid="no"; } } @@ -97,7 +97,7 @@ $confirmationcode = md5(mt_rand()); $password_plain = $password; $password = md5($password); -$sql = "INSERT INTO `t_userprofiles` (`UserName`,`UserEmail`,`UserWebsite`,`UserPass`,`UserMode`,`ConfirmationCode`) VALUES ('$name','$email','$website','$password','D','$confirmationcode');"; +$sql = "INSERT INTO `userprofiles` (`UserName`,`UserEmail`,`UserWebsite`,`UserPass`,`UserMode`,`ConfirmationCode`) VALUES ('$name','$email','$website','$password','D','$confirmationcode');"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { include"mail_newaccount.php"; @@ -107,19 +107,19 @@ $sql = "INSERT INTO `t_userprofiles` (`UserName`,`UserEmail`,`UserWebsite`,`User } else if ($function=="confirmaccount") { ?> -

Activate Your Mozilla Update Account

+

Activate Your Mozilla Update Account

+ +
+ diff --git a/mozilla/webtools/update/developers/faqmanager.php b/mozilla/webtools/update/developers/faqmanager.php index 9c1ca83ce3c..0c81391bd6e 100755 --- a/mozilla/webtools/update/developers/faqmanager.php +++ b/mozilla/webtools/update/developers/faqmanager.php @@ -38,7 +38,7 @@ if (!$function) {
- +
+ @@ -44,16 +44,16 @@ include"$page_header"; -
E-Mail:
+ Forgot your password? -

Create an Account

+

Create an Account

You need an account to access the features of the Developer Control Panel and add your extension or themes to Mozilla Update.

Join Mozilla Update! - +
diff --git a/mozilla/webtools/update/developers/itemoverview.php b/mozilla/webtools/update/developers/itemoverview.php index f33ff65a193..348fe0a7ee2 100755 --- a/mozilla/webtools/update/developers/itemoverview.php +++ b/mozilla/webtools/update/developers/itemoverview.php @@ -11,10 +11,10 @@ include"$page_header"; include"inc_sidebar.php"; ?> \n";

Listed Versions

"Pending Approval", "YES"=>"Approved", "NO"=>"Denied", "DISABLED"=>"Disabled"); -$sql = "SELECT vID, TV.Version, URI, OSName, approved FROM `t_version` TV -INNER JOIN t_os TOS ON TOS.OSID = TV.OSID +$sql = "SELECT vID, TV.Version, URI, OSName, approved FROM `version` TV +INNER JOIN os TOS ON TOS.OSID = TV.OSID WHERE `ID`='$id' GROUP BY `URI` ORDER BY `Version`"; $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)) { @@ -76,8 +76,8 @@ echo"

Versio echo"$filename - for $os
\n"; -$sql2 = "SELECT TV.Version, AppName, MinAppVer, MaxAppVer FROM `t_version` TV - INNER JOIN t_applications TA ON TA.AppID = TV.AppID +$sql2 = "SELECT TV.Version, AppName, MinAppVer, MaxAppVer FROM `version` TV + INNER JOIN applications TA ON TA.AppID = TV.AppID WHERE `ID`='$id' AND `URI`='$uri' ORDER BY TV.Version, TA.AppName"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); while($row2 = mysql_fetch_array($sql_result2)) { @@ -106,7 +106,7 @@ $sql2 = "SELECT TV.Version, AppName, MinAppVer, MaxAppVer FROM `t_version` TV
@@ -115,16 +115,16 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys

Developer Comments

\n"; } } } -$sql = "SELECT `devcomments` FROM `t_main` WHERE `id`='$id' LIMIT 1"; +$sql = "SELECT `devcomments` FROM `main` WHERE `id`='$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $devcomments = $row["devcomments"]; @@ -139,7 +139,7 @@ $sql = "SELECT `devcomments` FROM `t_main` WHERE `id`='$id' LIMIT 1";

">Previews

+ + + diff --git a/mozilla/webtools/update/developers/listmanager.php b/mozilla/webtools/update/developers/listmanager.php index 13413198176..d2276532cfd 100755 --- a/mozilla/webtools/update/developers/listmanager.php +++ b/mozilla/webtools/update/developers/listmanager.php @@ -41,10 +41,11 @@ unset($i); \n"; //Debug $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { @@ -96,12 +97,12 @@ if ($sql_result) { echo""; //Phase Two, Author List -- Autocomplete and Verify - $authors = $_POST["authors"]; + $authors = escape_string($_POST["authors"]); $authors = explode(", ","$authors"); foreach ($authors as $author) { if (strlen($author)<2) {continue;} //Kills all values that're too short.. $a++; - $sql = "SELECT `UserID`,`UserEmail` FROM `t_userprofiles` WHERE `UserEmail` LIKE '$author%' ORDER BY `UserMode`, `UserName` ASC"; + $sql = "SELECT `UserID`,`UserEmail` FROM `userprofiles` WHERE `UserEmail` LIKE '$author%' ORDER BY `UserMode`, `UserName` ASC"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $numresults = mysql_num_rows($sql_result); while ($row = mysql_fetch_array($sql_result)) { @@ -126,7 +127,8 @@ unset($a,$r); if ($updateauthors != "false") { //Remove Current Authors if (checkFormKey()) { - $sql = "DELETE FROM `t_authorxref` WHERE `ID` = '$_POST[id]'"; + $id = escape_string($_POST["id"]); + $sql = "DELETE FROM `authorxref` WHERE `ID` = '$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } @@ -134,7 +136,8 @@ if ($updateauthors != "false") { sort($authorids); foreach ($authorids as $authorid) { if (checkFormKey()) { - $sql = "INSERT INTO `t_authorxref` (`ID`, `UserID`) VALUES ('$_POST[id]', '$authorid');"; + $id = escape_string($_POST["id"]); + $sql = "INSERT INTO `authorxref` (`ID`, `UserID`) VALUES ('$id', '$authorid');"; $result = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } } @@ -149,13 +152,14 @@ unset($authors); //Clear from Post.. //print_r($_POST["categories"]); //Delete Current Category Linkages... if (checkFormKey()) { - $sql = "DELETE FROM `t_categoryxref` WHERE `ID` = '$_POST[id]'"; + $id = escape_string($_POST["id"]); + $sql = "DELETE FROM `categoryxref` WHERE `ID` = '$id'"; //echo"$sql
\n"; //Debug $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); //Add New Categories from $_POST["categories"] foreach ($_POST["categories"] as $categoryid) { - $sql = "INSERT INTO `t_categoryxref` (`ID`, `CategoryID`) VALUES ('$_POST[id]', '$categoryid');"; + $sql = "INSERT INTO `categoryxref` (`ID`, `CategoryID`) VALUES ('$id', '$categoryid');"; //echo"$sql
\n"; //Debug $result = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } @@ -178,12 +182,12 @@ echo"
"; } else if ($_POST["submit"]=="Delete") { -$name = $_POST["name"]; -$id = $_POST["id"]; +$name = escape_string($_POST["name"]); +$id = escape_string($_POST["id"]); echo"

Deleting $name, please wait...

\n"; - $sql = "SELECT `Version`, `URI` FROM `t_version` WHERE `ID`='$id' GROUP BY `URI` ORDER BY `Version` ASC"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $sql = "SELECT `Version`, `URI` FROM `version` WHERE `ID`='$id' GROUP BY `URI` ORDER BY `Version` ASC"; + $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"]; $uri = $row["URI"]; @@ -221,7 +225,7 @@ echo"

Deleting $name, please wait...

\n"; } if (checkFormKey()) { - $sql = "DELETE FROM `t_main` WHERE `ID`='$id'"; + $sql = "DELETE FROM `main` WHERE `ID`='$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"$name has been deleted...
\n"; @@ -241,11 +245,11 @@ echo"

Deleting $name, please wait...

\n"; //Get Parent Item Information -$id = $_GET["id"]; -if (!$id) {$id = $_POST["id"]; } -$sql = "SELECT TM.ID, TM.Type, TM.GUID, TM.Name, TM.Description, TM.DateAdded, TM.DateUpdated, TM.Homepage, TU.UserEmail FROM `t_main` TM -LEFT JOIN t_authorxref TAX ON TM.ID = TAX.ID -INNER JOIN t_userprofiles TU ON TAX.UserID = TU.UserID +$id = escape_string($_GET["id"]); +if (!$id) {$id = escape_string($_POST["id"]); } +$sql = "SELECT TM.ID, TM.Type, TM.GUID, TM.Name, TM.Description, TM.DateAdded, TM.DateUpdated, TM.Homepage, TU.UserEmail FROM `main` TM +LEFT JOIN authorxref TAX ON TM.ID = TAX.ID +INNER JOIN userprofiles TU ON TAX.UserID = TU.UserID WHERE TM.ID = '$id' ORDER BY `Type` , `Name` ASC "; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); @@ -283,8 +287,8 @@ unset($v); @@ -374,13 +378,12 @@ unset($sql_result); echo""; //Phase One-Part 1 -- Version (per-file record update) -$notes = $_POST["notes"]; -$id = $_POST["id"]; -$uri = $_POST["uri"]; -$osid = $_POST["osid"]; +$notes = escape_string($_POST["notes"]); +$id = escape_string($_POST["id"]); +$uri = escape_string($_POST["uri"]); +$osid = escape_string($_POST["osid"]); if (checkFormKey()) { - $sql = "UPDATE `t_version` SET `OSID`='$osid', `Notes`='$notes', `DateUpdated`=NOW(NULL) WHERE `ID`='$id' AND `URI`='$uri'"; - //echo"$sql
\n"; + $sql = "UPDATE `version` SET `OSID`='$osid', `Notes`='$notes', `DateUpdated`=NOW(NULL) WHERE `ID`='$id' AND `URI`='$uri'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); echo"Version Notes and OS for $_POST[name] $_POST[version] updated...
\n"; } @@ -388,7 +391,7 @@ $osid = $_POST["osid"]; //Construct Internal App_Version Arrays $i=0; -$sql = "SELECT `int_version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` ORDER BY `AppName`, `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; +$sql = "SELECT `int_version`, `major`, `minor`, `release`, `SubVer` FROM `applications` ORDER BY `AppName`, `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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++; @@ -404,9 +407,9 @@ $sql = "SELECT `int_version`, `major`, `minor`, `release`, `SubVer` FROM `t_appl for ($i = 1; $i <= $_POST[maxval]; $i++) { unset($minappver_int,$maxappver_int); -$minappver = $_POST["minappver_$i"]; -$maxappver = $_POST["maxappver_$i"]; -$vid = $_POST["appvid_$i"]; +$minappver = escape_string($_POST["minappver_$i"]); +$maxappver = escape_string($_POST["maxappver_$i"]); +$vid = escape_string($_POST["appvid_$i"]); if ($app_internal_array["$minappver"]) {$minappver_int = $app_internal_array["$minappver"]; } if ($app_internal_array["$maxappver"]) {$maxappver_int = $app_internal_array["$maxappver"]; } if (!$minappver_int) {$minappver_int = $minappver;} @@ -414,7 +417,7 @@ if (!$maxappver_int) {$maxappver_int = $maxappver;} if ($minappver && $maxappver) { if (checkFormKey()) { - $sql = "UPDATE `t_version` SET `MinAppVer`='$minappver', `MinAppVer_int`='$minappver_int', `MaxAppVer`='$maxappver', `MaxAppVer_int`='$maxappver_int' WHERE `vID`='$vid'"; + $sql = "UPDATE `version` SET `MinAppVer`='$minappver', `MinAppVer_int`='$minappver_int', `MaxAppVer`='$maxappver', `MaxAppVer_int`='$maxappver_int' WHERE `vID`='$vid'"; //echo"$sql
\n"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); echo"Updated Target Application Values for Application $i...
\n"; @@ -430,18 +433,18 @@ echo"
"; } else if ($_POST["submit"]=="Delete") { -$id = $_POST["id"]; -$uri = $_POST["uri"]; -$version = $_POST["version"]; +$id = escape_string($_POST["id"]); +$uri = escape_string($_POST["uri"]); +$version = escape_string($_POST["version"]); echo"

Deleting Version... Please wait...

\n"; -$sql = "SELECT `Name` FROM `t_main` WHERE `ID` = '$id'"; +$sql = "SELECT `Name` FROM `main` WHERE `ID` = '$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $name = $row["Name"]; $sql_result = false; if (checkFormKey()) { - $sql = "DELETE FROM `t_version` WHERE `ID`='$id' AND `URI`='$uri'"; + $sql = "DELETE FROM `version` WHERE `ID`='$id' AND `URI`='$uri'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } if ($sql_result) { @@ -476,9 +479,9 @@ $sql = "SELECT `Name` FROM `t_main` WHERE `ID` = '$id'"; //---------------------- //Get Parent Item Information -$id = $_GET["id"]; -if (!$id) {$id = $_POST["id"]; } -$sql = "SELECT TM.ID, TM.Name FROM `t_main` TM WHERE TM.ID = '$id' LIMIT 1"; +$id = escape_string($_GET["id"]); +if (!$id) {$id = escape_string($_POST["id"]); } +$sql = "SELECT TM.ID, TM.Name FROM `main` TM WHERE TM.ID = '$id' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $id = $row["ID"]; @@ -488,11 +491,11 @@ $sql = "SELECT TM.ID, TM.Name FROM `t_main` TM WHERE TM.ID = '$id' LIMIT 1"; //----------------------- // Version Table //----------------------- -$vid = $_GET["vid"]; -if (!$vid) {$vid = $_POST["vid"]; } +$vid = escape_string($_GET["vid"]); +if (!$vid) {$vid = escape_string($_POST["vid"]); } //Get Data for Form Population -//INNER JOIN t_main TM ON TV.ID = TM.ID - $sql = "SELECT `Version`, TV.OSID, `OSName`,`URI`,`Notes`,`Size`,`DateAdded`, `DateUpdated` FROM `t_version` TV INNER JOIN `t_os` TOS ON TOS.OSID=TV.OSID WHERE `vID` = '$vid' ORDER BY `Version` ASC LIMIT 1"; +//INNER JOIN main TM ON TV.ID = TM.ID + $sql = "SELECT `Version`, TV.OSID, `OSName`,`URI`,`Notes`,`Size`,`DateAdded`, `DateUpdated` FROM `version` TV INNER JOIN `os` TOS ON TOS.OSID=TV.OSID WHERE `vID` = '$vid' ORDER BY `Version` ASC LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $v++; @@ -521,7 +524,7 @@ if (!$vid) {$vid = $_POST["vid"]; } //Construct App_Versions Arrays $i=0; -$sql = "SELECT `AppName`, `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` ORDER BY `AppName`, `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; +$sql = "SELECT `AppName`, `Version`, `major`, `minor`, `release`, `SubVer` FROM `applications` ORDER BY `AppName`, `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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++; @@ -537,7 +540,7 @@ $sql = "SELECT `AppName`, `Version`, `major`, `minor`, `release`, `SubVer` FROM $i=0; echo"Target Application(s):\n"; - $sql = "SELECT vID, TV.AppID,`AppName`,`MinAppVer`,`MaxAppVer` FROM `t_version` TV INNER JOIN `t_applications` TA ON TA.AppID=TV.AppID WHERE `ID` = '$id' && TV.URI = '$uri' ORDER BY `AppName` ASC"; + $sql = "SELECT vID, TV.AppID,`AppName`,`MinAppVer`,`MaxAppVer` FROM `version` TV INNER JOIN `applications` TA ON TA.AppID=TV.AppID WHERE `ID` = '$id' && TV.URI = '$uri' ORDER BY `AppName` ASC"; $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++; @@ -569,7 +572,7 @@ foreach ($app_ver_array[strtolower($appname)] as $app_version) { echo"OS*"; echo" @@ -63,6 +63,8 @@ be generated and e-mailed to the e-mail address you have on file.

+ + diff --git a/mozilla/webtools/update/developers/previews.php b/mozilla/webtools/update/developers/previews.php index c9848cd05ac..0a0dfd493e8 100755 --- a/mozilla/webtools/update/developers/previews.php +++ b/mozilla/webtools/update/developers/previews.php @@ -11,10 +11,10 @@ include"$page_header"; include"inc_sidebar.php"; ?>
+ + + + + + diff --git a/mozilla/webtools/update/developers/usermanager.php b/mozilla/webtools/update/developers/usermanager.php index 4926bff35d7..7080d583e01 100755 --- a/mozilla/webtools/update/developers/usermanager.php +++ b/mozilla/webtools/update/developers/usermanager.php @@ -24,11 +24,11 @@ include"inc_sidebar.php"; @@ -63,11 +63,11 @@ if ($_POST["submit"] && $_GET["action"]=="update") { //Process Post Data, Make Changes to User Table. //Begin General Updating for ($i=1; $i<=$_POST[maxuserid]; $i++) { - $admin = $_POST["admin$i"]; - $editor = $_POST["editor$i"]; - $trusted = $_POST["trusted$i"]; - $disabled = $_POST["disabled$i"]; - $selected = $_POST["selected$i"]; + $admin = escape_string($_POST["admin$i"]); + $editor = escape_string($_POST["editor$i"]); + $trusted = escape_string($_POST["trusted$i"]); + $disabled = escape_string($_POST["disabled$i"]); + $selected = escape_string($_POST["selected$i"]); //echo "$i - $admin - $editor - $trusted - $selected
\n"; if ($admin=="TRUE") { $mode="A"; @@ -78,32 +78,32 @@ if ($_POST["submit"] && $_GET["action"]=="update") { if ($trusted !=="TRUE") {$trusted="FALSE"; } if (checkFormKey()) { - $sql = "UPDATE `t_userprofiles` SET `UserMode`= '$mode', `UserTrusted`= '$trusted' WHERE `UserID`='$i'"; + $sql = "UPDATE `userprofiles` SET `UserMode`= '$mode', `UserTrusted`= '$trusted' WHERE `UserID`='$i'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } //Do Special Disable, Delete, Enable Account Operations if ($_POST["selected$i"] AND $_POST["submit"] !=="Update") { - $selecteduser = $_POST["selected$i"]; + $selecteduser = escape_string($_POST["selected$i"]); if ($_POST["submit"]=="Disable Selected") { if (checkFormKey()) { - $sql = "UPDATE `t_userprofiles` SET `UserMode`= 'D' WHERE `UserID`='$selecteduser'"; + $sql = "UPDATE `userprofiles` SET `UserMode`= 'D' WHERE `UserID`='$selecteduser'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"User Account for User Number $selecteduser Disabled
\n"; } //Disabling an author, check their extension list and disable any item they're the solo author of. - $sql = "SELECT TM.ID, TM.Name from `t_main` TM INNER JOIN `t_authorxref` TAX ON TM.ID=TAX.ID WHERE TAX.UserID = '$selecteduser'"; + $sql = "SELECT TM.ID, TM.Name from `main` TM INNER JOIN `authorxref` TAX ON TM.ID=TAX.ID WHERE TAX.UserID = '$selecteduser'"; $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)) { $id = $row["ID"]; $name = $row["Name"]; - $sql2 = "SELECT `ID` from `t_authorxref` WHERE `ID` = '$id'"; + $sql2 = "SELECT `ID` from `authorxref` WHERE `ID` = '$id'"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result2)<="1") { - $sql3 = "UPDATE `t_version` SET `approved`='DISABLED' WHERE `ID`='$id' and `approved` !='NO' "; + $sql3 = "UPDATE `version` SET `approved`='DISABLED' WHERE `ID`='$id' and `approved` !='NO' "; $sql_result3 = mysql_query($sql3, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result3) { echo"$name disabled from public viewing...
\n"; @@ -114,7 +114,7 @@ if ($_POST["submit"] && $_GET["action"]=="update") { } else if ($_POST["submit"]=="Delete Selected") { if (checkFormKey()) { - $sql = "DELETE FROM `t_userprofiles` WHERE `UserID`='$selecteduser' LIMIT 1"; + $sql = "DELETE FROM `userprofiles` WHERE `UserID`='$selecteduser' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"User Account for User Number $selecteduser Deleted
\n"; @@ -123,21 +123,21 @@ if ($_POST["submit"] && $_GET["action"]=="update") { } else if ($_POST["submit"]=="Enable Selected") { if (checkFormKey()) { - $sql = "UPDATE `t_userprofiles` SET `UserMode`= 'U' WHERE `UserID`='$selecteduser'"; + $sql = "UPDATE `userprofiles` SET `UserMode`= 'U' WHERE `UserID`='$selecteduser'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"User Account for User Number $selecteduser Enabled, User Mode set to User
\n"; } //Disabling an author, check their extension list and disable any item they're the solo author of. - $sql = "SELECT TM.ID, TM.Name from `t_main` TM INNER JOIN `t_authorxref` TAX ON TM.ID=TAX.ID WHERE TAX.UserID = '$selecteduser'"; + $sql = "SELECT TM.ID, TM.Name from `main` TM INNER JOIN `authorxref` TAX ON TM.ID=TAX.ID WHERE TAX.UserID = '$selecteduser'"; $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)) { $id = $row["ID"]; $name = $row["Name"]; - $sql2 = "SELECT `ID` from `t_authorxref` WHERE `ID` = '$id'"; + $sql2 = "SELECT `ID` from `authorxref` WHERE `ID` = '$id'"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if (mysql_num_rows($sql_result2)<="1") { - $sql3 = "UPDATE `t_version` SET `approved`='?' WHERE `ID`='$id' and `approved` !='NO'"; + $sql3 = "UPDATE `version` SET `approved`='?' WHERE `ID`='$id' and `approved` !='NO'"; $sql_result3 = mysql_query($sql3, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result3) { echo"$name restored to public view pending approval...
\n"; @@ -170,7 +170,7 @@ if ($_POST["submit"] && $_GET["action"]=="update") {
"; MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"

Updating User Profile...

\n"; @@ -265,10 +265,10 @@ $useremailhide = $_POST["useremailhide"]; } } else if ($_POST["submit"] == "Delete User") { if ($_SESSION["level"] !=="admin" && $_SESSION["uid"] !== $_POST["userid"]) {$_POST["userid"]=$_SESSION["uid"];} -$userid = $_POST["userid"]; -$username = $_POST["username"]; +$userid = escape_string($_POST["userid"]); +$username = escape_string($_POST["username"]); if (checkFormKey()) { - $sql = "DELETE FROM `t_userprofiles` WHERE `UserID`='$userid'"; + $sql = "DELETE FROM `userprofiles` WHERE `UserID`='$userid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { echo"

Deleting User... Please wait...

\n"; @@ -280,10 +280,10 @@ $username = $_POST["username"]; } } -if (!$userid) {$userid=$_POST["userid"];} +if (!$userid) {$userid=escape_string($_POST["userid"]);} //Show Edit Form - $sql = "SELECT * FROM `t_userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; + $sql = "SELECT * FROM `userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $userid = $row["UserID"]; @@ -370,10 +370,10 @@ echo"

Adding User...

\n"; if ($errors !="true") { $_POST["username"] = htmlspecialchars($_POST["username"]); -$admin = $_POST["admin"]; -$editor = $_POST["editor"]; -$trusted = $_POST["trusted"]; -$disabled = $_POST["disabled"]; +$admin = escape_string($_POST["admin"]); +$editor = escape_string($_POST["editor"]); +$trusted = escape_string($_POST["trusted"]); +$disabled = escape_string($_POST["disabled"]); //echo"$i - $admin - $editor - $trusted
\n"; if ($admin=="TRUE") { $mode="A"; @@ -383,13 +383,13 @@ if ($admin=="TRUE") { $mode="A"; if ($trusted !=="TRUE") {$trusted="FALSE"; } -$username = $_POST[username]; -$useremail = $_POST[useremail]; -$userwebsite = $_POST[userwebsite]; -$userpass = $_POST[userpass]; -$useremailhide = $_POST[useremailhide]; +$username = escape_string($_POST[username]); +$useremail = escape_string($_POST[useremail]); +$userwebsite = escape_string($_POST[userwebsite]); +$userpass = escape_string($_POST[userpass]); +$useremailhide = escape_string($_POST[useremailhide]); if (checkFormKey()) { - $sql = "INSERT INTO `t_userprofiles` (`UserName`, `UserEmail`, `UserWebsite`, `UserPass`, `UserMode`, `UserTrusted`, `UserEmailHide`) VALUES ('$username', '$useremail', '$userwebsite', '$userpass', '$mode', '$trusted', '$useremailhide');"; + $sql = "INSERT INTO `userprofiles` (`UserName`, `UserEmail`, `UserWebsite`, `UserPass`, `UserMode`, `UserTrusted`, `UserEmailHide`) VALUES ('$username', '$useremail', '$userwebsite', '$userpass', '$mode', '$trusted', '$useremailhide');"; $sql_result = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { include"mail_newaccount.php"; @@ -420,13 +420,13 @@ $useremailhide = $_POST[useremailhide]; Changing Password, please wait...\n"; - $userid = $_POST["userid"]; - $sql = "SELECT `UserPass`, `UserEmail` FROM `t_userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; + $userid = escape_string($_POST["userid"]); + $sql = "SELECT `UserPass`, `UserEmail` FROM `userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $userpass = $row["UserPass"]; @@ -442,7 +442,7 @@ if ($_POST["submit"]=="Change Password") { $sql_result = false; if (checkFormKey()) { - $sql = "UPDATE `t_userprofiles` SET `UserPass`='$userpass' WHERE `UserID`='$userid'"; + $sql = "UPDATE `userprofiles` SET `UserPass`='$userpass' WHERE `UserID`='$userid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); } if ($sql_result) { @@ -464,15 +464,15 @@ if ($_POST["submit"]=="Change Password") { $newpassword = substr(md5(mt_rand()),0,14); $password_plain = $newpassword; $userpass = md5($newpassword); - $userid = $_POST["userid"]; + $userid = escape_string($_POST["userid"]); - $sql = "SELECT `UserEmail` FROM `t_userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; + $sql = "SELECT `UserEmail` FROM `userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $row = mysql_fetch_array($sql_result); $email = $row["UserEmail"]; if (checkFormKey()) { - $sql = "UPDATE `t_userprofiles` SET `UserPass`='$userpass' WHERE `UserID`='$userid'"; + $sql = "UPDATE `userprofiles` SET `UserPass`='$userpass' WHERE `UserID`='$userid'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); if ($sql_result) { include"mail_newpassword.php"; @@ -481,11 +481,11 @@ if ($_POST["submit"]=="Change Password") { } } -if (!$userid) { $userid = $_POST["userid"]; } +if (!$userid) { $userid = escape_string($_POST["userid"]); } //Get Name of User for Form - $sql = "SELECT `UserName` FROM `t_userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; + $sql = "SELECT `UserName` FROM `userprofiles` WHERE `UserID` = '$userid' LIMIT 1"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $row = mysql_fetch_array($sql_result); + $row = mysql_fetch_array($sql_result); $username = $row["UserName"]; ?>

Change password for

diff --git a/mozilla/webtools/update/extensions/authorprofiles.php b/mozilla/webtools/update/extensions/authorprofiles.php index 3b7d18da99f..9ee27a77cfb 100644 --- a/mozilla/webtools/update/extensions/authorprofiles.php +++ b/mozilla/webtools/update/extensions/authorprofiles.php @@ -45,14 +45,14 @@ require"../core/config.php"; Mozilla Update :: Extensions - Author Profile: <?php echo"$row[UserName]"; ?> @@ -71,8 +71,8 @@ include"$page_header";
$useremail";  

All Extensions and Themes by

-
-"Extensions","T"=>"Themes","U"=>"Updates"); -$typename = $types["$type"]; +
+ "Extensions","T"=>"Themes"); + $typename = $types["$type"]; + $uriparams_skip="category"; -$uriparams_skip="category"; + echo"
    \n"; -echo"
      \n"; + echo" All Extensions\n"; -if (!$category AND $index !="yes") {echo""; } - echo"
    • All Extensions
    • \n"; -if (!$category AND $index !="yes") {echo"
      "; } + echo"
      • \n"; -// Object Categories -$sql = "SELECT `CatName`,`CatDesc` FROM `t_categories` WHERE `CatType` = '$type' and `CatApp` = '$application' ORDER BY `CatName`"; - $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)) { - $catname = $row["CatName"]; - $catdesc = $row["CatDesc"]; - if (strtolower($category) == strtolower($catname)) {echo""; } - echo"
      • $catname
      • \n"; - if (strtolower($category) == strtolower($catname)) {echo"
        "; } - } -?> -"; } - echo"
      • Editor's Pick
      • \n"; -if (strtolower($category) == strtolower($catname)) {echo""; } + // Object Categories + $sql = "SELECT `CatName`,`CatDesc` FROM `categories` WHERE `CatType` = '$type' and `CatApp` = '$application' ORDER BY `CatName`"; + $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)) { + $catname = $row["CatName"]; + $catdesc = $row["CatDesc"]; + echo" $catname\n"; + } -$catname = "Popular"; -$catdesc = ucwords($typename)." downloaded the most over the last week."; -if (strtolower($category) == strtolower($catname)) {echo""; } - echo"
      • $catname
      • \n"; -if (strtolower($category) == strtolower($catname)) {echo"
        "; } + echo"
    • \n"; -$catname = "Top Rated"; -$catdesc = ucwords($typename)." rated the highest by site visitors"; -if (strtolower($category) == strtolower($catname)) {echo""; } - echo"
    • $catname
    • \n"; -if (strtolower($category) == strtolower($catname)) {echo"
      "; } + $catname = "Editors Pick"; + $catdesc = ucwords($typename)." picked by the Mozilla Update Editors"; + echo" Editor's Pick\n"; -$catname = "Newest"; -$catdesc = "Most recent ".ucwords($typename); -if (strtolower($category) == strtolower($catname)) {echo""; } - echo"
    • $catname
    • \n"; -if (strtolower($category) == strtolower($catname)) {echo"
      "; } + $catname = "Popular"; + $catdesc = ucwords($typename)." downloaded the most over the last week."; + echo" $catname\n"; -?> -
    -
-
-
\ No newline at end of file + $catname = "Top Rated"; + $catdesc = ucwords($typename)." rated the highest by site visitors"; + echo" $catname\n"; + + $catname = "Newest"; + $catdesc = "Most recent ".ucwords($typename); + echo"$catname\n"; + ?> + +
\ No newline at end of file diff --git a/mozilla/webtools/update/extensions/index.php b/mozilla/webtools/update/extensions/index.php index b1be48bde5f..159965cd9a8 100644 --- a/mozilla/webtools/update/extensions/index.php +++ b/mozilla/webtools/update/extensions/index.php @@ -39,165 +39,169 @@ - - - - - - + + -Mozilla Update :: Extensions - Add Features to Mozilla Software + + Mozilla Update :: Extensions - Add Features to Mozilla Software
- -$index="yes"; -include"inc_sidebar.php"; -?> +
+

Extensions

+

Extensions are small add-ons that add new functionality to . 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, while keeping small to download .

-
-

What is an Extension?

-

Extensions are small add-ons that add new functionality to . -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, while keeping small -to download .

+ -"1.0", "thunderbird"=>"0.9", "mozilla"=>"1.7"); -$currentver_display_array = array("firefox"=>"1.0", "thunderbird"=>"0.9", "mozilla"=>"1.7.x"); -$currentver = $currentver_array[$application]; -$currentver_display = $currentver_display_array[$application]; -?> +

Top Rated Extensions

+

Ratings are based on feedback from people who use these extensions.

+
    - -
    -Mozilla News in RSS

    New Additions

    -New and Updated Extensions -
      + = '$currentver' AND `Rating` > '0' AND `approved` = 'YES' GROUP BY `Name` ORDER BY `Rating` DESC, `Name` ASC, TV.Version 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)) { + $r++; + $s++; + $id = $row["ID"]; + $name = $row["Name"]; + $description = $row["Description"]; + $rating = $row["Rating"]; -\n"; - echo"
      $dateadded
      \n"; - echo"$name $version
      \n"; - echo"\n"; + echo"
    • "; + echo"$name, $rating stars
      "; + echo"$description"; + echo"
    • \n"; -$lastname = $name; -if ($i >= "5") {break;} -} -?> -
    -
    -
    -Mozilla Weblogs in RSS

    Most Popular

    -Downloads over the last week -
      + if ($r >= "5") { + break; + } + } + unset($usednames, $usedversions, $r, $s, $i); + ?> -= '$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++; - $id = $row["ID"]; - $vid = $row["vID"]; - $name = $row["Name"]; - $version = $row["Version"]; - $downloadcount = $row["downloadcount"]; - $totaldownloads = $row["TotalDownloads"]; -if ($lastname == $name) {$i--; continue; } - echo"
    • \n"; - echo"
      $i
      \n"; - echo"$name
      \n"; - echo"($downloadcount downloads)\n"; - echo"
    • \n"; -$lastname = $name; -if ($i >= "5") {break;} -} -?> -
    +
+

Most Popular Extensions

+

The most popular downloads over the last week.

+
    + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
  1. No Popular Extensions
  2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $vid = $row["vID"]; + $name = $row["Name"]; + $description = $row["Description"]; + $downloadcount = $row["downloadcount"]; + $totaldownloads = $row["TotalDownloads"]; + $typename="extensions"; + if ($lastname == $name) { + $i--; + continue; + } + + echo"
  3. "; + echo"$name, $downloadcount downloads
    "; + echo"$description"; + echo"
  4. \n"; + + $lastname = $name; + if ($i >= "5") { + break; + } + } + ?> +
+ &type=E&list=newest">News Additions in RSS +

Newest Extensions

+

New and updated extensions. Subscribe to &type=E&list=newest">our RSS feed to be notified when new extensions are added.

+
    + + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
  1. Nothing Recently Added
  2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $type = $row["Type"]; + $name = $row["Name"]; + $description = $row["Description"]; + $version = $row["Version"]; + $dateadded = $row["DateAdded"]; + $dateadded = gmdate("F d, Y", strtotime("$dateadded")); + //$dateupdated = gmdate("F d, Y g:i:sa T", $timestamp); + $typename = "extensions"; + + if ($lastname == $name) { + $i--; + continue; + } + + echo"
  3. "; + echo"$name $version, $dateadded
    "; + echo"$description"; + echo"
  4. \n"; + + $lastname = $name; + if ($i >= "8") { + break; + } + } + ?> +
+
-
-MozillaZine News in RSS

Top Rated

-Based on feedback from visitors -
    + -= '$currentver' AND `Rating` > '0' AND `approved` = 'YES' ORDER BY `Rating` DESC, `Name` ASC, `Version` 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)) { - $r++; $s++; - $id = $row["ID"]; - $vid = $row["vID"]; - $name = $row["Name"]; - $version = $row["Version"]; - $rating = $row["Rating"]; - $arraysearch = array_search("$name", $usednames); - if ($arraysearch !== false AND $usedversions[$arraysearch]['version']<$version) {$r--; continue; } - - echo"
  • \n"; - echo"
    $rating stars
    \n"; - echo"$name\n"; - echo"
  • \n"; - - -$usednames[$s] = $name; -$usedversions[$s] = $version; -if ($r >= "5") {break;} -} -unset($usednames, $usedversions, $r, $s, $i); -?> -
-
- - -
- - -
-
-
- - \ No newline at end of file + + \ No newline at end of file diff --git a/mozilla/webtools/update/extensions/moreinfo.php b/mozilla/webtools/update/extensions/moreinfo.php index b5e07a83540..3d91a26056b 100644 --- a/mozilla/webtools/update/extensions/moreinfo.php +++ b/mozilla/webtools/update/extensions/moreinfo.php @@ -39,13 +39,14 @@ - - - + + + -Mozilla Update :: Extensions -- More Info: <?php echo"$row[Name]"; if ($pagetitle) {echo" - $pagetitle"; } ?> + Mozilla Update :: Extensions -- More Info: <?php echo"$row[Name]"; if ($pagetitle) {echo" - $pagetitle"; } ?> - + + +
$dateadded) { + $dateadded = $VerDateAdded; + } + + if ($VerDateUpdated > $dateupdated) { + $dateupdated = $VerDateUpdated; + } + + //Turn Authors Array into readable string... + $authorcount = count($authors); + foreach ($authors as $author) { + $userid = $authorids[$author]; + $n++; + $authorstring .= "$author"; + if ($authorcount != $n) { + $authorstring .=", "; + } + } + $authors = $authorstring; + unset($authorstring, $n); // Clear used Vars.. + + // Create Date String + if ($dateupdated > $dateadded) { + $timestamp = $dateupdated; + $datetitle = "Last Updated: "; + } else { + $timestamp = $dateadded; + $datetitle = "Released On: "; + } + + $date = date("F d, Y g:i:sa", strtotime("$timestamp")); + $releasedate = date("F d, Y", strtotime("$timestamp")); + $datestring = "$datetitle $date"; + + //Rating + if (!$rating) { + $rating="0"; + } + + //No Results Returned for Main Query, throw the Incompatible Error. if (mysql_num_rows($sql_result)=="0") { echo"

Incompatible Extension or Extension No Longer Available

\n"; echo"The extension you requested is either incompatible with the application selected, or the version of it is no longer available on Mozilla Update.

\n"; @@ -154,7 +236,7 @@ $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mys ".ucwords($application)." "; echo" "> "> @@ -790,19 +754,23 @@ if ($num_pages>1) {
  
* Required Fields +
-
- + + + + + + + -echo"\n"; -echo"
\n"; -?> - - - \ No newline at end of file + + \ No newline at end of file diff --git a/mozilla/webtools/update/extensions/showlist.php b/mozilla/webtools/update/extensions/showlist.php index 58789b3e348..95a971c1cf3 100644 --- a/mozilla/webtools/update/extensions/showlist.php +++ b/mozilla/webtools/update/extensions/showlist.php @@ -39,26 +39,21 @@ - - + + + - - - - Mozilla Update :: Extensions - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?> "; +echo""; } ?> - +
+ -include"inc_sidebar.php"; +
+ +$num_pages) {$pageid=$num_pages;} //Check PageId for Validity - $startpoint = ($pageid-1)*$items_per_page; -if ($startpoint<0) {$startpoint=0; $startitem=0;} - $startitem = $startpoint+1; - $enditem = $startpoint+$items_per_page; - if ($totalresults=="0") {$startitem = "0"; } - if ($enditem>$totalresults) {$enditem=$totalresults;} //Verify EndItem + if ($pageid>$num_pages) {$pageid=$num_pages;} //Check PageId for Validity + $startpoint = ($pageid-1)*$items_per_page; + if ($startpoint<0) {$startpoint=0; $startitem=0;} + $startitem = $startpoint+1; + $enditem = $startpoint+$items_per_page; + if ($totalresults=="0") {$startitem = "0"; } + if ($enditem>$totalresults) {$enditem=$totalresults;} //Verify EndItem -if ($_GET[nextnum]) {$startpoint = $_GET["nextnum"]; } +if ($_GET[nextnum]) {$startpoint = escape_string($_GET["nextnum"]); } //$resultsquery = str_replace("GROUP BY `Name` ", "", $resultsquery); $resultsquery .= " LIMIT $startpoint , $items_per_page"; //Append LIMIT clause to result query @@ -173,16 +166,7 @@ if ($category=="%") {$category = $catname; unset($catname); } //Now Showing Box if (!$category) {$categoryname="All"; } else {$categoryname = $category;} -echo"

".ucwords("$application $typename » $categoryname ")."

\n"; - -$sql = "SELECT `CatDesc` FROM `t_categories` WHERE `CatName`='$category' and `CatType`='$type' LIMIT 1"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $row = mysql_fetch_array($sql_result); - $categorydescription = $row["CatDesc"]; -if ($category=="All") {$categorydescription="All listed extensions for $application";} - -if ($categorydescription) {echo"$categorydescription
\n";} - +echo"

".ucwords("$application $typename » $categoryname ")."

\n"; if (!$OS) {$OS="all";} if (!$category) {$categoryname="All"; } else {$categoryname = $category;} @@ -191,17 +175,24 @@ echo"".ucwords("$typename")." $startitem - $enditem of $totalresults   $previd=$pageid-1; if ($previd >"0") { -echo"« Previous • "; +echo"« Previous • "; } echo"Page $pageid of $num_pages"; $nextid=$pageid+1; if ($pageid <$num_pages) { -echo" • Next »"; +echo" • Next »"; } +echo"
\n"; -echo"

\n"; +$sql = "SELECT `CatDesc` FROM `categories` WHERE `CatName`='$category' and `CatType`='$type' LIMIT 1"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $row = mysql_fetch_array($sql_result); + $categorydescription = $row["CatDesc"]; +if ($category=="All") {$categorydescription="All listed extensions for $application";} + +if ($categorydescription) {echo"$categorydescription
\n";} @@ -209,6 +200,7 @@ echo"

\n"; echo"
"; echo"
\n"; +echo"
"; echo"\n"; echo"\n"; //Items-Per-Page @@ -226,7 +218,7 @@ echo"\n"; // Operating Systems echo" OS: "; echo""; if ($application != "thunderbird") {echo"";} $app_orig = $application; //Store original to protect against possible corruption -$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName` = '$application' AND `public_ver` = 'YES' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; +$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `applications` WHERE `AppName` = '$application' AND `public_ver` = 'YES' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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)) { $version = $row["Version"]; @@ -265,18 +257,18 @@ $application = $app_orig; unset($app_orig); echo"\n"; echo""; -echo""; +echo"
"; echo"
\n"; - +echo" 
\n"; //--------------------------------- // Begin List //--------------------------------- //Get Author Data and Create $authorarray and $authorids -$sql = "SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `t_main` TM -LEFT JOIN t_authorxref TAX ON TM.ID = TAX.ID -INNER JOIN t_userprofiles TU ON TAX.UserID = TU.UserID -ORDER BY `Type` , `Name` ASC "; // TM.Type = 'E' +$sql = "SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `main` TM +LEFT JOIN authorxref TAX ON TM.ID = TAX.ID +INNER JOIN userprofiles TU ON TAX.UserID = TU.UserID +ORDER BY `Type` , `Name` ASC "; $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)) { $authorarray[$row[Name]][] = $row["UserName"]; @@ -284,7 +276,7 @@ ORDER BY `Type` , `Name` ASC "; // TM.Type = 'E' } //Assemble a display application version array -$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`"; +$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `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"]; @@ -316,9 +308,9 @@ $sql = "$resultsquery"; $populardownloads = $row["downloadcount"]; //Get Version Record for Referenced MAXvID from list query -$sql2 = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes FROM `t_version` TV -INNER JOIN t_applications TA ON TV.AppID = TA.AppID -INNER JOIN t_os TOS ON TV.OSID = TOS.OSID +$sql2 = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes FROM `version` TV +INNER JOIN applications TA ON TV.AppID = TA.AppID +INNER JOIN os TOS ON TV.OSID = TOS.OSID WHERE TV.ID = '$id' AND TV.Version = '$row[Version]' AND TA.AppName = '$appname' AND TOS.OSName = '$osname' LIMIT 1"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $vid = $row[MAXvID]; @@ -335,7 +327,7 @@ if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer" $uri = $row["URI"]; $filename = basename($uri); -$sql3 = "SELECT `PreviewURI`, `caption` from `t_previews` WHERE `ID` = '$id' AND `preview`='YES' LIMIT 1"; +$sql3 = "SELECT `PreviewURI`, `caption` from `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"]; @@ -350,7 +342,7 @@ $authorcount = count($authors); foreach ($authors as $author) { $userid = $authorids[$author]; $n++; -$authorstring .= "$author"; +$authorstring .= "$author"; if ($authorcount != $n) {$authorstring .=", "; } } @@ -371,37 +363,51 @@ if ($dateupdated > $dateadded) { $datestring = "$datetitle $date"; -echo"
\n"; +echo"
\n"; -if ($previewuri) { -list($width, $height, $type, $attr) = getimagesize("$websitepath"."$previewuri"); -echo"
\n"; -echo"\"$name\n"; -echo"
\n"; -} -echo"
"; -echo"$name $version
"; -echo"By $authors"; -echo"
"; +echo"
Rating: \"3.8
\n"; + + +echo"

$name $version

"; + + if ($previewuri) { + + echo"

\n"; + + list($width, $height, $attr) = getimagesize("$websitepath"."$previewuri"); + echo"\"$name\n"; + + echo"

\n"; + $preview_minheight=$height-50; + } + + +echo"

By $authors

"; //Description & Version Notes +if ($previewuri AND $preview_minheight) { + echo"

"; +} else { + echo"

"; +} echo"$description
"; if ($notes) {echo"
$notes"; } -echo"
"; +echo"

"; + + //Icon Bar Modules echo"
"; echo"
"; if ($appname=="Thunderbird") { - echo"\"\"More Info"; + echo"\"\"More Info"; } else { - echo"\"\"Install"; + echo"\"\"Install"; } echo"
  $filesize kb
"; -echo"
\"\" For $appname:
  $minappver - $maxappver
"; -if($osname !=="ALL") { echo"
\"\"For $osname
only
"; } -if ($homepage) {echo"";} -echo""; +echo"
\"\" For $appname:
  $minappver - $maxappver
"; +if($osname !=="ALL") { echo"
\"\"For $osname
only
"; } +//if ($homepage) {echo"";} echo"
"; echo"
$datestring"; @@ -412,8 +418,8 @@ echo"
\n"; } //End While Loop if ($totalresults=="0") { -echo"
\n"; -echo"No extensions found in this category for ".ucwords($application).".\n"; +echo"
\n"; +echo"

No extensions found in this category for ".ucwords($application).".

\n"; echo"
\n"; } @@ -423,7 +429,7 @@ echo"
\n"; ".ucwords("$application $typename » $categoryname ").""; +echo"

".ucwords("$application $typename » $categoryname ")."

"; echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; echo"  |  "; @@ -433,14 +439,14 @@ if ($pageid <=$num_pages) { $previd=$pageid-1; if ($previd >"0") { -echo"« Previous • "; +echo"« Previous • "; } echo"Page $pageid of $num_pages"; $nextid=$pageid+1; if ($pageid <$num_pages) { -echo" • Next »"; +echo" • Next »"; } echo"
\n"; @@ -464,7 +470,7 @@ while ($i <= $maxpagesonpage && $i <= $num_pages) { if ($i==$pageid) { echo"$i "; } else { - echo"$i "; + echo"$i "; } @@ -477,8 +483,10 @@ if ($i==$pageid) { } ?> +
+
\ No newline at end of file diff --git a/mozilla/webtools/update/images/body_back.gif b/mozilla/webtools/update/images/body_back.gif index 72a0d3ee6aa..1fe411d531a 100755 Binary files a/mozilla/webtools/update/images/body_back.gif and b/mozilla/webtools/update/images/body_back.gif differ diff --git a/mozilla/webtools/update/images/download.png b/mozilla/webtools/update/images/download.png index 8804f8fe48e..5292c6d4248 100644 Binary files a/mozilla/webtools/update/images/download.png and b/mozilla/webtools/update/images/download.png differ diff --git a/mozilla/webtools/update/images/key-point_back.gif b/mozilla/webtools/update/images/key-point_back.gif index 979a984b4e5..c839bdb68e2 100755 Binary files a/mozilla/webtools/update/images/key-point_back.gif and b/mozilla/webtools/update/images/key-point_back.gif differ diff --git a/mozilla/webtools/update/images/key-point_bl.gif b/mozilla/webtools/update/images/key-point_bl.gif index fe6f825706f..29f0d9b5371 100755 Binary files a/mozilla/webtools/update/images/key-point_bl.gif and b/mozilla/webtools/update/images/key-point_bl.gif differ diff --git a/mozilla/webtools/update/images/key-point_br.gif b/mozilla/webtools/update/images/key-point_br.gif index 2262148b72f..2add2946ba2 100755 Binary files a/mozilla/webtools/update/images/key-point_br.gif and b/mozilla/webtools/update/images/key-point_br.gif differ diff --git a/mozilla/webtools/update/images/key-point_tl.gif b/mozilla/webtools/update/images/key-point_tl.gif index 87d7cd0d0e4..9b9ce47d8d3 100755 Binary files a/mozilla/webtools/update/images/key-point_tl.gif and b/mozilla/webtools/update/images/key-point_tl.gif differ diff --git a/mozilla/webtools/update/images/key-point_tr.gif b/mozilla/webtools/update/images/key-point_tr.gif index 8ce240790e8..e8a2bd69438 100755 Binary files a/mozilla/webtools/update/images/key-point_tr.gif and b/mozilla/webtools/update/images/key-point_tr.gif differ diff --git a/mozilla/webtools/update/images/mozilla_icon.png b/mozilla/webtools/update/images/mozilla_icon.png index ef59b495eb8..caa8d3759e8 100644 Binary files a/mozilla/webtools/update/images/mozilla_icon.png and b/mozilla/webtools/update/images/mozilla_icon.png differ diff --git a/mozilla/webtools/update/images/rss.png b/mozilla/webtools/update/images/rss.png index 382946ace7b..54c25324930 100755 Binary files a/mozilla/webtools/update/images/rss.png and b/mozilla/webtools/update/images/rss.png differ diff --git a/mozilla/webtools/update/images/stars/graystar_icon.png b/mozilla/webtools/update/images/stars/graystar_icon.png index 7c77bb144cb..cc7c1a5bf78 100644 Binary files a/mozilla/webtools/update/images/stars/graystar_icon.png and b/mozilla/webtools/update/images/stars/graystar_icon.png differ diff --git a/mozilla/webtools/update/images/stars/star_icon.png b/mozilla/webtools/update/images/stars/star_icon.png index c7665cb42c5..261218990e9 100644 Binary files a/mozilla/webtools/update/images/stars/star_icon.png and b/mozilla/webtools/update/images/stars/star_icon.png differ diff --git a/mozilla/webtools/update/index.php b/mozilla/webtools/update/index.php index 0a8c133b937..d52958c46f3 100644 --- a/mozilla/webtools/update/index.php +++ b/mozilla/webtools/update/index.php @@ -50,207 +50,204 @@ include"$page_header"; ?> "0.95", "thunderbird"=>"0.8", "mozilla"=>"1.7"); - $currentver_display_array = array("firefox"=>"1.0 Preview Release", "thunderbird"=>"0.8", "mozilla"=>"1.7.x"); - $currentver = $currentver_array[$application]; - $currentver_display = $currentver_display_array[$application]; ?> + + +

Important Firefox Security Update:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur viverra ultrices ante. Aliquam nec lectus. Praesent vitae risus. Aenean vulputate sapien et leo. Nullam euismod tortor id wisi.

+
+ + +
-
-

">Get Extensions

- Thunderbird -

Extensions are small add-ons that add new functionality. They can add anything from a toolbar button to a completely new feature.

+
+

What is Mozilla Update?

+

Mozilla Update is the place to get extras for your Mozilla products. Learn more about us.

-='$currentver' AND `approved` = 'YES' GROUP BY TM.ID"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $numextensions = mysql_num_rows($sql_result); -?> - ">Browse extensions
( available for )
-
-
-

">Get Themes

- Mozilla -

Themes are skins for Firefox, they allow you to change the look and feel of the browser and personalize it to your tastes.

-='$currentver' AND `approved` = 'YES' GROUP BY TM.ID"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $numthemes = mysql_num_rows($sql_result); -?> - ">Browse themes
( available for ) -
-
-

Get Plugins

- Mozilla Store -

Now you can order all Mozilla software on CD and purchase Mozilla logo merchandise at the Mozilla Store.

-
+ +
+
Themes
+
Themes allow you to change the way your Mozilla program looks. New graphics and colors. Browse themes for: application=firefox">Firefox, application=thunderbird">Thunderbird, application=mozilla">Mozilla Suite
+
Extensions
+
Extensions are small add-ons that add new functionality to your Mozilla program. They can add anything from a toolbar button to a completely new feature. Browse extensions for: application=firefox">Firefox, application=thunderbird">Thunderbird, application=mozilla">Mozilla Suite
+
Plugins
+
Plugins are programs that allow websites to provide content to you and have it appear in your browser. Examples of Plugins are Flash, RealPlayer, and Java. Browse plug-ins for Mozilla Suite and Firefox
+ +
+ + +

Currently Featuring...

+ Charamel Theme for Firefox +

The Charamel Theme for Firefox and Thunderbird has been very popular since it was introduced way back in February. It brings forward the interface of the classic Netscape browser to a modern interpretation.

+

Great work on this simple and elegant theme Alex. We give it 3.5 stars out of five.

+ +
+
+

Most Popular Themes

+
    -

    + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
  1. No Popular Themes
  2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $vid = $row["vID"]; + $name = $row["Name"]; + $version = $row["Version"]; + $downloadcount = $row["downloadcount"]; + $totaldownloads = $row["TotalDownloads"]; + $typename="themes"; + if ($lastname == $name) { + $i--; + continue; + } - -
    -Mozilla News in RSS

    New Additions

    - -
    - -
    -MozillaZine News in RSS

    This Space For Rent

    - + echo"
  3. "; + echo"$name"; + echo" ($downloadcount downloads)"; + echo"
  4. \n"; + + $lastname = $name; + if ($i >= "5") { + break; + } + } + ?> +
+

Most Popular Extensions

+
    + + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
  1. No Popular Extensions
  2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $vid = $row["vID"]; + $name = $row["Name"]; + $version = $row["Version"]; + $downloadcount = $row["downloadcount"]; + $totaldownloads = $row["TotalDownloads"]; + $typename="extensions"; + if ($lastname == $name) { + $i--; + continue; + } + + echo"
  3. "; + echo"$name"; + echo" ($downloadcount downloads)"; + echo"
  4. \n"; + + $lastname = $name; + if ($i >= "5") { + break; + } + } + ?> +
+ &list=newest">News Additions in RSS +

New Additions

+
    + + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
  1. Nothing Recently Added
  2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $vid = $row["vID"]; + $type = $row["Type"]; + $name = $row["Name"]; + $version = $row["Version"]; + $dateadded = $row["DateAdded"]; + $dateadded = gmdate("M d, Y", strtotime("$dateadded")); + //$dateupdated = gmdate("F d, Y g:i:sa T", $timestamp); + + if ($type=="E") { + $typename = "extensions"; + } else if ($type=="T") { + $typename = "themes"; + } + + if ($lastname == $name) { + $i--; + continue; + } + + echo"
  3. "; + echo"$name $version"; + echo" ($dateadded)"; + echo"
  4. \n"; + + $lastname = $name; + if ($i >= "8") { + break; + } + } + ?> +
+
- -
- -
- - - -Frequently Asked Questions... - - -if ($_GET["application"]) {$application=$_GET["application"]; } -?> -"250") { - $body = substr($body,0,250); - $body .= " [More...]"; - - } - -//Create Customizeable Timestamp - $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 - $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - $date = gmdate("F, Y", $timestamp); - - -echo"$title
   $date"; -if ($pick=="YES") {echo" Editors Pick";} -echo"

\n"; -echo"$body
\n"; -} -?> - -"250") { - $body = substr($body,0,250); - $body .= " [More...]"; - - } - -//Create Customizeable Timestamp - $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 - $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - $date = gmdate("F, Y", $timestamp); - -echo"$title - $date"; -if ($pick=="YES") {echo" Editors Pick

\n";} -echo"$body
\n"; -} -?> - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/mozilla/webtools/update/rss/index.php b/mozilla/webtools/update/rss/index.php index 37065ac2f43..c7f0d9b49cb 100644 --- a/mozilla/webtools/update/rss/index.php +++ b/mozilla/webtools/update/rss/index.php @@ -41,7 +41,7 @@ require"../core/config.php"; $app = strtolower($_GET["application"]); // Firefox, Thunderbird, Mozilla -$type = $_GET["type"]; //E, T, [P] +$type = escape_string($_GET["type"]); //E, T, [P] $list = ucwords(strtolower($_GET["list"])); // Newest, Updated, [Editors], Popular $sitetitle = "Mozilla Update"; @@ -59,41 +59,41 @@ header("Content-Type: text/xml"); // Firefox, extensions, by date added $select = "SELECT DISTINCT -t_main.ID, -t_main.Name AS Title, -t_main.Description, -t_version.Version, -t_version.vID, -t_version.DateUpdated AS DateStamp, -t_applications.AppName"; +main.ID, +main.Name AS Title, +main.Description, +version.Version, +version.vID, +version.DateUpdated AS DateStamp, +applications.AppName"; -$from = "FROM t_main -INNER JOIN t_version ON t_main.ID = t_version.ID -INNER JOIN t_applications ON t_version.AppID = t_applications.AppID"; +$from = "FROM main +INNER JOIN version ON main.ID = version.ID +INNER JOIN applications ON version.AppID = applications.AppID"; $where = "`approved` = 'YES'"; // Always have a WHERE if ($app == 'firefox' || $app == 'thunderbird' || $app == 'mozilla') { - $where .= " AND t_applications.AppName = '$app'"; + $where .= " AND applications.AppName = '$app'"; } if ($type == 'E' || $type == 'T' || $type == 'P') { - $where .= " AND t_main.Type = '$type'"; + $where .= " AND main.Type = '$type'"; } switch ($list) { case "Popular": - $orderby = "t_main.DownloadCount DESC"; + $orderby = "main.DownloadCount DESC"; break; case "Updated": - $orderby = "t_main.DateUpdated DESC"; + $orderby = "main.DateUpdated DESC"; break; case "Rated": - $orderby = "t_main.Rating DESC"; + $orderby = "main.Rating DESC"; break; case "Newest": default: - $orderby = "t_main.DateAdded DESC"; + $orderby = "main.DateAdded DESC"; break; } diff --git a/mozilla/webtools/update/themes/authorprofiles.php b/mozilla/webtools/update/themes/authorprofiles.php index 3ee089bcdd9..8b86501c174 100644 --- a/mozilla/webtools/update/themes/authorprofiles.php +++ b/mozilla/webtools/update/themes/authorprofiles.php @@ -45,7 +45,8 @@ require"../core/config.php"; $useremail\n";  

All Extensions and Themes by

-
- + "Extensions","T"=>"Themes"); + $typename = $types["$type"]; + $uriparams_skip="category"; -echo"
-
-
\ No newline at end of file + $catname = "Editors Pick"; + $catdesc = ucwords($typename)." picked by the Mozilla Update Editors"; + echo" Editor's Pick\n"; + + $catname = "Popular"; + $catdesc = ucwords($typename)." downloaded the most over the last week."; + echo" $catname\n"; + + $catname = "Top Rated"; + $catdesc = ucwords($typename)." rated the highest by site visitors"; + echo" $catname\n"; + + $catname = "Newest"; + $catdesc = "Most recent ".ucwords($typename); + echo"$catname\n"; + ?> + +
\ No newline at end of file diff --git a/mozilla/webtools/update/themes/index.php b/mozilla/webtools/update/themes/index.php index 07b4565611b..db2c9dda69b 100644 --- a/mozilla/webtools/update/themes/index.php +++ b/mozilla/webtools/update/themes/index.php @@ -39,13 +39,10 @@ - - - - - - + + + Mozilla Update :: Themes - Change the Look of Mozilla Software
- -$index="yes"; -include"inc_sidebar.php"; -?> +
+

Themes

+

Themes are skins for , 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 or it can change every piece of the browser appearance.

-
-

What is a Theme?

-

Themes are skins for , 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 -or it can change every piece of the browser appearance.

+ + +

Top Rated Themes

+

Ratings are based on feedback from people who use these themes.

+
    + + = '$currentver' AND `Rating` > '0' AND `approved` = 'YES' GROUP BY `Name` ORDER BY `Rating` DESC, `Name` ASC, TV.Version DESC"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + if (mysql_num_rows($sql_result)=="0") { + echo"
  1. No Top Rated Themes
  2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $r++; + $s++; + $id = $row["ID"]; + $name = $row["Name"]; + $description = $row["Description"]; + $rating = $row["Rating"]; -"1.0", "thunderbird"=>"0.9", "mozilla"=>"1.7"); -$currentver_display_array = array("firefox"=>"1.0", "thunderbird"=>"0.9", "mozilla"=>"1.7.x"); -$currentver = $currentver_array[$application]; -$currentver_display = $currentver_display_array[$application]; -?> + echo"
  3. "; + echo"$name, $rating stars
    "; + echo"$description"; + echo"
  4. \n"; - -
    -Mozilla News in RSS

    New Additions

    -New and Updated Themes -
      + if ($r >= "5") { + break; + } + } + unset($usednames, $usedversions, $r, $s, $i); + ?> - +

      Most Popular Themes

      +

      The most popular downloads over the last week.

      +
        + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
      1. No Popular Themes
      2. \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $vid = $row["vID"]; + $name = $row["Name"]; + $description = $row["Description"]; + $downloadcount = $row["downloadcount"]; + $totaldownloads = $row["TotalDownloads"]; + $typename="themes"; + if ($lastname == $name) { + $i--; + continue; + } -$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 `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++; - $id = $row["ID"]; - $vid = $row["vID"]; - $name = $row["Name"]; - $version = $row["Version"]; - $dateadded = $row["DateAdded"]; -//Create Customizeable Datestamp - $timestamp = strtotime("$dateadded"); - $dateadded = gmdate("M d", $timestamp); // $dateupdated = gmdate("F d, Y g:i:sa T", $timestamp); + echo"
      3. "; + echo"$name, $downloadcount downloads
        "; + echo"$description"; + echo"
      4. \n"; -if ($lastname == $name) {$i--; continue; } - echo"
      5. \n"; - echo"
        $dateadded
        \n"; - echo"$name $version
        \n"; - echo"
      6. \n"; + $lastname = $name; + if ($i >= "5") { + break; + } + } + ?> +
      + &type=T&list=newest">News Additions in RSS +

      Newest Themes

      +

      New and updated themes. Subscribe to &type=T&list=newest">our RSS feed to be notified when new themes are added.

      +
        -$lastname = $name; -if ($i >= "5") {break;} -} -?> -
    -
    -
    -Mozilla Weblogs in RSS

    Most Popular

    -Downloads over the last week -
      + = '$currentver' AND (`OSName` = '$OS' OR `OSName` = 'ALL') 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); + if (mysql_num_rows($sql_result)=="0") { + echo"
    • Nothing Recently Added
    • \n"; + } + while ($row = mysql_fetch_array($sql_result)) { + $i++; + $id = $row["ID"]; + $type = $row["Type"]; + $name = $row["Name"]; + $description = $row["Description"]; + $version = $row["Version"]; + $dateadded = $row["DateAdded"]; + $dateadded = gmdate("F d, Y", strtotime("$dateadded")); + //$dateupdated = gmdate("F d, Y g:i:sa T", $timestamp); + $typename = "themes"; -= '$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++; - $id = $row["ID"]; - $vid = $row["vID"]; - $name = $row["Name"]; - $version = $row["Version"]; - $downloadcount = $row["downloadcount"]; - $totaldownloads = $row["TotalDownloads"]; -if ($lastname == $name) {$i--; continue; } - echo"
    • \n"; - echo"
      $i
      \n"; - echo"$name
      \n"; - echo"($downloadcount downloads)\n"; - echo"
    • \n"; -$lastname = $name; -if ($i >= "5") {break;} -} -?> -
    + if ($lastname == $name) { + $i--; + continue; + } + + echo"
  5. "; + echo"$name $version, $dateadded
    "; + echo"$description"; + echo"
  6. \n"; + + $lastname = $name; + if ($i >= "8") { + break; + } + } + ?> +
+
-
-MozillaZine News in RSS

Top Rated

-Based on feedback from visitors -
    + -= '$currentver' AND `Rating` > '0' AND `approved` = 'YES' ORDER BY `Rating` DESC, `Name` ASC, `Version` 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)) { - $r++; $s++; - $id = $row["ID"]; - $vid = $row["vID"]; - $name = $row["Name"]; - $version = $row["Version"]; - $rating = $row["Rating"]; - $arraysearch = array_search("$name", $usednames); - if ($arraysearch !== false AND $usedversions[$arraysearch]['version']<$version) {$r--; continue; } - - echo"
  • \n"; - echo"
    $rating stars
    \n"; - echo"$name\n"; - echo"
  • \n"; - -$usednames[$s] = $name; -$usedversions[$s] = $version; -if ($r >= "5") {break;} -} -unset($usednames, $usedversions, $r, $s, $i); -?> -
-
- - -
- - -
-
-
- - \ No newline at end of file + + \ No newline at end of file diff --git a/mozilla/webtools/update/themes/moreinfo.php b/mozilla/webtools/update/themes/moreinfo.php index a3d7ce16e56..3dbeb1e1675 100644 --- a/mozilla/webtools/update/themes/moreinfo.php +++ b/mozilla/webtools/update/themes/moreinfo.php @@ -39,471 +39,491 @@ - - - - - - + + + "All Releases", "previews"=>"Preview Images", "comments"=>"User Comments", "staffreview"=>"Editor Review", "opinion"=>" My Opinion"); -$pagetitle = $pagetitles[$_GET["page"]]; + $pagetitles = array("releases"=>"All Releases", "previews"=>"Preview Images", "comments"=>"User Comments", "staffreview"=>"Editor Review", "opinion"=>" My Opinion"); + $pagetitle = $pagetitles[$_GET["page"]]; ?> -Mozilla Update :: Themes -- More Info: <?php echo"$row[Name]"; if ($pagetitle) {echo" - $pagetitle"; } ?> + Mozilla Update :: Themes -- More Info: <?php echo"$row[Name]"; if ($pagetitle) {echo" - $pagetitle"; } ?> - + + +
= '".strtolower($app_version)."' ";} -if ($OS) { $sql .=" AND (TOS.OSName = '$OS' OR TOS.OSName = 'All') "; } -} + $sql .=" WHERE TM.ID = '$id'"; -$sql .= "\nORDER BY `Name` , `Version` DESC LIMIT 1"; + if ($_GET["vid"]) { + $vid=$_GET["vid"]; + $sql .=" AND TV.vID = '$vid' "; -//echo"
$sql

\n"; + } else { - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $row = mysql_fetch_array($sql_result); - - if (mysql_num_rows($sql_result)=="0") { - echo"

Incompatible Theme or Theme No Longer Available

\n"; - echo"The theme you requested is either incompatible with the application selected, or the version of it is no longer available on Mozilla Update.

\n"; - echo"To try your request again for a different application version, use the form below.
\n"; - - echo"
- - - ".ucwords($application)." "; - echo" + + ".ucwords($application)." "; + echo" "; - echo"
"; + } + echo" "; + echo""; - include"$page_footer"; - echo"\n\n"; - exit; - } - - -$v++; - $id = $row["ID"]; - $name = $row["Name"]; - $dateadded = $row["DateAdded"]; - $dateupdated = $row["DateUpdated"]; - $homepage = $row["Homepage"]; - $description = $row["Description"]; - $rating = $row["Rating"]; - $authors = $authorarray[$name]; - $osname = $row["OSName"]; - - $vid = $row["vID"]; -if (!$_GET['vid']) {$_GET['vid']=$vid;} - $appname = $row["AppName"]; -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"]; - $downloadcount = $row["TotalDownloads"]; - $populardownloads = $row["downloadcount"]; - $filename = basename($uri); - -$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) { -$userid = $authorids[$author]; -$n++; -$authorstring .= "$author"; -if ($authorcount != $n) {$authorstring .=", "; } - -} -$authors = $authorstring; -unset($authorstring, $n); // Clear used Vars.. - -if ($dateupdated > $dateadded) { - $timestamp = $dateupdated; - $datetitle = "Last Update: "; - } else { - $timestamp = $dateadded; - $datetitle = "Added on: "; - } - - $date = date("F d, Y g:i:sa", strtotime("$timestamp")); - - -$datestring = "$datetitle $date"; - -//Rating -if (!$rating) { $rating="0"; } -?> - - -

Themes »

- -">More Info | -">All Releases | -">Comments | -"0") { -?> -">Previews | -"0") { -?> -">Editor Review | - -">My Opinion -\n"; - -if ($previewuri) { -list($width, $height, $type, $attr) = getimagesize("$websitepath"."$previewuri"); -echo"
\n"; -echo"\"$name\n"; -echo"
\n"; -} -echo"
"; -echo"$name $version
"; -echo"By $authors"; -echo"
"; - -//Categories - $sql = "SELECT `CatName` from `t_categoryxref` TCX INNER JOIN `t_categories` TC ON TCX.CategoryID=TC.CategoryID WHERE `ID`='$id' ORDER BY `CatName` ASC"; - $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); $i=0; - while ($row = mysql_fetch_array($sql_result)) { - $i++; - $categories .= $row["CatName"]; - if ($num_results < $i ) { $categories .= ", "; } + include"$page_footer"; + echo"\n\n"; + exit; } -//Description & Version Notes -echo"$description"; -if ($categories) { echo" (Categories: $categories)"; } -echo"
\n"; -if ($notes) {echo"
\n$notes
"; } -echo"
\n"; - - -$page = $_GET["page"]; -if (!$page or $page=="general") { + //Get Preview Image URI + $sql3 = "SELECT `PreviewURI`, `caption` from `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"]; ?> - -
-0) { -$time .= "$time_minutes minutes "; -} -$time .="$time_seconds seconds"; +
+
Rating: 3.8 Stars
+

-

+

, by , released on

-echo" -Released on $verdateadded
-
"; -if ($appname=="Thunderbird") { -echo"\"\" ( Download Now )
"; -} else { -echo"\"\" ( Install Now )
"; -} -echo" -  $filesize KB, ($time @ $speed"."k)
-"; + + +

+ "0") { + ?> + "> + + \n"; + ?> + "0") { ?> + + +

+ + +

Quick Description

+

-//Icon Bar Modules -echo"

"; -echo"
\"\" For $appname:
  $minappver - $maxappver
"; -if($osname !=="ALL") { echo"
\"\"For $osname
only
"; } -if ($homepage) {echo"";} -echo""; + + -echo"
"; -echo"
"; +
$notes\n"; + } + if ($categories) { + echo" (Categories: $categories)"; + } + ?> +

+

Requires: <?php echo ucwords($appname); ?> + \">"; + } + ?> +

-if ($application=="thunderbird") { -echo"Theme Install Instructions for Thunderbird Users:
-(1) Right-Click the link above to Download and save the file to your hard disk.
-(2) In Mozilla Thunderbird, open the theme manager (Tools Menu/Themes)
-(3) Click the Install button, and locate/select the file you downloaded and click \"OK\"

-"; -} -if ($homepage) {echo"Having a problem with this theme? For Help and Technical Support, visit the Theme's Homepage.";} +
"; -if ($homepage) {echo"
  • Theme Homepage"; } -if ($appname !="Thunderbird") {echo"
  • Download Theme"; } -echo"
  • Other Versions"; -?> - -
  • + if ($appname=="Thunderbird") { + echo""; + } else { + echo""; + } + ?>Install Now ( KB File)
    -Developer Comments:\n"; - echo"$devcomments"; - echo"
    \n"; - } -?> + Theme Install Instructions for Thunderbird Users:
    + (1) Right-Click the link above and choose \"Save Link As...\" to Download and save the file to your hard disk.
    + (2) In Mozilla Thunderbird, open the theme manager (Tools Menu/Themes)
    + (3) Click the Install button, and locate/select the file you downloaded and click \"OK\"

    "; + } + ?> + + + "0") { + $row = mysql_fetch_array($sql_result); + $title = $row["Title"]; + $dateadded = $row["DateAdded"]; + $body = $row["Body"]; + $pick = $row["Pick"]; + $date = gmdate("F, Y", strtotime("$dateadded")); //Create Customizeable Timestamp + ?> +

    Editor's Review

    + $title\n"; + if ($pick=="YES") { + echo" — $date Editors Pick\n"; + } + echo"
    \n"; + ?> +

    + -

    User Comments:

    - + Developer Comments:\n"; + echo"

    $devcomments

    \n"; + } + ?> -echo"

    $commenttitle

    "; -echo""; +

    User Comments

    +

    ">Add your own opinion »

    +
      + "; -} -for ($i = $i; $i <= 5; $i++) { -echo"\"\""; -} -echo""; + echo"
    • \n"; + echo"

      $commenttitle by $commentname

      \n"; + echo"

      $commentdate

      \n"; + echo"

      $commentnotes

      \n"; + echo"

      "; + for ($i = 1; $i <= $rating; $i++) { + echo"\"*\""; + } + for ($i = $i; $i <= 5; $i++) { + echo"\"\""; + } + echo"

      \n"; + echo"
    • \n"; + } -echo"  By $commentname
      \n"; -echo" 
      \n"; -echo"$commentnotes
      \n\n"; -echo" 
      \n"; -echo"
      \n"; -echo"$commentdate | More Comments... | Rate It!\n"; -echo"
      \n"; -} + if ($num_results=="0") { + echo"
    • \n"; + echo"

      Nobody's Commented on this Theme Yet

      \n"; + echo"

      Be the First! Rate It!

      "; + echo"
    • \n"; + } + ?> +
    +

    ">Read all opinions »

    -if ($num_results=="0") { -echo"
    "; -echo"Nobody's Commented on this Extension Yet
    "; -echo"Be the First! Rate It!"; -echo"
    "; -} +

    Theme Details

    + -?> -$datestring"; - if ($populardownloads > 5 ) { - echo" | Downloads Last 7 Days: $populardownloads"; - } - if ($downloadcount) { - echo" | Total Downloads: $downloadcount"; - } + echo"

    All Releases

    "; - echo"
    \n"; -?> -All Releases"; + echo"
    "; //Open Version DIV -$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' AND TA.AppName = '$application' -ORDER BY `Version` DESC, `OSName` ASC -LIMIT 0, 10"; + //Description & Version Notes + echo"

    $name $version

    \n"; + if ($notes) { + echo"$notes

    \n"; + } - $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"]; -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"]; - $uri = $row["URI"]; - $osname = $row["OSName"]; - $appname = $row["AppName"]; + //Icon Bar Modules + echo"
    "; + echo"
    "; + if ($appname=="Thunderbird") { + echo""; + } else { + echo""; + } + echo"\"\"Install
    Size: $filesize kb
    "; + echo"
    \"\" For $appname:
      $minappver - $maxappver
    "; + if($osname !=="ALL") { + echo"
    \"\"For $osname
    only
    "; + } + echo"

    \n"; -echo"
    "; //Open Version DIV + echo"
    "; + } -//Description & Version Notes -echo"

    Version $version

    \n"; -if ($notes) {echo"$notes

    \n"; } -//Icon Bar Modules -echo"
    "; -echo"
    "; -if ($appname=="Thunderbird") { - echo""; -} else { - echo""; -} -echo"\"\"Install
    Size: $filesize kb
    "; -echo"
    \"\" For $appname:
      $minappver - $maxappver
    "; -if($osname !=="ALL") { echo"
    \"\"For $osname
    only
    "; } -echo"

    \n"; + } else if ($page=="comments") { + //Comments/Ratings Page -echo"
    "; -} + if ($_GET["numpg"]) {$items_per_page=escape_string($_GET["numpg"]); } else {$items_per_page="25";} //Default Num per Page is 25 + if (!$_GET["pageid"]) {$pageid="1"; } else { $pageid = escape_string($_GET["pageid"]); } //Default PageID is 1 + $startpoint = ($pageid-1)*$items_per_page; -//End General Page -} else if ($page=="comments") { -//Comments/Ratings Page - -if ($_GET["numpg"]) {$items_per_page=$_GET["numpg"]; } else {$items_per_page="25";} //Default Num per Page is 25 -if (!$_GET["pageid"]) {$pageid="1"; } else { $pageid = $_GET["pageid"]; } //Default PageID is 1 -$startpoint = ($pageid-1)*$items_per_page; - - $sql = "SELECT CommentID FROM `t_feedback` WHERE ID = '$id'"; + $sql = "SELECT CommentID FROM `feedback` WHERE ID = '$id'"; $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); $num_pages = ceil(mysql_num_rows($sql_result)/$items_per_page); - - //Comments/Ratings Page echo"

    User Comments:

    "; if ($pageid <=$num_pages) { $previd=$pageid-1; if ($previd >"0") { - echo"« Previous • "; + echo"« Previous • "; } } @@ -511,12 +531,13 @@ $startpoint = ($pageid-1)*$items_per_page; $nextid=$pageid+1; if ($pageid <$num_pages) { - echo" • Next »"; + echo" • Next »"; } echo"
    \n"; - - - $sql = "SELECT CommentID, CommentName, CommentTitle, CommentNote, CommentDate, CommentVote, `helpful-yes`,`helpful-no` FROM `t_feedback` WHERE ID = '$id' ORDER BY `CommentDate` DESC LIMIT $startpoint, $items_per_page"; + ?> + + + "0") { + echo"« Previous • "; + } + } + + echo"Page $pageid of $num_pages"; + $nextid=$pageid+1; + + if ($pageid <$num_pages) { + echo" • Next »"; + } + echo"
    \n"; + + //Skip to Page... + if ($num_pages>1) { + echo"Jump to Page: "; + $pagesperpage=9; //Plus 1 by default.. + $i = 01; + + //Dynamic Starting Point + if ($pageid>11) { + $nextpage=$pageid-10; + } + + $i=$nextpage; + + //Dynamic Ending Point + $maxpagesonpage=$pageid+$pagesperpage; + //Page #s + while ($i <= $maxpagesonpage && $i <= $num_pages) { + if ($i==$pageid) { + echo"$i "; + } else { + echo"$i "; + } + $i++; + } + } + + if ($num_pages>1) { + echo"
    \nComments per page: \n"; + $perpagearray = array("25","50","100"); + foreach ($perpagearray as $items_per_page) { + echo"$items_per_page "; + } + } + + + } else if ($page=="previews") { + + // Item Previews Tab + echo"

    Previews for $name

    \n"; + + $sql = "SELECT `PreviewURI`,`caption` from `previews` WHERE `ID`='$id' and `preview`='NO' ORDER BY `PreviewID` ASC"; + $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)) { + $uri = $row["PreviewURI"]; + $caption = $row["caption"]; + + echo"

    $caption

    "; + list($src_width, $src_height, $type, $attr) = getimagesize("$websitepath/$uri"); + + //Scale Image Dimensions + $dest_width="690"; // Destination Width /$tn_size_width + $dest_height_fixed="520"; // Destination Height / $tn_size_height (Fixed) + if ($src_width<=$dest_width AND $src_height<=$dest_width) { + $dest_width = $src_width; + $dest_height = $src_height; + } else { + $dest_height= ($src_height * $dest_width) / $src_width; // (Aspect Ratio Variable Height + if ($dest_height>$dest_height_fixed) { + $dest_height = $dest_height_fixed; + $dest_width = ($src_width * $dest_height) / $src_height; + } + } + + echo"\"$caption\"
    \n"; } + + } else if ($page=="staffreview") { + + //Staff/Editor Review Tab + echo"

    Editor Review

    \n"; + $sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `Pick`, TU.UserName FROM `reviews` TR + INNER JOIN main TM ON TR.ID = TM.ID + INNER JOIN userprofiles TU ON TR.AuthorID = TU.UserID + WHERE `Type` = 'T' AND TR.ID = '$id' ORDER BY `rID` DESC LIMIT 1"; + $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)) { + $id = $row["ID"]; + $title = $row["Title"]; + $dateadded = $row["DateAdded"]; + $body = $row["Body"]; + $pick = $row["Pick"]; + $username = $row["UserName"]; + $date = gmdate("F, Y", strtotime("$dateadded")); //Create Customizeable Timestamp + $posteddate = date("F j Y, g:i:sa", strtotime("$dateadded")); + + echo"

    $title\n"; + if ($pick=="YES") { + echo" — $date Editors Pick\n"; + } + echo"

    \n"; + echo"Posted on $posteddate by $username
    \n"; + echo"

    $body

    \n"; + } + + $typename = "theme"; if ($num_results=="0") { - echo"
    "; - echo"Nobody has commented on this extension yet...
    - Be the First! - Leave your comments..."; - echo"
    \n"; + echo"This $typename has not yet been reviewed.

    + + To see what other users think of this $typename, view the User Comments... + "; } - echo"
    "; -// Begin Code for Dynamic Navbars -if ($pageid <=$num_pages) { - $previd=$pageid-1; - if ($previd >"0") { - echo"« Previous • "; - } -} + } else if ($page=="opinion") { -echo"Page $pageid of $num_pages"; -$nextid=$pageid+1; + //My Opinion Tab + echo"

    Your Comments about $name:

    "; -if ($pageid <$num_pages) { - echo" • Next »"; -} -echo"
    \n"; - -//Skip to Page... -if ($num_pages>1) { - echo"Jump to Page: "; - $pagesperpage=9; //Plus 1 by default.. - $i = 01; - - //Dynamic Starting Point - if ($pageid>11) { - $nextpage=$pageid-10; - } - - $i=$nextpage; - - //Dynamic Ending Point - $maxpagesonpage=$pageid+$pagesperpage; - //Page #s - while ($i <= $maxpagesonpage && $i <= $num_pages) { - if ($i==$pageid) { - echo"$i "; - } else { - echo"$i "; + if ($_GET["error"]=="norating") { + echo"
    \n + Your comment submission had the following error(s), please fix these errors and try again.
    \n +    Rating cannot be left blank.
    \n +    Review/Comments cannot be left blank.
    \n +
    \n"; } - $i++; - } -} - -if ($num_pages>1) { - echo"
    \nComments per page: \n"; - $perpagearray = array("25","50","100"); - foreach ($perpagearray as $items_per_page) { - echo"$items_per_page "; - } -} - - - - - -} else if ($page=="previews") { -// Item Previews Tab -echo"

    Previews for $name

    \n"; - -$sql = "SELECT `PreviewURI`,`caption` from `t_previews` WHERE `ID`='$id' and `preview`='NO' ORDER BY `PreviewID` ASC"; - $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)) { - $uri = $row["PreviewURI"]; - $caption = $row["caption"]; - echo"

    $caption

    "; - list($src_width, $src_height, $type, $attr) = getimagesize("$websitepath/$uri"); - - //Scale Image Dimensions - $dest_width="690"; // Destination Width /$tn_size_width - $dest_height_fixed="520"; // Destination Height / $tn_size_height (Fixed) - if ($src_width<=$dest_width AND $src_height<=$dest_width) { - $dest_width = $src_width; - $dest_height = $src_height; - } else { - $dest_height= ($src_height * $dest_width) / $src_width; // (Aspect Ratio Variable Height - if ($dest_height>$dest_height_fixed) { - $dest_height = $dest_height_fixed; - $dest_width = ($src_width * $dest_height) / $src_height; - } - } - - echo"\"$caption\"
    \n"; - - } - - -} else if ($page=="staffreview") { -//Staff/Editor Review Tab -echo"

    Editor Review:

    "; - -echo"
    \n"; -$sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `Pick`, TU.UserName FROM `t_reviews` TR -INNER JOIN t_main TM ON TR.ID = TM.ID -INNER JOIN t_userprofiles TU ON TR.AuthorID = TU.UserID -WHERE `Type` = 'E' AND TR.ID = '$_GET[id]' ORDER BY `rID` DESC LIMIT 1"; - $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)) { - $id = $row["ID"]; - $title = $row["Title"]; - $dateadded = $row["DateAdded"]; - $body = $row["Body"]; - $pick = $row["Pick"]; - $username = $row["UserName"]; - -//Create Customizeable Timestamp - $timestamp = strtotime("$dateadded"); - $date = gmdate("F, Y", $timestamp); - $posteddate = date("F j Y, g:i:sa", $timestamp); - - -echo"$title
    \n"; -if ($pick=="YES") {echo"   $date Editors Pick
    \n"; } -echo"
    \n"; -echo"$body

    \n"; -echo"
    Posted on $posteddate by $username
    \n"; -} -$typename = "extension"; -if ($num_results=="0") { -echo" - -This $typename has not yet been reviewed.

    - -To see what other users think of this theme, view the User Comments... -"; - - -} -echo"
    \n"; - -} else if ($page=="opinion") { -//My Opinion Tab -echo"

    Your opinion of $name:

    "; -?> -\n -Your comment submission had the following error(s), please fix these errors and try again.
    \n -   Rating cannot be left blank.
    \n -   Review/Comments cannot be left blank.
    \n -
    \n"; -} -?> -
    -
    -"> -"> + ?> + +
    + + "> + "> -Your Name:
    -
    + Your Name:*
    +
    -Rating:*
    -
    + Your E-Mail (optional):
    +
    -Title:
    -
    + Rating:*
    +
    -Review/Comments:*
    -
    -  
    -* Required Fields - + Title:*
    +
    -
    - +
    +   
    + * Required Fields +
    + + + + + + + + + + -echo"\n"; -echo"
    \n"; -?> - - - \ No newline at end of file + + \ No newline at end of file diff --git a/mozilla/webtools/update/themes/showlist.php b/mozilla/webtools/update/themes/showlist.php index 57c46fb4f12..9e6b285d87d 100644 --- a/mozilla/webtools/update/themes/showlist.php +++ b/mozilla/webtools/update/themes/showlist.php @@ -39,26 +39,21 @@ - - + + + - - - - Mozilla Update :: Themes - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?> - +
    + -include"inc_sidebar.php"; +
    + += '".strtolower($app_version)."' ";} -//MacOSX Specific override for All+Mac themes. Bug 252294 -if ($OS=="MacOSX") { $app_os = $OS; } else { $app_os = "ALL"; } -if ($OS) { $sql .=" AND (TOS.OSName = '$OS' OR TOS.OSName = '$app_os') "; } - +if ($OS) { $sql .=" AND (TOS.OSName = '$OS' OR TOS.OSName = 'All') "; } if ($catname == "Popular") { $sql .=" AND TM.downloadcount > '5'"; } $sql .="GROUP BY `Name` "; if ($orderby) { @@ -176,16 +167,7 @@ if ($category=="%") {$category = $catname; unset($catname); } //Now Showing Box if (!$category) {$categoryname="All"; } else {$categoryname = $category;} -echo"

    ".ucwords("$application $typename » $categoryname ")."

    \n"; - -$sql = "SELECT `CatDesc` FROM `t_categories` WHERE `CatName`='$category' and `CatType`='$type' LIMIT 1"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $row = mysql_fetch_array($sql_result); - $categorydescription = $row["CatDesc"]; -if ($category=="All") {$categorydescription="All listed extensions for $application";} - -if ($categorydescription) {echo"$categorydescription
    \n";} - +echo"

    ".ucwords("$application $typename » $categoryname ")."

    \n"; if (!$OS) {$OS="all";} if (!$category) {$categoryname="All"; } else {$categoryname = $category;} @@ -194,16 +176,24 @@ echo"".ucwords("$typename")." $startitem - $enditem of $totalresults   $previd=$pageid-1; if ($previd >"0") { -echo"« Previous • "; +echo"« Previous • "; } echo"Page $pageid of $num_pages"; $nextid=$pageid+1; if ($pageid <$num_pages) { -echo" • Next »"; +echo" • Next »"; } -echo"

    \n"; +echo"
    \n"; + +$sql = "SELECT `CatDesc` FROM `categories` WHERE `CatName`='$category' and `CatType`='$type' LIMIT 1"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $row = mysql_fetch_array($sql_result); + $categorydescription = $row["CatDesc"]; +if ($category=="All") {$categorydescription="All listed themes for $application";} + +if ($categorydescription) {echo"$categorydescription
    \n";} @@ -211,9 +201,9 @@ echo"

    \n"; echo"
    "; echo"
    \n"; -echo"\n"; +echo"
    "; +echo"\n"; echo"\n"; - //Items-Per-Page echo"Show/Page: "; $perpage = array("5","10","20","50"); @@ -229,7 +219,7 @@ echo"\n"; // Operating Systems echo" OS: "; echo""; if ($application != "thunderbird") {echo"";} $app_orig = $application; //Store original to protect against possible corruption -$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName` = '$application' AND `public_ver` = 'YES' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` DESC"; +$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `applications` WHERE `AppName` = '$application' AND `public_ver` = 'YES' ORDER BY `major` DESC, `minor` DESC, `release` DESC, `SubVer` 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)) { $version = $row["Version"]; @@ -268,18 +258,18 @@ $application = $app_orig; unset($app_orig); echo"\n"; echo""; -echo""; +echo"
    "; echo"
    \n"; - +echo" 
    \n"; //--------------------------------- // Begin List //--------------------------------- //Get Author Data and Create $authorarray and $authorids -$sql = "SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `t_main` TM -LEFT JOIN t_authorxref TAX ON TM.ID = TAX.ID -INNER JOIN t_userprofiles TU ON TAX.UserID = TU.UserID -ORDER BY `Type` , `Name` ASC "; // TM.Type = 'E' +$sql = "SELECT TM.Name, TU.UserName, TU.UserID, TU.UserEmail FROM `main` TM +LEFT JOIN authorxref TAX ON TM.ID = TAX.ID +INNER JOIN userprofiles TU ON TAX.UserID = TU.UserID +ORDER BY `Type` , `Name` ASC "; $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)) { $authorarray[$row[Name]][] = $row["UserName"]; @@ -287,7 +277,7 @@ ORDER BY `Type` , `Name` ASC "; // TM.Type = 'E' } //Assemble a display application version array -$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`"; +$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `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"]; @@ -310,7 +300,7 @@ $sql = "$resultsquery"; $dateadded = $row["DateAdded"]; $dateupdated = $row["DateUpdated"]; $homepage = $row["Homepage"]; - $description = $row["Description"]; + $description = nl2br($row["Description"]); $rating = $row["Rating"]; $authors = $authorarray[$name]; $osname = $row["OSName"]; @@ -319,11 +309,12 @@ $sql = "$resultsquery"; $populardownloads = $row["downloadcount"]; //Get Version Record for Referenced MAXvID from list query -$sql2 = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes FROM `t_version` TV -INNER JOIN t_applications TA ON TV.AppID = TA.AppID -INNER JOIN t_os TOS ON TV.OSID = TOS.OSID +$sql2 = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes FROM `version` TV +INNER JOIN applications TA ON TV.AppID = TA.AppID +INNER JOIN os TOS ON TV.OSID = TOS.OSID WHERE TV.ID = '$id' AND TV.Version = '$row[Version]' AND TA.AppName = '$appname' AND TOS.OSName = '$osname' LIMIT 1"; $sql_result2 = mysql_query($sql2, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); +$vid = $row[MAXvID]; $row = mysql_fetch_array($sql_result2); $vid = $row["vID"]; @@ -337,12 +328,13 @@ if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer" $uri = $row["URI"]; $filename = basename($uri); -$sql3 = "SELECT `PreviewURI`, `caption` from `t_previews` WHERE `ID` = '$id' AND `preview`='YES' LIMIT 1"; +$sql3 = "SELECT `PreviewURI`, `caption` from `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; } @@ -351,7 +343,7 @@ $authorcount = count($authors); foreach ($authors as $author) { $userid = $authorids[$author]; $n++; -$authorstring .= "$author"; +$authorstring .= "$author"; if ($authorcount != $n) {$authorstring .=", "; } } @@ -372,37 +364,50 @@ if ($dateupdated > $dateadded) { $datestring = "$datetitle $date"; -echo"
    \n"; +echo"
    \n"; -if ($previewuri) { -list($width, $height, $type, $attr) = getimagesize("$websitepath"."$previewuri"); -echo"
    \n"; -echo"\"$name\n"; -echo"
    \n"; -} -echo"
    "; -echo"$name $version
    "; -echo"By $authors"; -echo"
    "; +echo"
    Rating: \"3.8
    \n"; + +echo"

    $name $version

    "; + + if ($previewuri) { + + echo"

    \n"; + + list($width, $height, $attr) = getimagesize("$websitepath"."$previewuri"); + echo"\"$name\n"; + + echo"

    \n"; + $preview_minheight=$height-50; + } + + +echo"

    By $authors

    "; //Description & Version Notes +if ($previewuri AND $preview_minheight) { + echo"

    "; +} else { + echo"

    "; +} echo"$description
    "; if ($notes) {echo"
    $notes"; } -echo"
    "; +echo"

    "; + + //Icon Bar Modules echo"
    "; echo"
    "; if ($appname=="Thunderbird") { - echo"\"\"More Info"; + echo"\"\"More Info"; } else { - echo"\"\"Install"; + echo"\"\"Install"; } echo"
      $filesize kb
    "; -echo"
    \"\" For $appname:
      $minappver - $maxappver
    "; -if($osname !=="ALL") { echo"
    \"\"For $osname
    only
    "; } -if ($homepage) {echo"";} -echo""; +echo"
    \"\" For $appname:
      $minappver - $maxappver
    "; +if($osname !=="ALL") { echo"
    \"\"For $osname
    only
    "; } +//if ($homepage) {echo"";} echo"
    "; echo"
    $datestring"; @@ -413,8 +418,8 @@ echo"
    \n"; } //End While Loop if ($totalresults=="0") { -echo"
    \n"; -echo"No themes found in this category for ".ucwords($application).".\n"; +echo"
    \n"; +echo"

    No themes found in this category for ".ucwords($application).".

    \n"; echo"
    \n"; } @@ -424,7 +429,7 @@ echo"
    \n"; ".ucwords("$application $typename » $categoryname ").""; +echo"

    ".ucwords("$application $typename » $categoryname ")."

    "; echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; echo"  |  "; @@ -434,14 +439,14 @@ if ($pageid <=$num_pages) { $previd=$pageid-1; if ($previd >"0") { -echo"« Previous • "; +echo"« Previous • "; } echo"Page $pageid of $num_pages"; $nextid=$pageid+1; if ($pageid <$num_pages) { -echo" • Next »"; +echo" • Next »"; } echo"
    \n"; @@ -465,7 +470,7 @@ while ($i <= $maxpagesonpage && $i <= $num_pages) { if ($i==$pageid) { echo"$i "; } else { - echo"$i "; + echo"$i "; } @@ -478,8 +483,10 @@ if ($i==$pageid) { } ?> +
    +
    \ No newline at end of file