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/site/js1/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/kharagauli1/site/js1/main.js
/*
@author suxoza <suxoza@gmail.com>
*/


//http://demo.kopyov.com/pannonia/media.html

var positioin_array = ["top","left","right","bottom"];

var _location = location.pathname.split('/');
_location = '/'+_location[1]+'/'+_location[2];


$(function(){
        draga("left_menu_ul","left_menu_ul");
        hash_operations();
        $('#container').click(function(){
           remove_divs(); 
        });
});

$(window).bind("load hashchange", function(event){
     general_menu_();
     if(event.type == 'load'){
         slidedown_menu();
     }

});

function hash_operations(){
    if(location.hash){
        if(location.hash.indexOf('changed') != -1)
            $.alerts.alert("განახლდა","message!!!");
        else if(location.hash.indexOf('added') != -1)
            $.alerts.alert("დაემატა","message!!!");
        else if(location.hash.indexOf('deleted') != -1)
            $.alerts.alert("წაიშალა","message!!!");
    }
}

function slidedown_menu(){
    if($(location_href_menu+"_nane a[href='"+_location+"']").length){
        var href = $(location_href_menu+"_nane a[href='"+_location+"']");
        href.parent('.lines_li').addClass('active');
        slidedown_menu_recursion(href);
    }
}

function slidedown_menu_recursion(href){
    if(href.parent().parent().parent().is('.left_menu_ul')){
        if(!href.parent().parent().parent('.left_menu_ul').is(':visible'))
            href.parent().parent().parent('.left_menu_ul').show();
        if(href.parent().parent().parent().is('.navigation'))return;
        if($('a.one_menu_item:first',href.parent().parent().parent('.left_menu_ul').parent().not($(this))).length){
          slidedown_menu_recursion($('a.one_menu_item:first',href.parent().parent().parent('.left_menu_ul').parent()));
        }return;
    }
    
}



function remove_divs(a){
    var arrs = a || ['#menu_window'];
    for(var i = 0; i < arrs.length; i++)
        if($(arrs[i]).length)$(arrs[i]).remove();
}

function _window(a){
    var div = "menu_window";
    if($('#'+div).length)$('#'+div).remove();
    var divs = $('<div>',{id:div,html:a.html,css:{left:a.left,top:a.top}});
    $('body').prepend(divs);
    
}


function general_menu_(a){
    location_href_menu = (location.hash && location.hash.indexOf('#general_') != -1)?location.hash.split('/')[0]:_get_cookie("location_href_menu");
    location.hash = location_href_menu;
    $('.tabs-nav .active').removeClass('active');
    $('.tabs-nav a[href="'+location_href_menu+'"]').parent().addClass('active');
    var masiv = ['top_nane','left_nane','right_nane','bottom_nane'];
      for(var i = 0; i < masiv.length; i++)
          $('#general_'+masiv[i]).css('display','none');
    $(location_href_menu+"_nane").fadeIn(500,function(){
            //default page
            $('#_must_showed').removeClass('_display_none');
            //default page
    });
    

    
    _set_cookie("location_href_menu",location_href_menu); 
}



function draga(a,c){
   
    $('.'+a).sortable({
		   start: function(event, ui){
		  },revert : true,
		   connectWith: $('.'+c),
		   update:  function (event, ui) {
                       
                       var th = ui.item;
                       var parent_name = th.parent().parent();
                       if(parent_name.is('li.lines_li'))
                           $('li.lines_li:first',th).attr('parent',parent_name.attr('page_id'));
                       else
                          $('li.lines_li:first',th).attr('parent',0);
                      
                       eaches();
                      
                       
                   }          
    });
  
}

function eaches(){
     var arrs = [];
     var lies = $('.lines_li');
    $('.left_menu_ul li.lines_li').each(function(){
          var _th = $(this);
         if(_th.attr('page_id'))
             arrs[_th.attr('page_id')] = {pos:_th.parent('.lises').index(),id:_th.attr('page_id'),parent:_th.attr('parent')};
          //console.log(JSON.stringify(arrs[_th.attr('page_id')]));
         
    });
    //arrs = arrs.filter(function(v){return v!=='' && v!= null && v!= undefined});

   // console.log(JSON.stringify(arrs));
   if(!Object.keys(_.menu_index_variable).length)shesanaxia();
       _.menu_index_variable = arrs;
    
}

var super_dialog;


function whichButton(event,th){
    var th = $(th);
    var _id = '"'+th.attr('id')+'"';
    var checked = th.attr('visible');
    var page_id = th.attr('page_id');
    var menu_pos = th.attr('menu_pos');
    var parent = th.parent().attr("parent");
    var title = th.parent().attr("title");
    if(event.button==2){
           var obj = {
                left: event.pageX,
                top: event.pageY,
                html:function(){
                    var checkbox = (checked == 1)?'checked=\"\"':'';
                    var div = "<table><tr><th></th><th align='center'>"+title+"-ს პარამეტრები</th></tr>";

                     var masiv = {
                         text: ["<a onclick='rename_menu_name(this,"+_id+","+page_id+")'>გადარქმევა</a>","<a onclick='delete_menu_name(this,"+_id+","+page_id+")'>წაშლა</a>","<a onclick='add_new_child_menu("+page_id+");'>ქვე მენიუს დამატება</a>",
                               "<a onclick='menu_change_category(this,"+_id+","+page_id+")'>კატეგორია</a>"],
                         html :["","","",""]
                     };
                     if(!Number(parent)){
                        var select = "<form id='change_menu_pos' method='post' action='/change_menu_pos'>";
                            select +=  "<input type='hidden' name='change_menu_pos_id' value='"+page_id+"'/>";
                            select +=  "<select name='change_menu_pos' onchange='$(\"form#change_menu_pos\").submit();'>";
                            select +=  "<option value='"+menu_pos+"'>"+positioin_array[menu_pos]+"</option>";
                         for(var i = 0; i < positioin_array.length; i++){
                             if(i == menu_pos)continue;
                             select += "<option value='"+i+"'>"+positioin_array[i]+"</option>";

                         }  
                         select += "</select></form>"; 
                         
                        masiv.text[masiv.text.length] = "პოზიცია";
                        masiv.html[masiv.html.length] = select;
                     }
                     masiv.text[masiv.text.length] = "visible";
                     masiv.html[masiv.html.length] = "<input type=\"checkbox\" id=\"payt2\" "+checkbox+" onchange='change_menu_checkbox_visible(this,"+_id+","+page_id+");'/><label for=\"payt2\">კი</label>";
                     
                     for(var i = 0; i < masiv.text.length; i++){
                         div += "<tr>"+
                                  "<td>"+masiv.text[i]+"</td>"+
                                  "<td>"+(masiv.html[i] || '')+"</td>"+
                                 "</tr>";
                     }
                     div += "</table>";
                     return div;
                }
            };
            _window(obj);
    }

} 

function start_page_cookie(a,b){
     _set_cookie(a,b);
     location.href = "";
}

function back_button(){
    shesanaxia('remove');
    for(var i in _)
        _[i] = {};
}

function save_global_changes(){
    if($('#saves_info .saves_info').html() == '0')return;
     $.ajax({
        type: "POST",
        url : "/menu_index",
        data: "menu_index="+JSON.stringify(_),
        async:false,
        success:function(data){
            if(data && data == 1){
              back_button();  
            }
        }
    });
}


function learnRegExp(s) {    
  var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
  return regexp.test(s);    
}

window.onbeforeunload = function(){
    save_global_changes();
};

var Weather;
function weather(city,day){
    var $url = "http://api.worldweatheronline.com/free/v1/weather.ashx?q="+city+",Georgia&format=json&num_of_days="+day+"&key=m2afa3ubbqpxs4z7xe4rgqez";
    $.getJSON($url)
        .done(function(json){
              Weather = json;
        }).fail(function(jqxhr, textStatus, error){
             var err = textStatus + ", " + error;
             alert(" Weather Request Failed: " + err);
    });
}



Youez - 2016 - github.com/yon3zu
LinuXploit