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.
This commit is contained in:
Родитель
a1e9c15ad9
Коммит
bf7ac19aa9
|
@ -1,73 +1,73 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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
|
||||
|
||||
?>
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,132 +1,133 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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; }
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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; }
|
||||
?>
|
|
@ -1,96 +1,96 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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"<TITLE>Mozilla Update :: Error</TITLE>\n";
|
||||
echo"<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"/core/update.css\">\n";
|
||||
include"$page_header";
|
||||
|
||||
echo"<DIV class=\"contentbox\" style=\"border-color: #F00; width: 90%; margin: auto; min-height: 250px; margin-bottom: 5px\">\n";
|
||||
echo"<DIV class=\"boxheader\">Mozilla Update :: Error</DIV>\n";
|
||||
echo"<SPAN style=\"font-size: 12pt\">\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.<BR><BR>
|
||||
Error $reason: $custom_message<BR><BR>
|
||||
<A HREF=\"javascript:history.back()\">«« Go Back to Previous Page</A>";
|
||||
echo"</SPAN></DIV>\n";
|
||||
include"$page_footer";
|
||||
exit;
|
||||
}
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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"<TITLE>Mozilla Update :: Error</TITLE>\n";
|
||||
echo"<LINK REL=\"STYLESHEET\" TYPE=\"text/css\" HREF=\"/core/update.css\">\n";
|
||||
include"$page_header";
|
||||
|
||||
echo"<DIV class=\"contentbox\" style=\"border-color: #F00; width: 90%; margin: auto; min-height: 250px; margin-bottom: 5px\">\n";
|
||||
echo"<DIV class=\"boxheader\">Mozilla Update :: Error</DIV>\n";
|
||||
echo"<SPAN style=\"font-size: 12pt\">\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.<BR><BR>
|
||||
Error $reason: $custom_message<BR><BR>
|
||||
<A HREF=\"javascript:history.back()\">«« Go Back to Previous Page</A>";
|
||||
echo"</SPAN></DIV>\n";
|
||||
include"$page_footer";
|
||||
exit;
|
||||
}
|
||||
?>
|
|
@ -1,91 +1,91 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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;
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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;
|
||||
?>
|
|
@ -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 <psychoticwolf@carolina.rr.com>
|
||||
*
|
||||
* 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 <psychoticwolf@carolina.rr.com>
|
||||
*
|
||||
* 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
|
||||
}
|
||||
|
|
|
@ -1,97 +1,101 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
//Get Full Information for the file requested.
|
||||
$sql = "SELECT `URI` FROM `t_version` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' 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);
|
||||
$uri=$row["URI"];
|
||||
|
||||
// New DownloadCount management Code..
|
||||
//Check for user, to see if they recently accessed this file (filters duplicate/triplicate+ requests in a short period).
|
||||
$maxlife = date("YmdHis", mktime(date("H"), date("i")-10, date("s"), date("m"), date("d"), date("Y")));
|
||||
$sql = "SELECT `dID` FROM `t_downloads` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' AND `user_ip`='$_SERVER[REMOTE_ADDR]' AND `user_agent` = '$_SERVER[HTTP_USER_AGENT]' AND `date`>'$maxlife' AND `type`='download' LIMIT 1";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
if (mysql_num_rows($sql_result)=="0") {
|
||||
//Insert a record of this download for the next 10 minutes anyway. :-)
|
||||
$today=date("YmdHis");
|
||||
$sql = "INSERT INTO `t_downloads` (`ID`,`date`,`vID`, `user_ip`, `user_agent`, `type`) VALUES ('$_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")
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
//Get Full Information for the file requested.
|
||||
$sql = "SELECT `URI` FROM `t_version` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' 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);
|
||||
$uri=$row["URI"];
|
||||
|
||||
// New DownloadCount management Code..
|
||||
//Check for user, to see if they recently accessed this file (filters duplicate/triplicate+ requests in a short period).
|
||||
$maxlife = date("YmdHis", mktime(date("H"), date("i")-10, date("s"), date("m"), date("d"), date("Y")));
|
||||
$sql = "SELECT `dID` FROM `t_downloads` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' AND `user_ip`='$_SERVER[REMOTE_ADDR]' AND `user_agent` = '$_SERVER[HTTP_USER_AGENT]' AND `date`>'$maxlife' AND `type`='download' LIMIT 1";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
if (mysql_num_rows($sql_result)=="0") {
|
||||
//Insert a record of this download for the next 10 minutes anyway. :-)
|
||||
$today=date("YmdHis");
|
||||
$sql = "INSERT INTO `t_downloads` (`ID`,`date`,`vID`, `user_ip`, `user_agent`, `type`) VALUES ('$_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")
|
||||
?>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,484 +1,483 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<html lang="EN" dir="ltr">
|
||||
<head>
|
||||
|
||||
<?php
|
||||
//----------------------------
|
||||
//Global General $_GET variables
|
||||
//----------------------------
|
||||
//Detection Override
|
||||
if ($_GET["version"]) {$app_version=$_GET["version"]; $_SESSION["app_version"]=$_GET["version"];}
|
||||
|
||||
if ($_GET["numpg"]) {$_SESSION["items_per_page"]=$_GET["numpg"]; }
|
||||
if ($_SESSION["items_per_page"]) {$items_per_page = $_SESSION["items_per_page"];} else {$items_per_page="10";}//Default Num per Page is 10
|
||||
|
||||
if ($_GET["category"]) { $_SESSION["category"] = $_GET["category"]; }
|
||||
if ($_SESSION["category"]) {$category = $_SESSION["category"];}
|
||||
if ($category=="All") {$category="";}
|
||||
|
||||
|
||||
if (!$_GET["pageid"]) {$pageid="1"; } else { $pageid = $_GET["pageid"]; } //Default PageID is 1
|
||||
$type="E"; //Default Type is E
|
||||
|
||||
unset($typename);
|
||||
$types = array("E"=>"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; }
|
||||
?>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<TITLE>Mozilla Update :: Extensions - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?></TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
|
||||
<?php
|
||||
if ($rsslist) {
|
||||
echo"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"http://$_SERVER[HTTP_HOST]/$rssfeed\">";
|
||||
}
|
||||
?>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<?php
|
||||
include"$page_header";
|
||||
|
||||
// -----------------------------------------------
|
||||
// Begin Content of the Page Here
|
||||
// -----------------------------------------------
|
||||
|
||||
include"inc_sidebar.php";
|
||||
|
||||
echo"<DIV id=\"content\">\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"<DIV id=\"listnav\">";
|
||||
if (!$OS) {$OS="all";}
|
||||
if (!$category) {$categoryname="All"; } else {$categoryname = $category;}
|
||||
echo"<DIV class=\"pagenum\" "; if ($application!="mozilla") {echo" style=\"margin-right: 95px;\""; } echo">";
|
||||
$previd=$pageid-1;
|
||||
if ($previd >"0") {
|
||||
echo"<a href=\"?pageid=$previd\">« Previous</A> · ";
|
||||
}
|
||||
echo"Page $pageid of $num_pages";
|
||||
|
||||
$nextid=$pageid+1;
|
||||
if ($pageid <$num_pages) {
|
||||
echo" · <a href=\"?pageid=$nextid\">Next »</a>";
|
||||
}
|
||||
|
||||
echo"</DIV>\n";
|
||||
|
||||
echo"<SPAN class=\"listtitle\">".ucwords("$application $typename » $categoryname ")."</SPAN><br>";
|
||||
echo"".ucwords("$typename")." $startitem - $enditem of $totalresults";
|
||||
|
||||
|
||||
// Modify List Form
|
||||
|
||||
echo"<DIV class=\"listform\">";
|
||||
echo"<FORM NAME=\"listviews\" METHOD=\"GET\" ACTION=\"showlist.php\">\n";
|
||||
|
||||
//Items-Per-Page
|
||||
echo"Show/Page: ";
|
||||
$perpage = array("5","10","20","50");
|
||||
echo"<SELECT name=\"numpg\">";
|
||||
foreach ($perpage as $value) {
|
||||
echo"<OPTION value=\"$value\"";
|
||||
if ($items_per_page==$value) {echo" SELECTED"; }
|
||||
echo">$value</OPTION>";
|
||||
}
|
||||
echo"</SELECT>\n";
|
||||
|
||||
|
||||
// Operating Systems
|
||||
echo" OS: ";
|
||||
echo"<SELECT name=\"os\">\n";
|
||||
$sql = "SELECT `OSName` FROM `t_os` ORDER BY `OSName`";
|
||||
$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)) {
|
||||
$osname = $row["OSName"];
|
||||
echo"<OPTION value=\"".strtolower($osname)."\"";
|
||||
if (strtolower($OS) == strtolower($osname)) {echo" SELECTED";}
|
||||
echo">$osname</OPTION>";
|
||||
}
|
||||
echo"</SELECT>\n";
|
||||
|
||||
|
||||
//Versions of Application
|
||||
echo"Versions: ";
|
||||
echo"<SELECT name=\"version\">";
|
||||
if ($application != "thunderbird") {echo"<OPTION value=\"auto-detect\">Auto-Detect</OPTION>";}
|
||||
$app_orig = $application; //Store original to protect against possible corruption
|
||||
$sql = "SELECT `Version`, `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);
|
||||
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 ($app_version=="0.95") {$app_version="0.10"; }
|
||||
//Firesomething Support
|
||||
if ($application=="firefox" AND $row["major"]="0" AND $row["minor"]<"8") {$application="firebird";} else {$application="firefox";}
|
||||
|
||||
if ($subver !=="final") {$release="$release$subver";}
|
||||
echo"<OPTION value=\"$release\"";
|
||||
if ($app_version == $release) {echo" SELECTED"; }
|
||||
echo">".ucwords($application)." $version</OPTION>";
|
||||
|
||||
if ($app_version=="0.10") {$app_version="0.95"; }
|
||||
}
|
||||
$application = $app_orig; unset($app_orig);
|
||||
|
||||
|
||||
echo"</SELECT>\n";
|
||||
echo"<INPUT NAME=\"submit\" TYPE=\"SUBMIT\" VALUE=\"Update\">";
|
||||
echo"</FORM>";
|
||||
echo"</DIV>";
|
||||
|
||||
echo"</DIV>\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 .= "<A HREF=\"authorprofiles.php?id=$userid\">$author</A>";
|
||||
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"<DIV class=\"item\">\n";
|
||||
//echo"<DIV style=\"height: 100px\">"; //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"<IMG SRC=\"$previewuri\" BORDER=0 HEIGHT=$height WIDTH=$width STYLE=\"float: right; padding-right: 5px\" ALT=\"$name preview\">";
|
||||
}
|
||||
|
||||
|
||||
//Upper-Right Side Box
|
||||
echo"<DIV class=\"liststars\" title=\"$rating of 5 stars\" style=\"font-size: 8pt\"><A HREF=\"moreinfo.php?id=$id&page=comments\">";
|
||||
for ($i = 1; $i <= floor($rating); $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
if ($rating>floor($rating)) {
|
||||
$val = ($rating-floor($rating))*10;
|
||||
echo"<IMG SRC=\"/images/stars/star_0$val.png\" BORDER=0 ALT=\"\">";
|
||||
$i++;
|
||||
}
|
||||
for ($i = $i; $i <= 5; $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
echo"</A></DIV>\n";
|
||||
|
||||
|
||||
echo"<DIV class=\"itemtitle\">";
|
||||
echo"<SPAN class=\"title\"><A HREF=\"moreinfo.php?id=$id&vid=$vid\">$name $version</A></SPAN><BR>";
|
||||
echo"<SPAN class=\"authorline\">By $authors</SPAN><br>";
|
||||
echo"</DIV>";
|
||||
|
||||
//Description & Version Notes
|
||||
echo"<SPAN class=\"itemdescription\">";
|
||||
echo"$description<BR>";
|
||||
if ($notes) {echo"$notes"; }
|
||||
echo"</SPAN>\n";
|
||||
echo"<BR>";
|
||||
//echo"</DIV>";
|
||||
|
||||
//Icon Bar Modules
|
||||
echo"<DIV style=\"height: 34px\">";
|
||||
echo"<DIV class=\"iconbar\" style=\"width: 104px;\">";
|
||||
if ($appname=="Thunderbird") {
|
||||
echo"<A HREF=\"moreinfo.php?id=$id&vid=$vid\"><IMG SRC=\"/images/download.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"More Info about $name\" ALT=\"\">More Info</A>";
|
||||
} else {
|
||||
echo"<A HREF=\"install.php/$filename?id=$id&vid=$vid\"><IMG SRC=\"/images/download.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"Install $name\" ALT=\"\">Install</A>";
|
||||
}
|
||||
echo"<BR><SPAN class=\"filesize\">Size: $filesize kb</SPAN></DIV>";
|
||||
if ($homepage) {echo"<DIV class=\"iconbar\" style=\"width: 98px;\"><A HREF=\"$homepage\"><IMG SRC=\"/images/home.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"$name Homepage\" ALT=\"\">Homepage</A></DIV>";}
|
||||
echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/$appname"."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float: left\" ALT=\"$appname\"> Works with:<BR> $minappver - $maxappver</DIV>";
|
||||
if($osname !=="ALL") { echo"<DIV class=\"iconbar\" style=\"width: 85px;\"><IMG SRC=\"/images/$osname"."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float: left\" ALT=\"\">OS:<BR>$osname</DIV>"; }
|
||||
echo"</DIV>";
|
||||
|
||||
echo"<DIV class=\"baseline\">Updated: $dateupdated | Total Downloads: $downloadcount<BR></DIV>\n";
|
||||
echo"</DIV>\n";
|
||||
|
||||
} //End While Loop
|
||||
if ($totalresults=="0") {
|
||||
echo"<DIV class=\"item noitems\">\n";
|
||||
echo"No extensions found in this category for ".ucwords($application).".\n";
|
||||
echo"</DIV>\n";
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
// Begin PHP Code for Dynamic Navbars
|
||||
if ($pageid <=$num_pages) {
|
||||
echo"<DIV id=\"listnav\">";
|
||||
|
||||
|
||||
echo"<DIV class=\"pagenum\">";
|
||||
$previd=$pageid-1;
|
||||
if ($previd >"0") {
|
||||
echo"<a href=\"?pageid=$previd\">« Previous</A> · ";
|
||||
}
|
||||
echo"Page $pageid of $num_pages";
|
||||
|
||||
|
||||
$nextid=$pageid+1;
|
||||
if ($pageid <$num_pages) {
|
||||
echo" · <a href=\"?pageid=$nextid\">Next »</a>";
|
||||
}
|
||||
echo"<BR>\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"<SPAN style=\"color: #FF0000\">$i</SPAN> ";
|
||||
} else {
|
||||
echo"<A HREF=\"?pageid=$i\">$i</A> ";
|
||||
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
echo"</DIV>\n";
|
||||
|
||||
echo"<SPAN class=\"listtitle\">".ucwords("$application $typename » $categoryname ")."</SPAN><br>";
|
||||
echo"".ucwords("$typename")." $startitem - $enditem of $totalresults";
|
||||
|
||||
echo"</DIV>\n";
|
||||
}
|
||||
|
||||
echo"</DIV>\n"; //End Content
|
||||
?>
|
||||
<?php
|
||||
include"$page_footer";
|
||||
?>
|
||||
</BODY>
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<html lang="EN" dir="ltr">
|
||||
<head>
|
||||
|
||||
<?php
|
||||
//----------------------------
|
||||
//Global General $_GET variables
|
||||
//----------------------------
|
||||
//Detection Override
|
||||
if ($_GET["version"]) {$app_version=$_GET["version"]; $_SESSION["app_version"]=$_GET["version"];}
|
||||
|
||||
if ($_GET["numpg"]) {$_SESSION["items_per_page"]=$_GET["numpg"]; }
|
||||
if ($_SESSION["items_per_page"]) {$items_per_page = $_SESSION["items_per_page"];} else {$items_per_page="10";}//Default Num per Page is 10
|
||||
|
||||
if ($_GET["category"]) { $_SESSION["category"] = $_GET["category"]; }
|
||||
if ($_SESSION["category"]) {$category = $_SESSION["category"];}
|
||||
if ($category=="All") {$category="";}
|
||||
|
||||
|
||||
if (!$_GET["pageid"]) {$pageid="1"; } else { $pageid = $_GET["pageid"]; } //Default PageID is 1
|
||||
$type="E"; //Default Type is E
|
||||
|
||||
unset($typename);
|
||||
$types = array("E"=>"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; }
|
||||
?>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<TITLE>Mozilla Update :: Extensions - List - <?php echo"$categoryname"; if ($pageid) {echo" - Page $pageid"; } ?></TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
|
||||
<?php
|
||||
if ($rsslist) {
|
||||
echo"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"http://$_SERVER[HTTP_HOST]/$rssfeed\">";
|
||||
}
|
||||
?>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<?php
|
||||
include"$page_header";
|
||||
|
||||
// -----------------------------------------------
|
||||
// Begin Content of the Page Here
|
||||
// -----------------------------------------------
|
||||
|
||||
include"inc_sidebar.php";
|
||||
|
||||
echo"<DIV id=\"content\">\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"<DIV id=\"listnav\">";
|
||||
if (!$OS) {$OS="all";}
|
||||
if (!$category) {$categoryname="All"; } else {$categoryname = $category;}
|
||||
echo"<DIV class=\"pagenum\" "; if ($application!="mozilla") {echo" style=\"margin-right: 95px;\""; } echo">";
|
||||
$previd=$pageid-1;
|
||||
if ($previd >"0") {
|
||||
echo"<a href=\"?pageid=$previd\">« Previous</A> · ";
|
||||
}
|
||||
echo"Page $pageid of $num_pages";
|
||||
|
||||
$nextid=$pageid+1;
|
||||
if ($pageid <$num_pages) {
|
||||
echo" · <a href=\"?pageid=$nextid\">Next »</a>";
|
||||
}
|
||||
|
||||
echo"</DIV>\n";
|
||||
|
||||
echo"<SPAN class=\"listtitle\">".ucwords("$application $typename » $categoryname ")."</SPAN><br>";
|
||||
echo"".ucwords("$typename")." $startitem - $enditem of $totalresults";
|
||||
|
||||
|
||||
// Modify List Form
|
||||
|
||||
echo"<DIV class=\"listform\">";
|
||||
echo"<FORM NAME=\"listviews\" METHOD=\"GET\" ACTION=\"showlist.php\">\n";
|
||||
|
||||
//Items-Per-Page
|
||||
echo"Show/Page: ";
|
||||
$perpage = array("5","10","20","50");
|
||||
echo"<SELECT name=\"numpg\">";
|
||||
foreach ($perpage as $value) {
|
||||
echo"<OPTION value=\"$value\"";
|
||||
if ($items_per_page==$value) {echo" SELECTED"; }
|
||||
echo">$value</OPTION>";
|
||||
}
|
||||
echo"</SELECT>\n";
|
||||
|
||||
|
||||
// Operating Systems
|
||||
echo" OS: ";
|
||||
echo"<SELECT name=\"os\">\n";
|
||||
$sql = "SELECT `OSName` FROM `t_os` ORDER BY `OSName`";
|
||||
$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)) {
|
||||
$osname = $row["OSName"];
|
||||
echo"<OPTION value=\"".strtolower($osname)."\"";
|
||||
if (strtolower($OS) == strtolower($osname)) {echo" SELECTED";}
|
||||
echo">$osname</OPTION>";
|
||||
}
|
||||
echo"</SELECT>\n";
|
||||
|
||||
|
||||
//Versions of Application
|
||||
echo"Versions: ";
|
||||
echo"<SELECT name=\"version\">";
|
||||
if ($application != "thunderbird") {echo"<OPTION value=\"auto-detect\">Auto-Detect</OPTION>";}
|
||||
$app_orig = $application; //Store original to protect against possible corruption
|
||||
$sql = "SELECT `Version`, `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);
|
||||
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 ($app_version=="0.95") {$app_version="0.10"; }
|
||||
//Firesomething Support
|
||||
if ($application=="firefox") { if ($release == "0.7") {$application="firebird";} else {$application="firefox";} }
|
||||
|
||||
if ($subver !=="final") {$release="$release$subver";}
|
||||
echo"<OPTION value=\"$release\"";
|
||||
if ($app_version == $release) {echo" SELECTED"; }
|
||||
echo">".ucwords($application)." $version</OPTION>";
|
||||
|
||||
if ($app_version=="0.10") {$app_version="0.95"; }
|
||||
}
|
||||
$application = $app_orig; unset($app_orig);
|
||||
|
||||
|
||||
echo"</SELECT>\n";
|
||||
echo"<INPUT NAME=\"submit\" TYPE=\"SUBMIT\" VALUE=\"Update\">";
|
||||
echo"</FORM>";
|
||||
echo"</DIV>";
|
||||
|
||||
echo"</DIV>\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 .= "<A HREF=\"authorprofiles.php?id=$userid\">$author</A>";
|
||||
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"<DIV class=\"item\">\n";
|
||||
//echo"<DIV style=\"height: 100px\">"; //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"<IMG SRC=\"$previewuri\" BORDER=0 HEIGHT=$height WIDTH=$width STYLE=\"float: right; padding-right: 5px\" ALT=\"$name preview\">";
|
||||
}
|
||||
|
||||
|
||||
//Upper-Right Side Box
|
||||
echo"<DIV class=\"liststars\" title=\"$rating of 5 stars\" style=\"font-size: 8pt\"><A HREF=\"moreinfo.php?id=$id&page=comments\">";
|
||||
for ($i = 1; $i <= floor($rating); $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
if ($rating>floor($rating)) {
|
||||
$val = ($rating-floor($rating))*10;
|
||||
echo"<IMG SRC=\"/images/stars/star_0$val.png\" BORDER=0 ALT=\"\">";
|
||||
$i++;
|
||||
}
|
||||
for ($i = $i; $i <= 5; $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
echo"</A></DIV>\n";
|
||||
|
||||
|
||||
echo"<DIV class=\"itemtitle\">";
|
||||
echo"<SPAN class=\"title\"><A HREF=\"moreinfo.php?id=$id&vid=$vid\">$name $version</A></SPAN><BR>";
|
||||
echo"<SPAN class=\"authorline\">By $authors</SPAN><br>";
|
||||
echo"</DIV>";
|
||||
|
||||
//Description & Version Notes
|
||||
echo"<SPAN class=\"itemdescription\">";
|
||||
echo"$description<BR>";
|
||||
if ($notes) {echo"$notes"; }
|
||||
echo"</SPAN>\n";
|
||||
echo"<BR>";
|
||||
//echo"</DIV>";
|
||||
|
||||
//Icon Bar Modules
|
||||
echo"<DIV style=\"height: 34px\">";
|
||||
echo"<DIV class=\"iconbar\" style=\"width: 104px;\">";
|
||||
if ($appname=="Thunderbird") {
|
||||
echo"<A HREF=\"moreinfo.php?id=$id&vid=$vid\"><IMG SRC=\"/images/download.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"More Info about $name\" ALT=\"\">More Info</A>";
|
||||
} else {
|
||||
echo"<A HREF=\"install.php/$filename?id=$id&vid=$vid\"><IMG SRC=\"/images/download.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"Install $name\" ALT=\"\">Install</A>";
|
||||
}
|
||||
echo"<BR><SPAN class=\"filesize\">Size: $filesize kb</SPAN></DIV>";
|
||||
if ($homepage) {echo"<DIV class=\"iconbar\" style=\"width: 98px;\"><A HREF=\"$homepage\"><IMG SRC=\"/images/home.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float:left;\" TITLE=\"$name Homepage\" ALT=\"\">Homepage</A></DIV>";}
|
||||
echo"<DIV class=\"iconbar\"><IMG SRC=\"/images/$appname"."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float: left\" ALT=\"$appname\"> Works with:<BR> $minappver - $maxappver</DIV>";
|
||||
if($osname !=="ALL") { echo"<DIV class=\"iconbar\" style=\"width: 85px;\"><IMG SRC=\"/images/$osname"."_icon.png\" BORDER=0 HEIGHT=34 WIDTH=34 STYLE=\"float: left\" ALT=\"\">OS:<BR>$osname</DIV>"; }
|
||||
echo"</DIV>";
|
||||
|
||||
echo"<DIV class=\"baseline\">Updated: $dateupdated | Total Downloads: $downloadcount<BR></DIV>\n";
|
||||
echo"</DIV>\n";
|
||||
|
||||
} //End While Loop
|
||||
if ($totalresults=="0") {
|
||||
echo"<DIV class=\"item noitems\">\n";
|
||||
echo"No extensions found in this category for ".ucwords($application).".\n";
|
||||
echo"</DIV>\n";
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
// Begin PHP Code for Dynamic Navbars
|
||||
if ($pageid <=$num_pages) {
|
||||
echo"<DIV id=\"listnav\">";
|
||||
|
||||
|
||||
echo"<DIV class=\"pagenum\">";
|
||||
$previd=$pageid-1;
|
||||
if ($previd >"0") {
|
||||
echo"<a href=\"?pageid=$previd\">« Previous</A> · ";
|
||||
}
|
||||
echo"Page $pageid of $num_pages";
|
||||
|
||||
|
||||
$nextid=$pageid+1;
|
||||
if ($pageid <$num_pages) {
|
||||
echo" · <a href=\"?pageid=$nextid\">Next »</a>";
|
||||
}
|
||||
echo"<BR>\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"<SPAN style=\"color: #FF0000\">$i</SPAN> ";
|
||||
} else {
|
||||
echo"<A HREF=\"?pageid=$i\">$i</A> ";
|
||||
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
echo"</DIV>\n";
|
||||
|
||||
echo"<SPAN class=\"listtitle\">".ucwords("$application $typename » $categoryname ")."</SPAN><br>";
|
||||
echo"".ucwords("$typename")." $startitem - $enditem of $totalresults";
|
||||
|
||||
echo"</DIV>\n";
|
||||
}
|
||||
|
||||
echo"</DIV>\n"; //End Content
|
||||
?>
|
||||
<?php
|
||||
include"$page_footer";
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -1,181 +1,180 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
|
||||
<?php
|
||||
require"core/config.php";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<html lang="EN" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<TITLE>Mozilla Update</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<?php
|
||||
include"$page_header";
|
||||
?>
|
||||
|
||||
<DIV class="contentbox" style="margin-left: 2px;">
|
||||
<DIV class="boxheader">Welcome to Mozilla Update</DIV>
|
||||
<SPAN class="itemdescription">
|
||||
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 <A HREF="/faq/">Frequently Asked Questions...</A>
|
||||
|
||||
</SPAN>
|
||||
</DIV>
|
||||
<?php //include"inc_featuredupdate.php"; ?>
|
||||
|
||||
<?php
|
||||
//include"inc_softwareupdate.php";
|
||||
if ($_GET["application"]) {$application=$_GET["application"]; }
|
||||
?>
|
||||
<DIV class="frontpagecontainer">
|
||||
<DIV class="contentbox contentcolumns">
|
||||
<DIV class="boxheader"><?php print(ucwords($application)); ?> Extensions</DIV>
|
||||
<?php
|
||||
$sql = "SELECT TM.ID
|
||||
FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
WHERE `Type` = 'E' AND `AppName` = '$application' AND `approved` = 'YES' GROUP BY TM.ID";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
$numextensions = mysql_num_rows($sql_result);
|
||||
?>
|
||||
<a href="/extensions/">Browse extensions</a> (<?php echo"$numextensions"; ?> available)<BR>
|
||||
<BR>
|
||||
<?php
|
||||
$sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `pick` FROM `t_reviews` TR
|
||||
INNER JOIN t_main TM ON TR.ID = TM.ID
|
||||
INNER JOIN t_version TV ON TV.ID = TM.ID
|
||||
INNER JOIN t_applications TA ON TA.AppID = TV.AppID
|
||||
WHERE `Type` = 'E' AND `AppName` = '$application' AND `pick`='YES' ORDER BY `rID` DESC 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)) {
|
||||
$id = $row["ID"];
|
||||
$title = $row["Title"];
|
||||
$pick = $row["pick"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
$body = $row["Body"];
|
||||
$bodylength = strlen($body);
|
||||
if ($bodylength>"250") {
|
||||
$body = substr($body,0,250);
|
||||
$body .= " <a href=\"/extensions/moreinfo.php?id=$id&page=staffreview\">[More...]</a>";
|
||||
|
||||
}
|
||||
|
||||
//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<br> $date";
|
||||
if ($pick=="YES") {echo" Editors Pick";}
|
||||
echo"<BR><BR>\n";
|
||||
echo"<SPAN class=\"itemdescription\">$body</SPAN><BR>\n";
|
||||
}
|
||||
?>
|
||||
<BR>
|
||||
</DIV>
|
||||
|
||||
<DIV class="contentbox contentcolumns">
|
||||
<DIV class="boxheader"><?php print(ucwords($application)); ?> Themes</DIV>
|
||||
<?php
|
||||
$sql = "SELECT TM.ID FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
WHERE `Type` = 'T' AND `AppName` = '$application' AND `approved` = 'YES' GROUP BY TM.ID";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
$numthemes = mysql_num_rows($sql_result);
|
||||
?>
|
||||
<a href="/themes/">Browse themes</a> (<?php echo"$numthemes"; ?> available)<BR>
|
||||
<BR>
|
||||
<?php
|
||||
$sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `pick` FROM `t_reviews` TR
|
||||
INNER JOIN t_main TM ON TR.ID = TM.ID
|
||||
INNER JOIN t_version TV ON TV.ID = TM.ID
|
||||
INNER JOIN t_applications TA ON TA.AppID = TV.AppID
|
||||
WHERE `Type` = 'T' AND `AppName` = '$application' AND `pick`='YES' ORDER BY `rID` DESC 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)) {
|
||||
$id = $row["ID"];
|
||||
$title = $row["Title"];
|
||||
$pick = $row["pick"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
$body = $row["Body"];
|
||||
$bodylength = strlen($body);
|
||||
if ($bodylength>"250") {
|
||||
$body = substr($body,0,250);
|
||||
$body .= " <a href=\"/moreinfo.php?id=$id&page=staffreview\">[More...]</a>";
|
||||
|
||||
}
|
||||
|
||||
//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<BR><BR>\n";}
|
||||
echo"$body<BR>\n";
|
||||
}
|
||||
?>
|
||||
</DIV>
|
||||
</DIV>
|
||||
<?php
|
||||
include"$page_footer";
|
||||
?>
|
||||
</BODY>
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"core/config.php";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<html lang="EN" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<TITLE>Mozilla Update</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<?php
|
||||
include"$page_header";
|
||||
?>
|
||||
|
||||
<DIV class="contentbox" style="margin-left: 2px;">
|
||||
<DIV class="boxheader">Welcome to Mozilla Update</DIV>
|
||||
<SPAN class="itemdescription">
|
||||
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 <A HREF="/faq/">Frequently Asked Questions...</A>
|
||||
|
||||
</SPAN>
|
||||
</DIV>
|
||||
<?php //include"inc_featuredupdate.php"; ?>
|
||||
|
||||
<?php
|
||||
//include"inc_softwareupdate.php";
|
||||
if ($_GET["application"]) {$application=$_GET["application"]; }
|
||||
?>
|
||||
<DIV class="frontpagecontainer">
|
||||
<DIV class="contentbox contentcolumns">
|
||||
<DIV class="boxheader"><?php print(ucwords($application)); ?> Extensions</DIV>
|
||||
<?php
|
||||
$sql = "SELECT TM.ID
|
||||
FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
WHERE `Type` = 'E' AND `AppName` = '$application' AND `approved` = 'YES' GROUP BY TM.ID";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
$numextensions = mysql_num_rows($sql_result);
|
||||
?>
|
||||
<a href="/extensions/">Browse extensions</a> (<?php echo"$numextensions"; ?> available)<BR>
|
||||
<BR>
|
||||
<?php
|
||||
$sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `pick` FROM `t_reviews` TR
|
||||
INNER JOIN t_main TM ON TR.ID = TM.ID
|
||||
INNER JOIN t_version TV ON TV.ID = TM.ID
|
||||
INNER JOIN t_applications TA ON TA.AppID = TV.AppID
|
||||
WHERE `Type` = 'E' AND `AppName` = '$application' AND `pick`='YES' ORDER BY `rID` DESC 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)) {
|
||||
$id = $row["ID"];
|
||||
$title = $row["Title"];
|
||||
$pick = $row["pick"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
$body = $row["Body"];
|
||||
$bodylength = strlen($body);
|
||||
if ($bodylength>"250") {
|
||||
$body = substr($body,0,250);
|
||||
$body .= " <a href=\"/extensions/moreinfo.php?id=$id&page=staffreview\">[More...]</a>";
|
||||
|
||||
}
|
||||
|
||||
//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<br> $date";
|
||||
if ($pick=="YES") {echo" Editors Pick";}
|
||||
echo"<BR><BR>\n";
|
||||
echo"<SPAN class=\"itemdescription\">$body</SPAN><BR>\n";
|
||||
}
|
||||
?>
|
||||
<BR>
|
||||
</DIV>
|
||||
|
||||
<DIV class="contentbox contentcolumns">
|
||||
<DIV class="boxheader"><?php print(ucwords($application)); ?> Themes</DIV>
|
||||
<?php
|
||||
$sql = "SELECT TM.ID FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
WHERE `Type` = 'T' AND `AppName` = '$application' AND `approved` = 'YES' GROUP BY TM.ID";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
$numthemes = mysql_num_rows($sql_result);
|
||||
?>
|
||||
<a href="/themes/">Browse themes</a> (<?php echo"$numthemes"; ?> available)<BR>
|
||||
<BR>
|
||||
<?php
|
||||
$sql = "SELECT TR.ID, `Title`, TR.DateAdded, `Body`, `Type`, `pick` FROM `t_reviews` TR
|
||||
INNER JOIN t_main TM ON TR.ID = TM.ID
|
||||
INNER JOIN t_version TV ON TV.ID = TM.ID
|
||||
INNER JOIN t_applications TA ON TA.AppID = TV.AppID
|
||||
WHERE `Type` = 'T' AND `AppName` = '$application' AND `pick`='YES' ORDER BY `rID` DESC 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)) {
|
||||
$id = $row["ID"];
|
||||
$title = $row["Title"];
|
||||
$pick = $row["pick"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
$body = $row["Body"];
|
||||
$bodylength = strlen($body);
|
||||
if ($bodylength>"250") {
|
||||
$body = substr($body,0,250);
|
||||
$body .= " <a href=\"/moreinfo.php?id=$id&page=staffreview\">[More...]</a>";
|
||||
|
||||
}
|
||||
|
||||
//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<BR><BR>\n";}
|
||||
echo"$body<BR>\n";
|
||||
}
|
||||
?>
|
||||
</DIV>
|
||||
</DIV>
|
||||
<?php
|
||||
include"$page_footer";
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -1,224 +1,225 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<html lang="EN" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<TITLE>Mozilla Update :: Themes - Change the Look of Mozilla Software</TITLE>
|
||||
|
||||
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<?php
|
||||
$type = "T";
|
||||
if ($_GET["application"]) {$application=$_GET["application"]; }
|
||||
include"$page_header";
|
||||
$index="yes";
|
||||
include"inc_sidebar.php";
|
||||
?>
|
||||
<DIV class="box">
|
||||
<DIV class="boxheader" style="width: 100%">What is a Theme?</DIV>
|
||||
<SPAN class="itemdescription">Themes are skins for <?php print(ucwords($application)); ?>, they allow you to change the look and
|
||||
feel of the browser and personalize it to your tastes. A theme can simply change the colors of <?php print(ucwords($application)); ?>
|
||||
or it can change every piece of the browser appearance.</SPAN>
|
||||
</DIV>
|
||||
|
||||
<DIV class="box">
|
||||
<DIV class="boxheader" style="width: 100%">Featured <?php print(ucwords($application)); ?> Theme</DIV>
|
||||
<?php
|
||||
$sql = "SELECT TR.ID, TM.Name, `Title`, TR.DateAdded, `Body`, `Type`, `pick` FROM `t_reviews` TR
|
||||
INNER JOIN t_main TM ON TR.ID = TM.ID
|
||||
INNER JOIN t_version TV ON TV.ID = TM.ID
|
||||
INNER JOIN t_applications TA ON TA.AppID = TV.AppID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND `featured`='YES' ORDER BY `rID` DESC 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)) {
|
||||
$id = $row["ID"];
|
||||
$name = $row["Name"];
|
||||
$title = $row["Title"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
$pick = $row["pick"];
|
||||
$body = $row["Body"];
|
||||
$bodylength = strlen($body);
|
||||
if ($bodylength>"250") {
|
||||
$body = substr($body,0,250);
|
||||
$body .= " <a href=\"moreinfo.php?id=$id&page=staffreview\">[More...]</a>";
|
||||
|
||||
}
|
||||
|
||||
//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"<a href=\"moreinfo.php?id=$id\">$name</A> -- $title";
|
||||
if ($pick=="YES") {echo" - $date Editors Pick"; }
|
||||
echo"<BR>\n";
|
||||
echo"<SPAN class=\"itemdescription\">$body</SPAN><BR>\n";
|
||||
}
|
||||
?>
|
||||
</DIV>
|
||||
<DIV class="box" style="width: 80%; min-height: 200px; border: 0px">
|
||||
<DIV class="boxcolumns">
|
||||
<DIV class="boxheader"><A HREF="showlist.php?category=Popular">Most Popular</A>:</DIV>
|
||||
<?php
|
||||
$i=0;
|
||||
$sql = "SELECT TM.ID, TV.vID,TM.Name, TV.Version, TM.TotalDownloads, TM.downloadcount
|
||||
FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND `DownloadCount` > '0' AND `approved` = 'YES' ORDER BY `DownloadCount` DESC ";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$i++;
|
||||
$id = $row["ID"];
|
||||
$vid = $row["vID"];
|
||||
$name = $row["Name"];
|
||||
$version = $row["Version"];
|
||||
$downloadcount = $row["DownloadCount"];
|
||||
if ($lastname == $name) {$i--; continue; }
|
||||
echo"$i - <a href=\"moreinfo.php?id=$id\">$name</a><br>\n";
|
||||
echo"<SPAN class=\"smallfont nocomment\">($downloadcount downloads)</SPAN><BR>\n";
|
||||
|
||||
$lastname = $name;
|
||||
if ($i >= "5") {break;}
|
||||
}
|
||||
?>
|
||||
<BR>
|
||||
</DIV>
|
||||
<DIV class="boxcolumns">
|
||||
<DIV class="boxheader"><A HREF="showlist.php?category=Top Rated">Top Rated</A>:</DIV>
|
||||
<?php
|
||||
$r=0;
|
||||
$usednames = array();
|
||||
$sql = "SELECT TM.ID, TV.vID, TM.Name, TV.Version, TM.Rating, TU.UserName
|
||||
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_authorxref TAX ON TAX.ID = TM.ID
|
||||
INNER JOIN t_userprofiles TU ON TU.UserID = TAX.UserID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND `Rating` > '0' AND `approved` = 'YES' ORDER BY `Rating` DESC, `Name` ASC, `Version` DESC";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$r++; $s++;
|
||||
$id = $row["ID"];
|
||||
$vid = $row["vID"];
|
||||
$name = $row["Name"];
|
||||
$version = $row["Version"];
|
||||
$rating = $row["Rating"];
|
||||
$arraysearch = array_search("$name", $usednames);
|
||||
if ($arraysearch !== false AND $usedversions[$arraysearch]['version']<$version) {$r--; continue; } //
|
||||
echo"$r - <a href=\"moreinfo.php?id=$id&vid=$vid\">$name</a> ";
|
||||
|
||||
//$rating = round($rating);
|
||||
|
||||
echo"<SPAN title=\"Rated: $rating of 5\" style=\"font-size: 8pt\">";
|
||||
for ($i = 1; $i <= floor($rating); $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
if ($rating>floor($rating)) {
|
||||
$val = ($rating-floor($rating))*10;
|
||||
echo"<IMG SRC=\"/images/stars/star_0$val.png\" BORDER=0 ALT=\"\">";
|
||||
$i++;
|
||||
}
|
||||
for ($i = $i; $i <= 5; $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
echo"</SPAN><br>\n";
|
||||
//echo"<SPAN class=\"smallfont nocomment\">By $author</SPAN><BR>\n";
|
||||
$usednames[$s] = $name;
|
||||
$usedversions[$s] = $version;
|
||||
if ($r >= "5") {break;}
|
||||
}
|
||||
unset($usednames, $usedversions, $r, $s, $i);
|
||||
?>
|
||||
</DIV>
|
||||
<DIV class="boxcolumns">
|
||||
<DIV class="boxheader"><A HREF="showlist.php?category=Newest">Most Recent</A>:</DIV>
|
||||
<?php
|
||||
$i=0;
|
||||
//MacOSX Specific override for All+Mac themes. Bug 252294
|
||||
if ($_SESSION["app_os"]=="MacOSX") { $app_os = $_SESSION["app_os"]; } else { $app_os = "ALL"; }
|
||||
|
||||
$sql = "SELECT TM.ID, TV.vID, TM.Name, TV.Version, TV.DateAdded
|
||||
FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
INNER JOIN t_os TOS ON TV.OSID = TOS.OSID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND (`OSName` = '$_SESSION[app_os]' OR `OSName` = '$app_os') AND `approved` = 'YES' ORDER BY `DateAdded` DESC ";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$i++;
|
||||
$id = $row["ID"];
|
||||
$vid = $row["vID"];
|
||||
$name = $row["Name"];
|
||||
$version = $row["Version"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
//Create Customizeable Datestamp
|
||||
$timestamp = strtotime("$dateadded");
|
||||
$dateadded = gmdate("F d, Y g:i:sa", $timestamp); // $dateupdated = gmdate("F d, Y g:i:sa T", $timestamp);
|
||||
|
||||
if ($lastname == $name) {$i--; continue; }
|
||||
echo"$i - <a href=\"moreinfo.php?id=$id&vid=$vid\">$name $version</a><BR>\n";
|
||||
echo"<SPAN class=\"smallfont nocomment\">($dateadded)</SPAN><BR>\n";
|
||||
|
||||
$lastname = $name;
|
||||
if ($i >= "5") {break;}
|
||||
}
|
||||
?>
|
||||
</DIV>
|
||||
</DIV>
|
||||
<BR>
|
||||
<?php
|
||||
include"$page_footer";
|
||||
?>
|
||||
</BODY>
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
||||
<html lang="EN" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
|
||||
<TITLE>Mozilla Update :: Themes - Change the Look of Mozilla Software</TITLE>
|
||||
|
||||
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/core/update.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<?php
|
||||
$type = "T";
|
||||
if ($_GET["application"]) {$application=$_GET["application"]; }
|
||||
include"$page_header";
|
||||
$index="yes";
|
||||
include"inc_sidebar.php";
|
||||
?>
|
||||
<DIV class="box">
|
||||
<DIV class="boxheader" style="width: 100%">What is a Theme?</DIV>
|
||||
<SPAN class="itemdescription">Themes are skins for <?php print(ucwords($application)); ?>, they allow you to change the look and
|
||||
feel of the browser and personalize it to your tastes. A theme can simply change the colors of <?php print(ucwords($application)); ?>
|
||||
or it can change every piece of the browser appearance.</SPAN>
|
||||
</DIV>
|
||||
|
||||
<DIV class="box">
|
||||
<DIV class="boxheader" style="width: 100%">Featured <?php print(ucwords($application)); ?> Theme</DIV>
|
||||
<?php
|
||||
$sql = "SELECT TR.ID, TM.Name, `Title`, TR.DateAdded, `Body`, `Type`, `pick` FROM `t_reviews` TR
|
||||
INNER JOIN t_main TM ON TR.ID = TM.ID
|
||||
INNER JOIN t_version TV ON TV.ID = TM.ID
|
||||
INNER JOIN t_applications TA ON TA.AppID = TV.AppID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND `featured`='YES' ORDER BY `rID` DESC 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)) {
|
||||
$id = $row["ID"];
|
||||
$name = $row["Name"];
|
||||
$title = $row["Title"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
$pick = $row["pick"];
|
||||
$body = $row["Body"];
|
||||
$bodylength = strlen($body);
|
||||
if ($bodylength>"250") {
|
||||
$body = substr($body,0,250);
|
||||
$body .= " <a href=\"moreinfo.php?id=$id&page=staffreview\">[More...]</a>";
|
||||
|
||||
}
|
||||
|
||||
//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"<a href=\"moreinfo.php?id=$id\">$name</A> -- $title";
|
||||
if ($pick=="YES") {echo" - $date Editors Pick"; }
|
||||
echo"<BR>\n";
|
||||
echo"<SPAN class=\"itemdescription\">$body</SPAN><BR>\n";
|
||||
}
|
||||
?>
|
||||
</DIV>
|
||||
<DIV class="box" style="width: 80%; min-height: 200px; border: 0px">
|
||||
<DIV class="boxcolumns">
|
||||
<DIV class="boxheader"><A HREF="showlist.php?category=Popular">Most Popular</A>:</DIV>
|
||||
<?php
|
||||
$i=0;
|
||||
$sql = "SELECT TM.ID, TV.vID,TM.Name, TV.Version, TM.TotalDownloads, TM.downloadcount
|
||||
FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND `DownloadCount` > '0' AND `approved` = 'YES' ORDER BY `DownloadCount` DESC ";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$i++;
|
||||
$id = $row["ID"];
|
||||
$vid = $row["vID"];
|
||||
$name = $row["Name"];
|
||||
$version = $row["Version"];
|
||||
$downloadcount = $row["downloadcount"];
|
||||
$totaldownloads = $row["TotalDownloads"];
|
||||
if ($lastname == $name) {$i--; continue; }
|
||||
echo"$i - <a href=\"moreinfo.php?id=$id\">$name</a><br>\n";
|
||||
echo"<SPAN class=\"smallfont nocomment\">($downloadcount downloads)</SPAN><BR>\n";
|
||||
|
||||
$lastname = $name;
|
||||
if ($i >= "5") {break;}
|
||||
}
|
||||
?>
|
||||
<BR>
|
||||
</DIV>
|
||||
<DIV class="boxcolumns">
|
||||
<DIV class="boxheader"><A HREF="showlist.php?category=Top Rated">Top Rated</A>:</DIV>
|
||||
<?php
|
||||
$r=0;
|
||||
$usednames = array();
|
||||
$sql = "SELECT TM.ID, TV.vID, TM.Name, TV.Version, TM.Rating, TU.UserName
|
||||
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_authorxref TAX ON TAX.ID = TM.ID
|
||||
INNER JOIN t_userprofiles TU ON TU.UserID = TAX.UserID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND `Rating` > '0' AND `approved` = 'YES' ORDER BY `Rating` DESC, `Name` ASC, `Version` DESC";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$r++; $s++;
|
||||
$id = $row["ID"];
|
||||
$vid = $row["vID"];
|
||||
$name = $row["Name"];
|
||||
$version = $row["Version"];
|
||||
$rating = $row["Rating"];
|
||||
$arraysearch = array_search("$name", $usednames);
|
||||
if ($arraysearch !== false AND $usedversions[$arraysearch]['version']<$version) {$r--; continue; } //
|
||||
echo"$r - <a href=\"moreinfo.php?id=$id&vid=$vid\">$name</a> ";
|
||||
|
||||
//$rating = round($rating);
|
||||
|
||||
echo"<SPAN title=\"Rated: $rating of 5\" style=\"font-size: 8pt\">";
|
||||
for ($i = 1; $i <= floor($rating); $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/star_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
if ($rating>floor($rating)) {
|
||||
$val = ($rating-floor($rating))*10;
|
||||
echo"<IMG SRC=\"/images/stars/star_0$val.png\" BORDER=0 ALT=\"\">";
|
||||
$i++;
|
||||
}
|
||||
for ($i = $i; $i <= 5; $i++) {
|
||||
echo"<IMG SRC=\"/images/stars/graystar_icon.png\" BORDER=0 ALT=\""; if ($i==1) {echo"$rating of 5 stars";} echo"\">";
|
||||
}
|
||||
echo"</SPAN><br>\n";
|
||||
//echo"<SPAN class=\"smallfont nocomment\">By $author</SPAN><BR>\n";
|
||||
$usednames[$s] = $name;
|
||||
$usedversions[$s] = $version;
|
||||
if ($r >= "5") {break;}
|
||||
}
|
||||
unset($usednames, $usedversions, $r, $s, $i);
|
||||
?>
|
||||
</DIV>
|
||||
<DIV class="boxcolumns">
|
||||
<DIV class="boxheader"><A HREF="showlist.php?category=Newest">Most Recent</A>:</DIV>
|
||||
<?php
|
||||
$i=0;
|
||||
//MacOSX Specific override for All+Mac themes. Bug 252294
|
||||
if ($_SESSION["app_os"]=="MacOSX") { $app_os = $_SESSION["app_os"]; } else { $app_os = "ALL"; }
|
||||
|
||||
$sql = "SELECT TM.ID, TV.vID, TM.Name, TV.Version, TV.DateAdded
|
||||
FROM `t_main` TM
|
||||
INNER JOIN t_version TV ON TM.ID = TV.ID
|
||||
INNER JOIN t_applications TA ON TV.AppID = TA.AppID
|
||||
INNER JOIN t_os TOS ON TV.OSID = TOS.OSID
|
||||
WHERE `Type` = '$type' AND `AppName` = '$application' AND (`OSName` = '$_SESSION[app_os]' OR `OSName` = '$app_os') AND `approved` = 'YES' ORDER BY `DateAdded` DESC ";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
while ($row = mysql_fetch_array($sql_result)) {
|
||||
$i++;
|
||||
$id = $row["ID"];
|
||||
$vid = $row["vID"];
|
||||
$name = $row["Name"];
|
||||
$version = $row["Version"];
|
||||
$dateadded = $row["DateAdded"];
|
||||
//Create Customizeable Datestamp
|
||||
$timestamp = strtotime("$dateadded");
|
||||
$dateadded = gmdate("F d, Y g:i:sa", $timestamp); // $dateupdated = gmdate("F d, Y g:i:sa T", $timestamp);
|
||||
|
||||
if ($lastname == $name) {$i--; continue; }
|
||||
echo"$i - <a href=\"moreinfo.php?id=$id&vid=$vid\">$name $version</a><BR>\n";
|
||||
echo"<SPAN class=\"smallfont nocomment\">($dateadded)</SPAN><BR>\n";
|
||||
|
||||
$lastname = $name;
|
||||
if ($i >= "5") {break;}
|
||||
}
|
||||
?>
|
||||
</DIV>
|
||||
</DIV>
|
||||
<BR>
|
||||
<?php
|
||||
include"$page_footer";
|
||||
?>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -1,97 +1,101 @@
|
|||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
//Get Full Information for the file requested.
|
||||
$sql = "SELECT `URI` FROM `t_version` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' 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);
|
||||
$uri=$row["URI"];
|
||||
|
||||
// New DownloadCount management Code..
|
||||
//Check for user, to see if they recently accessed this file (filters duplicate/triplicate+ requests in a short period).
|
||||
$maxlife = date("YmdHis", mktime(date("H"), date("i")-10, date("s"), date("m"), date("d"), date("Y")));
|
||||
$sql = "SELECT `dID` FROM `t_downloads` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' AND `user_ip`='$_SERVER[REMOTE_ADDR]' AND `user_agent` = '$_SERVER[HTTP_USER_AGENT]' AND `date`>'$maxlife' AND `type`='download' LIMIT 1";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
if (mysql_num_rows($sql_result)=="0") {
|
||||
//Insert a record of this download for the next 10 minutes anyway. :-)
|
||||
$today=date("YmdHis");
|
||||
$sql = "INSERT INTO `t_downloads` (`ID`,`date`,`vID`, `user_ip`, `user_agent`, `type`) VALUES ('$_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")
|
||||
<?php
|
||||
// ***** 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 <psychoticwolf@carolina.rr.com>
|
||||
//
|
||||
// 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 *****
|
||||
?>
|
||||
<?php
|
||||
require"../core/config.php";
|
||||
//Get Full Information for the file requested.
|
||||
$sql = "SELECT `URI` FROM `t_version` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' 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);
|
||||
$uri=$row["URI"];
|
||||
|
||||
// New DownloadCount management Code..
|
||||
//Check for user, to see if they recently accessed this file (filters duplicate/triplicate+ requests in a short period).
|
||||
$maxlife = date("YmdHis", mktime(date("H"), date("i")-10, date("s"), date("m"), date("d"), date("Y")));
|
||||
$sql = "SELECT `dID` FROM `t_downloads` WHERE `ID`='$_GET[id]' AND `vID`='$_GET[vid]' AND `user_ip`='$_SERVER[REMOTE_ADDR]' AND `user_agent` = '$_SERVER[HTTP_USER_AGENT]' AND `date`>'$maxlife' AND `type`='download' LIMIT 1";
|
||||
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
|
||||
if (mysql_num_rows($sql_result)=="0") {
|
||||
//Insert a record of this download for the next 10 minutes anyway. :-)
|
||||
$today=date("YmdHis");
|
||||
$sql = "INSERT INTO `t_downloads` (`ID`,`date`,`vID`, `user_ip`, `user_agent`, `type`) VALUES ('$_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")
|
||||
?>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче