removing. Some unneeded, some going elsewhere a=asa (blanket), Not part of build

This commit is contained in:
robert%accettura.com 2005-06-10 03:27:54 +00:00
Родитель dfa4e12d4e
Коммит a68af7bbdf
5 изменённых файлов: 0 добавлений и 564 удалений

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

@ -1,59 +0,0 @@
<?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 Reporter (r.m.o).
*
* The Initial Developer of the Original Code is
* Robert Accettura <robert@accettura.com>.
*
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
?>
<hr class="hide">
<div id="footer">
<ul id="bn">
<li><a href="http://planet.mozilla.org">Community Blogs</a></li>
<li><a href="http://www.mozilla.org/sitemap.html">Site Map</a></li>
<li><a href="http://www.mozilla.org/security/">Security Updates</a></li>
<li><a href="http://www.mozilla.org/contact/">Contact Us</a></li>
<li><a href="http://www.mozilla.org/foundation/donate.html">Donate</a></li>
</ul>
<p>International Affiliates: <a href="http://www.mozilla-europe.org/">Mozilla Europe</a> - <a href="http://www.mozilla-japan.org/">Mozilla Japan</a></p>
<p>Copyright &copy; 1998-<?php print date("Y"); ?> The Mozilla Organization</p>
</div>
<!-- closes #footer-->
</div>
<!-- closes #container -->
</body>
</html>

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

@ -1,90 +0,0 @@
<?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 Reporter (r.m.o).
*
* The Initial Developer of the Original Code is
* Robert Accettura <robert@accettura.com>.
*
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
printheaders();
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title><?php print $title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="http://mozilla.org/css/print.css" media="print">
<link rel="stylesheet" type="text/css" href="http://mozilla.org/css/base/content.css" media="all">
<link rel="stylesheet" type="text/css" href="http://mozilla.org/css/cavendish/content.css" title="Cavendish" media="all">
<link rel="stylesheet" type="text/css" href="http://mozilla.org/css/base/template.css" media="screen">
<link rel="stylesheet" type="text/css" href="http://mozilla.org/css/cavendish/template.css" title="Cavendish" media="screen">
<link rel="stylesheet" type="text/css" href="<?php print $config['app_url']; ?>/style.css" media="all">
<link rel="icon" href="images/mozilla-16.png" type="image/png">
<link rel="home" title="Home" href="http://www.mozilla.org/">
</head>
<body id="www-mozilla-org" class="homepage">
<div id="container">
<p class="skipLink"><a href="#firefox-feature" accesskey="2">Skip to main content</a></p>
<div id="header">
<h1><a href="/" title="Return to home page" accesskey="1">Mozilla</a></h1>
<ul>
<li id="login"><a href="/app/login" title="Admin Login">Login</a></li>
<li id="top_25"><a href="/app/query/?show=25&count=on&&submit_query=Search" title="Top 25 Hosts">Top 25</a></li>
<li id="query"><a href="/app" title="Create a new Query">Query</a></li>
</ul>
<form id="search" method="get" action="http://reporter-test.mozilla.org/app/report/" title="Get Report">
<div>
<label for="report_id" title="Pull up report number">get report:</label>
<input type="text" id="report_id" name="report_id" accesskey="g" size="30">
<input type="submit" id="submit" value="Lookup">
</div>
</form>
</div>
<!-- closes #header-->
<h1>Mozilla Reporter</h1>
<!--
reporter.mozilla.org by:
Robert "DIGITALgimpus" Accettura <http://robert.accettura.com>
-->

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

@ -1,297 +0,0 @@
<?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 Reporter (r.m.o).
*
* The Initial Developer of the Original Code is
* Robert Accettura <robert@accettura.com>.
*
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
function strMiddleReduceWordSensitive($string, $max = 50, $rep = '[...]') {
$strlen = strlen($string);
if ($strlen <= $max)
return $string;
$lengthtokeep = $max - strlen($rep);
$start = 0;
$end = 0;
if (($lengthtokeep % 2) == 0) {
$start = $lengthtokeep / 2;
$end = $start;
} else {
$start = intval($lengthtokeep / 2);
$end = $start + 1;
}
$i = $start;
$tmp_string = $string;
while ($i < $strlen) {
if ($tmp_string[$i] == ' ') {
$tmp_string = substr($tmp_string, 0, $i) . $rep;
$return = $tmp_string;
}
$i++;
}
$i = $end;
$tmp_string = strrev ($string);
while ($i < $strlen) {
if ($tmp_string[$i] == ' ') {
$tmp_string = substr($tmp_string, 0, $i);
$return .= strrev ($tmp_string);
}
$i++;
}
return $return;
return substr($string, 0, $start) . $rep . substr($string, - $end);
}
function resolveProblemTypes($q){
global $problemTypes;
return $problemTypes[$q];
}
function navigation($pre_href='?page=', $post_href='', $num_items=0, $items_per_page=25, $active=1, $nearby=5, $threshold=100){
// Original From: http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=866
// License: GNU General Public License
// Info: 1336 2.0.1 10/19/02 18:01 mp96brbj
/*
The main function:
Returns HTML string with a navigation bar, easily styled with CSS.
Returns false if no navigation bar was necessary (if everything
could fit on one page).
$pre_href = everyhing in the links' HREF before the active page's number.
$post_href = everyhing *after* the active page's number.
$num_items = total number of items available.
$items_per_page = well, d'uh!
$active = the active page's number.
$nearby = minimum number of nearby pages to $active to display.
$threshold = the smaller the number, the more restrictive the
selection of links will be when $total is very high. This is to
conserve space.
These default settings limit the number of links to a maximum
of about 20.
*/
// &//8230; is the ellipse character: "..."
$space = '<span class="spacer"> &#8230; '."\n\t".'</span>';
// There's no point in printing this string if there are no items,
// Or if they all fit on one page.
if ($num_items > 0 && $num_items > $items_per_page)
{
// STEP 1:
// Force variables into certain values.
// $items_per_page can't be smaller than 1!
// Also, avoid division by zero later on.
$items_per_page = max($items_per_page, 1);
// Calculate the number of listing pages.
$total = ceil($num_items/$items_per_page);
// $active can't be higher than $total or smaller than 1!
$active = max( min($active,$total), 1);
// STEP 2:
// Do the rest.
// Get the sequence of pages to show links to.
$pages = navigationSequence($total, $active, $nearby, $threshold);
// Print a descriptive string.
$first = ($active-1)*$items_per_page + 1;
$last = min($first+$items_per_page-1, $num_items);
if ($first == $last)
$listing = $first;
else
// &//8211; is the EN dash, the proper hyphen to use.
$listing = $first.' - '.$last;
$r = '<p class="navigation">'."\n\tShowing $listing of $num_items<br />\n";
// Initialize the list of links.
$links = array();
// Add "previous" link.
if ($active > 1 && $total > 1)
$links[] = '<a href="'.$pre_href.($active-1).$post_href.
'" class="prev" title="Previous">&laquo;</a>';
// Decide how the each link should be presented.
for($i=0; $i<sizeof($pages); $i++)
{
// Current link.
$curr = $pages[$i];
// See if we should any $spacer in connection to this link.
if ($i>0 AND $i<sizeof($pages)-1)
{
$prev = $pages[$i-1];
$next = $pages[$i+1];
// See if we should any $spacer *before* this link.
// (Don't add one if the last link is already a spacer.)
if ($prev < $curr-1 AND $links[sizeof($links)-1] != $space)
$links[] = $space;
}
// Add the link itself!
// If the link is not the active page, link it.
if ($curr != $active)
$links[] = '<a href="'.$pre_href.$curr.$post_href.'">'.$curr.'</a>';
// Else don't link it.
else
$links[] = '<strong class="active">'.$active.'</strong>';
if ($i>0 AND $i<sizeof($pages)-1)
{
// See if we should any $spacer *after* this link.
// (Don't add one if the last link is already a spacer.)
if ($next > $curr+1 AND $links[sizeof($links)-1] != $space)
$links[] = $space;
}
}
// Add "next" link.
if ($active < $total && $total > 1)
$links[] = '<a href="'.$pre_href.($active+1).$post_href.
'" class="next" title="Next">&raquo;</a>';
// Put it all together.
$r .= "\t".implode($links, "\n\t")."\n</p>\n";
$r = str_replace("\n\t".$space."\n\t", $space, $r);
return $r;
}
else
return false;
}
function navigationSequence($total=1, $active=1, $nearby=5, $threshold=100){
// Original From: http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=866
// License: GNU General Public License
// Info: 1336 2.0.1 10/19/02 18:01 mp96brbj
// STEP 1:
// Force minimum and maximum values.
$total = (int)max($total, 1);
$active = (int)min( max($active,1), $total);
$nearby = (int)max($nearby, 2);
$threshold = (int)max($threshold, 1);
// STEP 2:
// Initialize $pages.
// Array where each key is a page.
// That way we can easily overwrite duplicate keys, without
// worrying about the order of elements.
// Begin by adding the first, the active and the final page.
$pages = array(1=>1, $active=>1, $total=>1);
// STEP 3:
// Add nearby pages.
for ($diff=1; $diff<$nearby+1; $diff++)
{
$pages[min( max($active-$diff,1), $total)] = 1;
$pages[min( max($active+$diff,1), $total)] = 1;
}
// STEP 4:
// Add distant pages.
// What are the greatest and smallest distances between page 1
// and active page, or between active page and final page?
$biggest_diff = max($total-$active, $active);
$smallest_diff = min($total-$active, $active);
// The lower $factor is, the bigger jumps (and ergo fewer pages)
// there will be between the distant pages.
$factor = 0.75;
// If we think there will be too many distant pages to list,
// reduce $factor.
while(pow($total*max($smallest_diff,1), $factor) > $threshold)
$factor *= 0.9;
// Add a page between $active and the farthest end (both upwards
// and downwards). Then add a page between *that* page and
// active. And so on, until we touch the nearby pages.
for ($diff=round($biggest_diff*$factor); $diff>$nearby; $diff=round($diff*$factor))
{
// Calculate the numbers.
$lower = $active-$diff;
$higher = $active+$diff;
// Round them to significant digits (for readability):
// Significant digits should be half or less than half of
// the total number of digits, but at least 2.
$lower = round($lower, -floor(max(strlen($lower),2)/2));
$higher = round($higher, -floor(max(strlen($higher),2)/2));
// Maxe sure they're within the valid range.
$lower = min(max($lower, 1),$total);
$higher = min(max($higher, 1),$total);
// Add them.
$pages[$lower] = 1;
$pages[$higher] = 1;
}
// STEP 5:
// Convert the keys into values and sort them.
$return = array_keys($pages);
sort($return);
return $return;
}
function printheaders(){
$now = date("D M j G:i:s Y T");
header('Expires: ' . $now);
header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('X-Powered-By: A Barrel of Monkey\'s ');
}
function strip_all_tags($input){
while($input != strip_tags($input)) {
$input = strip_tags($input);
}
return $input;
}
?>

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

@ -1,46 +0,0 @@
<?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 Reporter (r.m.o).
*
* The Initial Developer of the Original Code is
* Robert Accettura <robert@accettura.com>.
*
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
// Message
// to turn off, set it to ''
$message = '';
if ($message != ''){
?><div id="message"><?php print $message; ?></div><?php
}
?>

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

@ -1,72 +0,0 @@
<?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 Reporter (r.m.o).
*
* The Initial Developer of the Original Code is
* Robert Accettura <robert@accettura.com>.
*
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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 ***** */
class userlib {
function login($username, $password){
global $db;
$data =& $db->getRow("SELECT user.user_id, user.user_username, user.user_password, user.user_realname, user.user_status
FROM user
WHERE user.user_username = '".$username."' AND user.user_password = md5('".$password."')", DB_FETCHMODE_ASSOC);
if ($data['user_status'] == 1){
$_SESSION['user_id'] = $data['user_id'];
$_SESSION['user_realname'] = $data['user_realname'];
$_SESSION['user_username'] = $data['user_username'];
$_SESSION['login'] = true;
return array(true, '');
} else {
return array(false, 'Bad Status');
}
return true;
}
function isLoggedIn(){
if ($_SESSION['user_username'] && $_SESSION['login'] == true){
return true;
}
else {
return false;
}
}
// End Class
}
$userlib = new userlib;
?>