@@ 127-128 (lines=2) @@ | ||
124 | as$z=>$X){if(preg_match("~[\"\n,;\t]~",$X)||$X==="")$L[$z]='"'.str_replace('"','""',$X).'"';}echo |
|
125 | implode(($_POST["format"]=="csv"?",":($_POST["format"]=="tsv"?"\t":";")),$L)."\r\n";}function |
|
126 | apply_sql_function($q,$c){return($q?($q=="unixepoch"?"DATETIME($c, '$q')":($q=="count distinct"?"COUNT(DISTINCT ":strtoupper("$q("))."$c)"):$c);}function |
|
127 | get_temp_dir(){$K=ini_get("upload_tmp_dir");if(!$K){if(function_exists('sys_get_temp_dir'))$K=sys_get_temp_dir();else{$nc=@tempnam("","");if(!$nc)return |
|
128 | false;$K=dirname($nc);unlink($nc);}}return$K;}function |
|
129 | password_file($g){$nc=get_temp_dir()."/adminer.key";$K=@file_get_contents($nc);if($K||!$g)return$K;$p=@fopen($nc,"w");if($p){chmod($nc,0660);$K=rand_string();fwrite($p,$K);fclose($p);}return$K;}function |
|
130 | rand_string(){return |
|
131 | md5(uniqid(mt_rand(),true));}function |
@@ 127-128 (lines=2) @@ | ||
124 | as$x=>$V){if(preg_match("~[\"\n,;\t]~",$V)||$V==="")$L[$x]='"'.str_replace('"','""',$V).'"';}echo |
|
125 | implode(($_POST["format"]=="csv"?",":($_POST["format"]=="tsv"?"\t":";")),$L)."\r\n";}function |
|
126 | apply_sql_function($o,$d){return($o?($o=="unixepoch"?"DATETIME($d, '$o')":($o=="count distinct"?"COUNT(DISTINCT ":strtoupper("$o("))."$d)"):$d);}function |
|
127 | get_temp_dir(){$K=ini_get("upload_tmp_dir");if(!$K){if(function_exists('sys_get_temp_dir'))$K=sys_get_temp_dir();else{$Fb=@tempnam("","");if(!$Fb)return |
|
128 | false;$K=dirname($Fb);unlink($Fb);}}return$K;}function |
|
129 | password_file($Va){$Fb=get_temp_dir()."/adminer.key";$K=@file_get_contents($Fb);if($K||!$Va)return$K;$Rb=@fopen($Fb,"w");if($Rb){chmod($Fb,0660);$K=rand_string();fwrite($Rb,$K);fclose($Rb);}return$K;}function |
|
130 | rand_string(){return |
|
131 | md5(uniqid(mt_rand(),true));}function |