gaim/www

These files no longer seem to be used.

2006-02-11, Richard Laager
9cfe5528fbe1
Parents 838b1de0e362
Children 2f7092d4b486
These files no longer seem to be used.
--- a/htdocs/bugtracker.php Sat Feb 11 13:04:58 2006 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
-<?php
- require "base.inc.php";
- require "smilies.inc.php";
- require "Table.inc.php";
-
- $bug_data_file = $bug_data_dir . "/bugs.dat";
- $bug_lock_file = $bug_data_dir . "/bugs.lock";
-
- function build_bug_tracker_nav()
- {
- global $action, $session;
-
- if ($action == "")
- $buffer = "<b>List Bugs</b>";
- else
- {
- $buffer = "<a href=\"" . $session->localUrl($PHP_SELF) . "\">" .
- "List Bugs</a>";
- }
-
- $buffer .= " &nbsp;";
-
- $buffer .= "<b>&middot;</b> &nbsp;";
-
- if ($action == "addbug")
- $buffer .= "<b>Add Bug</b>";
- else
- {
- $buffer .= "<a href=\"" . $session->localUrl($PHP_SELF) .
- "?action=addbug\">Add Bug</a>";
- }
-
- $buffer .= " &nbsp;";
-
- $buffer .= "<b>&middot;</b> &nbsp;";
-
- $buffer .= "<a href=\"" . $session->localUrl("logout.php") .
- "\">Log Out</a>";
-
- return $buffer;
- }
-
- function lock_bug_file()
- {
- global $bug_lock_file;
-
- while (file_exists($bug_lock_file))
- {
- clearstatcache();
- usleep(rand(5, 70));
- }
-
- $fp = fopen($bug_lock_file, "w");
-
- return $fp;
- }
-
- function unlock_bug_file($fp)
- {
- global $bug_lock_file;
-
- fclose($fp);
-
- unlink($bug_lock_file);
- }
-
- function add_bug($bugnum, $desc)
- {
- global $bug_data_file;
-
- /* Just In Case (TM) */
- chop($bugnum);
- chop($desc);
-
- $lock = lock_bug_file();
-
- if (!$fp = fopen($bug_data_file, "a"))
- {
- print "There was an error opening $bug_data_file!";
- unlock_bug_file($lock);
- exit;
- }
-
- fwrite($fp, $bugnum . "\t" . $desc . "\n");
-
- fclose($fp);
-
- unlock_bug_file($lock);
-
- header("Location: bugtracker.php");
- exit;
- }
-
- function display_add_bug()
- {
- global $bugnum;
- global $desc;
-
- setup_site("Add Bug");
-
- start_section("Add Bug", build_bug_tracker_nav(), false);
-
-?>
-<form method="get" action="bugtracker.php">
- <input type="hidden" name="action" value="addbug" />
-<?php
-
- start_table(array("width" => "100%", "cellspacing" => 2,
- "cellpadding" => 0, "border" => 0));
-
- form_item("Bug Number", "bugnum", $bugnum, true, 10);
- form_item("Description", "desc", $desc, true, 50);
-
- start_tr();
- start_td(array("colspan" => 2, "align" => "center"));
- br();
-?>
- <input type="submit" value="Submit" />&nbsp;&nbsp;
- <input type="reset" />
-<?php
-
- end_td();
- end_tr();
-
- end_table();
-
- end_tag("form");
- end_section();
- }
-
- function remove_bugs($bugs)
- {
- global $bug_data_file;
-
- if (count($bugs) == 0)
- {
- print "No bugs were entered.\n";
- exit;
- }
-
- /* I know this algorithm sucks. It's slow. Deal with it :) */
-
- /* Build a little hashtable for the bugs */
- $bug_table = array();
-
- for ($i = 0; $i < count($bugs); $i++)
- {
- $bug_table[$bugs[$i]] = 1;
- }
-
- /* Write it out. */
- $lock = lock_bug_file();
-
- $lines = file($bug_data_file);
-
- if (!$fp = fopen($bug_data_file, "w"))
- {
- print "There was an error opening $bug_data_file!";
- unlock_bug_file($lock);
- exit;
- }
-
- for ($i = 0; $i < count($lines); $i++)
- {
- list($bugnum, $desc) = split("\t", $lines[$i], 2);
-
- if (!array_key_exists($bugnum, $bug_table))
- fwrite($fp, $bugnum . "\t" . $desc);
- }
-
- fclose($fp);
-
- unlock_bug_file($lock);
- }
-
- function display_remove_bugs()
- {
- global $bugs;
-
- setup_site("Remove Bugs");
-
- start_section("Remove Bugs", build_bug_tracker_nav(), false);
-
- print "<p>\n";
- print " Are you sure you want to remove the following bugs: ";
-
- $bug_count = count($bugs);
-
- for ($i = 0; $i < $bug_count; $i++)
- {
- print "<b>" . $bugs[$i] . "</b>";
-
- if ($i < $bug_count - 1)
- print ", ";
- }
-
- print "</p>\n";
-
- br();
-
-?>
-<div align="center">
- <form method="post" action="bugtracker.php">
- <input type="hidden" name="action" value="removebug" />
-<?php
-
- for ($i = 0; $i < $bug_count; $i++)
- {
- print " <input type=\"hidden\" name=\"bugs[]\" value=\"";
- print $bugs[$i] . "\" />\n";
- }
-
-?>
- <input type="submit" name="confirm" value="Yes" />&nbsp;&nbsp;
- <input type="submit" name="confirm" value="No" />
- </form>
-</div>
-<?php
-
- end_section();
- }
-
- function display_bugs()
- {
- global $bug_data_file;
-
- setup_site("Bugs");
-
- start_section("Bugs", build_bug_tracker_nav(), false);
-
- if (!file_exists($bug_data_file))
- {
- print "<i>None. We're a bug-free Gaim!</i>";
- }
- else
- {
- $lines = file($bug_data_file);
-
- $line_count = count($lines);
-
- if ($line_count == 0)
- {
- print "<i>None. We're a bug-free Gaim!</i>";
- }
- else
- {
-?>
-<form method="get" action="bugtracker.php">
- <input type="hidden" name="action" value="removebug" />
-<?php
- $table = new Table(array("", "Bug Number", "Description"),
- true, true);
- $table->set_valignment(0, "top");
- $table->set_valignment(1, "top");
- $table->set_widths(array("20", "100", "100%"));
-
- for ($i = 0; $i < $line_count; $i++)
- {
- list($bugnum, $desc) = split("\t", $lines[$i], 2);
-
- $table->add_row(array(
- "<input type=\"checkbox\" name=\"bugs[]\" value=\"" .
- $bugnum . "\" />",
-
- "<a href=\"http://sourceforge.net/tracker/index.php?" .
- "func=detail&aid=" . $bugnum . "&group_id=235&" .
- "atid=100235" .
- "\">" . $bugnum . "</a>",
-
- $desc
- ), array(
- 0,
- array("valign" => "top"),
- array("valign" => "top")
- ));
- }
-
- $table->output_html();
-
- br();
-
-?>
- <div align="right">
- <input type="reset" value="Clear Checks" />
- <input type="submit" value="Remove Bugs" />&nbsp;&nbsp;
- </div>
-<?php
- }
-
- }
-
- end_section();
- }
-
- /* Beginning of the main code */
- setup_site(-1);
-
- if (!$users->logged_in() || !$users->is_active_user_admin())
- {
- header("Location: login.php");
- exit;
- }
-
- if ($action == "addbug")
- {
- if (isset($bugnum) && isset($desc))
- add_bug($bugnum, $desc);
- else
- display_add_bug();
- }
- else if ($action == "removebug")
- {
- if (isset($confirm))
- {
- if ($confirm == "Yes")
- remove_bugs($bugs);
-
- header("Location: bugtracker.php");
- exit;
- }
- else
- display_remove_bugs();
- }
- else
- {
- display_bugs();
- }
-
- site_shutdown();
-?>
--- a/htdocs/login.php Sat Feb 11 13:04:58 2006 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-<?php
- require "base.inc.php";
-
- $missinginfo = false;
-
- setup_site(-1);
-
- if ($action == "resetpassword"):
- setup_site("Reset Password");
-
- if (!isset($user)):
- start_section("Reset Password");
-?>
-<p>
- Please enter your user. Your new password will be assigned to the address
- on file.
-</p>
-
-<form method="post" action="login.php">
- <input type="hidden" name="action" value="resetpassword" />
- <table align="center" border="0" cellspacing="5" cellpadding="0" width="100%">
- <tr>
- <td align="right" width="50%">
- <?php start_font(); ?>
- <b>Username:</b>
- <?php end_font(); ?>
- </td>
- <td width="50%">
- <?php start_font(); ?>
- <input type="text" name="user" />
- <?php end_font(); ?>
- </td>
- </tr>
- </table>
- <br />
- <div align="center">
- <?php start_font(); ?>
- <input type="submit" value="Reset Password" />
- <?php end_font(); ?>
- </div>
-<?php
- end_section();
- print "</form>";
- site_shutdown();
-
- else:
- $info = $users->get_user_info_from_username($user);
-
- if ($info == NULL):
-?>
-<p>
- You do not appear to be a registered user. Please
- <a href="register.php">register</a> an account.
-</p>
-<?php
- site_shutdown();
- endif;
-
- $newpass = substr($info["PASSWORD"], 2, 8);
-
- $users->change_password($user, $newpass);
-
- /* E-mail the person */
- $email_address = $info["EMAIL"];
-
-
- mail($email_address, "Password reset",
- "Your password has been reset. Your new password is " .
- $newpass . ".\n",
- "From: nobody@gaim.sourceforge.net");
-?>
-<p>
- Your password has been reset and mailed to
- <?php print htmlentities($email_address) ?>.
-</p>
-<p>
- Click <a href="<?php print $session->localUrl($PHP_SELF) ?>">here</a> to
- go back to the login page.
-</p>
-<?php
- endif;
-
- site_shutdown();
-
- elseif ($action == "login"):
- $ok = $users->login($user, $password);
- if (!$ok):
- $missinginfo = true;
-
- $userinfo = $users->get_user_info_from_username($user);
- endif;
- endif;
-
- if ($users->logged_in()):
- header("Location: " . $session->localUrl("members.php"));
- exit;
- endif;
-
- setup_site("Login");
-
- start_section("Log In");
-?>
-<form method="post" action="login.php">
- <input type="hidden" name="action" value="login" />
-<?php
-
- if ($missinginfo):
-?>
-<p>
- Your login or password was invalid. Please try again.
-</p>
-<?php
- endif;
-?>
-<p>
- To log into your account, enter your user and password below. If you do
- not yet have an account, please
- <a href="<?php print $session->localUrl('register.php'); ?>">register</a> one.
-</p>
-<p>
- If you lost your password, click
- <a href="<?php print $session->localUrl($PHP_SELF) ?>?action=resetpassword">here</a>
- to reset it.
-</p>
-
- <table align="center" border="0" cellspacing="5" cellpadding="0">
-<?php
- form_item("Username", "user", $user, $user_missing, 15, 15);
- form_item("Password", "password", $password, $password_missing, 15, 15);
-?>
- </table>
- <br />
- <div align="center"><input type="submit" value="Login" /></div>
-</form>
-<?php
- end_section();
-
- site_shutdown();
-?>
--- a/htdocs/members.php Sat Feb 11 13:04:58 2006 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-<?php
- require "base.inc.php";
- require "themes.inc.php";
- require "Table.inc.php";
-
- setup_site(-1);
-
- if (!$users->logged_in()) {
- header("Location: login.php");
- exit;
- }
-
- setup_site("Members Area");
-
- start_section("The Water Cooler");
-
- start_table(array("cellspacing" => 0, "cellpadding" => 10, "border" => 0));
- start_tr();
- start_td(array("valign" => "top"));
- print "<img src=\"/images/cool.png\" width=\"51\" height=\"76\"";
- print " border=\"0\" alt=\"Cool\" align=\"left\" />";
- end_td();
-
- start_td();
-?>
-<p>
- You're here because you're cool. You have an account on the gaim website.
- Go have fun.
-</p>
-<ul>
- <li><a href="plugins.php">Plugins</a></li>
- <li><a href="themes.php">Themes</a></li>
-</ul>
-<?php
- end_td();
- end_tr();
- end_table();
-
- end_section();
-
- start_section("Your Themes");
-
- $themes = new Themes();
- $user_themes = $themes->get_users_themes($users->get_active_user_id());
-
- if ($user_themes == "")
- {
- print "<i>You have no themes.</i>";
- }
- else
- {
- $table = new Table(array("", "Name", "Brief Description",
- "Version", "Page Views", "Downloads"),
- true, true);
-
- $table->set_widths(array("20", "20%", "50%", "10%", "10%", "10%"));
- $table->set_header_align(5, "right");
-
- while (list($id, $theme) = each($user_themes))
- {
- $icon = $themes->get_icon($theme["THEME_ID"]);
-
- if ($icon != "")
- $icon = "<img src=\"/themes/icons/$icon\" border=\"0\" />";
-
- $table->add_row(array(
- $icon,
- "<a href=\"themes.php?action=showtheme&id=$id\">" .
- $theme["NAME"] . "</a>",
- $theme["BRIEF"],
- $theme["VERSION"],
- $theme["VIEW_COUNT"],
- $theme["DOWNLOAD_COUNT"]
- ), array(
- 0,
- array("valign" => "top"),
- array("valign" => "top"),
- array("valign" => "top"),
- array("valign" => "top", "align" => "right"),
- array("valign" => "top", "align" => "right")
- ));
- }
-
- $table->output_html();
- }
-
- end_section();
-
- site_shutdown();
-?>
--- a/htdocs/register.php Sat Feb 11 13:04:58 2006 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-<?php
- require "base.inc.php";
-
- setup_site("Register");
-
- $missinginfo = false;
-
- if ($action == "join"):
- $ok = $users->register();
-
- if ($ok):
- start_section("You are a winner!");
-?>
-<p>
-
-<p>
- Congratulations! You can now enjoy all the happy and wonderful things that
- only priviledged members can participate in, such as fame, fortune, and the
- ability to post plugins to the Plugins page. Now please
- <a href="<?php print $session->localUrl('login.php'); ?>">login</a> with your
- new user and password to get started.
-</p>
-<?php
- end_section();
- site_shutdown();
- else:
- $missinginfo = true;
- endif;
- endif;
-
- start_section("Register an Account");
-
- if ($missinginfo):
- if ($user == "-2"):
-?>
-<p>
- <b>Note:</b> You have entered a username that somebody has already taken.
- Please choose a new one.
-</p>
-<?php
- endif;
-?>
-<p>
- You must enter in all the required information. Please fill in the information
- in <font color="#FF0000">red</font>, as well as your password again, to
- register.
-</p>
-<?php endif; ?>
-<p>
- Please note that all fields marked with a red asterisk
- (<font color="#FF0000">*</font>) must be filled in!
-</p>
-
-<br />
-
-<?php
- end_section();
-
-?>
-
-<form method="post" action="register.php">
- <input type="hidden" name="action" value="join" />
-<?php
- start_section("Required Account Information");
-
-
-?>
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
-<?php
- form_item("Username", "user", $user, true, 15, 15);
- form_item("Password", "password", "", true, 15, 15);
- form_item("Password (again)", "password2", "", true, 15, 15);
- form_item("E-mail", "email", $email, true, "", 85);
-?>
- </table>
- <br />
-<?php
- end_section();
- start_section("Optional Account Information");
-?>
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
-<?php
- form_item("First Name", "firstname", $firstname, false, "", 20);
- form_item("Last Name", "lastname", $lastname, false, "", 20);
- form_item("ICQ UIN", "icquin", $icquin, false, "", 20);
- form_item("AIM Screen Name", "aimname", $aimname, false, "", 40);
- form_item("Yahoo! Screen Name", "yahooname", $yahooname, false, "", 40);
- form_item("Jabber ID", "jabbername", $jabbername, false, "", 40);
- form_item("MSN Name", "msnname", $msnname, false, "", 40);
- form_item("Gadu-Gadu ID", "ggname", $ggname, false, "", 20);
-?>
- </table>
-
- <br />
- <div align="center">
- <input type="reset" value="Clear Fields" />&nbsp;&nbsp;
- <input type="submit" value="Register" />
- </div>
-<?php
- end_section();
-?>
-</form>
-
-<?php
- site_shutdown();
-?>
--- a/htdocs/themes.php Sat Feb 11 13:04:58 2006 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<?php
-header("Location: http://sourceforge.net/tracker/?atid=746976&group_id=235&func=browse");
-?>