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/moduls/weather/admin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/kharagauli1/moduls/weather/admin/js/main.js
/*
@author suxoza <suxoza@gmail.com>
*/
//var Weather_;
var __url__ = 'http://api.worldweatheronline.com/free/v1/';
var __key__ = 'm2afa3ubbqpxs4z7xe4rgqez';
var _weather_;
function weather_(city,day,callback){
    _ = {
        query       : city,
        format      : "json",
        num_of_days : day
    };
    var url = __url__ + 'weather.ashx?q=' + _.query + '&format=' + _.format + '&num_of_days=' + _.num_of_days + '&key=' + __key__;
    $.ajax({
        type: 'GET',
        url: url,
        async: false,
        contentType: "application/json",
        dataType: 'jsonp',
        success: function (json){
            _weather_ = json;
            callback();
        },
        error: function (e) {
            alert('weather error '+e.message);
        }
    });

}//
weather_('Zestafoni, Georgia',5,callback);

//weather_2('Zestafoni, Ge',callback);

function callback(){
    console.log(_weather_);
    //console.log(JSON.stringify(_weather_));
}

function weather_2(city,callback){
  $.simpleWeather({
    location: city,
    woeid: '',
    unit: 'c',
    forecasts:7,
    success: function(weather) {
        _weather_ = weather;
        callback();
//      html = '<h2><i class="icon-'+weather.code+'"></i> '+weather.temp+'&deg;'+weather.units.temp+'</h2>';
//      html += '<ul><li>'+weather.city+', '+weather.region+'</li>';
//      html += '<li class="currently">'+weather.currently+'</li>';
//      html += '<li>'+weather.wind.direction+' '+weather.wind.speed+' '+weather.units.speed+'</li></ul>';
//
//      $("#weather").html(html);
    },
    error: function(error) {
      alert('weather error!');
    }
  }); 
}


  function add_class_checked_2(a){
    var th = $(a);
    th.toggleClass('checked');
    if(th.is('.checked'))
        $('input:hidden',th.parent()).val(1);
    else
        $('input:hidden',th.parent()).val('');
    
  }
  var booles = false;
  function demo_for_clone(){
        if(!booles){
            booles = true;
            var div = $('._demo_for_clone').clone();
            
            var len = $('.real_form_elements').length || 0;
            div.prepend('<input type="hidden" class="real_form_elements"/>');
            $('input:file',div).attr('name','file_'+len);
            $('._width',div).attr('name','width_'+len);
            $('._height',div).attr('name','height_'+len);
            $('._banner_url',div).attr('name','url_'+len);
            $('._new_window',div).attr('name','new_window_'+len);
            
            
            $('._t_name',div).attr('name',function(){
                return $(this).attr('name')+"_"+len;
            });
            return_attr($('._t_title',div),len);
            return_attr($('._t_alt',div),len);
            
   
            
            div.removeClass('_demo_for_clone _display_none').addClass('_must_insert_aftered');
            $('#bg_color_').removeClass('_display_none');
            setTimeout(function(){
              $('#bg_color_').addClass('_display_none'); 
            //  if(!$('._must_insert_aftered').length)
                  $('#bg_color_').after(div); 
             // else
             //     $('._must_insert_aftered:last').after(div);
              booles = false;
              if(!$('._submited').length){
                  $('#demo_for_clone_parent').append('<tr><td colspan="7"><input type="submit" value="შენახვა" class="_submited"/></td></tr>');
              }
              
            },500);
        }
  }
  
  function return_attr(a,len){
       a.attr({
        name:function(){
             return $(this).attr('name')+"_"+len;
        },id:function(){
             return $(this).attr('id')+"_"+len;
        }});
  }
  
  function _returnes(a){
      var th = $(a);
      if(!$('.real_form_elements').length)return false;
      return true;
  }
  
  function change_lang_layout(a){
    var th = $(a);
    
    var text = $.trim(th.text());
    $('#lang_select_textarea .active').removeClass('active');
    th.addClass('active');
    $('#demo_for_clone_parent tr td textarea[id^="text_language_"]').removeClass('_display_block').addClass('_display_none');
    $('#demo_for_clone_parent tr td textarea[name*="'+text+'"]').addClass('_display_block').removeClass('_display_none');
}

  function dd_delete(a){
      var th = $(a).parent().parent().parent().parent();
      th.remove();
  }
  
  function upload_logo(event,a){
     var th = $(a);
     var logo;
     var img;
     var boolas;
     var ind = th.attr('name').split('_')[1];
       if(window.File &&  window.FileReader){
           var files = event.target.files; 
           for(var i = 0; i< files.length; i++){
                 if(files[i].name.endsWith('swf'))
                     boolas = true;
                 else
                     boolas = false;
                 if(parseInt(Math.round(files[i].size)) > 2000000){
                    $.alerts.alert("ასატვირთი ფაილის ზომა არ უნდა აღემატებოდეს 2(ორ) მეგაბაიტს!!!","message");
                     return false;
                  }
                   var picReader = new FileReader();                
                   picReader.addEventListener("load",function(event){                    
                     var picFile = event.target;
                     logo = picFile.result;
                     if(boolas)
                         img = $('<img>',{src:'/img/flash.png'});
                     else
                         img = $('<img>',{src:logo});
                     
                     $('._avatar_file',th.parent().parent()).html(img);
                   });
                   picReader.readAsDataURL(files[i]);
                   
               }
               
          
      }else alert("Your browser does not support File API \n Try firefox,google chrome or opera!");
 }

Youez - 2016 - github.com/yon3zu
LinuXploit