function Ebak_Dozip($path) { global $bakpath, $bakzippath; if (strstr($path, '..')) { printerror('DelPathNotExists', 'history.go(-1)', 9); } if (empty($path)) { printerror('DelPathNotExists', 'history.go(-1)', 9); } $mypath = $bakpath . '/' . $path; if (!file_exists($mypath)) { printerror('DelPathNotExists', 'history.go(-1)', 9); } $zipname = $path . '.zip'; ZipFile($path, $zipname); echo "<script>self.location.href='DownZip.php?f={$zipname}&p={$path}';</script>"; }
function Ebak_Dozip($path){ global $bakpath,$bakzippath; if(strstr($path,"..")) {printerror("DelPathNotExists","history.go(-1)",9);} if(empty($path)) { printerror("DelPathNotExists","history.go(-1)",9); } $mypath=$bakpath."/".$path; if(!file_exists($mypath)) { printerror("DelPathNotExists","history.go(-1)",9); } $zipname=$path.".zip"; ZipFile($path,$zipname); echo"<script>self.location.href='DownZip.php?f=$zipname&p=$path';</script>"; }
function Ebak_Dozip($path,$userid,$username){ global $public_r; //验证权限 CheckLevel($userid,$username,$classid,"dbdata"); $path=RepPostStr($path,1); if(strstr($path,"..")) {printerror("ThisPathNotExist","history.go(-1)");} if(empty($path)) { printerror("ThisPathNotExist","history.go(-1)"); } $bakpath=$public_r['bakdbpath']; $bakzippath=$public_r['bakdbzip']; $mypath=$bakpath."/".$path; if(!file_exists($mypath)) { printerror("ThisPathNotExist","history.go(-1)"); } $zipname=$path.".zip"; ZipFile($path,$zipname); echo"<script>self.location.href='DownZip.php?f=$zipname&p=$path".hReturnEcmsHashStrHref2(0)."';</script>"; }