Advertisement
| Hall of Fame |
|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: |
**************LOGIN PAGE/index.php ********************
<?php include "admin_login.php"; ?>
<?
function is_numericc($n) {
if (ereg("^[0-9]+", $n)) {
return(1);
} else {
return(0);
}
}
?>
<?php include "header.php"; ?>
<table border="0" width="100%">
<tr>
<td width="100%">
<hr color="#000080">
</td>
</tr>
<tr>
<td width="100%"><font color="#000080" size="3"><b>Login Successful!</b></font></td>
</tr>
<tr>
<td width="100%">
<hr color="#000080">
</td>
</tr>
</table>
***********admin_login.php******************
<?php
if ($error_code == 1) {
setcookie("userid");
setcookie("userpassword");
unset($useridin);
unset($userpasswordin);
}
if (!isset($useridin)) {
if ($error_code == 0) {
if (isset($userid)) {
$useridin = $userid;
$userpasswordin = $userpassword;
//$useridin = arunj;
//$userpasswordin = almega;
}
}
} else {
if($error_code == 0) {
setcookie("userid", $useridin, time()+7200);
setcookie("userpassword", $userpasswordin, time()+7200);
}
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<p>
<?php include "details.php";
if (!isset($useridin)) {
if (isset($userid) AND !isset($action)) {
$useridin = $userid;
$userpasswordin = $userpassword;
}
?>
<p align="center"><font color="#000000" size="4">Please Login<br>
</font>
<hr color="#000080">
<form method="post" action="<?php echo $PHP_SELF;?>">
<DIV ALIGN="CENTER"><CENTER>
<TABLE BORDER="1" WIDTH="200" CELLPADDING="2">
<TR>
<TH WIDTH="18%" ALIGN="RIGHT" NOWRAP><font color="#000000">ID</font></TH>
<TD WIDTH="82%" NOWRAP>
<INPUT TYPE="TEXT" NAME="useridin" SIZE="8">
</TD>
</TR>
<TR>
<TH WIDTH="18%" ALIGN="RIGHT" NOWRAP><font color="#000000">Password</font></TH>
<TD WIDTH="82%" NOWRAP>
<INPUT TYPE="PASSWORD" NAME="userpasswordin" SIZE="8">
</TD>
</TR>
<TR>
<TD WIDTH="100%" COLSPAN="2" ALIGN="CENTER" NOWRAP>
<INPUT TYPE="SUBMIT" VALUE="LOGIN" NAME="Submit" style="font-family: Times New Roman; font-size: 12pt; color: #000080">
<input type="hidden" name="error_code" value="<? echo $error_code; ?>">
</TD>
</TR>
</TABLE>
</CENTER></DIV>
</FORM>
<p align="left">
<?
exit;
}
else {
// Connect to the database server
$dbcnx = @mysql_connect("localhost", $username, $pwd);
if (!$dbcnx) {
echo( "<P align=center><b><font color=#FF0000>Error !<BR><BR>Please check your userid and password.</font></b></P>" );
exit();
}
// Select the database
if (!@mysql_select_db($dbname) ) {
echo( "<P align=center><b><font color=#FF0000>Unable to locate your " .
"database at this time.</font></b> </P>" );
exit();
}
$userpasswordin = crypt($userpasswordin, '.v');
$query = "SELECT userid FROM users WHERE userid = '$useridin' AND userpassword = '$userpasswordin'";
$result = mysql_query($query);
if(!mysql_num_rows($result)) {
unset($useridin);
unset($userpasswordin);
$error_code = 1;
?>
<form method="post" action="<?php echo $PHP_SELF;?>">
<DIV ALIGN="CENTER"><CENTER>
<TABLE BORDER="1" WIDTH="200" CELLPADDING="2">
<TR>
<TD WIDTH="100%" ALIGN="CENTER" NOWRAP>
<p align="center">
<b><font color="#000000">Unsuccessful Login !</font><br>
<font color="#FF0000">Invalid username or password</font><br>
<font color="#000000">Try again.</font><BR>
</b>
</TD>
</TR>
<TR>
<TD WIDTH="100%" ALIGN="CENTER" NOWRAP>
<INPUT TYPE="SUBMIT" VALUE="Try Again" NAME="Submit" style="font-family: Times New Roman; font-size: 12pt; color: #000080">
<input type = "hidden" name="error_code" value="<? echo $error_code?>">
</TD>
</TR>
</TABLE>
</CENTER></DIV>
</FORM>
<p align="left">
<?
exit;
} else {
$userid = $useridin;
$userpassword = $userpasswordin;
$msg = "To perform maintenance, select a property type from menu at left";
$error_code = 0;
// Request the company environment variables
$result = mysql_query("SELECT * FROM cart_env");
$num = mysql_numrows($result);
if ($num == 0) {
// Display no company variables message
echo("<P align=center><B><font color=#FF0000>There are currently no Company Variables defined.</font></b></P>");
}
// Store variables for later use
$row = mysql_fetch_array($result);
$ce_logo_url = $row["ce_logo_url"];
$ce_recipient = $row["ce_recipient"];
$ce_shipping = $row["ce_shipping"];
}
}
?>
************details.php********
<?php
$username = "admin";
$pwd = "manager";
$dbname = "my_db";
$sitename = "";
$sitename = "http://$path_str";
$companyname = "My_company.";
$default_dir = "../images";
$pic_dir = "../images/";
?>
|