Server IP : 80.241.246.6 / Your IP : 216.73.216.188 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/kharagauli_new/admin/clases/ |
Upload File : |
<?php /** * Class Get * * @author suxoza <suxoza@gmail.com> */ class Get 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'])){ //$this->pre($_->_url_masiv_2); $_->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 tests_(){ echo 'saxli'; } public function make_masiv(){ parent::make_masiv(); $this->_url_masiv_2 = [ //'Eng' => ['','page'], 'Geo' => ['exit','page','lang','მომხმარებლები','კითხვები','გამოკითხვა','რუქა','ლოგები','საკონტაქტო_ინფორმაცია','სლაიდი_1'], ['exit_user','page','lang','users_help','users_help','users_help','map','logs','contact_info','slide_'] ]; } public function exit_user($a){ session_destroy(); header("Location:/"); } public function Hello_word($a){ $_ = $this; $this->render('base', ["menu" => $_->menu_names()] ); //Tester::render(); } public function map($a){ $_ = $this; if(!$_->permission_("map","choose")) throw new Exception("Error Processing Request", 1); $_->_moduls(); $menu = $_->menu_names(); $menu['select_body'] = $_->select_(["*","map","small"]); $_->render("map",["menu" => $menu]); } public function logs($a){ $_ = $this; if(!$_->permission_("logs","view")) throw new Exception("Error Processing Request", 1); $_->_moduls(); $menu = $_->menu_names(); $sql = " select t.*, (case when t.event_name = 0 then 'ჩაწერა' when t.event_name = 1 then 'რედაქტირება' when t.event_name = 2 then 'წაშლა' else 'uncown' end) as event_name, (case when t.user_id = 0 then 'super user' else (select name from users where id = t.user_id) end) as user_name from log t order by timest desc "; $url = explode('/',$_SERVER['REQUEST_URI']); $obj = new stdClass(); $obj->c_type = "navigation"; $obj->count_on_one_page = 500; $obj->navig_name = $url[1]; $obj->navigation = (isset($url[3]) && is_numeric($url[3]))?$url[3]:1; $menu['select_body'] = $_->select_([$sql,$obj]); if(isset($menu['select_body']['navigation'])) $menu['select_body']['navigation'] = $_->navigation($menu['select_body']['navigation'],$obj->navigation); $_->render("logs",["menu" => $menu]); } public function lang($a){ $_ = $this; try{ $lang = $this->URL[array_search('lang',$this->URL) + 1]; if(!$lang)throw new Exception('language error'); $_SESSION['language'] = $lang; header("location:".$_SERVER['HTTP_REFERER']); }catch(Exception $ex){ die($ex->getMessage()); } } public function contact_info($a){ $_ = $this; if(!$_->permission_("contactInfo","choose")) throw new Exception("Error Processing Request", 1); $_->_moduls(); $menu = $_->menu_names(); $menu['select_body'] = $_->select_(["*","contact_info","small"]); $_->render("contact_info",["menu" => $menu]); } public function slide_($a){ $_ = $this; $type = ($a == 'სლაიდი_1')?1:2; if(!$_->permission_("slide".$type,"choose")) throw new Exception("Error Processing Request", 1); $_->_moduls(); $menu = $_->menu_names(); $url = explode('/',$_SERVER['REQUEST_URI']); $obj = new stdClass(); $obj->c_type = "navigation"; $obj->count_on_one_page = 100; $obj->navig_name = $url[1]; $obj->navigation = (isset($url[3]) && is_numeric($url[3]))?$url[3]:1; $sql = " select t.*,t1.name_".$_->_lang." as category_name,t2.menu_id from body t join menu t1 join menu_body t2 on t2.menu_id = t1.id and t2.body_id = t.id and t.slide_".$type." = 1 group by t.id order by t.id desc "; $menu['select_body'] = $_->select_([$sql,$obj]); if(isset($menu['select_body']['navigation'])) $menu['select_body']['navigation'] = $_->navigation($menu['select_body']['navigation'],$obj->navigation); $menu['type'] = $type; $_->render("slide",["menu" => $menu]); } }