if(isset($_GET["minimal_compress"])){echo SaveBackupSettings();exit;} if(isset($_GET["exclude-type-list"])){echo dar_exclude_types_list();exit;} if(isset($_GET["AddExcludeDarFileType"])){dar_exclude_types_add();exit;} if(isset($_GET["user-defined-folders"])){echo user_defined();exit;} if(isset($_GET["user-defined-schedule"])){echo user_defined_schedule();exit;} if(isset($_GET["user-defined-schedule-save"])){user_defined_schedule_save();exit;} if(isset($_GET["AddDarPersoFolder"])){user_defined_save();exit;} if(isset($_GET["DelDarPersoFolder"])){user_defined_del();exit;} if(isset($_GET["external-storage"])){external_storage();exit;} if(isset($_GET["net_storage_server"])){external_storage_net_save();exit;} if(isset($_GET["external-storage-usb"])){external_storage_usb();exit;} if(isset($_GET["external-storage-usb-list"])){echo external_storage_usb_list();exit;} if(isset($_GET["ExternalUsbSelect"])){external_storage_usb_save();exit;} if(isset($_GET["external-storage-list"])){external_storage_list();exit;} if(isset($_GET["ExternalStorageDelete"])){external_storage_delete();exit;} if(isset($_GET["external-storage-network"])){external_storage_net();exit;} if(isset($_GET["refresh-dar-status"])){echo dar_status();exit;} if(isset($_GET["RebuildCollection"])){dar_rebuild();exit;} if(isset($_GET["events"])){events();exit;} if(isset($_GET["dar-view"])){dar_view_index();exit;} if(isset($_GET["mount-dar"])){js_dar_mount();exit;} if(isset($_GET["mount-dar-list"])){dar_mount_select();exit;}
<?php include_once 'ressources/class.templates.inc'; include_once 'ressources/class.ldap.inc'; include_once 'ressources/class.users.menus.inc'; include_once 'ressources/class.os.system.inc'; if (isset($_GET["index"])) { external_storage_usb(); exit; } if (isset($_GET["external-storage-usb-list"])) { echo external_storage_usb_list(); exit; } js(); function js() { $page = CurrentPageName(); $tpl = new templates(); $title = $tpl->_ENGINE_parse_body('{use_usb_storage}', "dar.index.php"); $prefix = str_replace(".", "_", $page); $page = CurrentPageName(); $html = "\n\tfunction {$prefix}Load(){\n\t\tRTMMail(650,'{$page}?index=yes','{$title}');\n\t}\n\t\n\t{$prefix}Load();\n\t\n\tfunction BrowseUsbSelect(uid){\n\tvar stick_folder='';\n\tvar stick_mounted='';\n\tvar tmp='';\n\tvar TargetField='{$_GET["set-field"]}';\n\t\n\t\n\tif(document.getElementById(uid+'_stick_mounted')){\n\t\tstick_mounted=document.getElementById(uid+'_stick_mounted').value;\n\t\tvar re = new RegExp(document.getElementById(uid+'_stick_mounted').value+'/', 'g');\n\t}\n\t\tif(document.getElementById(uid+'_stick_folder')){\n\t\t\ttmp=document.getElementById(uid+'_stick_folder').value;\n\t\t\tif(tmp.length>0){\n\t\t\t\tif(re){\n\t\t\t\t\ttmp=tmp.replace(re,'');\n\t\t\t\t}\n\t\t\t\tstick_folder='/'+tmp;\n\t\t\t}\n\t\t}\n\t\n\t\n\t if(document.getElementById('{$_GET["set-field"]}')){\n\t \n\t \tdocument.getElementById('{$_GET["set-field"]}').value='usb:'+uid+stick_folder;\n\t \tRTMMailHide();\n\t \t\n\t \tif(TargetField=='dar-external-storage-formulaire'){\n\t \t\tExternalUsbSelect(document.getElementById('{$_GET["set-field"]}').value);\n\t\t}\n\t \t\n\t\t}else{\n\t\t\talert('Cannot find {$_GET["set-field"]} field');\n\t\t}\n\t}\n\t\n\t"; echo $html; } function external_storage_usb() { $list = external_storage_usb_list(); $page = CurrentPageName(); $tpl = new templates(); $html = "\n\t<H1>{use_usb_storage}</H1>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top' with=70%>\n\t<p class=caption>{use_usb_storage_text}</p>\n\t<strong style='font-size:12px'>{use_usb_storage_explain}</strong>\n\t</td>\n\t<td valign='top' align='center' width=30%>\n\t" . Paragraphe32("refresh", "refresh_text_usb", "LoadAjax('usblistp','{$page}?external-storage-usb-list=yes')", "64-usb-refresh.png") . "\n\t</td>\n\t</tr>\n\t</table>\n\t<hr>\n\t<div style='width:100%;height:300px;overflow:auto;padding:3px;' id='usblistp'>\n\t\t{$list}\n\t</div>\n\t";