403Webshell
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/kharagauli1/site/view/templates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/kharagauli1/site/view/templates/templates.php
<?php
/*
@author suxoza <suxoza@gmail.com>
*/
header("Content-type: text/html; Charset=utf-8");
  session_start();
   mb_internal_encoding("UTF-8");
    error_reporting(E_ALL);
     date_default_timezone_set("Asia/Tbilisi");
     
     require_once '../../clases/Central.php';
     
     $_ = new Central;
     $language = $_->_lang;
    
    if(count($_POST) && isset($_POST['template_settings'])){
       $name_ = $_POST['template_settings']; 
       if($name_ != $_->_default_theme['name']){
           if($_->update("template",[["default_"],[0],["default_",1]])){
               if($_->select("id","template","count",["name",$name_]))
                  $_->update("template",[["default_"],[1],["name",$name_]]);
               else
                  $_->insert("template",[["name","default_","date"],[$name_,1,time()]]);
            echo 1;   
           }
       }
        
     exit;   
    } 
    
    
    
    try{
        $_dir = $_->_dir.'templates/';
        if(!file_exists($_dir) && !is_dir($_dir))throw new Exception('templates dir not found on this server!');
        
        $scan = scandir($_dir);
        $_array = [];
        foreach($scan as $key => $value){
            if(in_array($value,['.','..']) ||
                is_file($_dir.$value)      ||
                  !file_exists($_dir.$value.'/templates.png'))continue;
            //$_->screen('http://'.str_replace('admin.', '', $_SERVER['HTTP_HOST']).'/templates/'.$value.'/index.html',$_dir.$value.'/templates.png');
            
            
            $image = 'http://'.str_replace('admin.', '', $_SERVER['HTTP_HOST']).'/templates/'.$value.'/templates.png';
            $url = 'http://'.str_replace('admin.', '', $_SERVER['HTTP_HOST']).'/templates/'.$value.'/index.html';
            $_array[] = ['img' => $image,'url' => $url,'name' => $value];
            
        }
        if(!count($_array))throw new Exception('templates not found on this server!');
        

    }catch(Exception $exc){
        die($exc->getMessage());
    }
     
    $_->assoc_buble($_array, $_->_default_theme['name']);
   // $_->pre($_array);
    
     
  ?>



<style>
    #_templates_container{margin-top: 24px}
    ._templates_container{cursor: pointer;width: 290px;height: 500px;float: left;margin: 10px;padding: 5px; border: 2px outset #327394;padding: 5px}
    ._templates_container:hover{
        background: url('/img/demo.png') no-repeat;
        background-position: 50% 50%;
        background-size: 250px 200px;
        opacity: 1;
    }
    ._templates_container img{width: 297px; max-height: 480px;height: 450px;}
    ._templates_container img:hover{opacity: 0.5}
    #_templates_container ._templates_text{border: 1px dotted #327394;padding: 10px;margin-top: 5px;height: 20px}
    #_templates_container ._templates_text span{float: right;margin-right: 5px;font-size: 14px;font-weight: bold}
    
    #_templates_container ._templates_container ._checkbox{
        width: 15px;
        height: 15px;
        border: 1px solid black;
        border-radius: 3px;
        cursor: pointer;
        margin-top: 2px
    }
    
    #_templates_container .checked img{
        opacity: 0.5;
    }

    #_templates_container .checked ._checkbox{
        background: rgb(169,3,41);
        background: -moz-linear-gradient(top,  rgba(169,3,41,1) 0%, rgba(143,2,34,1) 100%, rgba(109,0,25,1) 100%);
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(169,3,41,1)), color-stop(100%,rgba(143,2,34,1)), color-stop(100%,rgba(109,0,25,1)));
        background: -webkit-linear-gradient(top,  rgba(169,3,41,1) 0%,rgba(143,2,34,1) 100%,rgba(109,0,25,1) 100%); 
        background: -o-linear-gradient(top,  rgba(169,3,41,1) 0%,rgba(143,2,34,1) 100%,rgba(109,0,25,1) 100%); 
        background: -ms-linear-gradient(top,  rgba(169,3,41,1) 0%,rgba(143,2,34,1) 100%,rgba(109,0,25,1) 100%);
        background: linear-gradient(to bottom,  rgba(169,3,41,1) 0%,rgba(143,2,34,1) 100%,rgba(109,0,25,1) 100%); 
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a90329', endColorstr='#6d0019',GradientType=0 ); 
    }
    #save_changes{
        padding: 4px;
        color: red;
        text-align: center;
        border: 2px solid #005fb3;
        border-radius: 5px;
        width: 300px;
        margin-left: 500px;
        cursor: pointer;
        position: absolute;
        top:0px
    }
    ._display_none{display: none}
</style>
<script>window.jQuery || alert('jquery librari not included!');</script>

<div align="center" id="save_changes" class="_display_none" onclick="save_changes(this);">ცვლილებების შენახვა</div>
<div id="_templates_container" class="_display_none">
    <?php 
      $length = count($_array);
      for($i = 0; $i < $length; $i++):
          $class = (!$i)?' checked _maines_for_js':'';
    
    ?>
    <div class="_templates_container<?=$class;?>" app="<?=$_array[$i]['name'];?>">
        <div class="_templates_image">
            <img src="<?=$_array[$i]['img'];?>" onclick="window.open('<?=$_array[$i]['url'];?>','_blank');"/>
        </div>
        <div class="_templates_text">
            <span><?=$_array[$i]['name'];?></span>
            <div class="_checkbox" onclick="add_class_checked(this);"></div>
        </div>
    </div>
    
    
    <?php endfor;?>
</div>

<script type="text/javascript">
   
        var iterator = 0;
        var div = document.getElementById('_templates_container').getElementsByTagName('img');
        for(v in div){
            div[v].onload = function(){
                iterator++;
                if(iterator == <?=count($_array);?>)
                    $('#_templates_container').removeClass('_display_none');
                
            };
        }

  function add_class_checked(a){
    var th = $(a).parent().parent();
    if(th.is('.checked'))return;
    $('#_templates_container .checked').removeClass('checked');
    th.addClass('checked');
    $('#_templates_container').prepend(th);
    if(!th.is('._maines_for_js'))$('#save_changes').removeClass('_display_none');
    else{
        if(!$('#save_changes').is('_display_none'))$('#save_changes').addClass('_display_none');
    }
  }
  
  function save_changes(a){
    $('#_templates_container').css('opacity','0.3');
    $(a).remove();
    var theme = $('#_templates_container .checked').attr('app');
        $.ajax({
            type : "POST",
            async: false,
            url  : "/view/templates/templates.php", 
            data : "template_settings="+theme,
            success: function(data){
                if(data && data == 1){
                    location.reload();
                }
            }
        });
  }


</script>

Youez - 2016 - github.com/yon3zu
LinuXploit