admin.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?PHP
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:
- */
- error_reporting(0);
- require_once("./class/mysql_class.php");
- require_once("./class/template_class.php");
- require_once("./class/activeCodeObj.php");
- require_once("./config.php");
- require_once("./function/checkBaseSession.php");
- $_SESSION=getBBWPSSession("./$session/");
- if(file_exists("./data/module.php")){
- require("./data/module.php");
- }
- $mod = $_GET['mod'];
- $admin_username = $_POST['username'];
- $admin_password = md5($_POST['password']);
- if($mod=="login"){
- if(function_exists("imagecreatetruecolor")){
- if($_SESSION['bbwps_yz_code']!=md5($_POST['post_bbwps_yz'])){
- print ("<script language=javascript>alert('你输入的验证码不正确!');window.history.back();</script>");
- exit();
- }
- }
- $db=new DB($hostname,$username,$password,$database);
- $sql = "select * from ".$prefix."user where user='$admin_username'";
- $result = $db->query($sql,true);
- while ($row=$db->fetch_array($result)) {
- if($row["pwd"]==$admin_password){
- $SessionData = array('BBWPS_BASE_USERNAME'=>$admin_username,'BBWPS_BASE_PASSWORD'=>$admin_password,'BBWPS_BASE_POPEDOM'=>$row['popedom']);
- bbwpsSetSession("./$session/",$SessionData);
- if(file_exists("./loginfile.php")){
- require_once("./loginfile.php");
- }
- exit("<meta http-equiv="refresh" content="0;url=http://".$host.$installPath."/admin/$baseLoginFile">");
- }
- }
- exit();
- }
- $path=$_GET["path"];
- $file=$_GET["file"].".php";
- $para=$_SERVER['QUERY_STRING'];
- $url=$path.$file;
- if($path&&$file){
- $basePath = "http://".$host.$installPath."/release.php";
- $_SESSION = getBBWPSSession("./$session/");
- checkBaseSession("./$session/",TRUE);
- print("<meta http-equiv="refresh" content="0;url=".$url."?".$para."">");
- exit;
- }
- $p=new Template("admin/template");
- $p->set_file("login1","login.html");
- if(function_exists("imagecreatetruecolor")){
- $p->set_var("display","");
- }else {
- $p->set_var("display","none");
- }
- $p->parse("login2","login1");
- $p->p("login2");
- unset($db,$username,$pwd,$sql);
- ?>