Файл: online-ftp/mysql/load.php
Строк: 40
<?php
// mysql by jasis//
//сессия
session_name('ses');
session_start();
ob_start();
function prov($str,$skol=false) {
$str = htmlentities(trim($str), ENT_QUOTES, 'UTF-8');
$str = nl2br($str);
$str = strtr($str, array (
chr(0)=> '',
chr(1)=> '',
chr(2)=> '',
chr(3)=> '',
chr(4)=> '',
chr(5)=> '',
chr(6)=> '',
chr(7)=> '',
chr(8)=> '',
chr(9)=> '',
chr(10)=> '',
chr(11)=> '',
chr(12)=> '',
chr(13)=> '',
chr(14)=> '',
chr(15)=> '',
chr(16)=> '',
chr(17)=> '',
chr(18)=> '',
chr(19)=> '',
chr(20)=> '',
chr(21)=> '',
chr(22)=> '',
chr(23)=> '',
chr(24)=> '',
chr(25)=> '',
chr(26)=> '',
chr(27)=> '',
chr(28)=> '',
chr(29)=> '',
chr(30)=> '',
chr(31)=> ''
));
$str = str_replace("'", "'", $str);
$str = str_replace('\', "\", $str);
$str = str_replace("|", "I", $str);
$str = str_replace("||", "I", $str);
$str = str_replace("/\$/", "$", $str);
if(!empty($skol)){$str=mb_substr($str,0,$skol,'UTF-8');}
return $str;
}
$file=prov($_GET['file']);
$filecontent= file_get_contents('tmp/'.$_SESSION['servere'].'-'.$_SESSION['logine'].'/'.$file.'.sql');
$downloadfile=$file.'.sql';
header("Content-disposition: attachment; filename=$downloadfile");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".strlen($filecontent));
header("Pragma: no-cache");
header("Expires: 0");
echo $filecontent
?>