mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-23 12:42:21 +00:00
Minor tweaks.
This commit is contained in:
parent
2e96c8bf85
commit
c8a8e73ea7
3 changed files with 169 additions and 165 deletions
|
@ -4,9 +4,9 @@
|
|||
require("parts/preamble.php"); // Load most of document
|
||||
?>
|
||||
<!--SEARCHME-->
|
||||
<P>Website Copyright © 1999,2000 contributors of the QuakeForge Project.
|
||||
<P>Web site Copyright © 1999-<? echo date("Y"); ?> the QuakeForge Project.
|
||||
|
||||
<P>QuakeForge is Copyright © 1999,2000 contributors of the QuakeForge project.<BR>
|
||||
<P>QuakeForge is Copyright © 1999-<? echo date("Y"); ?> the QuakeForge project.<BR>
|
||||
Portions Copyright © 1996-1997 id Software, Inc.
|
||||
|
||||
<P>Quake® and QuakeWorld® are registered trademarks of id Software, Inc.
|
||||
|
|
|
@ -1,161 +1,165 @@
|
|||
<? // Preamble
|
||||
$pageName = "Admin - Add User";
|
||||
$focused = "home"; // Dock icon name to gets a border
|
||||
$need = 'auth';
|
||||
require("../parts/preamble.php"); // Load most of document
|
||||
?>
|
||||
<?
|
||||
if ($u_username) {
|
||||
need('sql');
|
||||
|
||||
$u_username = AddSlashes($u_username);
|
||||
$u_fullname = AddSlashes($u_fullname);
|
||||
$u_email = AddSlashes($u_email);
|
||||
$u_password = AddSlashes($u_password);
|
||||
$u_addr1 = AddSlashes($u_addr1);
|
||||
$u_phone = AddSlashes($u_phone);
|
||||
$u_addr2 = AddSlashes($u_addr2);
|
||||
$u_country = AddSlashes($u_country);
|
||||
$u_admin = ($u_admin) ? 'Y' : 'N';
|
||||
|
||||
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
||||
if ($conn) {
|
||||
$query1 = 'INSERT into members (u_username, u_fullname, u_email, u_password, u_addr1, u_phone, u_addr2, u_country, u_admin) VALUES (' .
|
||||
" '$u_username', '$u_fullname', '$u_email', ENCRYPT('$u_password', '$u_username'), '$u_addr1', '$u_phone', '$u_addr2', '$u_country', '$u_admin')";
|
||||
|
||||
$result = mysql_db_query (sqlDB, $query1, $conn);
|
||||
if ($result) {
|
||||
$numRows = mysql_affected_rows ($conn);
|
||||
if ($numRows) {
|
||||
echo '<P>User added to members dbase successfully.';
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
$query2 = 'INSERT into devel_plans (p_user, p_date, p_plan) VALUES (' .
|
||||
"'$u_username', NOW(), 'None')";
|
||||
$result2 = mysql_db_query (sqlDB, $query2, $conn);
|
||||
if ($result2) {
|
||||
$numRows2 = mysql_affected_rows ($conn);
|
||||
if ($numRows2) {
|
||||
echo '<P>User added to plan dbase successfully.';
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
mysql_close ($conn);
|
||||
} else {
|
||||
echo 'You suck, butthead.';
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<FORM action="adduser.php" method="post">
|
||||
<?
|
||||
tableBoxHeader (featureBgColor, tableHeadColor);
|
||||
tableTitle ("Required Information", 1, tableHeadColor);
|
||||
?>
|
||||
<TR>
|
||||
<TD>
|
||||
<? tableHeader ('100%', featureBgColor); ?>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Username:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_username" size="12"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Real Name:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_fullname" size="24"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Email:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_email" size="12"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Password:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="password" name="u_password" size="12"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<? tableFooter (); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableTitle ("Requested Information", 1, tableHeadColor);
|
||||
?>
|
||||
<TR>
|
||||
<TD>
|
||||
<? tableHeader ('100%', featureBgColor); ?>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Street:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_addr1" size="18"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Phone #:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_phone" size="18"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
C/S/ZIP:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_addr2" size="18"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Country:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_country" size="12"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<? tableFooter (); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableTitle ("Special Information", 1, tableHeadColor);
|
||||
?>
|
||||
<TR>
|
||||
<TD>
|
||||
<? tableHeader ('100%', featureBgColor); ?>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Admin status?
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="checkbox" name="u_admin"></INPUT>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT type="submit" value="Add User"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<? tableFooter (); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableBoxFooter ();
|
||||
?>
|
||||
</FORM>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<?
|
||||
require (siteHome ."/parts/postamble.php"); // Finish this sucker up
|
||||
?>
|
||||
<? // Preamble
|
||||
$pageName = "Admin - Add User";
|
||||
$focused = "home"; // Dock icon name to gets a border
|
||||
$need = 'auth';
|
||||
require "../parts/preamble.php"; // Load most of document
|
||||
?>
|
||||
<?
|
||||
if ($userInfo[u_admin] == 'Y' && $u_username) {
|
||||
need('sql');
|
||||
|
||||
$u_username = AddSlashes ($u_username);
|
||||
$u_fullname = AddSlashes ($u_fullname);
|
||||
$u_email = AddSlashes ($u_email);
|
||||
$u_password = AddSlashes ($u_password);
|
||||
$u_addr1 = AddSlashes ($u_addr1);
|
||||
$u_phone = AddSlashes ($u_phone);
|
||||
$u_addr2 = AddSlashes ($u_addr2);
|
||||
$u_country = AddSlashes ($u_country);
|
||||
$u_admin = ($u_admin) ? 'Y' : 'N';
|
||||
|
||||
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
||||
if ($conn) {
|
||||
$query1 = 'INSERT into members (u_username, u_fullname, u_email, u_password, u_addr1, u_phone, u_addr2, u_country, u_admin) VALUES (' .
|
||||
" '$u_username', '$u_fullname', '$u_email', ENCRYPT('$u_password', '$u_username'), '$u_addr1', '$u_phone', '$u_addr2', '$u_country', '$u_admin')";
|
||||
|
||||
$result = mysql_db_query (sqlDB, $query1, $conn);
|
||||
if ($result) {
|
||||
$numRows = mysql_affected_rows ($conn);
|
||||
if ($numRows) {
|
||||
echo "<P>User "$u_username" added to members database successfully.";
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
|
||||
$query2 = "INSERT into devel_plans (p_user, p_date, p_plan) VALUES ('$u_username', NOW(), 'None')";
|
||||
$result2 = mysql_db_query (sqlDB, $query2, $conn);
|
||||
if ($result2) {
|
||||
$numRows2 = mysql_affected_rows ($conn);
|
||||
if ($numRows2) {
|
||||
echo "<P>User "$u_username" added to plan dbase successfully.";
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
} else {
|
||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
||||
}
|
||||
mysql_close ($conn);
|
||||
} else {
|
||||
echo 'You suck, butthead. (the SQL server could not be contacted)';
|
||||
}
|
||||
} else {
|
||||
if ($userInfo[u_admin] == 'Y') {
|
||||
?>
|
||||
<FORM action="adduser.php" method="post">
|
||||
<?
|
||||
tableBoxHeader (featureBgColor, tableHeadColor);
|
||||
tableTitle ("Required Information", 1, tableHeadColor);
|
||||
?>
|
||||
<TR>
|
||||
<TD>
|
||||
<? tableHeader ('100%', featureBgColor); ?>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Username:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_username" size="12"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Real Name:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_fullname" size="24"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Email:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_email" size="12"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Password:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="password" name="u_password" size="12"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<? tableFooter (); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableTitle ("Requested Information", 1, tableHeadColor);
|
||||
?>
|
||||
<TR>
|
||||
<TD>
|
||||
<? tableHeader ('100%', featureBgColor); ?>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Street:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_addr1" size="18"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Phone #:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_phone" size="18"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
C/S/ZIP:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_addr2" size="18"></INPUT>
|
||||
</TD>
|
||||
<TD align="right" noWrap>
|
||||
Country:
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="text" name="u_country" size="12"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<? tableFooter (); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableTitle ("Special Information", 1, tableHeadColor);
|
||||
?>
|
||||
<TR>
|
||||
<TD>
|
||||
<? tableHeader ('100%', featureBgColor); ?>
|
||||
<TR vAlign="center">
|
||||
<TD align="right" noWrap>
|
||||
Admin status?
|
||||
</TD>
|
||||
<TD align="left">
|
||||
<INPUT type="checkbox" name="u_admin"></INPUT>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT type="submit" value="Add User"></INPUT>
|
||||
</TD>
|
||||
</TR>
|
||||
<? tableFooter (); ?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableBoxFooter ();
|
||||
?>
|
||||
</FORM>
|
||||
<?
|
||||
} else {
|
||||
echo '<P>You are not authorized to view this page. Now go away or I shall taunt you a second time!';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?
|
||||
require siteHome . "/parts/postamble.php"; // Finish this sucker up
|
||||
?>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<TR>
|
||||
<TD align="center">
|
||||
<SPAN class="titleBar">
|
||||
Copyright © 1999,2000 contributors of the QuakeForge Project.<BR>
|
||||
<A class="mainTitleBar" href="copyright.php">Additional Copyright and Trademark Acknowledgements</A>
|
||||
Copyright © 1999-<? echo date("Y"); ?> the QuakeForge Project.<BR>
|
||||
<A class="mainTitleBar" href="/copyright.php">Additional Copyright and Trademark Acknowledgements</A>
|
||||
</SPAN>
|
||||
</TD>
|
||||
</TR>
|
||||
|
|
Loading…
Reference in a new issue