C:\xampp\htdocs\kptv\admin\modules\login\act_adminlogin.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
require_once($CONFPATH "siteconf_.php");
require_once(
$LIBPATH "module_.php");
require_once(
$LIBPATH "utilfunc.php");

class 
act_adminlogin extends module_ {
    var 
$resultArr NULL;
    
    function 
Data_() {
        
parent::db_connect_();
        global 
$TBL_ACCOUNTS;
        if(
$this->status_ == 1) {
            if(
TestVars(array("UserName""Password"), $_POST)) {
                    
$this->resultArr $this->db_->Select($TBL_ACCOUNTSnull, array("UserName"), array($_POST["UserName"]), "AND"falsetrue);        
                    
// var_dump($this->resultArr);
                    // die();
            
}else
                
$this->status_ 5;
        }
    }                
    
    function 
Process_() {
        if(
$this->status_ == && count($this->resultArr) > 0)  {
                
                echo 
$_POST['Password']."<br />";
                echo 
$this->resultArr[0]->Password."<br />";
                echo 
crypt($_POST['Password'], $this->resultArr[0]->Password);
                
                 if(
crypt($_POST['Password'], $this->resultArr[0]->Password) == $this->resultArr[0]->Password) {
                     if(
$this->resultArr[0]->Enabled)  {
                        
parent::session_connect_();
                        
$this->session_->setVar("logged_""yes");
                        
$this->session_->setVar("rights"$this->resultArr[0]->Rights);
                        
$this->session_->setVar("LID"$this->resultArr[0]->ID);                                                                                                                    
                        
$this->session_->setVar("uname"$this->resultArr[0]->UserName);
                    } 
                    else  
                        
$this->status_ 16;
                 } 
                     else 
$this->status_ 452;                 
        } else 
            
$this->status_ 452// invalid uname or pass
    
}
    
    function 
Results_() {
        if(
$this->status_!=1) {
            
header("location:index.php?st=$this->status_");            
            exit();
        }
        else    
            
header("location:index.php");
    }
}
?>
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586