求这样一个系统登陆界面代码?用ASP做
3个回答
展开全部
<?php require_once('Connections/shopcart.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "index")) {
$insertSQL = sprintf("INSERT INTO adminip (username, admin_date, admin_ip) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['admin_date'], "date"),
GetSQLValueString($_POST['admin_ip'], "text"));
mysql_select_db($database_shopcart, $shopcart);
$Result1 = mysql_query($insertSQL, $shopcart) or die(mysql_error());
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "level";
$MM_redirectLoginSuccess = "main.php";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = true;
mysql_select_db($database_shopcart, $shopcart);
$LoginRS__query=sprintf("SELECT username, password, level FROM member WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $shopcart) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'level');
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && true) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=md5($_POST['password']);
$MM_fldUserAuthorization = "level";
$MM_redirectLoginSuccess = "main.php";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_shopcart, $shopcart);
$LoginRS__query=sprintf("SELECT username, password, level FROM member WHERE username=%s AND password=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query, $shopcart) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = mysql_result($LoginRS,0,'level');
if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FMK进销存系统</title>
<meta name="robots" content="noindex,nofollow" />
<meta http-equiv="Content-Language" content="zh-tw" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<body>
<div id="login">
<form action="<?php echo $editFormAction; ?><?php echo $loginFormAction; ?>" method="POST" name="index" id="index">
<table width="536" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" colspan="4" valign="middle"><img src="images/chengli_1.jpg" alt="" width="537" height="97" /></td>
</tr>
<tr>
<td width="212" rowspan="4" align="left" valign="top"><img src="images/chengli_2.jpg" alt="" width="212" height="105" /></td>
<td width="165" height="33"><img src="images/chengli_3.jpg" alt="" width="165" height="33" /></td>
<td width="110" rowspan="4" align="left" valign="top"><label>
<input type="image" name="imageField" id="imageField" src="images/chengli_4.jpg" />
</label></td>
<td width="51" rowspan="4" valign="top"><img src="images/chengli_5.jpg" alt="" width="50" height="105" /></td>
</tr>
<tr>
<td height="27"><input name="username" type="text" id="username" size="18" /></td>
</tr>
<tr>
<td height="16"><img src="images/chengli_7.jpg" alt="" width="165" height="16" /></td>
</tr>
<tr>
<td><input name="password" type="password" id="password" size="18" /></td>
</tr>
<tr>
<td height="92" colspan="4" align="left" valign="top"><img src="images/chengli_9.jpg" alt="" width="537" height="92" /></td>
</tr>
</table>
<input name="admin_date" type="hidden" id="admin_date" value="<? echo date("Y-m-d H:i:s");?>" />
<input name="admin_ip" type="hidden" id="admin_ip" value="<? echo $_SERVER["REMOTE_ADDR"];?>" />
<input type="hidden" name="MM_insert" value="index" />
</form>
</div>
</body>
</html>
展开全部
你可以把图片给我,直接做成HTML+Asp的
追问
Q:719546598
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你这个不是ASP的???
更多追问追答
追问
是啊 求要代码?
追答
是不就行了吗?你都有了还要什么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询