From e63b183bcfa4c0f0fcabacf8acf122abb9037245 Mon Sep 17 00:00:00 2001 From: "psychoticwolf%carolina.rr.com" Date: Sun, 29 Aug 2004 20:55:50 +0000 Subject: [PATCH] Fixing Bug 256523 (Thunderbird display problems), Bug 256725 (typo in theme page), and a couple of other small fixes that don't have bug #s. git-svn-id: svn://10.0.0.236/trunk@161456 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/update/core/config.php | 146 +-- .../update/core/inc_browserdetection.php | 263 ++-- mozilla/webtools/update/core/inc_global.php | 190 +-- mozilla/webtools/update/core/postfeedback.php | 180 +-- mozilla/webtools/update/core/update.css | 452 +++---- .../webtools/update/extensions/install.php | 196 +-- .../webtools/update/extensions/moreinfo.php | 1077 ++++++++-------- .../webtools/update/extensions/showlist.php | 965 ++++++++------- mozilla/webtools/update/index.php | 359 +++--- mozilla/webtools/update/themes/index.php | 447 +++---- mozilla/webtools/update/themes/install.php | 196 +-- mozilla/webtools/update/themes/moreinfo.php | 1078 ++++++++--------- mozilla/webtools/update/themes/showlist.php | 1000 +++++++-------- 13 files changed, 3278 insertions(+), 3271 deletions(-) diff --git a/mozilla/webtools/update/core/config.php b/mozilla/webtools/update/core/config.php index 58927570077..7eff210af5f 100644 --- a/mozilla/webtools/update/core/config.php +++ b/mozilla/webtools/update/core/config.php @@ -1,73 +1,73 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -// Mozilla Update -- PHP Configuration File -// All common PHP Variables/functions are defined here - -//-- Site Timing :: Function and Start... --// -function getmicrotime() { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); -} -$time_start = getmicrotime(); - -//-- Website Variables--// -$websitepath = "/opt/webtools/update"; // No trailing Slash -$sitehostname = "update.mozilla.org"; //Hostname - -//-- MySQL Server/Database Properties/Connection --// -$mysqlServer="localhost"; -$mysqlData=""; //MySQL Server Database Name -$mysqlLogin=""; //MySQL Server UserName -$mysqlPass=""; //MySQL Server Password - - -$connection = mysql_connect("$mysqlServer","$mysqlLogin","$mysqlPass") or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); -$db = mysql_select_db("$mysqlData", $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); - -//-- Page Header & Footer --// -$page_header = "$websitepath/core/inc_header.php"; -$page_footer = "$websitepath/core/inc_footer.php"; - - -//includes -include"inc_guids.php"; // GUID Handler -include"inc_global.php"; // Global Functions -include"sessionconfig.php"; //Start Session - -?> + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +// Mozilla Update -- PHP Configuration File +// All common PHP Variables/functions are defined here + +//-- Site Timing :: Function and Start... --// +function getmicrotime() { + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); +} +$time_start = getmicrotime(); + +//-- Website Variables--// +$websitepath = "/opt/update"; // Local Path to Site Files +$sitehostname = "update.mozilla.org"; // DNS Hostname + +//-- MySQL Server/Database Properties/Connection --// +$mysqlServer="localhost"; +$mysqlData="update"; //MySQL Server Database Name +$mysqlLogin=""; //MySQL Server UserName +$mysqlPass=""; //MySQL Server Password + + +$connection = mysql_connect("$mysqlServer","$mysqlLogin","$mysqlPass") or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); +$db = mysql_select_db("$mysqlData", $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_ERROR); + +//-- Page Header & Footer --// +$page_header = "$websitepath/core/inc_header.php"; +$page_footer = "$websitepath/core/inc_footer.php"; + + +//includes +include"inc_guids.php"; // GUID Handler +include"inc_global.php"; // Global Functions +include"sessionconfig.php"; //Start Session + +?> diff --git a/mozilla/webtools/update/core/inc_browserdetection.php b/mozilla/webtools/update/core/inc_browserdetection.php index d927dae38b2..c9b55351f0b 100644 --- a/mozilla/webtools/update/core/inc_browserdetection.php +++ b/mozilla/webtools/update/core/inc_browserdetection.php @@ -1,132 +1,133 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -//Various Sample User_Agents, uncomment to debug detection for one. :-) -//$_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+"; - -include"browser_detection.php"; //Script that defines the browser_detection() function - -$OS = browser_detection('os'); -$moz_array = browser_detection('moz_version'); - -//Turn $OS into something usable. -if ( $moz_array[0] !== '' ) -{ - switch ( $OS ) - { - case 'win': - case 'nt': - $OS = 'Windows'; - break; - case 'lin': - $OS = 'Linux'; - break; - case 'solaris': - case 'sunos': - $OS = 'Solaris'; - break; - case 'unix': - case 'bsd': - $OS = 'BSD'; - break; - case 'mac': - $OS = 'MacOSX'; - break; - default: - break; - } - -//Print what it's found, debug item. -//echo ( 'Your Mozilla product is ' . $moz_array[0] . ' ' . $moz_array[1] . ' running on '. $OS . ' '); - -$application = $moz_array[0]; -$app_version = $moz_array[1]; - -} else { -//If it's not a Mozilla product, then return nothing and let the default app code work.. -} - -//---------------------------- -//Browser & OS Detection (Default Code) -//---------------------------- - -//if (!$_GET["application"] or ($_GET["application"]==$application && $_GET["version"]==$moz_array[1])) { -//$app_version = $moz_array[1]; //Set app_version from Detection -//} - -//Application -if (!$application) { $application="firefox"; } //Default App is Firefox - -//App_Version -//if ($_GET["version"]) {$app_version = $_GET["version"]; } - -if ($detection_force_version=="true") {$application=$_SESSION["application"];} -//Get Max Version for App Specified -$sql = "SELECT `Release`, `SubVer` FROM `t_applications` WHERE `AppName` = '$application' ORDER BY `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["Release"]; - $subver = $row["SubVer"]; - if ($subver !=="final") {$release="$release$subver";} - - if (!$app_version OR $detection_force_version=="true") { $app_version = $release; } - unset($release, $subver); - -//OS -if ($_GET["os"]) {$OS = $_GET["os"];} //If Defined, set. - -// 1.0PR support -if ($app_version=="1.0PR") {$app_version="0.10"; } - -// 0.9.x branch support -- All non-branch (+) builds should be 0.9. -if (strpos($app_version, "+")=== false AND strpos($app_version, "0.9")===0) { $app_version="0.9";} - - - -//Register Browser Detection Values with the session -if (!$_SESSION["application"]) { $_SESSION["application"] = $application; } -if (!$_SESSION["app_version"]) { $_SESSION["app_version"] = $app_version; } -if (!$_SESSION["app_os"]) { $_SESSION["app_os"] = $OS; } + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +//Various Sample User_Agents, uncomment to debug detection for one. :-) +//$_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+"; + +include"browser_detection.php"; //Script that defines the browser_detection() function + +$OS = browser_detection('os'); +$moz_array = browser_detection('moz_version'); + +//Turn $OS into something usable. +if ( $moz_array[0] !== '' ) +{ + switch ( $OS ) + { + case 'win': + case 'nt': + $OS = 'Windows'; + break; + case 'lin': + $OS = 'Linux'; + break; + case 'solaris': + case 'sunos': + $OS = 'Solaris'; + break; + case 'unix': + case 'bsd': + $OS = 'BSD'; + break; + case 'mac': + $OS = 'MacOSX'; + break; + default: + break; + } + +//Print what it's found, debug item. +//echo ( 'Your Mozilla product is ' . $moz_array[0] . ' ' . $moz_array[1] . ' running on '. $OS . ' '); + +$application = $moz_array[0]; +$app_version = $moz_array[1]; + +} else { +//If it's not a Mozilla product, then return nothing and let the default app code work.. +} + +//---------------------------- +//Browser & OS Detection (Default Code) +//---------------------------- + +//if (!$_GET["application"] or ($_GET["application"]==$application && $_GET["version"]==$moz_array[1])) { +//$app_version = $moz_array[1]; //Set app_version from Detection +//} + +//Application +if (!$application) { $application="firefox"; } //Default App is Firefox + +//App_Version +//if ($_GET["version"]) {$app_version = $_GET["version"]; } + +if ($detection_force_version=="true") {$application=$_SESSION["application"];} +//Get Max Version for App Specified +$sql = "SELECT `major`,`minor`,`release`,`SubVer` FROM `t_applications` WHERE `AppName` = '$application' 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); + $row = mysql_fetch_array($sql_result); + $release = "$row[major].$row[minor]"; + if ($row["release"]) {$release = ".$release$row[release]";} + $subver = $row["SubVer"]; + if ($subver !=="final") {$release="$release$subver";} + + if (!$app_version OR $detection_force_version=="true") { $app_version = $release; } + unset($release, $subver); + +//OS +if ($_GET["os"]) {$OS = $_GET["os"];} //If Defined, set. + +// 1.0PR support +if ($app_version=="1.0PR") {$app_version="0.10"; } + +// 0.9.x branch support -- All non-branch (+) builds should be 0.9. +if (strpos($app_version, "+")=== false AND strpos($app_version, "0.9")===0) { $app_version="0.9";} + + + +//Register Browser Detection Values with the session +if (!$_SESSION["application"]) { $_SESSION["application"] = $application; } +if (!$_SESSION["app_version"]) { $_SESSION["app_version"] = $app_version; } +if (!$_SESSION["app_os"]) { $_SESSION["app_os"] = $OS; } ?> \ No newline at end of file diff --git a/mozilla/webtools/update/core/inc_global.php b/mozilla/webtools/update/core/inc_global.php index 5bb1ce25095..91c344c9cb0 100644 --- a/mozilla/webtools/update/core/inc_global.php +++ b/mozilla/webtools/update/core/inc_global.php @@ -1,96 +1,96 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -//inc_global.php -- Stuff that needs to be done globally to all of Mozilla Update - -//Attempt to fix Bug 246743 (strip_tags) and Bug 248242 (htmlentities) -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"] = strtolower($_GET["application"]); -$sql = "SELECT AppID FROM `t_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` = '".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"]);} -} - -if (!is_numeric($_GET["id"])) { unset($_GET["id"]); } -if (!is_numeric($_GET["vid"])) { unset($_GET["vid"]); } -if (!is_numeric($_GET["pageid"])) { unset($_GET["pageid"]); } -if (!is_numeric($_GET["numpg"])) { unset($_GET["numpg"]); } - -// page_error() function - -function page_error($reason, $custom_message) { -global $page_header, $page_footer; -echo"Mozilla Update :: Error\n"; -echo"\n"; -include"$page_header"; - -echo"
\n"; -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 -problem continues, please contact the Mozilla Update staff. More information about the error may be found at the end of this -message.

-Error $reason: $custom_message

-   «« Go Back to Previous Page"; -echo"
\n"; -include"$page_footer"; -exit; -} + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +//inc_global.php -- Stuff that needs to be done globally to all of Mozilla Update + +//Attempt to fix Bug 246743 (strip_tags) and Bug 248242 (htmlentities) +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"] = strtolower($_GET["application"]); +$sql = "SELECT AppID FROM `t_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` = '".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"]);} +} + +if (!is_numeric($_GET["id"])) { unset($_GET["id"]); } +if (!is_numeric($_GET["vid"])) { unset($_GET["vid"]); } +if (!is_numeric($_GET["pageid"])) { unset($_GET["pageid"]); } +if (!is_numeric($_GET["numpg"])) { unset($_GET["numpg"]); } + +// page_error() function + +function page_error($reason, $custom_message) { +global $page_header, $page_footer; +echo"Mozilla Update :: Error\n"; +echo"\n"; +include"$page_header"; + +echo"
\n"; +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 +problem continues, please contact the Mozilla Update staff. More information about the error may be found at the end of this +message.

+Error $reason: $custom_message

+   «« Go Back to Previous Page"; +echo"
\n"; +include"$page_footer"; +exit; +} ?> \ No newline at end of file diff --git a/mozilla/webtools/update/core/postfeedback.php b/mozilla/webtools/update/core/postfeedback.php index 2ab41c7407a..df5b5d7875a 100644 --- a/mozilla/webtools/update/core/postfeedback.php +++ b/mozilla/webtools/update/core/postfeedback.php @@ -1,91 +1,91 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -//Submit Review/Rating Feedback to Table -require"../core/config.php"; -if (!$_POST[rating] && $_POST[rating] !=="0") { -//No Rating Defined, send user back... -$return_path="extensions/moreinfo.php?id=$_POST[id]&vid=$_POST[vid]&page=opinion&error=norating"; -header("Location: http://$_SERVER[HTTP_HOST]/$return_path"); -exit; -} - -if (!$_POST[comments]) { - $_POST[comments]="NULL"; - } else { - //Comments is not null, format comments and get default name/title.. if needed. - $_POST["comments"]="'$_POST[comments]'"; - if (!$_POST[name]) {$_POST[name]=="Anonymous"; } - if (!$_POST[title]) {$_POST[title]=="My Comments..."; } - } - -$_POST["name"] = strip_tags($_POST["name"]); -$_POST["title"] = strip_tags($_POST["title"]); -$_POST["comments"] = strip_tags($_POST["comments"]); - - -$sql = "INSERT INTO `t_feedback` (`ID`, `CommentName`, `CommentVote`, `CommentTitle`, `CommentNote`, `CommentDate`) VALUES ('$_POST[id]', '$_POST[name]', '$_POST[rating]', '$_POST[title]', $_POST[comments], NOW(NULL));"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - - -//Get Rating Data and Create $ratingarray -$sql = "SELECT ID, CommentVote FROM `t_feedback` WHERE `ID` = '$_POST[id]' ORDER BY `CommentDate` 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)) { - $ratingarray[$row[ID]][] = $row["CommentVote"]; - } - -//Compile Rating Average -$id = $_POST[id]; -if (!$ratingarray[$id]) {$ratingarray[$id] = array(); } -$numratings = count($ratingarray[$id]); -$sumratings = array_sum($ratingarray[$id]); -if ($numratings>0) { -$rating = round($sumratings/$numratings, 1); -} else { -$rating="0"; } //Default Rating - - -$sql = "UPDATE `t_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); - - -$return_path="extensions/moreinfo.php?id=$_POST[id]&vid=$_POST[vid]&page=comments&action=postsuccessfull"; -header("Location: http://$_SERVER[HTTP_HOST]/$return_path"); -exit; + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +//Submit Review/Rating Feedback to Table +require"../core/config.php"; +if (!$_POST[rating] && $_POST[rating] !=="0") { +//No Rating Defined, send user back... +$return_path="extensions/moreinfo.php?id=$_POST[id]&vid=$_POST[vid]&page=opinion&error=norating"; +header("Location: http://$_SERVER[HTTP_HOST]/$return_path"); +exit; +} + +if (!$_POST[comments]) { + $_POST[comments]="NULL"; + } else { + //Comments is not null, format comments and get default name/title.. if needed. + $_POST["comments"]="'$_POST[comments]'"; + if (!$_POST[name]) {$_POST[name]=="Anonymous"; } + if (!$_POST[title]) {$_POST[title]=="My Comments..."; } + } + +$_POST["name"] = strip_tags($_POST["name"]); +$_POST["title"] = strip_tags($_POST["title"]); +$_POST["comments"] = strip_tags($_POST["comments"]); + + +$sql = "INSERT INTO `t_feedback` (`ID`, `CommentName`, `CommentVote`, `CommentTitle`, `CommentNote`, `CommentDate`, `commentip`) VALUES ('$_POST[id]', '$_POST[name]', '$_POST[rating]', '$_POST[title]', $_POST[comments], NOW(NULL), '$_SERVER[REMOTE_ADDR]');"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + + +//Get Rating Data and Create $ratingarray +$sql = "SELECT ID, CommentVote FROM `t_feedback` WHERE `ID` = '$_POST[id]' AND `CommentVote` IS NOT NULL ORDER BY `CommentDate` ASC"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + while ($row = mysql_fetch_array($sql_result)) { + $ratingarray[$row[ID]][] = $row["CommentVote"]; + } + +//Compile Rating Average +$id = $_POST[id]; +if (!$ratingarray[$id]) {$ratingarray[$id] = array(); } +$numratings = count($ratingarray[$id]); +$sumratings = array_sum($ratingarray[$id]); +if ($numratings>0) { +$rating = round($sumratings/$numratings, 1); +} else { +$rating="0"; } //Default Rating + + +$sql = "UPDATE `t_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); + + +$return_path="extensions/moreinfo.php?id=$_POST[id]&vid=$_POST[vid]&page=comments&action=postsuccessfull"; +header("Location: http://$_SERVER[HTTP_HOST]/$return_path"); +exit; ?> \ No newline at end of file diff --git a/mozilla/webtools/update/core/update.css b/mozilla/webtools/update/core/update.css index 15b8b0e20e1..d093495fe1e 100644 --- a/mozilla/webtools/update/core/update.css +++ b/mozilla/webtools/update/core/update.css @@ -1,226 +1,226 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Mozilla Update. - * - * The Initial Developer of the Original Code is - * Chris "Wolf" Crews. - * Portions created by the Initial Developer are Copyright (C) 2004 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Chris "Wolf" Crews - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -BODY { - MARGIN: 0px 0px 5px; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fff -} -A { - COLOR: #00129c; TEXT-DECORATION: none -} -A:visited { - COLOR: #00129c; TEXT-DECORATION: none -} -A:hover { - COLOR: #fc5900 -} -DIV.header { - BACKGROUND-IMAGE: url(/images/header.png); BACKGROUND-REPEAT: repeat-x; HEIGHT: 77px -} -DIV.header-top { - HEIGHT: 57px -} -DIV.logo { - z-index: 1; position: absolute; right: 0px -} -DIV.tabbar { - PADDING-LEFT: 26px; HEIGHT: 20px -} - -DIV.nav { - BACKGROUND-IMAGE: url(/images/orangebar.png); background-repeat: repeat-x; PADDING-TOP: 3px; PADDING-LEFT: 10px; FONT-WEIGHT: bold; MARGIN-BOTTOM: 10px; COLOR: #fff; BACKGROUND-COLOR: #0F67C1; a:VISITED: #fff -} -DIV.nav A:visited { - COLOR: #FFF; -} -DIV.nav A { - COLOR: #fff -} -DIV.adminheading { - FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-RIGHT: 10px; HEIGHT: 25px; TEXT-ALIGN: right -} -.box { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN-BOTTOM: 15px; PADDING-BOTTOM: 5px; POSITION: relative; LEFT: 150px; BORDER-LEFT: #ccc 2px solid; WIDTH: 78%; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px -} -.boxheader { - MARGIN-BOTTOM: 6px; BORDER-BOTTOM: #000 1px solid -} -.boxcolumns { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 2px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 2px; FONT-SIZE: 12pt; MIN-HEIGHT: 200px; FLOAT: left; PADDING-BOTTOM: 2px; MARGIN-LEFT: 2px; BORDER-LEFT: #ccc 2px solid; WIDTH: 31%; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px -} -DIV.sidelinks { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 2px; BORDER-TOP: #ccc 2px solid; MARGIN-TOP: 10px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN-LEFT: 3px; BORDER-LEFT: #ccc 2px solid; WIDTH: 135px; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 2px solid; POSITION: absolute; -moz-border-radius: 10px -} -.sidebartitle { - FONT-WEIGHT: bold -} -.sidebartext { - MARGIN-LEFT: 4px -} -.updatebox { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 2px solid; MARGIN-TOP: 3px; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 14pt; MIN-HEIGHT: 200px; MARGIN-BOTTOM: 15px; PADDING-BOTTOM: 5px; MARGIN-LEFT: 1px; BORDER-LEFT: #ccc 2px solid; WIDTH: 230px; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 2px solid; POSITION: absolute; -moz-border-radius: 10px -} -.frontpagecontainer { - MIN-HEIGHT: 360px; WIDTH: 100% -} -.contentbox { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 14pt; PADDING-BOTTOM: 5px; MARGIN: 0px 5px 15px 0px; BORDER-LEFT: #ccc 2px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px -} -.contentcolumns { - FLOAT: left; WIDTH: 48% -} - -#content { - PADDING-LEFT: 5px; POSITION: relative; LEFT: 145px; WIDTH: 85%; -} - -DIV.item { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 8px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 0px; MARGIN: 0px auto 15px; BORDER-LEFT: #ccc 2px solid; WIDTH: 95%; PADDING-TOP: 8px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px -} -#listnav { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 6px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 6px; FONT-WEIGHT: bold; FONT-SIZE: 10pt; PADDING-BOTTOM: 6px; MARGIN: 3px auto; BORDER-LEFT: #ccc 2px solid; WIDTH: 95%; PADDING-TOP: 6px; BORDER-BOTTOM: #ccc 2px solid; TEXT-ALIGN: left; -moz-border-radius: 10px -} -.listform { - BORDER-RIGHT: #3d97c0 1px dotted; PADDING-RIGHT: 2px; BORDER-TOP: #3d97c0 1px dotted; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 10px auto auto; BORDER-LEFT: #3d97c0 1px dotted; WIDTH: 90%; PADDING-TOP: 2px; BORDER-BOTTOM: #3d97c0 1px dotted; HEIGHT: 25px; BACKGROUND-COLOR: #d4e9f2; TEXT-ALIGN: center -} -.title A { - COLOR: #fc5900 -} -.title A:visited { - COLOR: #fc5900 -} -.liststars { - FLOAT: right; WIDTH: 80px; HEIGHT: 20px -} -.listtitle { - FONT-WEIGHT: bold; FONT-SIZE: 11pt -} -.itemtitle { - FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN-BOTTOM: 10px; MARGIN-LEFT: 30px -} -.authorline { - FONT-SIZE: 10pt; MARGIN-LEFT: 15px -} -.itemdescription { - FONT-SIZE: 10pt -} -.iconbar { - PADDING-RIGHT: 5px; FONT-WEIGHT: normal; FONT-SIZE: 9pt; FLOAT: right; WIDTH: 115px; HEIGHT: 34px; TEXT-ALIGN: left -} -.filesize { - FONT-WEIGHT: bold; FONT-SIZE: 8pt -} -.smallfont { - FONT-WEIGHT: bold; FONT-SIZE: 8pt -} -.baseline { - BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 10px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #333 -} -.noitems { - FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 60px; TEXT-ALIGN: center -} -.pagenum { - FONT-SIZE: 9pt; FLOAT: right -} -DIV.tabbar { - PADDING-RIGHT: 8px; PADDING-LEFT: 8px; PADDING-BOTTOM: 0px; MARGIN: 0px auto auto; WIDTH: 85%; PADDING-TOP: 0px; HEIGHT: 20px -} -DIV.tab { - BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 3px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 3px; FONT-SIZE: 11pt; FLOAT: left; MARGIN: 0px 3px; VERTICAL-ALIGN: middle; BORDER-LEFT: #ccc 2px solid; BORDER-BOTTOM: #ccc 2px solid; HEIGHT: 20px; BACKGROUND-COLOR: #ddd; TEXT-ALIGN: center; -moz-border-radius: 10px -} -.downloadbox { - BORDER-RIGHT: #ccc 1px dotted; BORDER-TOP: #ccc 1px dotted; FONT-WEIGHT: bold; FLOAT: left; BORDER-LEFT: #ccc 1px dotted; BORDER-BOTTOM: #ccc 1px dotted; max-width: 395px; -} -.moreinfoinstall { - MARGIN-LEFT: 18px; WIDTH: 250px; HEIGHT: 34px -} -.commentbox { - BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 10pt; MIN-HEIGHT: 240px; PADDING-BOTTOM: 6px; MARGIN: auto 0px 5px auto; BORDER-LEFT: #ccc 1px solid; WIDTH: 50%; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 1px solid -} -.commenttitlebar { - PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 11pt; HEIGHT: 20px; BACKGROUND-COLOR: #eee -} -.commenttitle { - PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 11pt; POSITION: absolute -} -.commentfooter { - PADDING-RIGHT: 5px; FONT-SIZE: 8pt; TEXT-ALIGN: right -} -.nocomment { - MARGIN-LEFT: 30px -} -.mipageheading { - BORDER-TOP: #ccc 1px solid; MARGIN-TOP: 5px; PADDING-LEFT: 4px; FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN-BOTTOM: 5px; COLOR: #333 -} -.reviewbox { - BORDER-RIGHT: #bbb 1px dotted; BORDER-TOP: #bbb 1px dotted; FONT-WEIGHT: bold; MARGIN: auto auto 10px; BORDER-LEFT: #bbb 1px dotted; WIDTH: 70%; BORDER-BOTTOM: #bbb 1px dotted -}; -.opinionform { - FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: auto 30px; WIDTH: 80%; LINE-HEIGHT: 30px -} -.errorbox { - BORDER-RIGHT: #f00 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #f00 1px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: auto auto 20px; BORDER-LEFT: #f00 1px solid; WIDTH: 80%; PADDING-TOP: 3px; BORDER-BOTTOM: #f00 1px solid -} -.boxheader2 { - BORDER-TOP: #2e64ff 4px solid; HEIGHT: 4px -} -.boldfont { - FONT-WEIGHT: bold -} -.disabled { - FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #ccc; FONT-STYLE: italic -} -.emailactive { - FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-STYLE: italic -} -.profileitemdesc { - FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-BOTTOM: 4px; MARGIN-LEFT: 20px -} -.mailresult { - FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: auto; WIDTH: 650px; HEIGHT: 30px; TEXT-ALIGN: center -} -.faqtitle { - FONT-WEIGHT: normal; FONT-SIZE: 24pt; COLOR: #0065CA; TEXT-ALIGN: center -} -.faqitemtitle { - FONT-WEIGHT: bold; FONT-SIZE: 12pt -} -.faqitemtext { - MARGIN-LEFT: 5px -} -.footer { - PADDING-RIGHT: 30px; FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-LEFT: 200px; TEXT-ALIGN: right -} +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Update. + * + * The Initial Developer of the Original Code is + * Chris "Wolf" Crews. + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Chris "Wolf" Crews + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +BODY { + MARGIN: 0px 0px 5px; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fff +} +A { + COLOR: #00129c; TEXT-DECORATION: none +} +A:visited { + COLOR: #00129c; TEXT-DECORATION: none +} +A:hover { + COLOR: #fc5900 +} +DIV.header { + BACKGROUND-IMAGE: url(/images/header.png); BACKGROUND-REPEAT: repeat-x; HEIGHT: 77px +} +DIV.header-top { + HEIGHT: 57px +} +DIV.logo { + z-index: 1; position: absolute; right: 0px +} +DIV.tabbar { + PADDING-LEFT: 26px; HEIGHT: 20px +} + +DIV.nav { + BACKGROUND-IMAGE: url(/images/orangebar.png); background-repeat: repeat-x; PADDING-TOP: 3px; PADDING-LEFT: 10px; FONT-WEIGHT: bold; MARGIN-BOTTOM: 10px; COLOR: #fff; BACKGROUND-COLOR: #0F67C1; a:VISITED: #fff +} +DIV.nav A:visited { + COLOR: #FFF; +} +DIV.nav A { + COLOR: #fff +} +DIV.adminheading { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-RIGHT: 10px; HEIGHT: 25px; TEXT-ALIGN: right +} +.box { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN-BOTTOM: 15px; PADDING-BOTTOM: 5px; POSITION: relative; LEFT: 150px; BORDER-LEFT: #ccc 2px solid; WIDTH: 78%; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px +} +.boxheader { + MARGIN-BOTTOM: 6px; BORDER-BOTTOM: #000 1px solid +} +.boxcolumns { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 2px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 2px; FONT-SIZE: 12pt; MIN-HEIGHT: 200px; FLOAT: left; PADDING-BOTTOM: 2px; MARGIN-LEFT: 2px; BORDER-LEFT: #ccc 2px solid; WIDTH: 31%; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px +} +DIV.sidelinks { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 2px; BORDER-TOP: #ccc 2px solid; MARGIN-TOP: 10px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN-LEFT: 3px; BORDER-LEFT: #ccc 2px solid; WIDTH: 135px; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 2px solid; POSITION: absolute; -moz-border-radius: 10px +} +.sidebartitle { + FONT-WEIGHT: bold +} +.sidebartext { + MARGIN-LEFT: 4px +} +.updatebox { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 2px solid; MARGIN-TOP: 3px; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 14pt; MIN-HEIGHT: 200px; MARGIN-BOTTOM: 15px; PADDING-BOTTOM: 5px; MARGIN-LEFT: 1px; BORDER-LEFT: #ccc 2px solid; WIDTH: 230px; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 2px solid; POSITION: absolute; -moz-border-radius: 10px +} +.frontpagecontainer { + MIN-HEIGHT: 360px; WIDTH: 100% +} +.contentbox { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 14pt; PADDING-BOTTOM: 5px; MARGIN: 0px 5px 15px 0px; BORDER-LEFT: #ccc 2px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px +} +.contentcolumns { + FLOAT: left; WIDTH: 48% +} + +#content { + PADDING-LEFT: 5px; POSITION: relative; LEFT: 145px; WIDTH: 85%; +} + +DIV.item { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 8px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 8px; PADDING-BOTTOM: 0px; MARGIN: 0px auto 15px; BORDER-LEFT: #ccc 2px solid; WIDTH: 95%; PADDING-TOP: 8px; BORDER-BOTTOM: #ccc 2px solid; -moz-border-radius: 10px +} +#listnav { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 6px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 6px; FONT-WEIGHT: bold; FONT-SIZE: 10pt; PADDING-BOTTOM: 6px; MARGIN: 3px auto; BORDER-LEFT: #ccc 2px solid; WIDTH: 95%; PADDING-TOP: 6px; BORDER-BOTTOM: #ccc 2px solid; TEXT-ALIGN: left; -moz-border-radius: 10px +} +.listform { + BORDER-RIGHT: #3d97c0 1px dotted; PADDING-RIGHT: 2px; BORDER-TOP: #3d97c0 1px dotted; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 10px auto auto; BORDER-LEFT: #3d97c0 1px dotted; WIDTH: 90%; PADDING-TOP: 2px; BORDER-BOTTOM: #3d97c0 1px dotted; HEIGHT: 25px; BACKGROUND-COLOR: #d4e9f2; TEXT-ALIGN: center +} +.title A { + COLOR: #fc5900 +} +.title A:visited { + COLOR: #fc5900 +} +.liststars { + FLOAT: right; WIDTH: 80px; HEIGHT: 20px +} +.listtitle { + FONT-WEIGHT: bold; FONT-SIZE: 11pt +} +.itemtitle { + FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN-BOTTOM: 10px; MARGIN-LEFT: 30px +} +.authorline { + FONT-SIZE: 10pt; MARGIN-LEFT: 15px +} +.itemdescription { + FONT-SIZE: 10pt +} +.iconbar { + PADDING-RIGHT: 5px; FONT-WEIGHT: normal; FONT-SIZE: 9pt; FLOAT: right; WIDTH: 115px; HEIGHT: 34px; TEXT-ALIGN: left +} +.filesize { + FONT-WEIGHT: bold; FONT-SIZE: 8pt +} +.smallfont { + FONT-WEIGHT: bold; FONT-SIZE: 8pt +} +.baseline { + BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 10px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #333 +} +.noitems { + FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 60px; TEXT-ALIGN: center +} +.pagenum { + FONT-SIZE: 9pt; FLOAT: right +} +DIV.tabbar { + PADDING-RIGHT: 8px; PADDING-LEFT: 8px; PADDING-BOTTOM: 0px; MARGIN: 0px auto auto; WIDTH: 85%; PADDING-TOP: 0px; HEIGHT: 20px +} +DIV.tab { + BORDER-RIGHT: #ccc 2px solid; PADDING-RIGHT: 3px; BORDER-TOP: #ccc 2px solid; PADDING-LEFT: 3px; FONT-SIZE: 11pt; FLOAT: left; MARGIN: 0px 3px; VERTICAL-ALIGN: middle; BORDER-LEFT: #ccc 2px solid; BORDER-BOTTOM: #ccc 2px solid; HEIGHT: 20px; BACKGROUND-COLOR: #ddd; TEXT-ALIGN: center; -moz-border-radius: 10px +} +.downloadbox { + BORDER-RIGHT: #ccc 1px dotted; BORDER-TOP: #ccc 1px dotted; FONT-WEIGHT: bold; FLOAT: left; BORDER-LEFT: #ccc 1px dotted; BORDER-BOTTOM: #ccc 1px dotted; max-width: 395px; +} +.moreinfoinstall { + MARGIN-LEFT: 18px; WIDTH: 250px; HEIGHT: 34px +} +.commentbox { + BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 10pt; MIN-HEIGHT: 260px; PADDING-BOTTOM: 6px; MARGIN: auto 0px 5px auto; BORDER-LEFT: #ccc 1px solid; WIDTH: 50%; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 1px solid +} +.commenttitlebar { + PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 11pt; HEIGHT: 20px; BACKGROUND-COLOR: #eee +} +.commenttitle { + PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 11pt; POSITION: absolute +} +.commentfooter { + PADDING-RIGHT: 5px; FONT-SIZE: 8pt; TEXT-ALIGN: right +} +.nocomment { + MARGIN-LEFT: 30px +} +.mipageheading { + BORDER-TOP: #ccc 1px solid; MARGIN-TOP: 5px; PADDING-LEFT: 4px; FONT-WEIGHT: bold; FONT-SIZE: 11pt; MARGIN-BOTTOM: 5px; COLOR: #333 +} +.reviewbox { + BORDER-RIGHT: #bbb 1px dotted; BORDER-TOP: #bbb 1px dotted; FONT-WEIGHT: bold; MARGIN: auto auto 10px; BORDER-LEFT: #bbb 1px dotted; WIDTH: 70%; BORDER-BOTTOM: #bbb 1px dotted +}; +.opinionform { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: auto 30px; WIDTH: 80%; LINE-HEIGHT: 30px +} +.errorbox { + BORDER-RIGHT: #f00 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #f00 1px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: auto auto 20px; BORDER-LEFT: #f00 1px solid; WIDTH: 80%; PADDING-TOP: 3px; BORDER-BOTTOM: #f00 1px solid +} +.boxheader2 { + BORDER-TOP: #2e64ff 4px solid; HEIGHT: 4px +} +.boldfont { + FONT-WEIGHT: bold +} +.disabled { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #ccc; FONT-STYLE: italic +} +.emailactive { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-STYLE: italic +} +.profileitemdesc { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-BOTTOM: 4px; MARGIN-LEFT: 20px +} +.mailresult { + FONT-WEIGHT: bold; FONT-SIZE: 14pt; MARGIN: auto; WIDTH: 650px; HEIGHT: 30px; TEXT-ALIGN: center +} +.faqtitle { + FONT-WEIGHT: normal; FONT-SIZE: 24pt; COLOR: #0065CA; TEXT-ALIGN: center +} +.faqitemtitle { + FONT-WEIGHT: bold; FONT-SIZE: 12pt +} +.faqitemtext { + MARGIN-LEFT: 5px +} +.footer { + PADDING-RIGHT: 30px; FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-LEFT: 200px; TEXT-ALIGN: right +} diff --git a/mozilla/webtools/update/extensions/install.php b/mozilla/webtools/update/extensions/install.php index 8e71f3cd0cc..1dae8e7d9d6 100644 --- a/mozilla/webtools/update/extensions/install.php +++ b/mozilla/webtools/update/extensions/install.php @@ -1,97 +1,101 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> -'$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 ('$_GET[id]','$today','$_GET[vid]', '$_SERVER[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_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`='$_GET[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 ('$_GET[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_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - - -//Download Statistic Management Code -// Maintain the last 7 days record count -// This is also where the weekly w/e code would go. if that feature is ever created. - $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`='$_GET[id]' AND `date`>='$mindate' AND `type`='count' 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)) { - $downloadcount = $downloadcount+$row["downloadcount"]; - } - //Update the 7 day count in the main record. - $sql = "UPDATE `t_main` SET `downloadcount`='$downloadcount' WHERE `ID`='$_GET[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. (and in the future, compile the week/ending records for this data) - $sql = "DELETE FROM `t_downloads` WHERE `ID`='$_GET[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); - - } - -//Send User on their way to the file... -header("Location: $uri") + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> +'$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 ('$_GET[id]','$today','$_GET[vid]', '$_SERVER[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_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`='$_GET[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 ('$_GET[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_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + + +//Download Statistic Management Code +// Maintain the last 7 days record count +// This is also where the weekly w/e code would go. if that feature is ever created. + $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`='$_GET[id]' AND `date`>='$mindate' AND `type`='count' 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)) { + $downloadcount = $downloadcount+$row["downloadcount"]; + } + //Update the 7 day count in the main record. + $sql = "UPDATE `t_main` SET `downloadcount`='$downloadcount' WHERE `ID`='$_GET[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`='$_GET[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. (and in the future, compile the week/ending records for this data) + $sql = "DELETE FROM `t_downloads` WHERE `ID`='$_GET[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); + + } + +//Send User on their way to the file... +header("Location: $uri") ?> \ No newline at end of file diff --git a/mozilla/webtools/update/extensions/moreinfo.php b/mozilla/webtools/update/extensions/moreinfo.php index 33b59477d54..e21d1a59b02 100644 --- a/mozilla/webtools/update/extensions/moreinfo.php +++ b/mozilla/webtools/update/extensions/moreinfo.php @@ -1,540 +1,539 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> - - - - - - - - -"All Releases", "comments"=>"User Comments", "staffreview"=>"Editor Review", "opinion"=>" My Opinion"); -$pagetitle = $pagetitles[$_GET["page"]]; -?> - -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 Customizeable Timestamp for DateAdded/DateUpdated - $day=substr($dateadded,8,2); //get the day - $month=substr($dateadded,5,2); //get the month - $year=substr($dateadded,0,4); //get the year - $hour=substr($dateadded,11,2); //get the hour - $minute=substr($dateadded,14,2); //get the minute - $second=substr($dateadded,17,2); //get the sec - $datimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - - $day=substr($dateupdated,8,2); //get the day - $month=substr($dateupdated,5,2); //get the month - $year=substr($dateupdated,0,4); //get the year - $hour=substr($dateupdated,11,2); //get the hour - $minute=substr($dateupdated,14,2); //get the minute - $second=substr($dateupdated,17,2); //get the sec - $dutimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - - $dateadded = gmdate("F d, Y g:i:sa", $datimestamp); //gmdate("F d, Y", $datimestamp); - $dateupdated = gmdate("F d, Y g:i:sa", $dutimestamp); //gmdate("F d, Y", $dutimestamp); - -//Rating -if (!$rating) { $rating="0"; } -?> - - - -\n"; -//echo"
"; //Why?!? -if ($previewuri) { -list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); - -echo"\"$name"; -} - -//Upper-Right Side Box -echo"\n"; - -echo"
"; -echo"$name $version
"; -echo"By $authors
"; -echo"
"; - -//Description & Version Notes -echo""; -echo"$description
"; -if ($notes) {echo"$notes"; } -echo"
\n"; - -//echo"
\n"; -echo"
\n\n"; - -$page = $_GET["page"]; -if (!$page or $page=="general") { -?> -
-0) { -$time .= "$time_minutes minutes "; -} -$time .="$time_seconds seconds"; - -$filename = basename($uri); - -echo" -Released on $verdateadded
- - -
"; -if ($appname=="Thunderbird") { -echo"\"\" ( Download Now )
"; -} else { -echo"\"\" ( Install Now )
"; -} -echo" -  $filesize KB, ($time @ $speed"."k)
-
"; - -if ($appname=="Thunderbird") { -echo"Extension 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\"
-"; -} -if ($homepage) {echo"Having a problem with this Extension? For Help and Technical Support, visit the Extension's Homepage.";} - -echo" -
- -
-
User Comments:
-
-"; -echo"$commenttitle"; -echo""; - -for ($i = 1; $i <= $rating; $i++) { -echo"\"*\""; -} -for ($i = $i; $i <= 5; $i++) { -echo"\"\""; -} -echo""; -echo"
"; -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"
"; -echo"Nobody's Commented on this Extension Yet
"; -echo"Be the First! Rate It!"; -echo"
"; -} - -?> - -
- -"; -echo"Recent Releases:
"; -echo""; - -$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' -ORDER BY `Version` DESC, `OSName` ASC -LIMIT 0, 10"; - - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - while ($row = mysql_fetch_array($sql_result)) { - $vid = $row["vID"]; - $minappver = $row["MinAppVer"]; - $maxappver = $row["MaxAppVer"]; - $filesize = $row["Size"]; - $notes = $row["Notes"]; - $version = $row["Version"]; - $uri = $row["URI"]; - $osname = $row["OSName"]; - $appname = $row["AppName"]; - $filename = basename($uri); - -echo"
"; //Open Version DIV - -//Description & Version Notes -echo""; -echo"Version $version
\n"; -if ($notes) {echo"$notes"; } -echo"
\n"; - -//Icon Bar Modules -echo"
"; -echo"
\"\"Install
Size: $filesize kb
"; -echo"
\"$appname\" Works with:
  $minappver - $maxappver
"; -echo"
\"\"OS:
"; if($osname=="ALL") {echo"All OSes";} else {echo"$osname";} echo"
"; -echo"
"; - -echo"
"; -} - -//End General Page -} else if ($page=="comments") { -//Comments/Ratings Page -echo"
"; -echo"User Comments:
"; -echo"
"; -$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` ASC"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $num_results = mysql_num_rows($sql_result); - while ($row = mysql_fetch_array($sql_result)) { - $name = $row["CommentName"]; - $title = $row["CommentTitle"]; - $notes = $row["CommentNote"]; - $date = $row["CommentDate"]; - $rating = $row["CommentVote"]; - -echo"
"; -echo"$title"; -echo""; - -for ($i = 1; $i <= $rating; $i++) { -echo"\"*\""; -} -for ($i = $i; $i <= 5; $i++) { -echo"\"\""; -} -echo""; -echo"
"; -echo"$notes
\n\n"; - -echo"
\n"; -echo"Posted on $date by $name
"; -echo"
\n"; -} - -if ($num_results=="0") { -echo"
"; -echo"Nobody has commented on this extension yet...
-Be the First! -Leave your comments..."; -echo"
\n"; -} - - -echo"
"; - -} else if ($page=="staffreview") { -//Staff/Editor Review Tab -echo"
"; -echo"Editor Review:
"; -echo"
"; - -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 -// $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"); - $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 extension, view the User Comments... -
-"; - - -} -echo"
\n"; - -} else if ($page=="opinion") { -//My Opinion Tab -echo"
"; -echo"Your Rating / Feedback:
"; -echo"
"; -?> -\n -Your comment submission had the following error(s), please fix these errors and try again.
\n -   Rating field cannot be left blank.
\n -\n"; -} -?> -
-
-"> -"> -Your Name:
-
- -Rating:*
-
- -Title:
-
- -Review/Comments:
-
-     No Comment?
-  
-* Required Fields -
- -
-"; -echo"Date Added: $dateadded | Last Updated: $dateupdated | "; -echo"Total Downloads: $downloadcount
"; -echo"\n"; -echo"\n"; -echo"
\n"; -?> - - - + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> + + + + + + + + +"All Releases", "comments"=>"User Comments", "staffreview"=>"Editor Review", "opinion"=>" My Opinion"); +$pagetitle = $pagetitles[$_GET["page"]]; +?> + +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 Customizeable Timestamp for DateAdded/DateUpdated + $day=substr($dateadded,8,2); //get the day + $month=substr($dateadded,5,2); //get the month + $year=substr($dateadded,0,4); //get the year + $hour=substr($dateadded,11,2); //get the hour + $minute=substr($dateadded,14,2); //get the minute + $second=substr($dateadded,17,2); //get the sec + $datimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); + + $day=substr($dateupdated,8,2); //get the day + $month=substr($dateupdated,5,2); //get the month + $year=substr($dateupdated,0,4); //get the year + $hour=substr($dateupdated,11,2); //get the hour + $minute=substr($dateupdated,14,2); //get the minute + $second=substr($dateupdated,17,2); //get the sec + $dutimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); + + $dateadded = gmdate("F d, Y g:i:sa", $datimestamp); //gmdate("F d, Y", $datimestamp); + $dateupdated = gmdate("F d, Y g:i:sa", $dutimestamp); //gmdate("F d, Y", $dutimestamp); + +//Rating +if (!$rating) { $rating="0"; } +?> + + + +\n"; +//echo"
"; //Why?!? +if ($previewuri) { +list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); + +echo"\"$name"; +} + +//Upper-Right Side Box +echo"\n"; + +echo"
"; +echo"$name $version
"; +echo"By $authors
"; +echo"
"; + +//Description & Version Notes +echo""; +echo"$description
"; +if ($notes) {echo"$notes"; } +echo"
\n"; + +//echo"
\n"; +echo"
\n\n"; + +$page = $_GET["page"]; +if (!$page or $page=="general") { +?> +
+0) { +$time .= "$time_minutes minutes "; +} +$time .="$time_seconds seconds"; + +$filename = basename($uri); + +echo" +Released on $verdateadded
+ + +
"; +if ($appname=="Thunderbird") { +echo"\"\" ( Download Now )
"; +} else { +echo"\"\" ( Install Now )
"; +} +echo" +  $filesize KB, ($time @ $speed"."k)
+
"; +if ($application=="thunderbird") { +echo"Extension 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\"

+"; +} +if ($homepage) {echo"Having a problem with this Extension? For Help and Technical Support, visit the Extension's Homepage.";} + +echo" +
+ +
+
User Comments:
+
+"; +echo"$commenttitle"; +echo""; + +for ($i = 1; $i <= $rating; $i++) { +echo"\"*\""; +} +for ($i = $i; $i <= 5; $i++) { +echo"\"\""; +} +echo""; +echo"
"; +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"
"; +echo"Nobody's Commented on this Extension Yet
"; +echo"Be the First! Rate It!"; +echo"
"; +} + +?> + +
+ +"; +echo"Recent Releases:
"; +echo""; + +$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' +ORDER BY `Version` DESC, `OSName` ASC +LIMIT 0, 10"; + + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + while ($row = mysql_fetch_array($sql_result)) { + $vid = $row["vID"]; + $minappver = $row["MinAppVer"]; + $maxappver = $row["MaxAppVer"]; + $filesize = $row["Size"]; + $notes = $row["Notes"]; + $version = $row["Version"]; + $uri = $row["URI"]; + $osname = $row["OSName"]; + $appname = $row["AppName"]; + $filename = basename($uri); + +echo"
"; //Open Version DIV + +//Description & Version Notes +echo""; +echo"Version $version
\n"; +if ($notes) {echo"$notes"; } +echo"
\n"; + +//Icon Bar Modules +echo"
"; +echo"
\"\"Install
Size: $filesize kb
"; +echo"
\"$appname\" Works with:
  $minappver - $maxappver
"; +echo"
\"\"OS:
"; if($osname=="ALL") {echo"All OSes";} else {echo"$osname";} echo"
"; +echo"
"; + +echo"
"; +} + +//End General Page +} else if ($page=="comments") { +//Comments/Ratings Page +echo"
"; +echo"User Comments:
"; +echo"
"; +$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` ASC"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $num_results = mysql_num_rows($sql_result); + while ($row = mysql_fetch_array($sql_result)) { + $name = $row["CommentName"]; + $title = $row["CommentTitle"]; + $notes = $row["CommentNote"]; + $date = $row["CommentDate"]; + $rating = $row["CommentVote"]; + +echo"
"; +echo"$title"; +echo""; + +for ($i = 1; $i <= $rating; $i++) { +echo"\"*\""; +} +for ($i = $i; $i <= 5; $i++) { +echo"\"\""; +} +echo""; +echo"
"; +echo"$notes
\n\n"; + +echo"
\n"; +echo"Posted on $date by $name
"; +echo"
\n"; +} + +if ($num_results=="0") { +echo"
"; +echo"Nobody has commented on this extension yet...
+Be the First! +Leave your comments..."; +echo"
\n"; +} + + +echo"
"; + +} else if ($page=="staffreview") { +//Staff/Editor Review Tab +echo"
"; +echo"Editor Review:
"; +echo"
"; + +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 +// $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"); + $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 extension, view the User Comments... +
+"; + + +} +echo"
\n"; + +} else if ($page=="opinion") { +//My Opinion Tab +echo"
"; +echo"Your Rating / Feedback:
"; +echo"
"; +?> +\n +Your comment submission had the following error(s), please fix these errors and try again.
\n +   Rating field cannot be left blank.
\n +\n"; +} +?> +
+
+"> +"> +Your Name:
+
+ +Rating:*
+
+ +Title:
+
+ +Review/Comments:
+
+     No Comment?
+  
+* Required Fields +
+ +
+"; +echo"Date Added: $dateadded | Last Updated: $dateupdated | "; +echo"Total Downloads: $downloadcount
"; +echo"\n"; +echo"\n"; +echo"
\n"; +?> + + + \ No newline at end of file diff --git a/mozilla/webtools/update/extensions/showlist.php b/mozilla/webtools/update/extensions/showlist.php index 09946caa10b..a8150093464 100644 --- a/mozilla/webtools/update/extensions/showlist.php +++ b/mozilla/webtools/update/extensions/showlist.php @@ -1,484 +1,483 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> - - - - - -"Extensions","T"=>"Themes","U"=>"Updates"); -$typename = $types["$type"]; - -//RSS Autodiscovery Link Stuff -switch ($_SESSION["category"]) { - case "Newest": - $rsslist = "newest"; - break; - case "Popular": - $rsslist = "popular"; - break; - case "Top Rated": - $rsslist = "rated"; - break; -} - -$rssfeed = "rss/?application=" . $application . "&type=" . $type . "&list=" . $rsslist; - -if (!$category) {$categoryname = "All $typename"; } else {$categoryname = $category; } -?> - - - - - -Mozilla Update :: Extensions - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?> - -"; -} -?> - - -\n"; // Begin Content Area - -//Query for List Creation -$s = "0"; -$startpoint = ($pageid-1)*$items_per_page; -if ($category=="Editors Pick" or $category=="Newest" or $category=="Popular" or $category=="Top Rated") { -if ($category =="Editors Pick") { -$editorpick="true"; -} else if ($category =="Newest") { -$orderby = "TV.DateAdded DESC, `Name` ASC"; -} else if ($category =="Popular") { -$orderby = "TM.TotalDownloads DESC, `Name` ASC"; -} else if ($category =="Top Rated") { -$orderby = "TM.Rating DESC, `Name` ASC"; -} -$catname = $category; -$category = "%"; -} -if ($app_version=="0.10") {$app_version="0.95"; } -$sql = "SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TM.TotalDownloads, TV.vID, -SUBSTRING(MAX(CONCAT(LPAD(TV.Version, 6, '0'), TV.vID)), 7) AS MAXvID, -MAX(TV.Version) AS Version, -TA.AppName, TOS.OSName -FROM `t_main` TM -INNER JOIN t_version TV ON TM.ID = TV.ID -INNER JOIN t_applications TA ON TV.AppID = TA.AppID -INNER JOIN t_os TOS ON TV.OSID = TOS.OSID "; -if ($category && $category !=="%") { $sql .="INNER JOIN t_categoryxref TCX ON TM.ID = TCX.ID -INNER JOIN t_categories TC ON TCX.CategoryID = TC.CategoryID "; } -if ($editorpick=="true") { $sql .="INNER JOIN t_reviews TR ON TM.ID = TR.ID "; } -$sql .="WHERE Type = '$type' AND AppName = '$application' AND `approved` = 'YES' "; -if ($editorpick=="true") { $sql .="AND TR.Pick = 'YES' "; } -if ($category && $category !=="%") {$sql .="AND CatName LIKE '$category' ";} -if ($app_version) { $sql .=" AND TV.MinAppVer_int <= '".strtolower($app_version)."' AND TV.MaxAppVer_int >= '".strtolower($app_version)."' ";} -if ($OS) { $sql .=" AND (TOS.OSName = '$OS' OR TOS.OSName = 'All') "; } -$sql .="GROUP BY `Name` "; -if ($orderby) { -$sql .="ORDER BY $orderby"; -} else { -$sql .="ORDER BY `Name` , `Version` DESC "; -} - -$resultsquery = $sql; -unset($sql); - -//Get Total Results from Result Query & Populate Page Control Vars. - $sql_result = mysql_query($resultsquery, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $totalresults = mysql_num_rows($sql_result); - - $num_pages = ceil($totalresults/$items_per_page); //Total # of Pages - 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"]; } -//$resultsquery = str_replace("GROUP BY `Name` ", "", $resultsquery); -$resultsquery .= " LIMIT $startpoint , $items_per_page"; //Append LIMIT clause to result query - -if ($category=="%") {$category = $catname; unset($catname); } - -//Now Showing Box -echo"
"; -if (!$OS) {$OS="all";} -if (!$category) {$categoryname="All"; } else {$categoryname = $category;} -echo"
"; -$previd=$pageid-1; -if ($previd >"0") { -echo"« Previous · "; -} -echo"Page $pageid of $num_pages"; - -$nextid=$pageid+1; -if ($pageid <$num_pages) { -echo" · Next »"; -} - -echo"
\n"; - -echo"".ucwords("$application $typename » $categoryname ")."
"; -echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; - - -// Modify List Form - -echo"
"; -echo"
\n"; - -//Items-Per-Page -echo"Show/Page: "; -$perpage = array("5","10","20","50"); -echo"\n"; - - -// Operating Systems -echo" OS: "; -echo"\n"; - - -//Versions of Application -echo"Versions: "; -echo"\n"; -echo""; -echo"
"; -echo"
"; - -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_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"]; - $authorids[$row[UserName]] = $row["UserID"]; - } - -//Assemble a display application version array -$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - while ($row = mysql_fetch_array($sql_result)) { - $version = $row["Version"]; - $subver = $row["SubVer"]; - $release = "$row[major].$row[minor]"; - if ($row["release"]) {$release = ".$release$row[release]";} - if ($subver !=="final") {$release="$release$subver";} - - $appvernames[$release] = $version; - } - -//Query to Generate List.. -$sql = "$resultsquery"; - $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"]; - $type = $row["Type"]; - $name = $row["Name"]; - $dateadded = $row["DateAdded"]; - $dateupdated = $row["DateUpdated"]; - $homepage = $row["Homepage"]; - $description = $row["Description"]; - $rating = $row["Rating"]; - $authors = $authorarray[$name]; - $osname = $row["OSName"]; - $appname = $row["AppName"]; - $downloadcount = $row["TotalDownloads"]; - -//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, TP.PreviewURI FROM `t_version` TV -LEFT JOIN t_previews TP ON TV.vID = TP.vID -INNER JOIN t_applications TA ON TV.AppID = TA.AppID -INNER JOIN t_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"]; -if ($appvernames[$row["MinAppVer"]]) {$minappver = $appvernames[$row["MinAppVer"]]; } else { $minappver = $row["MinAppVer"]; } -if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer"]]; } else { $maxappver = $row["MaxAppVer"]; } - $VerDateAdded = $row["VerDateAdded"]; - $VerDateUpdated = $row["VerDateUpdated"]; - $filesize = $row["Size"]; - $notes = $row["Notes"]; - $version = $row["Version"]; - $uri = $row["URI"]; - $previewuri = $row["PreviewURI"]; - - $filename = basename($uri); - -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.. - -//Create Customizeable Timestamp - $day=substr($dateupdated,8,2); //get the day - $month=substr($dateupdated,5,2); //get the month - $year=substr($dateupdated,0,4); //get the year - $hour=substr($dateupdated,11,2); //get the hour - $minute=substr($dateupdated,14,2); //get the minute - $second=substr($dateupdated,17,2); //get the sec - $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - $dateupdated = gmdate("F d, Y g:i:sa", $timestamp); //gmdate("F d, Y g:i:sa T", $timestamp); - - -echo"
\n"; -//echo"
"; //Not sure why this is here, it caused text to flood out of the box though. - -if ($previewuri) { -list($width, $height, $type, $attr) = getimagesize("$websitepath"."$previewuri"); - -echo"\"$name"; -} - - -//Upper-Right Side Box -echo"\n"; - - -echo"
"; -echo"$name $version
"; -echo"By $authors
"; -echo"
"; - -//Description & Version Notes -echo""; -echo"$description
"; -if ($notes) {echo"$notes"; } -echo"
\n"; -echo"
"; -//echo"
"; - -//Icon Bar Modules -echo"
"; -echo"
"; -if ($appname=="Thunderbird") { -echo"\"\"More Info"; -} else { -echo"\"\"Install"; -} -echo"
Size: $filesize kb
"; -if ($homepage) {echo"";} -echo"
\"$appname\" Works with:
  $minappver - $maxappver
"; -if($osname !=="ALL") { echo"
\"\"OS:
$osname
"; } -echo"
"; - -echo"
Updated: $dateupdated | Total Downloads: $downloadcount
\n"; -echo"
\n"; - -} //End While Loop -if ($totalresults=="0") { -echo"
\n"; -echo"No extensions found in this category for ".ucwords($application).".\n"; -echo"
\n"; - -} -?> - - - - -"; - - -echo"
"; -$previd=$pageid-1; -if ($previd >"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: "; -$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++; -} -} - -echo"
\n"; - -echo"".ucwords("$application $typename » $categoryname ")."
"; -echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; - -echo"\n"; -} - -echo"\n"; //End Content -?> - - + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> + + + + + +"Extensions","T"=>"Themes","U"=>"Updates"); +$typename = $types["$type"]; + +//RSS Autodiscovery Link Stuff +switch ($_SESSION["category"]) { + case "Newest": + $rsslist = "newest"; + break; + case "Popular": + $rsslist = "popular"; + break; + case "Top Rated": + $rsslist = "rated"; + break; +} + +$rssfeed = "rss/?application=" . $application . "&type=" . $type . "&list=" . $rsslist; + +if (!$category) {$categoryname = "All $typename"; } else {$categoryname = $category; } +?> + + + + + +Mozilla Update :: Extensions - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?> + +"; +} +?> + + +\n"; // Begin Content Area +//Query for List Creation +$s = "0"; +$startpoint = ($pageid-1)*$items_per_page; +if ($category=="Editors Pick" or $category=="Newest" or $category=="Popular" or $category=="Top Rated") { +if ($category =="Editors Pick") { +$editorpick="true"; +} else if ($category =="Newest") { +$orderby = "TV.DateAdded DESC, `Name` ASC"; +} else if ($category =="Popular") { +$orderby = "TM.TotalDownloads DESC, `Name` ASC"; +} else if ($category =="Top Rated") { +$orderby = "TM.Rating DESC, `Name` ASC"; +} +$catname = $category; +$category = "%"; +} +if ($app_version=="0.10") {$app_version="0.95"; } +$sql = "SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TM.TotalDownloads, TV.vID, +SUBSTRING(MAX(CONCAT(LPAD(TV.Version, 6, '0'), TV.vID)), 7) AS MAXvID, +MAX(TV.Version) AS Version, +TA.AppName, TOS.OSName +FROM `t_main` TM +INNER JOIN t_version TV ON TM.ID = TV.ID +INNER JOIN t_applications TA ON TV.AppID = TA.AppID +INNER JOIN t_os TOS ON TV.OSID = TOS.OSID "; +if ($category && $category !=="%") { $sql .="INNER JOIN t_categoryxref TCX ON TM.ID = TCX.ID +INNER JOIN t_categories TC ON TCX.CategoryID = TC.CategoryID "; } +if ($editorpick=="true") { $sql .="INNER JOIN t_reviews TR ON TM.ID = TR.ID "; } +$sql .="WHERE Type = '$type' AND AppName = '$application' AND `approved` = 'YES' "; +if ($editorpick=="true") { $sql .="AND TR.Pick = 'YES' "; } +if ($category && $category !=="%") {$sql .="AND CatName LIKE '$category' ";} +if ($app_version) { $sql .=" AND TV.MinAppVer_int <= '".strtolower($app_version)."' AND TV.MaxAppVer_int >= '".strtolower($app_version)."' ";} +if ($OS) { $sql .=" AND (TOS.OSName = '$OS' OR TOS.OSName = 'All') "; } +$sql .="GROUP BY `Name` "; +if ($orderby) { +$sql .="ORDER BY $orderby"; +} else { +$sql .="ORDER BY `Name` , `Version` DESC "; +} + +$resultsquery = $sql; +unset($sql); + +//Get Total Results from Result Query & Populate Page Control Vars. + $sql_result = mysql_query($resultsquery, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $totalresults = mysql_num_rows($sql_result); + + $num_pages = ceil($totalresults/$items_per_page); //Total # of Pages + 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"]; } +//$resultsquery = str_replace("GROUP BY `Name` ", "", $resultsquery); +$resultsquery .= " LIMIT $startpoint , $items_per_page"; //Append LIMIT clause to result query + +if ($category=="%") {$category = $catname; unset($catname); } + +//Now Showing Box +echo"
"; +if (!$OS) {$OS="all";} +if (!$category) {$categoryname="All"; } else {$categoryname = $category;} +echo"
"; +$previd=$pageid-1; +if ($previd >"0") { +echo"« Previous · "; +} +echo"Page $pageid of $num_pages"; + +$nextid=$pageid+1; +if ($pageid <$num_pages) { +echo" · Next »"; +} + +echo"
\n"; + +echo"".ucwords("$application $typename » $categoryname ")."
"; +echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; + + +// Modify List Form + +echo"
"; +echo"
\n"; + +//Items-Per-Page +echo"Show/Page: "; +$perpage = array("5","10","20","50"); +echo"\n"; + + +// Operating Systems +echo" OS: "; +echo"\n"; + + +//Versions of Application +echo"Versions: "; +echo"\n"; +echo""; +echo"
"; +echo"
"; + +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_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"]; + $authorids[$row[UserName]] = $row["UserID"]; + } + +//Assemble a display application version array +$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + while ($row = mysql_fetch_array($sql_result)) { + $version = $row["Version"]; + $subver = $row["SubVer"]; + $release = "$row[major].$row[minor]"; + if ($row["release"]) {$release = ".$release$row[release]";} + if ($subver !=="final") {$release="$release$subver";} + + $appvernames[$release] = $version; + } + +//Query to Generate List.. +$sql = "$resultsquery"; + $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"]; + $type = $row["Type"]; + $name = $row["Name"]; + $dateadded = $row["DateAdded"]; + $dateupdated = $row["DateUpdated"]; + $homepage = $row["Homepage"]; + $description = $row["Description"]; + $rating = $row["Rating"]; + $authors = $authorarray[$name]; + $osname = $row["OSName"]; + $appname = $row["AppName"]; + $downloadcount = $row["TotalDownloads"]; + +//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, TP.PreviewURI FROM `t_version` TV +LEFT JOIN t_previews TP ON TV.vID = TP.vID +INNER JOIN t_applications TA ON TV.AppID = TA.AppID +INNER JOIN t_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"]; +if ($appvernames[$row["MinAppVer"]]) {$minappver = $appvernames[$row["MinAppVer"]]; } else { $minappver = $row["MinAppVer"]; } +if ($appvernames[$row["MaxAppVer"]]) {$maxappver = $appvernames[$row["MaxAppVer"]]; } else { $maxappver = $row["MaxAppVer"]; } + $VerDateAdded = $row["VerDateAdded"]; + $VerDateUpdated = $row["VerDateUpdated"]; + $filesize = $row["Size"]; + $notes = $row["Notes"]; + $version = $row["Version"]; + $uri = $row["URI"]; + $previewuri = $row["PreviewURI"]; + + $filename = basename($uri); + +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.. + +//Create Customizeable Timestamp + $day=substr($dateupdated,8,2); //get the day + $month=substr($dateupdated,5,2); //get the month + $year=substr($dateupdated,0,4); //get the year + $hour=substr($dateupdated,11,2); //get the hour + $minute=substr($dateupdated,14,2); //get the minute + $second=substr($dateupdated,17,2); //get the sec + $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); + $dateupdated = gmdate("F d, Y g:i:sa", $timestamp); //gmdate("F d, Y g:i:sa T", $timestamp); + + +echo"
\n"; +//echo"
"; //Not sure why this is here, it caused text to flood out of the box though. + +if ($previewuri) { +list($width, $height, $type, $attr) = getimagesize("$websitepath"."$previewuri"); + +echo"\"$name"; +} + + +//Upper-Right Side Box +echo"\n"; + + +echo"
"; +echo"$name $version
"; +echo"By $authors
"; +echo"
"; + +//Description & Version Notes +echo""; +echo"$description
"; +if ($notes) {echo"$notes"; } +echo"
\n"; +echo"
"; +//echo"
"; + +//Icon Bar Modules +echo"
"; +echo"
"; +if ($appname=="Thunderbird") { +echo"\"\"More Info"; +} else { +echo"\"\"Install"; +} +echo"
Size: $filesize kb
"; +if ($homepage) {echo"";} +echo"
\"$appname\" Works with:
  $minappver - $maxappver
"; +if($osname !=="ALL") { echo"
\"\"OS:
$osname
"; } +echo"
"; + +echo"
Updated: $dateupdated | Total Downloads: $downloadcount
\n"; +echo"
\n"; + +} //End While Loop +if ($totalresults=="0") { +echo"
\n"; +echo"No extensions found in this category for ".ucwords($application).".\n"; +echo"
\n"; + +} +?> + + + + +"; + + +echo"
"; +$previd=$pageid-1; +if ($previd >"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: "; +$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++; +} +} + +echo"
\n"; + +echo"".ucwords("$application $typename » $categoryname ")."
"; +echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; + +echo"\n"; +} + +echo"\n"; //End Content +?> + + \ No newline at end of file diff --git a/mozilla/webtools/update/index.php b/mozilla/webtools/update/index.php index 9b465a5cf71..8d07d373687 100644 --- a/mozilla/webtools/update/index.php +++ b/mozilla/webtools/update/index.php @@ -1,181 +1,180 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> - - - - - - - - - -Mozilla Update - - - - - -
-
Welcome to Mozilla Update
- -Mozilla Update hosts Extensions and Themes for Mozilla software. On this site you can find Extensions and Themes for Mozilla Firefox, -Mozilla Thunderbird and the Mozilla 1.x suite, with more to come. The site is broken up into sections for each product, with the -extensions and themes categorized to be easy to find. They're also sorted by what version of the product you're using, so you can -browse only for Firefox 0.9 compatible extensions, for example. For more information about Mozilla Update, please read our Frequently Asked Questions... - - -
- - - -
-
-
Extensions
- - Browse extensions ( available)
-
-"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"; -} -?> -
-
- -
-
Themes
- - Browse themes ( available)
-
-"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"; -} -?> -
-
- - + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> + + + + + + + + +Mozilla Update + + + + + +
+
Welcome to Mozilla Update
+ +Mozilla Update hosts Extensions and Themes for Mozilla software. On this site you can find Extensions and Themes for Mozilla Firefox, +Mozilla Thunderbird and the Mozilla 1.x suite, with more to come. The site is broken up into sections for each product, with the +extensions and themes categorized to be easy to find. They're also sorted by what version of the product you're using, so you can +browse only for Firefox 0.9 compatible extensions, for example. For more information about Mozilla Update, please read our Frequently Asked Questions... + + +
+ + + +
+
+
Extensions
+ + Browse extensions ( available)
+
+"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"; +} +?> +
+
+ +
+
Themes
+ + Browse themes ( available)
+
+"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 diff --git a/mozilla/webtools/update/themes/index.php b/mozilla/webtools/update/themes/index.php index 8e269e9dccf..592021977f4 100644 --- a/mozilla/webtools/update/themes/index.php +++ b/mozilla/webtools/update/themes/index.php @@ -1,224 +1,225 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> - - - - - - - - -Mozilla Update :: Themes - Change the Look of Mozilla Software - - - - - - -
-
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. -
- -
-
Featured Theme
-"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"$name -- $title"; -if ($pick=="YES") {echo" - $date Editors Pick"; } -echo"
\n"; -echo"$body
\n"; -} -?> -
-
-
- - '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"]; -if ($lastname == $name) {$i--; continue; } - echo"$i - $name
\n"; - echo"($downloadcount downloads)
\n"; - -$lastname = $name; -if ($i >= "5") {break;} -} -?> -
-
-
- - '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"$r - $name "; - - //$rating = round($rating); - -echo""; -for ($i = 1; $i <= floor($rating); $i++) { -echo"\"";"; -} -if ($rating>floor($rating)) { -$val = ($rating-floor($rating))*10; -echo"\"\""; -$i++; -} -for ($i = $i; $i <= 5; $i++) { -echo"\"";"; -} -echo"
\n"; -//echo"By $author
\n"; -$usednames[$s] = $name; -$usedversions[$s] = $version; -if ($r >= "5") {break;} -} -unset($usednames, $usedversions, $r, $s, $i); -?> -
-
- -$name $version
\n"; - echo"($dateadded)
\n"; - -$lastname = $name; -if ($i >= "5") {break;} -} -?> -
-
-
- - + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> + + + + + + + + +Mozilla Update :: Themes - Change the Look of Mozilla Software + + + + + + +
+
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. +
+ +
+
Featured Theme
+"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"$name -- $title"; +if ($pick=="YES") {echo" - $date Editors Pick"; } +echo"
\n"; +echo"$body
\n"; +} +?> +
+
+
+ + '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"$i - $name
\n"; + echo"($downloadcount downloads)
\n"; + +$lastname = $name; +if ($i >= "5") {break;} +} +?> +
+
+
+ + '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"$r - $name "; + + //$rating = round($rating); + +echo""; +for ($i = 1; $i <= floor($rating); $i++) { +echo"\"";"; +} +if ($rating>floor($rating)) { +$val = ($rating-floor($rating))*10; +echo"\"\""; +$i++; +} +for ($i = $i; $i <= 5; $i++) { +echo"\"";"; +} +echo"
\n"; +//echo"By $author
\n"; +$usednames[$s] = $name; +$usedversions[$s] = $version; +if ($r >= "5") {break;} +} +unset($usednames, $usedversions, $r, $s, $i); +?> +
+
+ +$name $version
\n"; + echo"($dateadded)
\n"; + +$lastname = $name; +if ($i >= "5") {break;} +} +?> +
+
+
+ + \ No newline at end of file diff --git a/mozilla/webtools/update/themes/install.php b/mozilla/webtools/update/themes/install.php index 8e71f3cd0cc..1dae8e7d9d6 100644 --- a/mozilla/webtools/update/themes/install.php +++ b/mozilla/webtools/update/themes/install.php @@ -1,97 +1,101 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> -'$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 ('$_GET[id]','$today','$_GET[vid]', '$_SERVER[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_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`='$_GET[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 ('$_GET[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_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - - -//Download Statistic Management Code -// Maintain the last 7 days record count -// This is also where the weekly w/e code would go. if that feature is ever created. - $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`='$_GET[id]' AND `date`>='$mindate' AND `type`='count' 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)) { - $downloadcount = $downloadcount+$row["downloadcount"]; - } - //Update the 7 day count in the main record. - $sql = "UPDATE `t_main` SET `downloadcount`='$downloadcount' WHERE `ID`='$_GET[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. (and in the future, compile the week/ending records for this data) - $sql = "DELETE FROM `t_downloads` WHERE `ID`='$_GET[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); - - } - -//Send User on their way to the file... -header("Location: $uri") + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> +'$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 ('$_GET[id]','$today','$_GET[vid]', '$_SERVER[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_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`='$_GET[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 ('$_GET[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_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + + +//Download Statistic Management Code +// Maintain the last 7 days record count +// This is also where the weekly w/e code would go. if that feature is ever created. + $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`='$_GET[id]' AND `date`>='$mindate' AND `type`='count' 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)) { + $downloadcount = $downloadcount+$row["downloadcount"]; + } + //Update the 7 day count in the main record. + $sql = "UPDATE `t_main` SET `downloadcount`='$downloadcount' WHERE `ID`='$_GET[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`='$_GET[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. (and in the future, compile the week/ending records for this data) + $sql = "DELETE FROM `t_downloads` WHERE `ID`='$_GET[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); + + } + +//Send User on their way to the file... +header("Location: $uri") ?> \ No newline at end of file diff --git a/mozilla/webtools/update/themes/moreinfo.php b/mozilla/webtools/update/themes/moreinfo.php index 4ad789c8e14..e9be4479821 100644 --- a/mozilla/webtools/update/themes/moreinfo.php +++ b/mozilla/webtools/update/themes/moreinfo.php @@ -1,540 +1,540 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> - - - - - - - - -"All Releases", "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"; } ?> - - - - - -
- $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 Customizeable Timestamp for DateAdded/DateUpdated - $day=substr($dateadded,8,2); //get the day - $month=substr($dateadded,5,2); //get the month - $year=substr($dateadded,0,4); //get the year - $hour=substr($dateadded,11,2); //get the hour - $minute=substr($dateadded,14,2); //get the minute - $second=substr($dateadded,17,2); //get the sec - $datimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - - $day=substr($dateupdated,8,2); //get the day - $month=substr($dateupdated,5,2); //get the month - $year=substr($dateupdated,0,4); //get the year - $hour=substr($dateupdated,11,2); //get the hour - $minute=substr($dateupdated,14,2); //get the minute - $second=substr($dateupdated,17,2); //get the sec - $dutimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - - $dateadded = gmdate("F d, Y g:i:sa", $datimestamp); //gmdate("F d, Y", $datimestamp); - $dateupdated = gmdate("F d, Y g:i:sa", $dutimestamp); //gmdate("F d, Y", $dutimestamp); - -//Rating -if (!$rating) { $rating="0"; } -?> - - - -\n"; -//echo"
"; //Why?!? -if ($previewuri) { -list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); - -echo"\"$name"; -} - -//Upper-Right Side Box -echo"\n"; - -echo"
"; -echo"$name $version
"; -echo"By $authors
"; -echo"
"; - -//Description & Version Notes -echo""; -echo"$description
"; -if ($notes) {echo"$notes"; } -echo"
\n"; - -//echo"
\n"; -echo"
\n\n"; - -$page = $_GET["page"]; -if (!$page or $page=="general") { -?> -
-0) { -$time .= "$time_minutes minutes "; -} -$time .="$time_seconds seconds"; - -echo" -Released on $verdateadded
-
"; -if ($appname=="Thunderbird") { -echo"\"\" ( Download Now )
"; -} else { -//Make Theme Install work again, Bug 246754 -//echo"\"\" ( Install Now )
"; -} -echo" -  $filesize KB, ($time @ $speed"."k)
-
"; -if ($appname=="Thunderbird") { -echo"Theme Install Instructions for Thunderbird Users:
-(1) 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 Extension? For Help and Technical Support, visit the Themes' Homepage.";} - -echo" -
- -
-
User Comments:
-
-"; -echo"$commenttitle"; -echo""; - -for ($i = 1; $i <= $rating; $i++) { -echo"\"*\""; -} -for ($i = $i; $i <= 5; $i++) { -echo"\"\""; -} -echo""; -echo"
"; -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"
"; -echo"Nobody's Commented on this Extension Yet
"; -echo"Be the First! Rate It!"; -echo"
"; -} - -?> - -
- -"; -echo"Recent Releases:
"; -echo""; - -$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' -ORDER BY `Version` DESC, `OSName` ASC -LIMIT 0, 10"; - - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - while ($row = mysql_fetch_array($sql_result)) { - $vid = $row["vID"]; - $minappver = $row["MinAppVer"]; - $maxappver = $row["MaxAppVer"]; - $filesize = $row["Size"]; - $notes = $row["Notes"]; - $version = $row["Version"]; - $uri = $row["URI"]; - $osname = $row["OSName"]; - $appname = $row["AppName"]; - -echo"
"; //Open Version DIV - -//Description & Version Notes -echo""; -echo"Version $version
\n"; -if ($notes) {echo"$notes"; } -echo"
\n"; - -//Icon Bar Modules -echo"
"; -echo"
"; -if ($type=="T") { -//Make Theme Install work again, Bug 246754 -//echo""; -echo""; -} else { -echo""; -} -echo"\"\"Install
Size: $filesize kb
"; -echo"
\"$appname Works with:
  $minappver - $maxappver
"; -echo"
\"\"OS:
"; if($osname=="ALL") {echo"All OSes";} else {echo"$osname";} echo"
"; -echo"
"; - -echo"
"; -} - -//End General Page -} else if ($page=="comments") { -//Comments/Ratings Page -echo"
"; -echo"User Comments:
"; -echo"
"; -$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` ASC"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $num_results = mysql_num_rows($sql_result); - while ($row = mysql_fetch_array($sql_result)) { - $name = $row["CommentName"]; - $title = $row["CommentTitle"]; - $notes = $row["CommentNote"]; - $date = $row["CommentDate"]; - $rating = $row["CommentVote"]; - -echo"
"; -echo"$title"; -echo""; - -for ($i = 1; $i <= $rating; $i++) { -echo"\"*\""; -} -for ($i = $i; $i <= 5; $i++) { -echo"\"\""; -} -echo""; -echo"
"; -echo"$notes
\n\n"; - -echo"
\n"; -echo"Posted on $date by $name
"; -echo"
\n"; -} - -if ($num_results=="0") { -echo"
"; -echo"Nobody has commented on this extension yet...
-Be the First! -Leave your comments..."; -echo"
\n"; -} - - -echo"
"; - -} else if ($page=="staffreview") { -//Staff/Editor Review Tab -echo"
"; -echo"Editor Review:
"; -echo"
"; - -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 = gmdate("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 extension, view the User Comments... -
-"; - - -} -echo"
\n"; - -} else if ($page=="opinion") { -//My Opinion Tab -echo"
"; -echo"Your Rating / Feedback:
"; -echo"
"; -?> -\n -Your comment submission had the following error(s), please fix these errors and try again.
\n -   Rating field cannot be left blank.
\n -\n"; -} -?> -
-
-"> -"> -Your Name:
-
- -Rating:*
-
- -Title:
-
- -Review/Comments:
-
-     No Comment?
-  
-* Required Fields -
- -
-"; -echo"Date Added: $dateadded | Last Updated: $dateupdated | "; -echo"Total Downloads: $downloadcount
"; -echo"\n"; -echo"\n"; -echo"
\n"; -?> - - - + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> + + + + + + + + +"All Releases", "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"; } ?> + + + + + +
+ $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 Customizeable Timestamp for DateAdded/DateUpdated + $day=substr($dateadded,8,2); //get the day + $month=substr($dateadded,5,2); //get the month + $year=substr($dateadded,0,4); //get the year + $hour=substr($dateadded,11,2); //get the hour + $minute=substr($dateadded,14,2); //get the minute + $second=substr($dateadded,17,2); //get the sec + $datimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); + + $day=substr($dateupdated,8,2); //get the day + $month=substr($dateupdated,5,2); //get the month + $year=substr($dateupdated,0,4); //get the year + $hour=substr($dateupdated,11,2); //get the hour + $minute=substr($dateupdated,14,2); //get the minute + $second=substr($dateupdated,17,2); //get the sec + $dutimestamp = strtotime("$year-$month-$day $hour:$minute:$second"); + + $dateadded = gmdate("F d, Y g:i:sa", $datimestamp); //gmdate("F d, Y", $datimestamp); + $dateupdated = gmdate("F d, Y g:i:sa", $dutimestamp); //gmdate("F d, Y", $dutimestamp); + +//Rating +if (!$rating) { $rating="0"; } +?> + + + +\n"; +//echo"
"; //Why?!? +if ($previewuri) { +list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); + +echo"\"$name"; +} + +//Upper-Right Side Box +echo"\n"; + +echo"
"; +echo"$name $version
"; +echo"By $authors
"; +echo"
"; + +//Description & Version Notes +echo""; +echo"$description
"; +if ($notes) {echo"$notes"; } +echo"
\n"; + +//echo"
\n"; +echo"
\n\n"; + +$page = $_GET["page"]; +if (!$page or $page=="general") { +?> +
+0) { +$time .= "$time_minutes minutes "; +} +$time .="$time_seconds seconds"; + +echo" +Released on $verdateadded
+
"; +if ($appname=="Thunderbird") { +echo"\"\" ( Download Now )
"; +} else { +//Make Theme Install work again, Bug 246754 +//echo"\"\" ( Install Now )
"; +} +echo" +  $filesize KB, ($time @ $speed"."k)
+
"; +if ($application=="thunderbird") { +echo"Theme Install Instructions for Thunderbird Users:
+(1) 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.";} + +echo" +
+ +
+
User Comments:
+
+"; +echo"$commenttitle"; +echo""; + +for ($i = 1; $i <= $rating; $i++) { +echo"\"*\""; +} +for ($i = $i; $i <= 5; $i++) { +echo"\"\""; +} +echo""; +echo"
"; +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"
"; +echo"Nobody's Commented on this Extension Yet
"; +echo"Be the First! Rate It!"; +echo"
"; +} + +?> + +
+ +"; +echo"Recent Releases:
"; +echo""; + +$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' +ORDER BY `Version` DESC, `OSName` ASC +LIMIT 0, 10"; + + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + while ($row = mysql_fetch_array($sql_result)) { + $vid = $row["vID"]; + $minappver = $row["MinAppVer"]; + $maxappver = $row["MaxAppVer"]; + $filesize = $row["Size"]; + $notes = $row["Notes"]; + $version = $row["Version"]; + $uri = $row["URI"]; + $osname = $row["OSName"]; + $appname = $row["AppName"]; + +echo"
"; //Open Version DIV + +//Description & Version Notes +echo""; +echo"Version $version
\n"; +if ($notes) {echo"$notes"; } +echo"
\n"; + +//Icon Bar Modules +echo"
"; +echo"
"; +if ($type=="T") { +//Make Theme Install work again, Bug 246754 +//echo""; +echo""; +} else { +echo""; +} +echo"\"\"Install
Size: $filesize kb
"; +echo"
\"$appname Works with:
  $minappver - $maxappver
"; +echo"
\"\"OS:
"; if($osname=="ALL") {echo"All OSes";} else {echo"$osname";} echo"
"; +echo"
"; + +echo"
"; +} + +//End General Page +} else if ($page=="comments") { +//Comments/Ratings Page +echo"
"; +echo"User Comments:
"; +echo"
"; +$sql = "SELECT CommentName, CommentTitle, CommentNote, CommentDate, CommentVote FROM `t_feedback` WHERE ID = '$_GET[id]' AND CommentNote IS NOT NULL ORDER BY `CommentDate` ASC"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $num_results = mysql_num_rows($sql_result); + while ($row = mysql_fetch_array($sql_result)) { + $name = $row["CommentName"]; + $title = $row["CommentTitle"]; + $notes = $row["CommentNote"]; + $date = $row["CommentDate"]; + $rating = $row["CommentVote"]; + +echo"
"; +echo"$title"; +echo""; + +for ($i = 1; $i <= $rating; $i++) { +echo"\"*\""; +} +for ($i = $i; $i <= 5; $i++) { +echo"\"\""; +} +echo""; +echo"
"; +echo"$notes
\n\n"; + +echo"
\n"; +echo"Posted on $date by $name
"; +echo"
\n"; +} + +if ($num_results=="0") { +echo"
"; +echo"Nobody has commented on this extension yet...
+Be the First! +Leave your comments..."; +echo"
\n"; +} + + +echo"
"; + +} else if ($page=="staffreview") { +//Staff/Editor Review Tab +echo"
"; +echo"Editor Review:
"; +echo"
"; + +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 = gmdate("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 extension, view the User Comments... +
+"; + + +} +echo"
\n"; + +} else if ($page=="opinion") { +//My Opinion Tab +echo"
"; +echo"Your Rating / Feedback:
"; +echo"
"; +?> +\n +Your comment submission had the following error(s), please fix these errors and try again.
\n +   Rating field cannot be left blank.
\n +\n"; +} +?> +
+
+"> +"> +Your Name:
+
+ +Rating:*
+
+ +Title:
+
+ +Review/Comments:
+
+     No Comment?
+  
+* Required Fields +
+ +
+"; +echo"Date Added: $dateadded | Last Updated: $dateupdated | "; +echo"Total Downloads: $downloadcount
"; +echo"\n"; +echo"\n"; +echo"
\n"; +?> + + + \ No newline at end of file diff --git a/mozilla/webtools/update/themes/showlist.php b/mozilla/webtools/update/themes/showlist.php index 330213d4eee..435b8abcf1e 100644 --- a/mozilla/webtools/update/themes/showlist.php +++ b/mozilla/webtools/update/themes/showlist.php @@ -1,501 +1,501 @@ - -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** -?> - - - - - -"Extensions","T"=>"Themes","U"=>"Updates"); -$typename = $types["$type"]; - - -//RSS Autodiscovery Link -switch ($_SESSION["category"]) { - case "Newest": - $rsslist = "newest"; - break; - case "Popular": - $rsslist = "popular"; - break; - case "Top Rated": - $rsslist = "rated"; - break; -} - -$rssfeed = "rss/?application=" . $application . "&type=" . $type . "&list=" . $rsslist; - -if (!$category) {$categoryname = "All $typename"; } else {$categoryname = $category; } -?> - - - - -Mozilla Update :: Themes - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?> - - -"; -} -?> - - -\n"; // Begin Content Area - -//Query for List Creation -$s = "0"; -$startpoint = ($pageid-1)*$items_per_page; -if ($category=="Editors Pick" or $category=="Newest" or $category=="Popular" or $category=="Top Rated") { -if ($category =="Editors Pick") { -$editorpick="true"; -} else if ($category =="Newest") { -$orderby = "TV.DateAdded DESC, `Name` ASC"; -} else if ($category =="Popular") { -$orderby = "TM.TotalDownloads DESC, `Name` ASC"; -} else if ($category =="Top Rated") { -$orderby = "TM.Rating DESC, `Name` ASC"; -} -$catname = $category; -$category = "%"; -} - -if ($app_version=="0.10") {$app_version="0.95"; } -$sql = "SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TM.TotalDownloads, TV.vID, -SUBSTRING(MAX(CONCAT(LPAD(TV.Version, 6, '0'), TV.vID)), 7) AS MAXvID, -MAX(TV.Version) AS Version, -TA.AppName, TOS.OSName -FROM `t_main` TM -INNER JOIN t_version TV ON TM.ID = TV.ID -INNER JOIN t_applications TA ON TV.AppID = TA.AppID -INNER JOIN t_os TOS ON TV.OSID = TOS.OSID "; -if ($category && $category !=="%") { $sql .="INNER JOIN t_categoryxref TCX ON TM.ID = TCX.ID -INNER JOIN t_categories TC ON TCX.CategoryID = TC.CategoryID "; } -if ($editorpick=="true") { $sql .="INNER JOIN t_reviews TR ON TM.ID = TR.ID "; } -$sql .="WHERE Type = '$type' AND AppName = '$application' AND `approved` = 'YES' "; -if ($editorpick=="true") { $sql .="AND TR.Pick = 'YES' "; } -if ($category && $category !=="%") {$sql .="AND CatName LIKE '$category' ";} -if ($app_version) { $sql .=" AND TV.MinAppVer_int <= '".strtolower($app_version)."' AND TV.MaxAppVer_int >= '".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') "; } -$sql .="GROUP BY `Name` "; -if ($orderby) { -$sql .="ORDER BY $orderby"; -} else { -$sql .="ORDER BY `Name` , `Version` DESC "; -} -$resultsquery = $sql; -unset($sql); - -//Get Total Results from Result Query & Populate Page Control Vars. - $sql_result = mysql_query($resultsquery, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - $totalresults = mysql_num_rows($sql_result); - - $num_pages = ceil($totalresults/$items_per_page); //Total # of Pages - 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"]; } -//$resultsquery = str_replace("GROUP BY `Name` ", "", $resultsquery); -$resultsquery .= " LIMIT $startpoint , $items_per_page"; //Append LIMIT clause to result query - -if ($category=="%") {$category = $catname; unset($catname); } - -//Now Showing Box -echo"
"; -if (!$OS) {$OS="all";} -if (!$category) {$categoryname="All"; } else {$categoryname = $category;} -echo"
"; -$previd=$pageid-1; -if ($previd >"0") { -echo"« Previous · "; -} -echo"Page $pageid of $num_pages"; - - -$nextid=$pageid+1; -if ($pageid <$num_pages) { -echo" · Next »"; -} - -echo"
\n"; - -echo"".ucwords("$application $typename » $categoryname ")."
"; -echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; - - - -// Modify List Form - -echo"
"; -echo"
\n"; - -//Items-Per-Page -echo"Show/Page: "; -$perpage = array("5","10","20","50"); -echo"\n"; - -// Operating Systems -echo" OS: "; -echo"\n"; - - -//Versions of Application -echo"Versions: "; -echo"\n"; -echo""; -echo"
"; -echo"
"; - -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_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"]; - $authorids[$row[UserName]] = $row["UserID"]; - } - -//Assemble a display application version array -$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`"; - $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); - while ($row = mysql_fetch_array($sql_result)) { - $version = $row["Version"]; - $subver = $row["SubVer"]; - $release = "$row[major].$row[minor]"; - if ($row["release"]) {$release = ".$release$row[release]";} - if ($subver !=="final") {$release="$release$subver";} - - $appvernames[$release] = $version; - } - -//Query to Generate List.. -$sql = "$resultsquery"; - $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"]; - $type = $row["Type"]; - $name = $row["Name"]; - $dateadded = $row["DateAdded"]; - $dateupdated = $row["DateUpdated"]; - $homepage = $row["Homepage"]; - $description = $row["Description"]; - $rating = $row["Rating"]; - $authors = $authorarray[$name]; - $osname = $row["OSName"]; - $appname = $row["AppName"]; - $downloadcount = $row["TotalDownloads"]; - -//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, TP.PreviewURI FROM `t_version` TV -//LEFT JOIN t_previews TP ON TV.vID = TP.vID -//WHERE TV.vID = '$row[MAXvID]' LIMIT 1"; - -$sql2 = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes, TP.PreviewURI FROM `t_version` TV -LEFT JOIN t_previews TP ON TV.vID = TP.vID -INNER JOIN t_applications TA ON TV.AppID = TA.AppID -INNER JOIN t_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); - $row = mysql_fetch_array($sql_result2); - - $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"]; } - $VerDateAdded = $row["VerDateAdded"]; - $VerDateUpdated = $row["VerDateUpdated"]; - $filesize = $row["Size"]; - $notes = $row["Notes"]; - $version = $row["Version"]; - $uri = $row["URI"]; - $previewuri = $row["PreviewURI"]; - - -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.. - -//Create Customizeable Timestamp - $day=substr($dateupdated,8,2); //get the day - $month=substr($dateupdated,5,2); //get the month - $year=substr($dateupdated,0,4); //get the year - $hour=substr($dateupdated,11,2); //get the hour - $minute=substr($dateupdated,14,2); //get the minute - $second=substr($dateupdated,17,2); //get the sec - $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); - $dateupdated = gmdate("F d, Y g:i:sa", $timestamp); //gmdate("F d, Y g:i:sa T", $timestamp); - - -echo"
\n"; -//echo"
"; //Not sure why this is here, it caused text to flood out of the box though. - -if ($previewuri) { -list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); - -echo"\"$name"; -} - -//Upper-Right Side Box -echo"\n"; - - -echo"
"; -echo"$name $version
"; -echo"By $authors
"; -echo"
"; - -//Description & Version Notes -echo""; -echo"$description
"; -if ($notes) {echo"$notes"; } -echo"
\n"; -echo"
"; -//echo"
"; - -//Icon Bar Modules -echo"
"; -echo"
"; - -if ($appname=="Thunderbird") { -echo"\"\"More Info"; -} else { -//Make Theme Install work again, Bug 246754 -//echo""; -echo""; -echo"\"\"Install"; -} -echo"
Size: $filesize kb
"; - -if ($homepage) {echo"";} -echo"
\"$appname\" Works with:
  $minappver - $maxappver
"; -if ($osname !=="ALL") { -echo"
\"\"OS:
$osname
"; -} -echo"
"; - -echo"
Updated: $dateupdated | Total Downloads: $downloadcount
\n"; -echo"
\n"; - -} //End While Loop -if ($totalresults=="0") { -echo"
\n"; -echo"No themes found in this category for ".ucwords($application).".\n"; -echo"
\n"; - -} -?> - - - - -"; - - -echo"
"; -$previd=$pageid-1; -if ($previd >"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: "; -$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++; -} -} - -echo"
\n"; - -echo"".ucwords("$application $typename » $categoryname ")."
"; -echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; - -echo"\n"; -} - -echo"\n"; //End Content -?> - - + +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** +?> + + + + + +"Extensions","T"=>"Themes","U"=>"Updates"); +$typename = $types["$type"]; + + +//RSS Autodiscovery Link +switch ($_SESSION["category"]) { + case "Newest": + $rsslist = "newest"; + break; + case "Popular": + $rsslist = "popular"; + break; + case "Top Rated": + $rsslist = "rated"; + break; +} + +$rssfeed = "rss/?application=" . $application . "&type=" . $type . "&list=" . $rsslist; + +if (!$category) {$categoryname = "All $typename"; } else {$categoryname = $category; } +?> + + + + +Mozilla Update :: Themes - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?> + + +"; +} +?> + + +\n"; // Begin Content Area + +//Query for List Creation +$s = "0"; +$startpoint = ($pageid-1)*$items_per_page; +if ($category=="Editors Pick" or $category=="Newest" or $category=="Popular" or $category=="Top Rated") { +if ($category =="Editors Pick") { +$editorpick="true"; +} else if ($category =="Newest") { +$orderby = "TV.DateAdded DESC, `Name` ASC"; +} else if ($category =="Popular") { +$orderby = "TM.TotalDownloads DESC, `Name` ASC"; +} else if ($category =="Top Rated") { +$orderby = "TM.Rating DESC, `Name` ASC"; +} +$catname = $category; +$category = "%"; +} + +if ($app_version=="0.10") {$app_version="0.95"; } +$sql = "SELECT TM.ID, TM.Name, TM.DateAdded, TM.DateUpdated, TM.Homepage, TM.Description, TM.Rating, TM.TotalDownloads, TV.vID, +SUBSTRING(MAX(CONCAT(LPAD(TV.Version, 6, '0'), TV.vID)), 7) AS MAXvID, +MAX(TV.Version) AS Version, +TA.AppName, TOS.OSName +FROM `t_main` TM +INNER JOIN t_version TV ON TM.ID = TV.ID +INNER JOIN t_applications TA ON TV.AppID = TA.AppID +INNER JOIN t_os TOS ON TV.OSID = TOS.OSID "; +if ($category && $category !=="%") { $sql .="INNER JOIN t_categoryxref TCX ON TM.ID = TCX.ID +INNER JOIN t_categories TC ON TCX.CategoryID = TC.CategoryID "; } +if ($editorpick=="true") { $sql .="INNER JOIN t_reviews TR ON TM.ID = TR.ID "; } +$sql .="WHERE Type = '$type' AND AppName = '$application' AND `approved` = 'YES' "; +if ($editorpick=="true") { $sql .="AND TR.Pick = 'YES' "; } +if ($category && $category !=="%") {$sql .="AND CatName LIKE '$category' ";} +if ($app_version) { $sql .=" AND TV.MinAppVer_int <= '".strtolower($app_version)."' AND TV.MaxAppVer_int >= '".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') "; } +$sql .="GROUP BY `Name` "; +if ($orderby) { +$sql .="ORDER BY $orderby"; +} else { +$sql .="ORDER BY `Name` , `Version` DESC "; +} +$resultsquery = $sql; +unset($sql); + +//Get Total Results from Result Query & Populate Page Control Vars. + $sql_result = mysql_query($resultsquery, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + $totalresults = mysql_num_rows($sql_result); + + $num_pages = ceil($totalresults/$items_per_page); //Total # of Pages + 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"]; } +//$resultsquery = str_replace("GROUP BY `Name` ", "", $resultsquery); +$resultsquery .= " LIMIT $startpoint , $items_per_page"; //Append LIMIT clause to result query + +if ($category=="%") {$category = $catname; unset($catname); } + +//Now Showing Box +echo"
"; +if (!$OS) {$OS="all";} +if (!$category) {$categoryname="All"; } else {$categoryname = $category;} +echo"
"; +$previd=$pageid-1; +if ($previd >"0") { +echo"« Previous · "; +} +echo"Page $pageid of $num_pages"; + + +$nextid=$pageid+1; +if ($pageid <$num_pages) { +echo" · Next »"; +} + +echo"
\n"; + +echo"".ucwords("$application $typename » $categoryname ")."
"; +echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; + + + +// Modify List Form + +echo"
"; +echo"
\n"; + +//Items-Per-Page +echo"Show/Page: "; +$perpage = array("5","10","20","50"); +echo"\n"; + +// Operating Systems +echo" OS: "; +echo"\n"; + + +//Versions of Application +echo"Versions: "; +echo"\n"; +echo""; +echo"
"; +echo"
"; + +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_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"]; + $authorids[$row[UserName]] = $row["UserID"]; + } + +//Assemble a display application version array +$sql = "SELECT `Version`, `major`, `minor`, `release`, `SubVer` FROM `t_applications` WHERE `AppName`='$application' ORDER BY `major`,`minor`"; + $sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE); + while ($row = mysql_fetch_array($sql_result)) { + $version = $row["Version"]; + $subver = $row["SubVer"]; + $release = "$row[major].$row[minor]"; + if ($row["release"]) {$release = ".$release$row[release]";} + if ($subver !=="final") {$release="$release$subver";} + + $appvernames[$release] = $version; + } + +//Query to Generate List.. +$sql = "$resultsquery"; + $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"]; + $type = $row["Type"]; + $name = $row["Name"]; + $dateadded = $row["DateAdded"]; + $dateupdated = $row["DateUpdated"]; + $homepage = $row["Homepage"]; + $description = $row["Description"]; + $rating = $row["Rating"]; + $authors = $authorarray[$name]; + $osname = $row["OSName"]; + $appname = $row["AppName"]; + $downloadcount = $row["TotalDownloads"]; + +//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, TP.PreviewURI FROM `t_version` TV +//LEFT JOIN t_previews TP ON TV.vID = TP.vID +//WHERE TV.vID = '$row[MAXvID]' LIMIT 1"; + +$sql2 = "SELECT TV.vID, TV.Version, TV.MinAppVer, TV.MaxAppVer, TV.Size, TV.DateAdded AS VerDateAdded, TV.DateUpdated AS VerDateUpdated, TV.URI, TV.Notes, TP.PreviewURI FROM `t_version` TV +LEFT JOIN t_previews TP ON TV.vID = TP.vID +INNER JOIN t_applications TA ON TV.AppID = TA.AppID +INNER JOIN t_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); + $row = mysql_fetch_array($sql_result2); + + $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"]; } + $VerDateAdded = $row["VerDateAdded"]; + $VerDateUpdated = $row["VerDateUpdated"]; + $filesize = $row["Size"]; + $notes = $row["Notes"]; + $version = $row["Version"]; + $uri = $row["URI"]; + $previewuri = $row["PreviewURI"]; + + +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.. + +//Create Customizeable Timestamp + $day=substr($dateupdated,8,2); //get the day + $month=substr($dateupdated,5,2); //get the month + $year=substr($dateupdated,0,4); //get the year + $hour=substr($dateupdated,11,2); //get the hour + $minute=substr($dateupdated,14,2); //get the minute + $second=substr($dateupdated,17,2); //get the sec + $timestamp = strtotime("$year-$month-$day $hour:$minute:$second"); + $dateupdated = gmdate("F d, Y g:i:sa", $timestamp); //gmdate("F d, Y g:i:sa T", $timestamp); + + +echo"
\n"; +//echo"
"; //Not sure why this is here, it caused text to flood out of the box though. + +if ($previewuri) { +list($width, $height, $imagetype, $attr) = getimagesize("$websitepath"."$previewuri"); + +echo"\"$name"; +} + +//Upper-Right Side Box +echo"\n"; + + +echo"
"; +echo"$name $version
"; +echo"By $authors
"; +echo"
"; + +//Description & Version Notes +echo""; +echo"$description
"; +if ($notes) {echo"$notes"; } +echo"
\n"; +echo"
"; +//echo"
"; + +//Icon Bar Modules +echo"
"; +echo"
"; + +if ($appname=="Thunderbird") { +echo"\"\"More Info"; +} else { +//Make Theme Install work again, Bug 246754 +//echo""; +echo""; +echo"\"\"Install"; +} +echo"
Size: $filesize kb
"; + +if ($homepage) {echo"";} +echo"
\"$appname\" Works with:
  $minappver - $maxappver
"; +if ($osname !=="ALL") { +echo"
\"\"OS:
$osname
"; +} +echo"
"; + +echo"
Updated: $dateupdated | Total Downloads: $downloadcount
\n"; +echo"
\n"; + +} //End While Loop +if ($totalresults=="0") { +echo"
\n"; +echo"No themes found in this category for ".ucwords($application).".\n"; +echo"
\n"; + +} +?> + + + + +"; + + +echo"
"; +$previd=$pageid-1; +if ($previd >"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: "; +$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++; +} +} + +echo"
\n"; + +echo"".ucwords("$application $typename » $categoryname ")."
"; +echo"".ucwords("$typename")." $startitem - $enditem of $totalresults"; + +echo"\n"; +} + +echo"\n"; //End Content +?> + + \ No newline at end of file