credentials();$H=Driver::connect($hc[0],$hc[1],$hc[2]);return(is_object($H)?$H:null);}function idf_unescape($u){if(!preg_match('~^[`\'"[]~',$u))return$u;$pg=substr($u,-1);return str_replace($pg.$pg,$pg,substr($u,1,-1));}function q($P){return connection()->quote($P);}function idx($Ga,$x,$l=null){return($Ga&&array_key_exists($x,$Ga)?$Ga[$x]:$l);}function number($W){return preg_replace('~[^0-9]+~','',$W);}function int_type(){return'(tiny|small|medium|big)?int(eger|\d)?';}function number_type(){return'(^('.int_type().'|decimal|numeric|number|real|(binary_|half_|scaled_)?float\d?|(binary_)?double( precision)?|(small)?money)$)';}function text_type(){return'char|text'.(JUSH=="sql"?'|enum|set':'');}function is_user_type($T){return in_array($T,idx(driver()->structuredTypes(),lang(0),array()));}function full_type_sql(array$n){$T=$n["type"];return(is_user_type($T)?idf_escape($T).substr($n["full_type"],strlen($T)):$n["full_type"]);}function is_searchable(array$n,array$W){if(!isset($n["privileges"]["where"]))return false;if(preg_match('~NULL$~',$W["op"]))return true;$T=$n["type"];$Mk=$W["val"];$Za='binary$|bytea|raw|image|bfile|^vector$'.(JUSH=="mssql"?'|^timestamp$':'|^bit').(JUSH=="oracle"?'|^blob|^long|rowid':'');if(preg_match("~$Za~",$T))return false;if(preg_match(number_type(),$T)){$Xh='-?\d+(\.\d+)?';$th='';if(preg_match('~IN$~',$W["op"])){$Mk=preg_replace('~^\s*\(\s*(.*?)\s*\)\s*$~s','\1',$Mk);$th="( *, *$Xh)*";}elseif($W["op"]=="BETWEEN")$th="\\s+AND\\s+$Xh";return(bool)preg_match('~^'.$Xh.$th.'$~i',$Mk);}if(preg_match('~^(small)?date|^timestamp~',$T))return(bool)preg_match('~^\d+-\d+-\d+~',$Mk);if(preg_match('~^time~',$T))return(bool)preg_match('~^\d+:\d+~',$Mk);if(preg_match('~^bool~',$T)||(JUSH=="mssql"&&$T=="bit"))return(bool)preg_match('~^(t|f|true|false|[01])$~i',$Mk);return true;}function remove_slashes(array$Y,$Zd=false){$H=array();foreach($Y as$x=>$W)$H[stripslashes($x)]=(is_array($W)?remove_slashes($W,$Zd):($Zd?$W:stripslashes($W)));return$H;}function bracket_escape($u,$Sa=false){static$Lm=array(':'=>':1',']'=>':2','['=>':3','"'=>':4','='=>':5');return strtr($u,($Sa?array_flip($Lm):$Lm));}function url_escape($P){static$Lm=array();if(!$Lm){$Lm=array(' '=>'+');foreach(str_split("\"'<>#%&+=?".ini_get("arg_separator.input"))as$nb)$Lm[$nb]=sprintf('%%%02X',ord($nb));for($s=0;$s<256;$s++){if($s<32||$s>126)$Lm[chr($s)]=sprintf('%%%02X',$s);}}return strtr((string)$P,$Lm);}function min_version($Kn,$Kg="",$h=null){$h=connection($h);$jl=$h->server_info;if($Kg&&preg_match('~([\d.]+)-MariaDB~',$jl,$A)){$jl=$A[1];$Kn=$Kg;}return$Kn&&version_compare($jl,$Kn)>=0;}function charset(Db$g){return(min_version("5.5.3",0,$g)?"utf8mb4":"utf8");}function ini_set($xi,$X){return(function_exists('ini_set')?\ini_set($xi,$X):false);}function ini_bool($Ef){$W=ini_get($Ef);return(preg_match('~^(on|true|yes)$~i',$W)||(int)$W);}function ini_bytes($Ef){$W=ini_get($Ef);switch(strtolower(substr($W,-1))){case'g':$W=(int)$W*1024;case'm':$W=(int)$W*1024;case'k':$W=(int)$W*1024;}return$W;}function max_input_vars($I,$Ni){$Og=(int)ini_get("max_input_vars");return($Og?(int)floor(($Og-$Ni)/$I):0);}function max_input_vars_error(){$Ef="max_input_vars";return lang(1,"$Ef = ".ini_get($Ef)."");}function sid(){static$H;if($H===null)$H=(SID&&!($_COOKIE&&ini_bool("session.use_cookies")));return$H;}function set_password($Jn,$M,$U,$D){$_SESSION["pwds"][$Jn][$M][$U]=($_COOKIE["adminer_key"]&&is_string($D)?array(encrypt_string($D,$_COOKIE["adminer_key"])):$D);}function get_password(){$H=get_session("pwds");if(is_array($H))$H=($_COOKIE["adminer_key"]?decrypt_string($H[0],$_COOKIE["adminer_key"]):false);return$H;}function get_val($F,$n=0,$Pb=null){$Pb=connection($Pb);$G=$Pb->query($F);if(!is_object($G))return false;$I=$G->fetch_row();return($I?$I[$n]:false);}function get_vals($F,$d=0){$H=array();$G=connection()->query($F);if(is_object($G)){while($I=$G->fetch_row())$H[]=$I[$d];}return$H;}function get_key_vals($F,$h=null,$ml=true){$h=connection($h);$H=array();$G=$h->query($F);if(is_object($G)){while($I=$G->fetch_row()){if($ml)$H[$I[0]]=$I[1];else$H[]=$I[0];}}return$H;}function get_rows($F,$h=null,$m="
"){$Pb=connection($h);$H=array();$G=$Pb->query($F);if(is_object($G)){while($I=$G->fetch_assoc())$H[]=$I;}elseif(!$G&&!$h&&$m&&(defined('Adminer\PAGE_HEADER')||$m=="-- "))echo$m.adminer()->error()."\n";return$H;}function
unique_array($I,array$w){foreach($w
as$v){if(preg_match("~^(PRIMARY|UNIQUE)$~",$v["type"])&&!$v["partial"]){$H=array();foreach($v["columns"]as$x){if(!isset($I[$x]))continue
2;$H[$x]=$I[$x];}return$H;}}}function
where_function($xe,$d,array$n){if($xe=="md5")return
driver()->md5($d,$n)?:$d;return(in_array($xe,driver()->functions)||in_array($xe,driver()->grouping)?apply_sql_function($xe,$d):$d);}function
where(array$Z,array$o=array()){$H=array();foreach((array)$Z["where"]as$x=>$W){$x=bracket_escape($x,true);$d=idf_escape($x);$n=idx($o,$x,array());$Td=$n["type"];$Rf=$n&&(is_blob($n)||preg_match('~binary~',$Td));$H[]=$d.($Rf&&!is_utf8($W)?" = ".driver()->quoteBinary($W):(JUSH=="sql"&&$Td=="json"?" = CAST(".q($W)." AS JSON)":(JUSH=="pgsql"&&preg_match('~^jsonb?$~',$n["full_type"])?"::jsonb = ".q($W)."::jsonb":(JUSH=="sql"&&is_numeric($W)&&preg_match('~\.~',$W)?" LIKE ".q($W):(JUSH=="mssql"&&strpos($Td,"datetime")===false?" LIKE ".q(preg_replace('~[_%[]~','[\0]',$W)):" = ".unconvert_field($n,q($W)))))));if(JUSH=="sql"&&preg_match('~char|text~',$Td)&&preg_match("~[^ -@]~",$W))$H[]="$d = ".q($W)." COLLATE ".charset(connection())."_bin";}foreach((array)$Z["null"]as$x)$H[]=idf_escape($x)." IS NULL";foreach((array)$Z["col"]as$s=>$Bb){$W=idx($Z["val"],$s);$H[]=where_function(idx($Z["fun"],$s),idf_escape($Bb),idx($o,$Bb,array())).($W!==null?" = ".q($W):" IS NULL");}return
implode(" AND ",$H);}function
where_columns(array$o){$H=array();foreach((array)$_GET["null"]as$x)$H[$x]=true;foreach(array_keys((array)$_GET["where"])as$x)$H[bracket_escape($x,true)]=true;foreach((array)$_GET["col"]as$Bb)$H[$Bb]=true;return
array_intersect_key($H,$o);}function
where_check($W,array$o=array()){parse_str($W,$qb);remove_slashes(array(&$qb));return
where($qb,$o);}function
where_link($s,$d,$X,$ui="="){$ri=($X!==null?$ui:"IS NULL");return"&where[$s][col]=".url_escape($d).($ri!=first(adminer()->operators())?"&where[$s][op]=".url_escape($ri):"")."&where[$s][val]=".url_escape($X);}function
convert_fields(array$e,array$o,array$L=array()){$H="";foreach($e
as$x=>$W){if($L&&!in_array(idf_escape($x),$L))continue;$Ha=convert_field($o[$x]);if($Ha)$H
.=", $Ha AS ".idf_escape($x);}return$H;}function
cookie_path(){return
strtr(preg_replace('~\?.*~','',$_SERVER["REQUEST_URI"]),array(";"=>"%3B",","=>"%2C"));}function
cookie($B,$X,$zg=2592000){header("Set-Cookie: $B=".rawurlencode($X).($zg?"; expires=".gmdate("D, d M Y H:i:s",time()+$zg)." GMT":"")."; path=".cookie_path().(HTTPS?"; secure":"").($B=="adminer_import"?"":"; HttpOnly")."; SameSite=lax",false);}function
get_url($un,$Yb){$http_response_header=null;$vd=array();set_error_handler(function($ud,$m)use(&$vd){$vd[]=preg_replace('~^file_get_contents\([^)]*\):\s*~','',$m);return
true;});$H=file_get_contents($un,false,$Yb);restore_error_handler();$Ve=(function_exists('http_get_last_response_headers')?http_get_last_response_headers():$http_response_header);return
array($H,(preg_match('~^HTTP/[\d.]+ (\d+)~',idx($Ve,0,''),$A)?$A[1]:''),(array)$Ve,($H===false?implode("\n",$vd):''),);}function
json_decode_exact($ag){$ag=preg_replace('~"(\\\\u0001(?:[^"\\\\]|\\\\.)*+")|"(?:[^"\\\\]|\\\\.)*+"(*SKIP)(*FAIL)~','"\\\\u0001$1',$ag);return
json_decode(preg_replace('~"(?:[^"\\\\]|\\\\.)*+"(*SKIP)(*FAIL)|-?\d[-+.\deE]*+~','"\\\\u0001$0"',$ag));}function
json_scalar($W){return(is_string($W)&&substr($W,0,1)=="\1"?substr($W,1):$W);}function
json_encode_exact($W,$fe=0){return
preg_replace('~"\\\\u0001(-?\d[^"\\\\]*)"|(")\\\\u0001(\\\\u0001(?:[^"\\\\]|\\\\.)*+")|"(?:[^"\\\\]|\\\\.)*+"(*SKIP)(*FAIL)~','$1$2$3',json_encode($W,$fe));}function
get_settings($cc){parse_str($_COOKIE[$cc],$nl);return$nl;}function
get_setting($x,$cc="adminer_settings",$l=null){return
idx(get_settings($cc),$x,$l);}function
save_settings(array$nl,$cc="adminer_settings"){$X=http_build_query($nl+get_settings($cc));cookie($cc,$X);$_COOKIE[$cc]=$X;}function
restart_session(){if(!ini_bool("session.use_cookies")&&(!function_exists('session_status')||session_status()==PHP_SESSION_NONE))session_start();}function
stop_session($ie=false){$xn=ini_bool("session.use_cookies");if(!$xn||$ie){session_write_close();if($xn&&ini_set("session.use_cookies",'0')===false)session_start();}}function&get_session($x){return$_SESSION[$x][DRIVER][SERVER][$_GET["username"]];}function
set_session($x,$W){$_SESSION[$x][DRIVER][SERVER][$_GET["username"]]=$W;}function
auth_url($Jn,$M,$U,$k=null){$tn=remove_from_uri(implode("|",array_keys(SqlDriver::$drivers))."|username|ext|".($k!==null?"db|":"").($Jn=='mssql'||$Jn=='pgsql'?"":"ns|").session_name());preg_match('~([^?]*)\??(.*)~',$tn,$A);return"$A[1]?".(sid()?SID."&":"").($_GET["ext"]?"ext=".url_escape($_GET["ext"])."&":"").($Jn!="server"||$M!=""?url_escape($Jn)."=".url_escape($M)."&":"")."username=".url_escape($U).($k!=""?"&db=".url_escape($k):"").($A[2]?"&$A[2]":"");}function
is_ajax(){return($_SERVER["HTTP_X_REQUESTED_WITH"]=="XMLHttpRequest");}function
redirect($Gg,$eh=null){if($eh!==null){restart_session();$_SESSION["messages"][preg_replace('~^[^?]*~','',($Gg!==null?$Gg:$_SERVER["REQUEST_URI"]))][]=$eh;}if($Gg!==null){if($Gg=="")$Gg=".";header("Location: $Gg");exit;}}function
query_redirect($F,$Gg,$eh,$bk=true,$Cd=true,$Nd=false,$zm=""){if($Cd){$Il=microtime(true);$Nd=!connection()->query($F);$zm=format_time($Il);}$Bl=($F?adminer()->messageQuery($F,$zm,$Nd):"");if($Nd){adminer()->error
.=adminer()->error().$Bl.script("messagesPrint();")."
";return
false;}if($bk)redirect($Gg,$eh.$Bl);return
true;}class
Queries{static$queries=array();static$start=0;}function
remember_query($F){if(!Queries::$start)Queries::$start=microtime(true);Queries::$queries[]=(driver()->delimiter!=';'?$F:(preg_match('~;$~',$F)?"DELIMITER ;;\n$F;\nDELIMITER ":$F).";");}function
queries($F){remember_query($F);return
connection()->query($F);}function
apply_queries($F,array$S,$xd='Adminer\table'){foreach($S
as$Q){if(!queries("$F ".$xd($Q)))return
false;}return
true;}function
queries_redirect($Gg,$eh,$bk){$Uj=implode("\n",Queries::$queries);$zm=format_time(Queries::$start);return
query_redirect($Uj,$Gg,$eh,$bk,false,!$bk,$zm);}function
format_time($Il){return
lang(2,max(0,microtime(true)-$Il));}function
relative_uri($tn=''){return
preg_replace_callback('~^[^?]*~',function($A){return
str_replace(":","%3A",$A[0]);},preg_replace('~^[^?]*/([^?]*)~','\1',($tn?:$_SERVER["REQUEST_URI"])));}function
remove_from_uri($Ui=""){return
substr(preg_replace("~(?<=[?&])($Ui".(SID?"":"|".session_name()).")=[^&]*&~",'',relative_uri()."&"),0,-1);}function
get_files($B,$wc=false){$Vd=$_FILES[$B];if(!$Vd)return
null;foreach($Vd
as$x=>$W)$Vd[$x]=(array)$W;$H=array();foreach($Vd["error"]as$x=>$m){if($m)return$m;$p=$Vd["name"][$x];$Gm=$Vd["tmp_name"][$x];$Wb=file_get_contents($wc&&preg_match('~\.gz$~',$p)?"compress.zlib://$Gm":$Gm);if($wc){$Il=substr($Wb,0,3);if(function_exists("iconv")&&preg_match("~^\xFE\xFF|^\xFF\xFE~",$Il))$Wb=iconv("utf-16","utf-8",$Wb);elseif($Il=="\xEF\xBB\xBF")$Wb=substr($Wb,3);}$H[]=array($p,$Wb);}return$H;}function
get_file($x,$wc=false,$Cc=""){$Yd=get_files($x,$wc);if(!is_array($Yd))return$Yd;$H='';foreach($Yd
as$Vd){$Wb=$Vd[1];$H
.=$Wb;if($Cc)$H
.=(preg_match("($Cc\\s*\$)",$Wb)?"":$Cc)."\n\n";}return$H;}function
upload_error($m){$Wg=($m==UPLOAD_ERR_INI_SIZE?ini_get("upload_max_filesize"):0);return($m?lang(3).($Wg?" ".lang(4,$Wg):""):lang(5));}function
is_utf8($W){return(preg_match('~~u',$W)&&!preg_match('~[\0-\x8\xB\xC\xE-\x1F]~',$W));}function
utf8_length($W){return
strlen(preg_replace('~[\x80-\xBF]~','',$W));}function
format_number($W){preg_match('~^#+([^#0]+)(?:(#+)\1)?(#*0)$~u',lang(6),$A);$rl=strlen($A[3]);$H=number_format($W,0,".","");$H=preg_replace('~\B(?=(\d{'.(strlen($A[2])?:$rl).'})*\d{'.$rl.'}$)~',$A[1],$H);return
strtr($H,preg_split('~~u',lang(7),-1,PREG_SPLIT_NO_EMPTY));}function
format_status(array$R,$x){$W=idx($R,$x,'?');if(!is_numeric($W))return
h($W);if($W<0)return'?';$Ca=($x=="Rows"&&(JUSH=="sqlite"||$R["Engine"]==(JUSH=="pgsql"?"table":"InnoDB")));$W=in_array($x,array("Data_length","Index_length","Data_free"))?adminer()->formatSizeValue($W):format_number($W);return($Ca?"~ ":"").$W;}function
friendly_url($W){return
preg_replace('~\W~i','-',$W);}function
table_status1($Q,$Od=false){$H=table_status($Q,$Od);return($H?reset($H):array("Name"=>$Q));}function
column_foreign_keys($Q){$H=array();foreach(adminer()->foreignKeys($Q)as$q){foreach($q["source"]as$W)$H[$W][]=$q;}return$H;}function
fields_from_edit(){$H=array();foreach((array)$_POST["field_keys"]as$x=>$W){if($W!=""){$W=bracket_escape($W);$_POST["function"][$W]=$_POST["field_funs"][$x];$_POST["fields"][$W]=$_POST["field_vals"][$x];}}foreach((array)$_POST["fields"]as$x=>$W){$B=bracket_escape($x,true);$H[$B]=array("field"=>$B,"full_type"=>"","type"=>"","privileges"=>array("insert"=>1,"update"=>1,"where"=>1,"order"=>1),"null"=>true,"auto_increment"=>($B==driver()->primary),);}return$H;}function
dump_headers($jf,$xh=false){$H=adminer()->dumpHeaders($jf,$xh);$Pi=$_POST["output"];if($Pi!="text"||$H=="tar"){$Mb=($Pi!="text"&&$Pi!="file"&&preg_match('~^[0-9a-z]+$~',$Pi)?".$Pi":"");header("Content-Disposition: attachment; filename=".adminer()->dumpFilename($jf).".$H$Mb");}session_write_close();if(!ob_get_level())ob_start(null,4096);ob_flush();flush();return$H;}function
dump_csv(array$I){$Ym=$_POST["format"]=="tsv";foreach($I
as$x=>$W){if(preg_match('~["\n]|^0[^.]|\.\d*0$|'.($Ym?'\t':'[,;]|^$').'~',$W))$I[$x]='"'.str_replace('"','""',$W).'"';}echo
implode(($_POST["format"]=="csv"?",":($Ym?"\t":";")),$I)."\r\n";}function
parse_csv($kc,$Xk){$H=array();preg_match_all('~(?>"[^"]*"|[^"\r\n]+)+~',$kc,$Mg);foreach($Mg[0]as$I){preg_match_all("~((?>\"[^\"]*\")+|[^$Xk]*)$Xk~",$I.$Xk,$Ng);$H[]=$Ng[1];}return$H;}function
csv_value($W){return(preg_match('~^".*"$~s',$W)?str_replace('""','"',substr($W,1,-1)):$W);}function
apply_sql_function($ye,$d){return($ye?($ye=="unixepoch"?"DATETIME($d, '$ye')":($ye=="count distinct"?"COUNT(DISTINCT ":strtoupper("$ye("))."$d)"):$d);}function
get_temp_dir(){return
ini_get("upload_tmp_dir")?:sys_get_temp_dir();}function
file_open_lock($p){if(is_link($p))return;$pe=@fopen($p,"c+");if(!$pe)return;@chmod($p,0660);if(!flock($pe,LOCK_EX)){fclose($pe);return;}return$pe;}function
file_write_unlock($pe,$oc){rewind($pe);fwrite($pe,$oc);ftruncate($pe,strlen($oc));file_unlock($pe);}function
file_unlock($pe){flock($pe,LOCK_UN);fclose($pe);}function
first(array$Ga){return
reset($Ga);}function
password_file($i){$p=get_temp_dir()."/adminer.key";if(!$i&&!file_exists($p))return'';$pe=file_open_lock($p);if(!$pe)return'';$H=stream_get_contents($pe);if(!$H){$H=rand_string();file_write_unlock($pe,$H);}else
file_unlock($pe);return$H;}function
rand_string(){return(function_exists('random_bytes')?bin2hex(random_bytes(16)):md5(uniqid(strval(mt_rand()),true)));}function
select_value($W,$_,array$n,$xm,array$oj=array()){if(is_array($W)){$H="";if(array_filter($W,'is_array')==array_values($W)){$fg=array();foreach($W
as$V)$fg+=array_fill_keys(array_keys($V),null);foreach(array_keys($fg)as$cg)$H
.="