mirror of
https://git.code.sf.net/p/quake/website
synced 2025-01-19 07:00:49 +00:00
Okay, let's see if we can finish this.
This commit is contained in:
parent
c8c1639dcd
commit
3136f2ed6e
1 changed files with 8 additions and 128 deletions
136
lib/auth.php
136
lib/auth.php
|
@ -84,70 +84,9 @@ CREATE TABLE members (
|
|||
|
||||
if ($result[auth]) {
|
||||
authCreateSecret ($userName, $result[u_password]);
|
||||
return 1;
|
||||
} else {
|
||||
require siteHome ."/parts/library.php";
|
||||
require siteHome ."/parts/head.php"; // Load the HEAD and open BODY
|
||||
require siteHome ."/parts/topstrip.php"; // Display top strip
|
||||
require siteHome ."/parts/titletable.php"; // Display main title w/ logos
|
||||
?>
|
||||
<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD bgColor="<? echo menuBgColor; ?>">
|
||||
<? include siteHome . "/parts/menu.php"; ?>
|
||||
</TD>
|
||||
<TD width="100%">
|
||||
<? tableHeader ("100%", black); ?>
|
||||
<TR>
|
||||
<? tableSpacer (1, 9, 3, black); ?>
|
||||
</TR>
|
||||
<TR>
|
||||
<? tableSpacer (9, 1, 1, black); ?>
|
||||
<TD>
|
||||
<? require siteHome . "/parts/topmain.php"; ?>
|
||||
</TD>
|
||||
<? tableSpacer (9, 1, 1, black); ?>
|
||||
</TR>
|
||||
<TR>
|
||||
<? tableSpacer (1, 18, 3, black); ?>
|
||||
</TR>
|
||||
<TR>
|
||||
<? tableSpacer (9, 1, 1, black); ?>
|
||||
<TD>
|
||||
<!-- Content Start -->
|
||||
|
||||
<FORM name="login" method="post" action="<? echo thisUrl; ?>">
|
||||
<?
|
||||
tableBoxHeader (featureBgColor, tableHeadColor);
|
||||
tableTitle ("Login incorrect", 1, tableHeadColor);
|
||||
?><TD align="center"><?
|
||||
tableHeader ("100%", featureBgColor);
|
||||
?>
|
||||
<TR vAlign="middle">
|
||||
<TD align="center">
|
||||
<STRONG>User Name:</STRONG>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT name="userName" type="text" size="10">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="middle">
|
||||
<TD align="center">
|
||||
<STRONG>Password:</STRONG>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT name="password" type="password" size="10">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="middle">
|
||||
<TD align="center" colSpan="2">
|
||||
<INPUT TYPE="submit" VALUE="Log in">
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableFooter ();
|
||||
tableBoxFooter ();
|
||||
require siteHome ."/parts/postamble.php";
|
||||
die ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,72 +124,13 @@ CREATE TABLE members (
|
|||
$userName = authCookie ($loginInfo, $userName, $password);
|
||||
} else {
|
||||
if ($userName) {
|
||||
authProcess ($userName, $password);
|
||||
if (!authProcess ($userName, $password)) {
|
||||
$title = "Login incorrect.";
|
||||
require siteHome ."/parts/authform.php";
|
||||
}
|
||||
} else {
|
||||
require siteHome ."/parts/library.php";
|
||||
require siteHome ."/parts/head.php"; // Load the HEAD and open BODY
|
||||
require siteHome ."/parts/topstrip.php"; // Display top strip
|
||||
require siteHome ."/parts/titletable.php"; // Display main title w/ logos
|
||||
?>
|
||||
<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0">
|
||||
<TR vAlign="top">
|
||||
<TD bgColor="<? echo menuBgColor; ?>">
|
||||
<? include siteHome . "/parts/menu.php"; ?>
|
||||
</TD>
|
||||
<TD width="100%">
|
||||
<? tableHeader ("100%", black); ?>
|
||||
<TR>
|
||||
<? tableSpacer (1, 9, 3, black); ?>
|
||||
</TR>
|
||||
<TR>
|
||||
<? tableSpacer (9, 1, 1, black); ?>
|
||||
<TD>
|
||||
<? require siteHome . "/parts/topmain.php"; ?>
|
||||
</TD>
|
||||
<? tableSpacer (9, 1, 1, black); ?>
|
||||
</TR>
|
||||
<TR>
|
||||
<? tableSpacer (1, 18, 3, black); ?>
|
||||
</TR>
|
||||
<TR>
|
||||
<? tableSpacer (9, 1, 1, black); ?>
|
||||
<TD>
|
||||
<!-- Content Start -->
|
||||
|
||||
<FORM name="login" method="post" action="<? echo thisUrl; ?>">
|
||||
<?
|
||||
tableBoxHeader (featureBgColor, tableHeadColor);
|
||||
tableTitle ("Login required", 1, tableHeadColor);
|
||||
?><TD align="center"><?
|
||||
tableHeader ("100%", featureBgColor);
|
||||
?>
|
||||
<TR vAlign="middle">
|
||||
<TD align="center">
|
||||
<STRONG>User Name:</STRONG>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT name="userName" type="text" size="10">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="middle">
|
||||
<TD align="center">
|
||||
<STRONG>Password:</STRONG>
|
||||
</TD>
|
||||
<TD align="center">
|
||||
<INPUT name="password" type="password" size="10">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR vAlign="middle">
|
||||
<TD align="center" colSpan="2">
|
||||
<INPUT TYPE="submit" VALUE="Log in">
|
||||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
tableFooter ();
|
||||
tableBoxFooter ();
|
||||
require siteHome ."/parts/postamble.php";
|
||||
die ();
|
||||
authLoginForm ('Login required');
|
||||
$title = "Login required."
|
||||
require siteHome . "/parts/authform.php";
|
||||
}
|
||||
}
|
||||
$query = "SELECT * FROM members" .
|
||||
|
|
Loading…
Reference in a new issue