!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/slider/   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 (3.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
class Slider
{
    var 
$UserMode   false;
    var 
$AdminMode  true;
    var 
$AdminAsynchMode  true;
    var 
$SearchMode false;
    var 
$PanelMode  true;
    var 
$Table;
    var 
$Directory;
    var 
$FilesDirectory;
    var 
$ClassName 'Slider';
    function 
Slider()
    {
        
$this->FilesDirectory "data/slider/";
        
$this->Directory dirname(__FILE__);
        
$this->Table = new AMTable2('AMCMS_slider');
        
$this->Table->AddIndexField('photo_id');
        
$this->Table->Module($this->ClassName);
        
$this->Table->AddPositionField("photo_position");    
    }
    function 
User()
    {                
         global 
$language$ULANG;      
    }    
    function 
Menu()
    {
        global 
$ALANG;
        return array(
            array(
'title' => "Додати фотографію"'link' => '?mod='.__CLASS__.'&add'),
            array(
'title' => "Список фотографій",     'link' => '?mod='.__CLASS__.'&list')
        );
    }
    function 
Admin()
    {
        global 
$ALANG$alang$_LANG_ID;
        
$smarty GetAdminSmarty($this->ClassName);
        if (isset(
$_GET['list']))
        {                
            
$fields     = array("photo_filename");
            
$captions   = array("Фотографія");
            
$conditions = array("true");
            
$order        "photo_position DESC";
            
$links         = array("checkbox""delete");
            
$multiple     = array("delete");
            
$params     = array("sortable" => "yes""id" => "group".$group['group_id']);
            
$html      .= "<div class=\"page-subtitle\">".$group['group_title_'.GetParam("DefaultLanguage")]."</div>";
            
$html        .= $this->Table->GetAdminTable($fields$captions$conditions$order$links$multiple$params);                    
            
$result['pagename']      = "Список фотографій";
            
$result['Title']         = "Список фотографій";
            
$result['Content']       = $html;
            return 
$result;
        }
                if (isset(
$_GET['add']))
                {
                    if (isset(
$_POST['add']))
                    {
                        for(
$i 0$i count($_FILES['photo']); $i++)
                        {                        
                            if (
strlen($_FILES['photo']['tmp_name'][$i]) > 0)
                            {
                                
$_POST['photo_date'] = GetCurrentDateAndTime();
                                
$_POST['photo_filename'] = $_FILES['photo']['name'][$i];
                                
$id $this->Table->Insert($_POST);
                                
$sourceFile $_FILES['photo']['tmp_name'][$i];
                                
$file2 $this->FilesDirectory."{$id}.jpeg";
                                
$thumb PhpThumbFactory::create($sourceFile);
                                
$w 555;
                                
$h 335;
                                
$thumb->adaptiveResize($w$h)->save($file2);
                            }
                        }
                            
                        
header("Location: ?mod=".__CLASS__."&list");
                        die;
                    }            
                    
                    foreach(
$_POST as $key => $value)
                        
$smarty->assign($key$value);
                    
$smarty->assign('oper''add');
                    
$result['Title']     = $ALANG['BannersAdd'];
                    
$result['Content']     = $smarty->fetch('photo.tpl');
                    return 
$result;
                }
    }    
    function 
Panel()
    {
        global 
$ULANG$ulang;
        
$html  '<div id="slider">';
        
$html .= '<ul id="sliderContent">';
        
$photos $this->Table->GetRows("photo_position DESC");
        foreach(
$photos as $photo)
        {
            
$html .= '<li class="sliderImage">';
            
$html .= "<img src=\"/data/slider/{$photo['photo_id']}.jpeg\" />";
            
$html .= "<span></span>";             $html .= '</li>';
        }
        
$html .= '<div class="clear sliderImage"></div>';
        
$html .= '</ul>';
        
$html .= '</div>';
        
$result['Slider'] = array('Title'   => "     "
                                 
'Module'  => $this->ClassName,
                                 
'Content' => $html);
            
        return 
$result;
    }
    function 
AdminAsynch()
    {
        
$this->Table->Run($_POST);
    }


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

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