function list_files() { $base = $_GET["browse-tree"]; $folder = $_GET["dar-list-files"]; $cryt = new SimpleCrypt(); $mounted_path_decrypted = $cryt->decrypt(base64_decode($_GET["mounted-path"])); $tpl = new templates(); $KEY = md5(implode("", $_GET)); if (isset($_SESSION["DAR_FILE_PAGE"][$KEY])) { echo $tpl->_ENGINE_parse_body($_SESSION["DAR_FILE_PAGE"][$KEY], "dar.index.php"); return true; } $folder = str_replace($base, '', $folder); if (substr($folder, strlen($folder) - 1, 1) == '/') { $folder = substr($folder, 0, strlen($folder) - 1); } if (substr($folder, 0, 1) == '/') { $folder = substr($folder, 1, strlen($folder)); } $folder = str_replace('//', '/', $folder); $array = DirFilesCaches($base, $folder, $mounted_path_decrypted); $foldernum = get_path_id($folder, $mounted_path_decrypted); $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td valign='middle'><strong>{$folder}</strong></td>\n\t\t<td width=1%>" . imgtootltip('24-redo.png', "{restore}", "DarLoadPathDetails('{$foldernum}');") . "</td>\n\t</tr>\n\t</table>\n\t<hr>\n\t<table style='width:100%'>\n\t"; while (list($num, $line) = each($array)) { $file_path = $line["PATH"]; $date = $line["DATE"]; $size = $line["SIZE"]; $js = "DarLoadPathDetails('{$num}');"; $size = ParseBytes($size); $html = $html . "\n\t\t<tr " . CellRollOver($js) . ">\n\t\t<td width=1% valign='top'>" . get_img_ext($file_path) . "</td>\n\t\t<td><code style='font-size:11px'>{$file_path}</code></td>\n\t\t<td><code style='font-size:11px'>{$size}</code></td>\n\t\t<td width=1% valign='top' nowrap>{$date}</td>\n\t\t\n\t\t</tr>\n\t\t"; } $html = $html . "</table>"; $_SESSION["DAR_FILE_PAGE"][$KEY] = $html; echo $tpl->_ENGINE_parse_body($html, "dar.index.php"); }
function FilterByName_load($return = 0) { if (preg_match('#kav:([0-9]+)#', $_GET["TreeKasSelect"], $reg)) { $gidNumber = $reg[1]; } $ldap = new clladp(); $HashGroup = $ldap->GroupDatas($gidNumber); $kav4mailservers = new kav4mailservers(1, $HashGroup["KasperkyAVScanningDatas"]); $hashKAV = $kav4mailservers->array_conf["smtpscan.group:{$gidNumber}"]; $html = "<table style='width:30%' align='center'>"; $tbl = explode(',', $hashKAV["FilterByName"]); if (is_array($tbl)) { while (list($num, $ligne) = each($tbl)) { if ($ligne != null) { if ($class == 'rowA') { $class = "rowB"; } else { $class = "rowA"; } $html = $html . "<tr>\n\t\t\t\t<td width=1% valign=middle>" . get_img_ext($ligne) . "</td>\n\t\t\t\t<td valign=middle>{$ligne}</td>\n\t\t\t\t<td valign=middle width=1%><a href=\"javascript:FilterByName_delete({$num});\"><img src='img/x.gif'></a></td>\n\t\t\t\t</tr>"; } } $html = $html . "</table>"; if ($return == 0) { echo $html; exit; } return $html; } }