⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.php

📁 我不介意你怎么用这个程序
💻 PHP
字号:
<?php
include("includes/fun_post.php");
if(!empty($_POST["name"]))
{
	include("includes/fun_data.php" );
	include("includes/inc_var.php");
	DB($g_db_host, $g_db_name, $g_db_user, $g_db_password);
	$db = new DBReader;
	$sql = "SELECT * FROM `".$g_db_prefix."user` WHERE u_name='".$_POST["name"]."' AND u_password=MD5('".$_POST["password"]."')";
	$db->execute($sql);
	if(0==$db->count())
	{
		echo "<script language='javascript'>window.alert('用户名、密码或域名错误!');self.location='login.php';</script>";
		exit();
	}
	$dbrow = $db->reader();
	session_start();
	$_SESSION["user_id"]=$dbrow["u_ID"];
	echo "<script language='javascript'>window.alert('用户 ".$_POST["name"]." 登陆成功!');self.location='fream.php';</script>";
	exit();
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="includes/main.css">
<title>星雨留言板</title>
</head>

<body>
<table width="450" border="0" cellspacing="2" cellpadding="0" align="center" class="tableborder">
  <form name="form" method="post" action="login.php">
    <tr> 
      <td colspan="2" align="center"><blockquote>
          <p>星雨留言板-PHP 管理登陆</p>
        </blockquote></td>
    </tr>
    <tr> 
      <td colspan="2">
          <p>欢迎使用“雨留言板-PHP 管理系统”,登陆后您可以进行以下操作:</p>
          <blockquote><ol>
            <li>查看您申请的留言板信息。</li>
            <li>删除与回复留言。</li>
            <li>修改留言板资料,包括管理密码、主页、管理员邮件等。</li>
          </ol>
        </blockquote>
        <p><font color="#FF0000">注意:</font>非授权使用本管理系统,请勿尝试登录。对于任何非授权的使用,我们将保留所有的权利。对于由于非法使用造成的损失,我们将予以追究。</p></td>
    </tr>
    <tr> 
      <td width="36%" align="right"> 用户名: </td>
      <td width="64%"> <input type="text" name="name" class="TextBox"></td>
    </tr>
    <tr> 
      <td align="right"> 密码: </td>
      <td> <input type="password" name="password" class="TextBox"></td>
    </tr>
    <tr> 
      <td colspan="2" align="center"> <input type="submit" name="Submit" value="登陆" class="Button"> 
      </td>
    </tr>
    <tr> 
      <td colspan="2" align="center"><a href="#" onClick="javascript:history.go(-1)">返回</a></td>
    </tr>
  </form>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -