403Webshell
Server IP : 80.241.246.6  /  Your IP : 216.73.216.167
Web Server : Apache/2.4.25 (Debian)
System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User : www-data ( 33)
PHP Version : 7.0.33-0+deb9u12
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/kharagauli1/clases/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/kharagauli1/clases/Post.php
<?php
/**
 * Class Post
 *
 * @author suxoza <suxoza@gmail.com>
 */


class Post extends Base_class{
    
    public  $_url_masiv_2;
    private $URL;
    
    
    
    public function __construct(){
      parent::__construct();
      $this->URL = explode('/',urldecode($_SERVER['REQUEST_URI']));
      $this->make_url();
     
      
    }
    
    public function make_url(){
        $_ = $this;
            $_->make_masiv();
            $lang = 1;
            $_->_url = $_->URL[$lang];
            $_->_url = (!$_->_url || strlen($_->_url) < 2)?'/':$_->_url;
            try{
                
                if($_->_url && in_array($_->_url,$_->_url_masiv['Geo']))
                   $_->reflection($_->_url_masiv,__CLASS__);  
                elseif($_->_url && in_array($_->_url,$_->_url_masiv_2['Geo']))
                   $_->reflection($_->_url_masiv_2,__CLASS__); 
                ///widgets
                elseif($_->_url && in_array($_->_url,$_->_widgets[0])){
                    $reflection = new ReflectionClass(__CLASS__);
                    echo $reflection->getMethod('widgets')->invoke($_,$_->_url);
                }
                ///end widgets
                else  throw new Page_not_found; 
            }catch(Page_not_found $ex){
                die($this->render('404',["menu" => $_->menu_names(),'message' => $ex->getMessage()]));
            }
        
    }

    public function make_masiv(){
        parent::make_masiv();
        $this->_url_masiv_2 = [
            //'Eng' => ['add_new_category','add_new_category_change','change_menu_pos','page'],
            'Geo' => ['add_new_category','add_new_category_change','change_menu_pos','page'],
            ['add_new_category','add_new_category_change','change_menu_pos','page']
        ];
    }
    
    public function change_menu_pos($a){
        $_ = $this;
        $id = $_->clier($_POST['change_menu_pos_id']);
        $pos = $_->clier($_POST['change_menu_pos']);
        if($_->update("menu",[["menu_pos"],[$pos],["id",$id]]))
            header("Location:".$_SERVER['HTTP_REFERER'].$_COOKIE['location_href_menu']);
    }


    public function add_new_category($a){//HTTP_REFERER
        $_ = $this;
        $category = $_->clear($_POST['category']);
        $parent = (isset($_POST['parent']) && $_POST['parent'])?$_->clear($_POST['parent']):0;
        $menu_pos = $_->clear($_POST['menu_pos']);
        $category_name = 0;
        $open_in = (isset($_POST['open_in']))?1:0;
        $_url_page = 0;
        $_url_site = '';
        $location_url = '';
        if($category == 0){
            $location_url = 'none';
            if(!isset($_POST['page_action_2']) || !is_numeric($_POST['page_action_2']))return;
            $category_name = $_->clier($_POST['page_action_2']);
                if($_POST['page_action_2'] == 1){
                    if(!isset($_POST['page_action_3']) || !is_numeric($_POST['page_action_3']))return;
                      $_url_page = $_->clier($_POST['page_action_3']);
                      $location_url = '/page/'.$_url_page;
                }elseif($_POST['page_action_2'] == 2){
                    if(!isset($_POST['href_url']) || !filter_var($_POST['href_url'], FILTER_VALIDATE_URL))return;
                      $_url_site = $_->clier($_POST['href_url']);
                      
                }
        }
        $def_ = $_->language_config[0];
        
        $home_page = $_->select('id',"menu","count",["home_page",1])?0:1;
        
        $insert_ = ["parent","menu_pos",
                  "category","category_name","open_in","url_page","url_site","date","home_page"];
        $value_ = [$parent,$menu_pos,
                  $category,$category_name,$open_in,$_url_page,$_url_site,time(),$home_page];
        
        for($i = 0; $i < count($_->language_config); $i++){
           $insert_[] = "url_".$_->language_config[$i];
           $insert_[] = "name_".$_->language_config[$i];
           $value_[] = $_->clier($_POST['URL_'.$_->language_config[$i]]);
           $value_[] = $_->clier($_POST['name_'.$_->language_config[$i]]);
        }
        
        if($_->insert("menu",[$insert_,$value_])){
            $ID = $_->select("max(id)","menu","small",["parent",$parent,"menu_pos",
                                                       $menu_pos,"category",$category]);
            if($category){
                $_->insert("body",[
                        ["page_id","name_".$def_,"date"],
                        [$ID,$_->clear($_POST['name_'.$def_]),time()]]
                    );
            }
            
            $return_location = (!$location_url)?'/page/'.$ID:$_SERVER['HTTP_REFERER'];
            $return_location = ($location_url == 'none')?$_SERVER['HTTP_REFERER']:$return_location;
             header("Location:".$return_location.$_COOKIE['location_href_menu']);  
         }else echo 'error from insert';
    }

    public function add_new_category_change($a){//HTTP_REFERER
        $_ = $this;
        if(!isset($_POST['page_id']))return;
        $_id = $_->clear($_POST['page_id']);
        $category = $_->clear($_POST['category']);
        $category_name = 0;
        $open_in = (isset($_POST['open_in']))?1:0;
        $_url_page = 0;
        $_url_site = '';
        if($category == 0){
            if(!isset($_POST['page_action_2']) || !is_numeric($_POST['page_action_2']))return;
            $category_name = $_->clier($_POST['page_action_2']);
                if($_POST['page_action_2'] == 1){
                    if(!isset($_POST['page_action_3']) || !is_numeric($_POST['page_action_3']))return;
                      $_url_page = $_->clier($_POST['page_action_3']);
                }elseif($_POST['page_action_2'] == 2){
                    if(!isset($_POST['href_url']) || !filter_var($_POST['href_url'], FILTER_VALIDATE_URL))return;
                      $_url_site = $_->clier($_POST['href_url']);
                }
        }else{
            $def_ = $_->language_config[0];
                    if(!$_->select("id","body","count",["page_id",$_id])){
                       $selected = $_->select("name_".$def_,"menu","small",["id",$_id]); 
                        $_->insert("body",[
                                ["page_id","name_".$def_,"date"],
                                [$_id,$selected,time()]]
                            );
                    }  
            }
         if($_->select("id","menu","count",["category_name",1,"url_page",$_id])){
                $_href = (!$category)?'none':'';
                if($_url_page)$_href = $_url_page;
                elseif($_url_site)$_href = $_url_site;
                $_->update("menu",[["url_site"],[$_href],["url_page",$_id]]);
         }
         
        $insert_ = ["category","category_name","open_in","url_page","url_site","modify_date"];
        $value_  = [$category,$category_name,$open_in,$_url_page,$_url_site,time()]; 
         
        
        for($i = 0; $i < count($_->language_config); $i++){
           $insert_[] = "url_".$_->language_config[$i];
           $value_[] = $_->clier($_POST['URL_'.$_->language_config[$i]]);
        }
         
        
         if($_->update("menu",[$insert_,$value_,["id",$_id]]))
            header("Location:".$_SERVER['HTTP_REFERER'].$_COOKIE['location_href_menu']);  
       else echo 'error from update';  
    }
    
 
    
}    

Youez - 2016 - github.com/yon3zu
LinuXploit