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

📄 adm.inc.php

📁 学校网站源码http://您的网址/admin/admin_login.asp 默认登录用户:admin 默认登录密码:admin
💻 PHP
字号:
<?php


function admincheck( )
{
	global $msql;
	global $tbl_admin;
	global $strAdminLoginErr1;
	global $strAdminLoginErr2;
	global $strAdminLoginErr3;
	global $charset;
	
	$user = $_POST['user'];
	$password = $_POST['password'];
	$ImgCode = $_POST['ImgCode'];
	$oem = $_POST['oem'];
	if ( $user == "" || $password == "" )
	{
		echo "<html><head><title>LOGIN</title><meta http-equiv='Content-Type' content='text/html; charset=".$charset."'></head>";
		echo err( $strAdminLoginErr1, "index.php", "" );
		exit( );
	}
	$Ic = $_COOKIE['SYSIMG'];
	$Ic = strrev( $Ic ) + 5 * 2 - 9;
	$Ic = substr( $Ic, 0, 4 );
	if ( $oem != "yes" && ( $ImgCode == "" || $Ic != $ImgCode ) )
	{
		echo "<html><head><title>LOGIN</title><meta http-equiv='Content-Type' content='text/html; charset=".$charset."'></head>";
		echo err( $strAdminLoginErr3, "index.php", "" );
		exit( );
	}
	$md5pass = md5( $password );
	$msql->query( "select * from {$tbl_admin} where user='{$user}' and password='{$md5pass}'" );
	if ( $msql->next_record( ) )
	{
		$psd = $msql->f( "password" );
		$name = $msql->f( "name" );
		$tm = time( );
		$md5 = md5( $user."l0aZXUYJ876Mn5rQoL55B".$psd.$tm );
		setcookie( "SYSZC", $md5 );
		setcookie( "SYSUSER", $user );
		setcookie( "SYSNAME", $name );
		setcookie( "SYSTM", $tm );
		echo "<script>window.location='main.php'</script>";
	}
	else
	{
		echo "<html><head><title>LOGIN</title><meta http-equiv='Content-Type' content='text/html; charset=".$charset."'></head>";
		echo err( $strAdminLoginErr2, "index.php", "" );
		exit( );
	}
}

function needauth( $au )
{
	global $msql;
	global $tbl_admin;
	global $tbl_admin_rights;
	global $PHP_SELF;
	if ( !isset( $_COOKIE['SYSUSER'] ) || $_COOKIE['SYSUSER'] == "" )
	{
		echo "<script>top.location='logout.php'</script>";
		exit( );
	}
	$msql->query( "select * from {$tbl_admin} where user='".$_COOKIE['SYSUSER']."'" );
	if ( $msql->next_record( ) )
	{
		$psd = $msql->f( "password" );
		$needmd5 = md5( $_COOKIE['SYSUSER']."l0aZXUYJ876Mn5rQoL55B".$psd.$_COOKIE['SYSTM'] );
		if ( $needmd5 != $_COOKIE['SYSZC'] )
		{
			echo "<script>top.location='logout.php'</script>";
			exit( );
		}
		if ( $au != "0" )
		{
			$msql->query( "select * from {$tbl_admin_rights} where user='".$_COOKIE['SYSUSER']."' and auth='{$au}'" );
			if ( $msql->next_record( ) )
			{
			}
			else
			{
				echo "<script>window.location='noright.php'</script>";
				exit( );
			}
		}
	}
	else
	{
		echo "<script>top.location='logout.php'</script>";
		exit( );
	}
}

function sendback( $reson )
{
	global $charset;
	echo "<html><head>\r\n\t\t\t<title>LOGIN</title><meta http-equiv='Content-Type' content='text/html; charset=".$charset."'></head>";
	echo "<script>alert(\"{$reson}\");\r\n\twindow.location='javascript:history.back()';\r\n\t</script>";
	exit( );
}

function trylimit( $tbl, $nums )
{
	
	global $msql;
	if ( $lic_3 == "try" )
	{
		$msql->query( "select count(id) from {$tbl}" );
		if ( $msql->next_record( ) )
		{
			$WaStarCount = $msql->f( "count(id)" );
			if ( $nums <= $WaStarCount )
			{
				echo "NOTICE : Limited For Try Version";
				exit( );
			}
		}
	}
}

?>

⌨️ 快捷键说明

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