增加用户名登录

This commit is contained in:
2026-02-24 21:53:24 +08:00
parent f36d6cb9e9
commit 9ae4e8e614
23 changed files with 388 additions and 110 deletions

View File

@@ -1,28 +1,31 @@
<?php
class myInc {
function links($web_conn=''){
if($web_conn=="agent"){//代理后台
$hostname="121.40.40.53";
if($web_conn=="agent"){//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨
$hostname="127.0.0.1";
$dbuser="sa";
$dbpasswd="Hzsoft@2009";
$dbname="QPPlatformManagerDB";
}elseif($web_conn=="info"){
$hostname="121.40.40.53";
$hostname="127.0.0.1";
$dbuser="sa";
$dbpasswd="Hzsoft@2009";
$dbname="QPTreasureDB";
}elseif($web_conn=="old"){
$hostname="121.40.40.53";
$hostname="127.0.0.1";
$dbuser="sa";
$dbpasswd="Hzsoft@2009";
$dbname="QPAccountsDB";
}else{
$hostname="121.40.40.53";
$hostname="127.0.0.1";
$dbuser="sa";
$dbpasswd="Hzsoft@2009";
$dbname="QPAccountsDB";
}
$this->link=sqlsrv_connect($hostname,["UID"=>$dbuser, "PWD"=>$dbpasswd, "Database"=>$dbname]) or die("数据库用户密码错误!");
$this->link=sqlsrv_connect($hostname,["UID"=>$dbuser, "PWD"=>$dbpasswd, "Database"=>$dbname]);
if($this->link === false){
die("数据库连接失败: ".print_r(sqlsrv_errors(), true));
}
return $this->link;
}
function __destruct(){

View File

@@ -4,7 +4,7 @@ include_once("../inc/admin.smarty.php");
$db = new myConn;
$db->links();
$GG=$db->getpost($GG);
if($GG['id']){
if(!empty($GG['id'])){
$arr = explode(",",$GG['id']);
$idd = implode(',',$arr);
$data = $db->fetch_all("select HeadHttp from IndividualDatum where UserID in (".$idd.")");

View File

@@ -3,10 +3,10 @@ session_start();
include_once("../../inc/class.php");
$db = new myConn;
$GG=array_merge($db->getpost($_POST,"uname|user|3|16|1"),$GG);
$upwd=md5($_POST[upwd]);//MD5加密
$upwd=md5($_POST['upwd']);//MD5<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if($GG['uname'] && $upwd){
if($GG['uname'] == 'admin' && $upwd=='9a7d95c86e6da0fb3b47cd2384cfe27d'){
//写入登录信息及SESSION
//д<EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>SESSION
$_SESSION['XQAdUser']='admin';
echo "/adminxx";
}else{

View File

@@ -2,8 +2,8 @@
ini_set("display_errors", "On");
include_once("../../inc/class.php");
include_once("../../inc/admin.smarty.php");
$ppxq -> caching = ture; //false 缓存关闭 ture 开启
$ppxq -> cache_lifetime = 86400; //缓存时间秒1天
$ppxq -> caching = true; //false <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD> ture <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
$ppxq -> cache_lifetime = 86400; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD>
$ppxq -> display('login.tpl');
unset($GG,$ppxq);
?>