';$_e=array("select"=>lang(40));if(support("table")||support("indexes"))$_e["table"]=lang(41);if(support("table")){if(is_view($Oh))$_e["view"]=lang(42);else$_e["create"]=lang(43);}if($N!==null)$_e["edit"]=lang(44);$C=$Oh["Name"];foreach($_e
as$y=>$X)echo" $X";echo
doc_link(array($x=>$l->tableHelp($C)),"?"),"\n";}function
foreignKeys($Q){return
foreign_keys($Q);}function
backwardKeys($Q,$Nh){return
array();}function
backwardKeysPrint($Oa,$J){}function
selectQuery($G,$Eh,$Xc=false){global$x,$l;$I="
\n";if(!$Xc&&($dj=$l->warnings())){$Kd="warnings";$I=", ".select_input(" name='where[$t][col]'",$e,$X["col"],($X?"selectFieldChange":"selectAddRow"),"(".lang(56).")"),html_select("where[$t][op]",$this->operators,$X["op"],$bb),"",script("mixin(qsl('input'), {oninput: function () { $bb }, onkeydown: selectSearchKeydown, onsearch: selectSearchSearch});",""),"
\n";}}echo"\n";}function
selectOrderPrint($Bf,$e,$w){print_fieldset("sort",lang(57),$Bf);$t=0;foreach((array)$_GET["order"]as$y=>$X){if($X!=""){echo"".select_input(" name='order[$t]'",$e,$X,"selectFieldChange"),checkbox("desc[$t]",1,isset($_GET["desc"][$y]),lang(58))."
\n";$t++;}}echo"".select_input(" name='order[$t]'",$e,"","selectAddRow"),checkbox("desc[$t]",1,false,lang(58))."
\n","\n";}function
selectLimitPrint($z){echo"($oc[$Xi]) ".h($V.($M!=""?"@".$this->serverName($M):"").($k!=""?" - $k":""))."\n";}}}}if($Mf)echo"\n".script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");}else{$S=array();if($_GET["ns"]!==""&&!$Ve&&DB!=""){$g->select_db(DB);$S=table_status('',true);}echo
script_src(preg_replace("~\\?.*~","",ME)."?file=jush.js&version=4.17.1");if(support("sql")){echo'
';}$this->databasesPrint($Ve);$wa=array();if(DB==""||!$Ve){if(support("sql")){$wa[]="".lang(63)."";$wa[]="".lang(71)."";}if(support("dump"))$wa[]="".lang(72)."";}$Pd=$_GET["ns"]!==""&&!$Ve&&DB!="";if($Pd)$wa[]='".lang(73)."";echo($wa?"\n".implode("\n",$wa)."\n":"");if($Pd){if($S)$this->tablesPrint($S);else
echo"
".lang(10)."
\n";}}}function
databasesPrint($Ve){global$b,$g;$j=$this->databases();if(DB&&$j&&!in_array(DB,$j))array_unshift($j,DB);echo'\n";}function
tablesPrint($S){echo"".script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");foreach($S
as$Q=>$O){$C=$this->tableName($O);if($C!=""){echo'- ".lang(76)." ",(support("table")||support("indexes")?'$C":"$C")."\n";}}echo"
\n";}}$b=(function_exists('adminer_object')?adminer_object():new
Adminer);$oc=array("server"=>"MySQL")+$oc;if(!defined("DRIVER")){define("DRIVER","server");if(extension_loaded("mysqli")){class
Min_DB
extends
MySQLi{var$extension="MySQLi";function
__construct(){parent::init();}function
connect($M="",$V="",$F="",$Vb=null,$eg=null,$uh=null){global$b;mysqli_report(MYSQLI_REPORT_OFF);list($Id,$eg)=explode(":",$M,2);$Dh=$b->connectSsl();if($Dh)$this->ssl_set($Dh['key'],$Dh['cert'],$Dh['ca'],'','');$I=@$this->real_connect(($M!=""?$Id:ini_get("mysqli.default_host")),($M.$V!=""?$V:ini_get("mysqli.default_user")),($M.$V.$F!=""?$F:ini_get("mysqli.default_pw")),$Vb,(is_numeric($eg)?$eg:ini_get("mysqli.default_port")),(!is_numeric($eg)?$eg:$uh),($Dh?(empty($Dh['cert'])?2048:64):0));$this->options(MYSQLI_OPT_LOCAL_INFILE,false);return$I;}function
set_charset($cb){if(parent::set_charset($cb))return
true;parent::set_charset('utf8');return$this->query("SET NAMES $cb");}function
result($G,$n=0){$H=$this->query($G);if(!$H)return
false;$J=$H->fetch_array();return$J[$n];}function
quote($P){return"'".$this->escape_string($P)."'";}}}elseif(extension_loaded("mysql")&&!((ini_bool("sql.safe_mode")||ini_bool("mysql.allow_local_infile"))&&extension_loaded("pdo_mysql"))){class
Min_DB{var$extension="MySQL",$server_info,$affected_rows,$errno,$error,$_link,$_result;function
connect($M,$V,$F){if(ini_bool("mysql.allow_local_infile")){$this->error=lang(77,"'mysql.allow_local_infile'","MySQLi","PDO_MySQL");return
false;}$this->_link=@mysql_connect(($M!=""?$M:ini_get("mysql.default_host")),("$M$V"!=""?$V:ini_get("mysql.default_user")),("$M$V$F"!=""?$F:ini_get("mysql.default_password")),true,131072);if($this->_link)$this->server_info=mysql_get_server_info($this->_link);else$this->error=mysql_error();return(bool)$this->_link;}function
set_charset($cb){if(function_exists('mysql_set_charset')){if(mysql_set_charset($cb,$this->_link))return
true;mysql_set_charset('utf8',$this->_link);}return$this->query("SET NAMES $cb");}function
quote($P){return"'".mysql_real_escape_string($P,$this->_link)."'";}function
select_db($Vb){return
mysql_select_db($Vb,$this->_link);}function
query($G,$Ci=false){$H=@($Ci?mysql_unbuffered_query($G,$this->_link):mysql_query($G,$this->_link));$this->error="";if(!$H){$this->errno=mysql_errno($this->_link);$this->error=mysql_error($this->_link);return
false;}if($H===true){$this->affected_rows=mysql_affected_rows($this->_link);$this->info=mysql_info($this->_link);return
true;}return
new
Min_Result($H);}function
multi_query($G){return$this->_result=$this->query($G);}function
store_result(){return$this->_result;}function
next_result(){return
false;}function
result($G,$n=0){$H=$this->query($G);if(!$H||!$H->num_rows)return
false;return
mysql_result($H->_result,0,$n);}}class
Min_Result{var$num_rows,$_result,$_offset=0;function
__construct($H){$this->_result=$H;$this->num_rows=mysql_num_rows($H);}function
fetch_assoc(){return
mysql_fetch_assoc($this->_result);}function
fetch_row(){return
mysql_fetch_row($this->_result);}function
fetch_field(){$I=mysql_fetch_field($this->_result,$this->_offset++);$I->orgtable=$I->table;$I->orgname=$I->name;$I->charsetnr=($I->blob?63:0);return$I;}function
__destruct(){mysql_free_result($this->_result);}}}elseif(extension_loaded("pdo_mysql")){class
Min_DB
extends
Min_PDO{var$extension="PDO_MySQL";function
connect($M,$V,$F){global$b;$D=array(PDO::MYSQL_ATTR_LOCAL_INFILE=>false);$Dh=$b->connectSsl();if($Dh){if(!empty($Dh['key']))$D[PDO::MYSQL_ATTR_SSL_KEY]=$Dh['key'];if(!empty($Dh['cert']))$D[PDO::MYSQL_ATTR_SSL_CERT]=$Dh['cert'];if(!empty($Dh['ca']))$D[PDO::MYSQL_ATTR_SSL_CA]=$Dh['ca'];if(!empty($Dh['verify']))$D[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT]=$Dh['verify'];}$this->dsn("mysql:charset=utf8;host=".str_replace(":",";unix_socket=",preg_replace('~:(\d)~',';port=\1',$M)),$V,$F,$D);return
true;}function
set_charset($cb){$this->query("SET NAMES $cb");}function
select_db($Vb){return$this->query("USE ".idf_escape($Vb));}function
query($G,$Ci=false){$this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,!$Ci);return
parent::query($G,$Ci);}}}class
Min_Driver
extends
Min_SQL{function
insert($Q,$N){return($N?parent::insert($Q,$N):queries("INSERT INTO ".table($Q)." ()\nVALUES ()"));}function
insertUpdate($Q,$K,$lg){$e=array_keys(reset($K));$jg="INSERT INTO ".table($Q)." (".implode(", ",$e).") VALUES\n";$Vi=array();foreach($e
as$y)$Vi[$y]="$y = VALUES($y)";$Kh="\nON DUPLICATE KEY UPDATE ".implode(", ",$Vi);$Vi=array();$xe=0;foreach($K
as$N){$Y="(".implode(", ",$N).")";if($Vi&&(strlen($jg)+$xe+strlen($Y)+strlen($Kh)>1e6)){if(!queries($jg.implode(",\n",$Vi).$Kh))return
false;$Vi=array();$xe=0;}$Vi[]=$Y;$xe+=strlen($Y)+2;}return
queries($jg.implode(",\n",$Vi).$Kh);}function
slowQuery($G,$fi){if(min_version('5.7.8','10.1.2')){if(preg_match('~MariaDB~',$this->_conn->server_info))return"SET STATEMENT max_statement_time=$fi FOR $G";elseif(preg_match('~^(SELECT\b)(.+)~is',$G,$B))return"$B[1] /*+ MAX_EXECUTION_TIME(".($fi*1000).") */ $B[2]";}}function
convertSearch($u,$X,$n){return(preg_match('~char|text|enum|set~',$n["type"])&&!preg_match("~^utf8~",$n["collation"])&&preg_match('~[\x80-\xFF]~',$X['val'])?"CONVERT($u USING ".charset($this->_conn).")":$u);}function
warnings(){$H=$this->_conn->query("SHOW WARNINGS");if($H&&$H->num_rows){ob_start();select($H);return
ob_get_clean();}}function
tableHelp($C){$Ce=preg_match('~MariaDB~',$this->_conn->server_info);if(information_schema(DB))return
strtolower("information-schema-".($Ce?"$C-table/":str_replace("_","-",$C)."-table.html"));if(DB=="mysql")return($Ce?"mysql$C-table/":"system-schema.html");}function
hasCStyleEscapes(){static$Ya;if($Ya===null){$Bh=$this->_conn->result("SHOW VARIABLES LIKE 'sql_mode'",1);$Ya=(strpos($Bh,'NO_BACKSLASH_ESCAPES')===false);}return$Ya;}}function
idf_escape($u){return"`".str_replace("`","``",$u)."`";}function
table($u){return
idf_escape($u);}function
connect(){global$b,$U,$Hh,$wc;$g=new
Min_DB;$Ob=$b->credentials();if($g->connect($Ob[0],$Ob[1],$Ob[2])){$g->set_charset(charset($g));$g->query("SET sql_quote_show_create = 1, autocommit = 1");if(min_version('5.7.8',10.2,$g)){$Hh[lang(26)][]="json";$U["json"]=4294967295;}if(min_version('',10.7,$g)){$Hh[lang(26)][]="uuid";$U["uuid"]=128;$wc[0]['uuid']='uuid';}if(min_version(9,'',$g)){$Hh[lang(27)][]="vector";$U["vector"]=16383;$wc[0]['vector']='string_to_vector';}return$g;}$I=$g->error;if(function_exists('iconv')&&!is_utf8($I)&&strlen($Wg=iconv("windows-1250","utf-8",$I))>strlen($I))$I=$Wg;return$I;}function
get_databases($jd){$I=get_session("dbs");if($I===null){$G=(min_version(5)?"SELECT SCHEMA_NAME FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME":"SHOW DATABASES");$I=($jd?slow_query($G):get_vals($G));restart_session();set_session("dbs",$I);stop_session();}return$I;}function
limit($G,$Z,$z,$lf=0,$gh=" "){return" $G$Z".($z!==null?$gh."LIMIT $z".($lf?" OFFSET $lf":""):"");}function
limit1($Q,$G,$Z,$gh="\n"){return
limit($G,$Z,1,0,$gh);}function
db_collation($k,$qb){global$g;$I=null;$i=$g->result("SHOW CREATE DATABASE ".idf_escape($k),1);if(preg_match('~ COLLATE ([^ ]+)~',$i,$B))$I=$B[1];elseif(preg_match('~ CHARACTER SET ([^ ]+)~',$i,$B))$I=$qb[$B[1]][-1];return$I;}function
engines(){$I=array();foreach(get_rows("SHOW ENGINES")as$J){if(preg_match("~YES|DEFAULT~",$J["Support"]))$I[]=$J["Engine"];}return$I;}function
logged_user(){global$g;return$g->result("SELECT USER()");}function
tables_list(){return
get_key_vals(min_version(5)?"SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME":"SHOW TABLES");}function
count_tables($j){$I=array();foreach($j
as$k)$I[$k]=count(get_vals("SHOW TABLES IN ".idf_escape($k)));return$I;}function
table_status($C="",$Yc=false){$I=array();foreach(get_rows($Yc&&min_version(5)?"SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ".($C!=""?"AND TABLE_NAME = ".q($C):"ORDER BY Name"):"SHOW TABLE STATUS".($C!=""?" LIKE ".q(addcslashes($C,"%_\\")):""))as$J){if($J["Engine"]=="InnoDB")$J["Comment"]=preg_replace('~(?:(.+); )?InnoDB free: .*~','\1',$J["Comment"]);if(!isset($J["Engine"]))$J["Comment"]="";if($C!=""){$J["Name"]=$C;return$J;}$I[$J["Name"]]=$J;}return$I;}function
is_view($R){return$R["Engine"]===null;}function
fk_support($R){return
preg_match('~InnoDB|IBMDB2I~i',$R["Engine"])||(preg_match('~NDB~i',$R["Engine"])&&min_version(5.6));}function
fields($Q){$I=array();foreach(get_rows("SHOW FULL COLUMNS FROM ".table($Q))as$J){preg_match('~^([^( ]+)(?:\((.+)\))?( unsigned)?( zerofill)?$~',$J["Type"],$B);$I[$J["Field"]]=array("field"=>$J["Field"],"full_type"=>$J["Type"],"type"=>$B[1],"length"=>$B[2],"unsigned"=>ltrim($B[3].$B[4]),"default"=>($J["Default"]!=""||preg_match("~char|set~",$B[1])?(preg_match('~text~',$B[1])?stripslashes(preg_replace("~^'(.*)'\$~",'\1',$J["Default"])):$J["Default"]):null),"null"=>($J["Null"]=="YES"),"auto_increment"=>($J["Extra"]=="auto_increment"),"on_update"=>(preg_match('~^on update (.+)~i',$J["Extra"],$B)?$B[1]:""),"collation"=>$J["Collation"],"privileges"=>array_flip(preg_split('~, *~',$J["Privileges"])),"comment"=>$J["Comment"],"primary"=>($J["Key"]=="PRI"),"generated"=>preg_match('~^(VIRTUAL|PERSISTENT|STORED)~',$J["Extra"]),);}return$I;}function
indexes($Q,$h=null){$I=array();foreach(get_rows("SHOW INDEX FROM ".table($Q),$h)as$J){$C=$J["Key_name"];$I[$C]["type"]=($C=="PRIMARY"?"PRIMARY":($J["Index_type"]=="FULLTEXT"?"FULLTEXT":($J["Non_unique"]?($J["Index_type"]=="SPATIAL"?"SPATIAL":"INDEX"):"UNIQUE")));$I[$C]["columns"][]=$J["Column_name"];$I[$C]["lengths"][]=($J["Index_type"]=="SPATIAL"?null:$J["Sub_part"]);$I[$C]["descs"][]=null;}return$I;}function
foreign_keys($Q){global$g,$tf;static$ag='(?:`(?:[^`]|``)+`|"(?:[^"]|"")+")';$I=array();$Mb=$g->result("SHOW CREATE TABLE ".table($Q),1);if($Mb){preg_match_all("~CONSTRAINT ($ag) FOREIGN KEY ?\\(((?:$ag,? ?)+)\\) REFERENCES ($ag)(?:\\.($ag))? \\(((?:$ag,? ?)+)\\)(?: ON DELETE ($tf))?(?: ON UPDATE ($tf))?~",$Mb,$Fe,PREG_SET_ORDER);foreach($Fe
as$B){preg_match_all("~$ag~",$B[2],$wh);preg_match_all("~$ag~",$B[5],$Xh);$I[idf_unescape($B[1])]=array("db"=>idf_unescape($B[4]!=""?$B[3]:$B[4]),"table"=>idf_unescape($B[4]!=""?$B[4]:$B[3]),"source"=>array_map('idf_unescape',$wh[0]),"target"=>array_map('idf_unescape',$Xh[0]),"on_delete"=>($B[6]?$B[6]:"RESTRICT"),"on_update"=>($B[7]?$B[7]:"RESTRICT"),);}}return$I;}function
view($C){global$g;return
array("select"=>preg_replace('~^(?:[^`]|`[^`]*`)*\s+AS\s+~isU','',$g->result("SHOW CREATE VIEW ".table($C),1)));}function
collations(){$I=array();foreach(get_rows("SHOW COLLATION")as$J){if($J["Default"])$I[$J["Charset"]][-1]=$J["Collation"];else$I[$J["Charset"]][]=$J["Collation"];}ksort($I);foreach($I
as$y=>$X)asort($I[$y]);return$I;}function
information_schema($k){return(min_version(5)&&$k=="information_schema")||(min_version(5.5)&&$k=="performance_schema");}function
error(){global$g;return
h(preg_replace('~^You have an error.*syntax to use~U',"Syntax error",$g->error));}function
create_database($k,$pb){return
queries("CREATE DATABASE ".idf_escape($k).($pb?" COLLATE ".q($pb):""));}function
drop_databases($j){$I=apply_queries("DROP DATABASE",$j,'idf_escape');restart_session();set_session("dbs",null);return$I;}function
rename_database($C,$pb){$I=false;if(create_database($C,$pb)){$S=array();$aj=array();foreach(tables_list()as$Q=>$T){if($T=='VIEW')$aj[]=$Q;else$S[]=$Q;}$I=(!$S&&!$aj)||move_tables($S,$aj,$C);drop_databases($I?array(DB):array());}return$I;}function
auto_increment(){$Ma=" PRIMARY KEY";if($_GET["create"]!=""&&$_POST["auto_increment_col"]){foreach(indexes($_GET["create"])as$v){if(in_array($_POST["fields"][$_POST["auto_increment_col"]]["orig"],$v["columns"],true)){$Ma="";break;}if($v["type"]=="PRIMARY")$Ma=" UNIQUE";}}return" AUTO_INCREMENT$Ma";}function
alter_table($Q,$C,$o,$ld,$wb,$Dc,$pb,$La,$Wf){$c=array();foreach($o
as$n)$c[]=($n[1]?($Q!=""?($n[0]!=""?"CHANGE ".idf_escape($n[0]):"ADD"):" ")." ".implode($n[1]).($Q!=""?$n[2]:""):"DROP ".idf_escape($n[0]));$c=array_merge($c,$ld);$O=($wb!==null?" COMMENT=".q($wb):"").($Dc?" ENGINE=".q($Dc):"").($pb?" COLLATE ".q($pb):"").($La!=""?" AUTO_INCREMENT=$La":"");if($Q=="")return
queries("CREATE TABLE ".table($C)." (\n".implode(",\n",$c)."\n)$O$Wf");if($Q!=$C)$c[]="RENAME TO ".table($C);if($O)$c[]=ltrim($O);return($c||$Wf?queries("ALTER TABLE ".table($Q)."\n".implode(",\n",$c).$Wf):true);}function
alter_indexes($Q,$c){foreach($c
as$y=>$X)$c[$y]=($X[2]=="DROP"?"\nDROP INDEX ".idf_escape($X[1]):"\nADD $X[0] ".($X[0]=="PRIMARY"?"KEY ":"").($X[1]!=""?idf_escape($X[1])." ":"")."(".implode(", ",$X[2]).")");return
queries("ALTER TABLE ".table($Q).implode(",",$c));}function
truncate_tables($S){return
apply_queries("TRUNCATE TABLE",$S);}function
drop_views($aj){return
queries("DROP VIEW ".implode(", ",array_map('table',$aj)));}function
drop_tables($S){return
queries("DROP TABLE ".implode(", ",array_map('table',$S)));}function
move_tables($S,$aj,$Xh){global$g;$Ig=array();foreach($S
as$Q)$Ig[]=table($Q)." TO ".idf_escape($Xh).".".table($Q);if(!$Ig||queries("RENAME TABLE ".implode(", ",$Ig))){$ec=array();foreach($aj
as$Q)$ec[table($Q)]=view($Q);$g->select_db($Xh);$k=idf_escape(DB);foreach($ec
as$C=>$Zi){if(!queries("CREATE VIEW $C AS ".str_replace(" $k."," ",$Zi["select"]))||!queries("DROP VIEW $k.$C"))return
false;}return
true;}return
false;}function
copy_tables($S,$aj,$Xh){queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");foreach($S
as$Q){$C=($Xh==DB?table("copy_$Q"):idf_escape($Xh).".".table($Q));if(($_POST["overwrite"]&&!queries("\nDROP TABLE IF EXISTS $C"))||!queries("CREATE TABLE $C LIKE ".table($Q))||!queries("INSERT INTO $C SELECT * FROM ".table($Q)))return
false;foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($Q,"%_\\")))as$J){$xi=$J["Trigger"];if(!queries("CREATE TRIGGER ".($Xh==DB?idf_escape("copy_$xi"):idf_escape($Xh).".".idf_escape($xi))." $J[Timing] $J[Event] ON $C FOR EACH ROW\n$J[Statement];"))return
false;}}foreach($aj
as$Q){$C=($Xh==DB?table("copy_$Q"):idf_escape($Xh).".".table($Q));$Zi=view($Q);if(($_POST["overwrite"]&&!queries("DROP VIEW IF EXISTS $C"))||!queries("CREATE VIEW $C AS $Zi[select]"))return
false;}return
true;}function
trigger($C){if($C=="")return
array();$K=get_rows("SHOW TRIGGERS WHERE `Trigger` = ".q($C));return
reset($K);}function
triggers($Q){$I=array();foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($Q,"%_\\")))as$J)$I[$J["Trigger"]]=array($J["Timing"],$J["Event"]);return$I;}function
trigger_options(){return
array("Timing"=>array("BEFORE","AFTER"),"Event"=>array("INSERT","UPDATE","DELETE"),"Type"=>array("FOR EACH ROW"),);}function
routine($C,$T){global$g,$Fc,$Wd,$U;$Ca=array("bool","boolean","integer","double precision","real","dec","numeric","fixed","national char","national varchar");$xh="(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";$Bi="((".implode("|",array_merge(array_keys($U),$Ca)).")\\b(?:\\s*\\(((?:[^'\")]|$Fc)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";$ag="$xh*(".($T=="FUNCTION"?"":$Wd).")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$Bi";$i=$g->result("SHOW CREATE $T ".idf_escape($C),2);preg_match("~\\(((?:$ag\\s*,?)*)\\)\\s*".($T=="FUNCTION"?"RETURNS\\s+$Bi\\s+":"")."(.*)~is",$i,$B);$o=array();preg_match_all("~$ag\\s*,?~is",$B[1],$Fe,PREG_SET_ORDER);foreach($Fe
as$Qf)$o[]=array("field"=>str_replace("``","`",$Qf[2]).$Qf[3],"type"=>strtolower($Qf[5]),"length"=>preg_replace_callback("~$Fc~s",'normalize_enum',$Qf[6]),"unsigned"=>strtolower(preg_replace('~\s+~',' ',trim("$Qf[8] $Qf[7]"))),"null"=>1,"full_type"=>$Qf[4],"inout"=>strtoupper($Qf[1]),"collation"=>strtolower($Qf[9]),);return
array("fields"=>$o,"comment"=>$g->result("SELECT ROUTINE_COMMENT FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = ".q(DB)." AND ROUTINE_NAME = ".q($C)),)+($T!="FUNCTION"?array("definition"=>$B[11]):array("returns"=>array("type"=>$B[12],"length"=>$B[13],"unsigned"=>$B[15],"collation"=>$B[16]),"definition"=>$B[17],"language"=>"SQL",));}function
routines(){return
get_rows("SELECT ROUTINE_NAME AS SPECIFIC_NAME, ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = ".q(DB));}function
routine_languages(){return
array();}function
routine_id($C,$J){return
idf_escape($C);}function
last_id(){global$g;return$g->result("SELECT LAST_INSERT_ID()");}function
explain($g,$G){return$g->query("EXPLAIN ".(min_version(5.1)&&!min_version(5.7)?"PARTITIONS ":"").$G);}function
found_rows($R,$Z){return($Z||$R["Engine"]!="InnoDB"?null:$R["Rows"]);}function
types(){return
array();}function
schemas(){return
array();}function
get_schema(){return"";}function
set_schema($Yg,$h=null){return
true;}function
create_sql($Q,$La,$Ih){global$g;$I=$g->result("SHOW CREATE TABLE ".table($Q),1);if(!$La)$I=preg_replace('~ AUTO_INCREMENT=\d+~','',$I);return$I;}function
truncate_sql($Q){return"TRUNCATE ".table($Q);}function
use_sql($Vb){return"USE ".idf_escape($Vb);}function
trigger_sql($Q){$I="";foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($Q,"%_\\")),null,"-- ")as$J)$I.="\nCREATE TRIGGER ".idf_escape($J["Trigger"])." $J[Timing] $J[Event] ON ".table($J["Table"])." FOR EACH ROW\n$J[Statement];;\n";return$I;}function
show_variables(){return
get_key_vals("SHOW VARIABLES");}function
process_list(){return
get_rows("SHOW FULL PROCESSLIST");}function
show_status(){return
get_key_vals("SHOW STATUS");}function
convert_field($n){if(preg_match("~binary~",$n["type"]))return"HEX(".idf_escape($n["field"]).")";if($n["type"]=="bit")return"BIN(".idf_escape($n["field"])." + 0)";if(preg_match("~geometry|point|linestring|polygon~",$n["type"]))return(min_version(8)?"ST_":"")."AsWKT(".idf_escape($n["field"]).")";}function
unconvert_field($n,$I){if(preg_match("~binary~",$n["type"]))$I="UNHEX($I)";if($n["type"]=="bit")$I="CONVERT(b$I, UNSIGNED)";if(preg_match("~geometry|point|linestring|polygon~",$n["type"])){$jg=(min_version(8)?"ST_":"");$I=$jg."GeomFromText($I, $jg"."SRID($n[field]))";}return$I;}function
support($Zc){return!preg_match("~scheme|sequence|type|view_trigger|materializedview".(min_version(8)?"":"|descidx".(min_version(5.1)?"":"|event|partitioning".(min_version(5)?"":"|routine|trigger|view"))).(min_version('8.0.16','10.2.1')?"":"|check")."~",$Zc);}function
kill_process($X){return
queries("KILL ".number($X));}function
connection_id(){return"SELECT CONNECTION_ID()";}function
max_connections(){global$g;return$g->result("SELECT @@max_connections");}function
driver_config(){$U=array();$Hh=array();foreach(array(lang(27)=>array("tinyint"=>3,"smallint"=>5,"mediumint"=>8,"int"=>10,"bigint"=>20,"decimal"=>66,"float"=>12,"double"=>21),lang(28)=>array("date"=>10,"datetime"=>19,"timestamp"=>19,"time"=>10,"year"=>4),lang(26)=>array("char"=>255,"varchar"=>65535,"tinytext"=>255,"text"=>65535,"mediumtext"=>16777215,"longtext"=>4294967295),lang(78)=>array("enum"=>65535,"set"=>64),lang(29)=>array("bit"=>20,"binary"=>255,"varbinary"=>65535,"tinyblob"=>255,"blob"=>65535,"mediumblob"=>16777215,"longblob"=>4294967295),lang(31)=>array("geometry"=>0,"point"=>0,"linestring"=>0,"polygon"=>0,"multipoint"=>0,"multilinestring"=>0,"multipolygon"=>0,"geometrycollection"=>0),)as$y=>$X){$U+=$X;$Hh[$y]=array_keys($X);}return
array('possible_drivers'=>array("MySQLi","MySQL","PDO_MySQL"),'jush'=>"sql",'types'=>$U,'structured_types'=>$Hh,'unsigned'=>array("unsigned","zerofill","unsigned zerofill"),'operators'=>array("=","<",">","<=",">=","!=","LIKE","LIKE %%","REGEXP","IN","FIND_IN_SET","IS NULL","NOT LIKE","NOT REGEXP","NOT IN","IS NOT NULL","SQL"),'functions'=>array("char_length","date","from_unixtime","lower","round","floor","ceil","sec_to_time","time_to_sec","upper"),'grouping'=>array("avg","count","count distinct","group_concat","max","min","sum"),'edit_functions'=>array(array("char"=>"md5/sha1/password/encrypt/uuid","binary"=>"md5/sha1","date|time"=>"now",),array(number_type()=>"+/-","date"=>"+ interval/- interval","time"=>"addtime/subtime","char|text"=>"concat",)),);}}$_b=driver_config();$ig=$_b['possible_drivers'];$x=$_b['jush'];$U=$_b['types'];$Hh=$_b['structured_types'];$Ji=$_b['unsigned'];$yf=$_b['operators'];$sd=$_b['functions'];$zd=$_b['grouping'];$wc=$_b['edit_functions'];if($b->operators===null)$b->operators=$yf;define("SERVER",$_GET[DRIVER]);define("DB",$_GET["db"]);define("ME",preg_replace('~\?.*~','',relative_uri()).'?'.(sid()?SID.'&':'').(SERVER!==null?DRIVER."=".urlencode(SERVER).'&':'').(isset($_GET["username"])?"username=".urlencode($_GET["username"]).'&':'').(DB!=""?'db='.urlencode(DB).'&'.(isset($_GET["ns"])?"ns=".urlencode($_GET["ns"])."&":""):''));function
page_header($hi,$m="",$Va=array(),$ii=""){global$ca,$ia,$b,$oc,$x;page_headers();if(is_ajax()&&$m){page_messages($m);exit;}$ji=$hi.($ii!=""?": $ii":"");$ki=strip_tags($ji.(SERVER!=""&&SERVER!="localhost"?h(" - ".SERVER):"")." - ".$b->name());echo'
',$ki,'
',script_src(preg_replace("~\\?.*~","",ME)."?file=functions.js&version=4.17.1");if($b->head()){echo'
';foreach($b->css()as$Qb){echo'
';}}echo'
';$p=get_temp_dir()."/adminer.version";if(!$_COOKIE["adminer_version"]&&function_exists('openssl_verify')&&file_exists($p)&&filemtime($p)+86400>time()){$Yi=unserialize(file_get_contents($p));$tg="-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwqWOVuF5uw7/+Z70djoK
RlHIZFZPO0uYRezq90+7Amk+FDNd7KkL5eDve+vHRJBLAszF/7XKXe11xwliIsFs
DFWQlsABVZB3oisKCBEuI71J4kPH8dKGEWR9jDHFw3cWmoH3PmqImX6FISWbG3B8
h7FIx3jEaw5ckVPVTeo5JRm/1DZzJxjyDenXvBQ/6o9DgZKeNDgxwKzH+sw9/YCO
jHnq1cFpOIISzARlrHMa/43YfeNRAm/tsBXjSxembBPo7aQZLAWHmaj5+K19H10B
nCpz9Y++cipkVEiKRGih4ZEvjoFysEOdRLj6WiD/uUNky4xGeA6LaJqh5XpkFkcQ
fQIDAQAB
-----END PUBLIC KEY-----
";if(openssl_verify($Yi["version"],base64_decode($Yi["signature"]),$tg)==1)$_COOKIE["adminer_version"]=$Yi["version"];}echo'
',script("mixin(qs('#help'), {onmouseover: function () { helpOpen = 1; }, onmouseout: helpMouseout});"),'
';if($Va!==null){$_=substr(preg_replace('~\b(username|db|ns)=[^&]*&~','',ME),0,-1);echo'
'.$oc[DRIVER].' » ';$_=substr(preg_replace('~\b(db|ns)=[^&]*&~','',ME),0,-1);$M=$b->serverName(SERVER);$M=($M!=""?$M:lang(33));if($Va===false)echo"$M\n";else{echo"$M » ";if($_GET["ns"]!=""||(DB!=""&&is_array($Va)))echo''.h(DB).' » ';if(is_array($Va)){if($_GET["ns"]!="")echo''.h($_GET["ns"]).' » ';foreach($Va
as$y=>$X){$gc=(is_array($X)?$X[1]:h($X));if($gc!="")echo"$gc » ";}}echo"$hi\n";}}echo"
$ji
\n","
\n";restart_session();page_messages($m);$j=&get_session("dbs");if(DB!=""&&$j&&!in_array(DB,$j,true))$j=null;stop_session();define("PAGE_HEADER",1);}function
page_headers(){global$b;header("Content-Type: text/html; charset=utf-8");header("Cache-Control: no-cache");header("X-Frame-Options: deny");header("X-XSS-Protection: 0");header("X-Content-Type-Options: nosniff");header("Referrer-Policy: origin-when-cross-origin");foreach($b->csp()as$Pb){$Ed=array();foreach($Pb
as$y=>$X)$Ed[]="$y $X";header("Content-Security-Policy: ".implode("; ",$Ed));}$b->headers();}function
csp(){return
array(array("script-src"=>"'self' 'unsafe-inline' 'nonce-".get_nonce()."' 'strict-dynamic'","connect-src"=>"'self'","frame-src"=>"https://www.adminer.org","object-src"=>"'none'","base-uri"=>"'none'","form-action"=>"'self'",),);}function
get_nonce(){static$ff;if(!$ff)$ff=base64_encode(rand_string());return$ff;}function
page_messages($m){$Li=preg_replace('~^[^?]*~','',$_SERVER["REQUEST_URI"]);$Se=$_SESSION["messages"][$Li];if($Se){echo"
".implode("
\n
",$Se)."
".script("messagesPrint();");unset($_SESSION["messages"][$Li]);}if($m)echo"
$m
\n";}function
page_footer($Ve=""){global$b,$oi;echo'
';if($Ve!="auth"){echo'
';}echo
script("setupSubmitHighlight(document);");}function
int32($Ye){while($Ye>=2147483648)$Ye-=4294967296;while($Ye<=-2147483649)$Ye+=4294967296;return(int)$Ye;}function
long2str($W,$cj){$Wg='';foreach($W
as$X)$Wg.=pack('V',$X);if($cj)return
substr($Wg,0,end($W));return$Wg;}function
str2long($Wg,$cj){$W=array_values(unpack('V*',str_pad($Wg,4*ceil(strlen($Wg)/4),"\0")));if($cj)$W[]=strlen($Wg);return$W;}function
xxtea_mx($oj,$nj,$Lh,$ie){return
int32((($oj>>5&0x7FFFFFF)^$nj<<2)+(($nj>>3&0x1FFFFFFF)^$oj<<4))^int32(($Lh^$nj)+($ie^$oj));}function
encrypt_string($Gh,$y){if($Gh=="")return"";$y=array_values(unpack("V*",pack("H*",md5($y))));$W=str2long($Gh,true);$Ye=count($W)-1;$oj=$W[$Ye];$nj=$W[0];$ug=floor(6+52/($Ye+1));$Lh=0;while($ug-->0){$Lh=int32($Lh+0x9E3779B9);$vc=$Lh>>2&3;for($Of=0;$Of<$Ye;$Of++){$nj=$W[$Of+1];$Xe=xxtea_mx($oj,$nj,$Lh,$y[$Of&3^$vc]);$oj=int32($W[$Of]+$Xe);$W[$Of]=$oj;}$nj=$W[0];$Xe=xxtea_mx($oj,$nj,$Lh,$y[$Of&3^$vc]);$oj=int32($W[$Ye]+$Xe);$W[$Ye]=$oj;}return
long2str($W,false);}function
decrypt_string($Gh,$y){if($Gh=="")return"";if(!$y)return
false;$y=array_values(unpack("V*",pack("H*",md5($y))));$W=str2long($Gh,false);$Ye=count($W)-1;$oj=$W[$Ye];$nj=$W[0];$ug=floor(6+52/($Ye+1));$Lh=int32($ug*0x9E3779B9);while($Lh){$vc=$Lh>>2&3;for($Of=$Ye;$Of>0;$Of--){$oj=$W[$Of-1];$Xe=xxtea_mx($oj,$nj,$Lh,$y[$Of&3^$vc]);$nj=int32($W[$Of]-$Xe);$W[$Of]=$nj;}$oj=$W[$Ye];$Xe=xxtea_mx($oj,$nj,$Lh,$y[$Of&3^$vc]);$nj=int32($W[0]-$Xe);$W[0]=$nj;$Lh=int32($Lh-0x9E3779B9);}return
long2str($W,true);}$g='';$Dd=$_SESSION["token"];if(!$Dd)$_SESSION["token"]=rand(1,1e6);$oi=get_token();$cg=array();if($_COOKIE["adminer_permanent"]){foreach(explode(" ",$_COOKIE["adminer_permanent"])as$X){list($y)=explode(":",$X);$cg[$y]=$X;}}function
add_invalid_login(){global$b;$r=file_open_lock(get_temp_dir()."/adminer.invalid");if(!$r)return;$be=unserialize(stream_get_contents($r));$ei=time();if($be){foreach($be
as$ce=>$X){if($X[0]<$ei)unset($be[$ce]);}}$ae=&$be[$b->bruteForceKey()];if(!$ae)$ae=array($ei+30*60,0);$ae[1]++;file_write_unlock($r,serialize($be));}function
check_invalid_login(){global$b;$be=unserialize(@file_get_contents(get_temp_dir()."/adminer.invalid"));$ae=($be?$be[$b->bruteForceKey()]:array());$ef=($ae[1]>29?$ae[0]-time():0);if($ef>0)auth_error(lang(82,ceil($ef/60)));}$Ja=$_POST["auth"];if($Ja){session_regenerate_id();$Xi=$Ja["driver"];$M=$Ja["server"];$V=$Ja["username"];$F=(string)$Ja["password"];$k=$Ja["db"];set_password($Xi,$M,$V,$F);$_SESSION["db"][$Xi][$M][$V][$k]=true;if($Ja["permanent"]){$y=base64_encode($Xi)."-".base64_encode($M)."-".base64_encode($V)."-".base64_encode($k);$og=$b->permanentLogin(true);$cg[$y]="$y:".base64_encode($og?encrypt_string($F,$og):"");cookie("adminer_permanent",implode(" ",$cg));}if(count($_POST)==1||DRIVER!=$Xi||SERVER!=$M||$_GET["username"]!==$V||DB!=$k)redirect(auth_url($Xi,$M,$V,$k));}elseif($_POST["logout"]&&(!$Dd||verify_token())){foreach(array("pwds","db","dbs","queries")as$y)set_session($y,null);unset_permanent();redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~','',ME),0,-1),lang(83).' '.lang(84));}elseif($cg&&!$_SESSION["pwds"]){session_regenerate_id();$og=$b->permanentLogin();foreach($cg
as$y=>$X){list(,$jb)=explode(":",$X);list($Xi,$M,$V,$k)=array_map('base64_decode',explode("-",$y));set_password($Xi,$M,$V,decrypt_string(base64_decode($jb),$og));$_SESSION["db"][$Xi][$M][$V][$k]=true;}}function
unset_permanent(){global$cg;foreach($cg
as$y=>$X){list($Xi,$M,$V,$k)=array_map('base64_decode',explode("-",$y));if($Xi==DRIVER&&$M==SERVER&&$V==$_GET["username"]&&$k==DB)unset($cg[$y]);}cookie("adminer_permanent",implode(" ",$cg));}function
auth_error($m){global$b,$Dd;$mh=session_name();if(isset($_GET["username"])){header("HTTP/1.1 403 Forbidden");if(($_COOKIE[$mh]||$_GET[$mh])&&!$Dd)$m=lang(85);else{restart_session();add_invalid_login();$F=get_password();if($F!==null){if($F===false)$m.=($m?'
':'').lang(86,target_blank(),'permanentLogin()
');set_password(DRIVER,SERVER,$_GET["username"],null);}unset_permanent();}}if(!$_COOKIE[$mh]&&$_GET[$mh]&&ini_bool("session.use_only_cookies"))$m=lang(87);$Rf=session_get_cookie_params();cookie("adminer_key",($_COOKIE["adminer_key"]?$_COOKIE["adminer_key"]:rand_string()),$Rf["lifetime"]);page_header(lang(37),$m,null);echo"\n";page_footer("auth");exit;}if(isset($_GET["username"])&&!class_exists("Min_DB")){unset($_SESSION["pwds"][DRIVER]);unset_permanent();page_header(lang(89),lang(90,implode(", ",$ig)),false);page_footer("auth");exit;}stop_session(true);if(isset($_GET["username"])&&is_string(get_password())){list($Id,$eg)=explode(":",SERVER,2);if(preg_match('~^\s*([-+]?\d+)~',$eg,$B)&&($B[1]<1024||$B[1]>65535))auth_error(lang(91));check_invalid_login();$g=connect();$l=new
Min_Driver($g);}$Ae=null;if(!is_object($g)||($Ae=$b->login($_GET["username"],get_password()))!==true){$m=(is_string($g)?nl_br(h($g)):(is_string($Ae)?$Ae:lang(92)));auth_error($m.(preg_match('~^ | $~',get_password())?'
'.lang(93):''));}if($_POST["logout"]&&$Dd&&!verify_token()){page_header(lang(81),lang(94));page_footer("db");exit;}if($Ja&&$_POST["token"])$_POST["token"]=$oi;$m='';if($_POST){if(!verify_token()){$Vd="max_input_vars";$Le=ini_get($Vd);if(extension_loaded("suhosin")){foreach(array("suhosin.request.max_vars","suhosin.post.max_vars")as$y){$X=ini_get($y);if($X&&(!$Le||$X<$Le)){$Vd=$y;$Le=$X;}}}$m=(!$_POST["token"]&&$Le?lang(95,"'$Vd'"):lang(94).' '.lang(96));}}elseif($_SERVER["REQUEST_METHOD"]=="POST"){$m=lang(97,"'post_max_size'");if(isset($_GET["sql"]))$m.=' '.lang(98);}function
select($H,$h=null,$Ef=array(),$z=0){global$x;$_e=array();$w=array();$e=array();$Ta=array();$U=array();$I=array();for($t=0;(!$z||$t<$z)&&($J=$H->fetch_row());$t++){if(!$t){echo"":"".lang(13))."\n";return$I;}function
referencable_primary($eh){$I=array();foreach(table_status('',true)as$Ph=>$Q){if($Ph!=$eh&&fk_support($Q)){foreach(fields($Ph)as$n){if($n["primary"]){if($I[$Ph]){unset($I[$Ph]);break;}$I[$Ph]=$n;}}}}return$I;}function
adminer_settings(){parse_str($_COOKIE["adminer_settings"],$oh);return$oh;}function
adminer_setting($y){$oh=adminer_settings();return$oh[$y];}function
set_adminer_settings($oh){return
cookie("adminer_settings",http_build_query($oh+adminer_settings()));}function
textarea($C,$Y,$K=10,$sb=80){global$x;echo"";}function
select_input($Ia,$D,$Y="",$uf="",$dg=""){$Wh=($D?"select":"input");return"<$Wh$Ia".($D?">