function DirectoryListing($file) { $listFileNames = array(); if (is_dir($file)) { $handle = opendir($file); while (false !== ($file1 = readdir($handle))) { $files[] = $file1; } natcasesort($files); reset($files); foreach ($files as $filename) { if ($filename != "." && $filename != "..") { if (is_dir($file1 = $file . "/" . $filename)) { DirectoryListing($file1, $findFile); } $listFileNames[] = $filename; } } @closedir($handle); } return $listFileNames; }
exit; } if (isset($_GET["popup-shared"])) { popup_shared(); exit; } if (isset($_GET["popup-services"])) { popup_services(); exit; } if (isset($_GET["ScanComputer"])) { popup_scan_computer(); exit; } if (isset($_POST["dir"])) { echo DirectoryListing(); exit; } js(); function js() { $page = CurrentPageName(); $uid = $_GET["uid"]; $title = str_replace('$', '', $_GET["uid"]); $pose = strpos($_GET["uid"], '$'); if ($pose == 0) { $uid = $uid . '$'; } $html = "\n\tfunction LoadComputerInfos(){\n\t\tYahooWin4(700,'{$page}?popup=yes&uid={$uid}','{$title}');\n\t\n\t}\n\t\n\tfunction ComputerTasks(file){\n\t\tYahooWin5(500,'{$page}?popup-file=yes&uid={$uid}&file='+file,'{$title}');\n\t}\n\t\n\tfunction ComputerAgentBackupDir(file_encoded){\n\t\tYahooWin6(500,'{$page}?popup-backup-dir=yes&uid={$uid}&file='+file_encoded,'{$title}');\n\t}\n\t\n\tvar x_RunComputerTaskID= function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tLoadAjax('computer_tasks_list','{$page}?computer-task-list=yes&uid={$uid}');\n\t\t\t\n\t\t\t}\n\t\t\t\n\tvar x_SaveComputerAgentParameters=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tLoadAjax('form_comp_parameters','{$page}?popup-parameters-form=yes&uid={$uid}');\n\t\t\t\n\t\t\t}\n\n\t\t\n\t\n\tfunction RunComputerTaskID(ID,MAC){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('RunComputerTaskID',ID);\n\t\t\tXHR.appendData('uid','{$uid}');\n\t\t\tXHR.appendData('MAC',MAC);\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_RunComputerTaskID);\n\t\t\t}\t\n\t\t\t\n\tfunction DeleteComputerTaskID(ID,MAC){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('DeleteComputerTaskID',ID);\n\t\t\tXHR.appendData('uid','{$uid}');\n\t\t\tXHR.appendData('MAC',MAC);\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_RunComputerTaskID);\t\n\t}\n\t\n\tfunction SaveComputerAgentParameters(MAC){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('SendNoop',document.getElementById('SendNoop').value);\n\t\t\tXHR.appendData('SendDirs',document.getElementById('SendDirs').value);\n\t\t\tXHR.appendData('MAC',MAC);\n\t\t\tXHR.appendData('uid','{$uid}');\n\t\t\tdocument.getElementById('form_comp_parameters').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\t\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_SaveComputerAgentParameters);\n\t\t\t}\n\t\n\tfunction initBrowserComp(disk){\n\t\t\t\$(document).ready( function() {\n\t\t\t \$('#comp_browser').fileTree(\n\t\t\t \t{ root: disk ,multiFolder:false,script: '{$page}?uid={$uid}&drive='+disk,\n\t\t\t\t\tfolderEvent: 'click', \n\t\t\t\t\texpandSpeed: 750, \n\t\t\t\t\tcollapseSpeed: 750, \n\t\t\t\t\texpandEasing: 'easeOutBounce', \n\t\t\t\t\tcollapseEasing: 'easeOutBounce', \n\t\t\t\t\tloadMessage: 'Un momento...' \n\t\t\t\t\t},\n\t\t\t \tfunction(file) {ComputerTasks(file);}\n\t\t\t \t);\n\t\t\t});\n\t\t}\t\n\t\n\tLoadComputerInfos();\n\t"; echo $html; }
<?php /** * File For Database Full Backup * * @package addfullbkup.inc.php * @Section general * @author Jack Scott */ require_once SITE_FUNC . "backup.inc.php"; $dbFiles = DirectoryListing(BACKUP_DBPATH); ?> <form id="frmfullbkup" name="frmfullbkup" method="post" action="index.php?file=gen-fullbkup&view=action"> <input type="hidden" name="action" id="action"/> <input type="hidden" name="filedown" id="filedown"/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="5" height="75" valign="top"><?php include_once "btop.inc.php"; ?> </td> </tr> <tr> <td colspan="5" height="30" valign="top"> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr> <td width="25%"><img src="<?php echo ADMIN_IMAGES; ?>
<?php //include here vars files require_once SITE_FUNC . "backup.inc.php"; $dir = GetVar('directory'); $updir = dirname($dir); $updir = str_replace("\\", "/", $updir); if ($updir == "") { $updir = "/"; } if (isset($_GET[directory]) && $_GET[directory] != "") { $path .= $_GET[directory]; } else { $path .= SPATH_ROOT . "/"; } $AlldataFile = DirectoryListing($path); ?> <br> <form id="frmsource" name="frmsource" method="post" action="index.php?file=gen-fullbkup&view=action"> <input type="hidden" name="action" id="action"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="5" height="75" valign="top"><?php include_once "btop.inc.php"; ?> </td> </tr> <tr> <td colspan="5" height="30" valign="top"> <table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr>
if(isset($_GET["edit-task-id"])){popup_task_edit();exit;} if(isset($_GET["edit-task-popup"])){popup_task_edit_form();exit;} if(isset($_GET["SaveTaskID"])){popup_task_save();exit;} if(isset($_GET["RunComputerTaskID"])){popup_task_run();exit;} if(isset($_GET["DeleteComputerTaskID"])){popup_task_delete();exit;} if(isset($_GET["computer-task-list"])){popup_tasks_lists();exit;} if(isset($_GET["popup-parameters"])){popup_parameters();exit;} if(isset($_GET["popup-parameters-form"])){popup_parameters_form();exit;} if(isset($_GET["popup-shared"])){popup_shared();exit;} if(isset($_GET["popup-services"])){popup_services();exit;} if(isset($_GET["ScanComputer"])){popup_scan_computer();exit;} if(isset($_POST["dir"])){echo DirectoryListing();exit;} js(); function js(){ $page=CurrentPageName(); $uid=$_GET["uid"]; $title=str_replace('$','',$_GET["uid"]); $pose=strpos($_GET["uid"],'$'); if($pose==0){$uid=$uid.'$';} $html=" function LoadComputerInfos(){ YahooWin4(700,'$page?popup=yes&uid=$uid','$title');