About 22,057 results: "php extension_loaded"
Page 1 of 50
Filter Results
Sources
Languages
Filter Results
Try Search On

  1. 			<tr> <th colspan="2"> PHP extension </th> <th> Result </th> </tr>
  2. 			<tr> <td colspan="2"> ctype </td> <td> <?php showResult(extension_loaded('ctype'), true); ?> </td> </tr>
  3. 			<tr> <td colspan="2"> curl </td> <td> <?php showResult(extension_loaded('curl'), true); ?> </td> </tr>
  4. 			<tr> <td colspan="2"> DOM </td> <td> <?php showResult(extension_loaded('dom'), true); ?> </td> </tr>
  5. 			<tr> <td colspan="2"> gettext </td> <td> <?php showResult(extension_loaded('gettext'), false); ?> </td> </tr>
  6. 			<tr> <td colspan="2"> mbstring </td> <td> <?php showResult(extension_loaded('mbstring'), true); ?> </td> </tr>
  7. 			<tr> <td colspan="2"> json </td> <td> <?php showResult(extension_loaded('json'), true); ?> </td> </tr>
  8. 			<tr> <td colspan="2"> xml </td> <td> <?php showResult(extension_loaded('xml'), true); ?> </td> </tr>
  9. 			<tr> <td colspan="2"> zip </td> <td> <?php showResult(extension_loaded('zip'), false, "", "You need this module to select multiple NZB files"); ?> </td> </tr>
  10. 			<tr> <td colspan="2"> zlib </td> <td> <?php showResult(extension_loaded('zlib'), true); ?> </td> </tr>
  11. 
                        
  12. 			<tr> <th colspan="2"> Database support </th> <td> <?php showResult(extension_loaded('mysql') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'), true); ?> </td> </tr>
  13. 			<tr> <td colspan="2"> DB::mysql </td> <td> <?php showResult(extension_loaded('mysql'), false); ?> </td> </tr>
  14. 			<tr> <td colspan="2"> DB::pdo_mysql </td> <td> <?php showResult(extension_loaded('pdo_mysql'), false); ?> </td> </tr>
  15. 			<tr> <td colspan="2"> DB::pgsql </td> <td> <?php showResult(extension_loaded('pdo_pgsql'), false); ?> </td> </tr>


  1. f
  2. Ł “B@żŤfěƤLl\$-.3\000";break;}$gg=array();foreach(explode("\n",lzw_decompress($g))as$X)$gg[]=(strpos($X,"\t")?explode("\t",$X):$X);}if(extension_loaded('pdo')){class
  3. fetch_row(){return$this->fetch(3);}function
  4. fetch_field(){$I=(object)$this->getColumnMeta($this->_offset++);$I->orgtable=$I->table;$I->orgname=$I->name;$I->charsetnr=(in_array("blob",(array)$I->flags)?63:0);return$I;}}}$Eb=array();$Eb["sqlite"]="SQLite 3";$Eb["sqlite2"]="SQLite 2";if(isset($_GET["sqlite"])||isset($_GET["sqlite2"])){$Ee=array((isset($_GET["sqlite"])?"SQLite3":"SQLite"),"PDO_SQLite");define("DRIVER",(isset($_GET["sqlite"])?"sqlite":"sqlite2"));if(extension_loaded(isset($_GET["sqlite"])?"sqlite3":"sqlite")){if(isset($_GET["sqlite"])){class
  5. support($lc){return
  6. ereg('^(view|trigger|variables|status|dump|move_col|drop_col)$',$lc);}$v="sqlite";$U=array("integer"=>0,"real"=>0,"numeric"=>0,"text"=>0,"blob"=>0);$Df=array_keys($U);$ug=array();$be=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT IN","IS NOT NULL","");$_c=array("hex","length","lower","round","unixepoch","upper");$Ec=array("avg","count","count distinct","group_concat","max","min","sum");$Kb=array(array(),array("integer|real|numeric"=>"+/-","text"=>"||",));}$Eb["pgsql"]="PostgreSQL";if(isset($_GET["pgsql"])){$Ee=array("PgSQL","PDO_PgSQL");define("DRIVER","pgsql");if(extension_loaded("pgsql")){class
  7. stdClass;$H->name=oci_field_name($this->_result,$e);$H->orgname=$H->name;$H->type=oci_field_type($this->_result,$e);$H->charsetnr=(ereg("raw|blob|bfile",$H->type)?63:0);return$H;}function
  8. __destruct(){oci_free_statement($this->_result);}}}elseif(extension_loaded("pdo_oci")){class
  9. support($lc){return
  10. ereg('^(scheme|trigger|view|drop_col)$',$lc);}$v="mssql";$U=array();$Df=array();foreach(array(lang(13)=>array("tinyint"=>3,"smallint"=>5,"int"=>10,"bigint"=>20,"bit"=>1,"decimal"=>0,"real"=>12,"float"=>53,"smallmoney"=>10,"money"=>20),lang(14)=>array("date"=>10,"smalldatetime"=>19,"datetime"=>19,"datetime2"=>19,"time"=>8,"datetimeoffset"=>10),lang(15)=>array("char"=>8000,"varchar"=>8000,"text"=>2147483647,"nchar"=>4000,"nvarchar"=>4000,"ntext"=>1073741823),lang(16)=>array("binary"=>8000,"varbinary"=>8000,"image"=>2147483647),)as$w=>$X){$U+=$X;$Df[$w]=array_keys($X);}$ug=array();$be=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT IN","IS NOT NULL");$_c=array("len","lower","round","upper");$Ec=array("avg","count","count distinct","max","min","sum");$Kb=array(array("date|time"=>"getdate",),array("int|decimal|real|float|money|datetime"=>"+/-","char|text"=>"+",));}$Eb=array("server"=>"MySQL")+$Eb;if(!defined("DRIVER")){$Ee=array("MySQLi","MySQL","PDO_MySQL");define("DRIVER","server");if(extension_loaded("mysqli")){class
  11. false;$I=$G->fetch_array();return$I[$m];}function
  12. quote($N){return"'".$this->escape_string($N)."'";}}}elseif(extension_loaded("mysql")&&!(ini_get("sql.safe_mode")&&extension_loaded("pdo_mysql"))){class
  13. fetch_field(){$H=mysql_fetch_field($this->_result,$this->_offset++);$H->orgtable=$H->table;$H->orgname=$H->name;$H->charsetnr=($H->blob?63:0);return$H;}function
  14. __destruct(){mysql_free_result($this->_result);}}}elseif(extension_loaded("pdo_mysql")){class
  15. <input type="hidden" name="token" value="',$S,'">
  16. ',checkbox("error_stops",1,$_POST["error_stops"],lang(129))."\n",checkbox("only_errors",1,$_POST["only_errors"],lang(130))."\n";print_fieldset("webfile",lang(131),$_POST["webfile"],"document.getElementById('form')['only_errors'].checked = true; ");$eb=array();foreach(array("gz"=>"zlib","bz2"=>"bz2")as$w=>$X){if(extension_loaded($X))$eb[]=".$w";}echo

  1. stdClass;if(function_exists('pg_field_table'))$H->orgtable=pg_field_table($this->_result,$e);$H->name=pg_field_name($this->_result,$e);$H->orgname=$H->name;$H->type=pg_field_type($this->_result,$e);$H->charsetnr=($H->type=="bytea"?63:0);return$H;}function
  2. __destruct(){pg_free_result($this->_result);}}}elseif(extension_loaded("pdo_pgsql")){class
  3. support($kc){return
  4. ereg('^(comment|view|scheme|processlist|sequence|trigger|type|variables|drop_col)$',$kc);}$v="pgsql";$T=array();$Cf=array();foreach(array(lang(13)=>array("smallint"=>5,"integer"=>10,"bigint"=>19,"boolean"=>1,"numeric"=>0,"real"=>7,"double precision"=>16,"money"=>20),lang(14)=>array("date"=>13,"time"=>17,"timestamp"=>20,"timestamptz"=>21,"interval"=>0),lang(15)=>array("character"=>0,"character varying"=>0,"text"=>0,"tsquery"=>0,"tsvector"=>0,"uuid"=>0,"xml"=>0),lang(16)=>array("bit"=>0,"bit varying"=>0,"bytea"=>0),lang(17)=>array("cidr"=>43,"inet"=>43,"macaddr"=>17,"txid_snapshot"=>0),lang(18)=>array("box"=>0,"circle"=>0,"line"=>0,"lseg"=>0,"path"=>0,"point"=>0,"polygon"=>0),)as$w=>$W){$T+=$W;$Cf[$w]=array_keys($W);}$ug=array();$ae=array("=","<",">","<=",">=","!=","~","!~","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT IN","IS NOT NULL");$zc=array("char_length","lower","round","to_hex","to_timestamp","upper");$Dc=array("avg","count","count distinct","max","min","sum");$Kb=array(array("char"=>"md5","date|time"=>"now",),array("int|numeric|real|money"=>"+/-","date|time"=>"+ interval/- interval","char|text"=>"||",));}$Eb["oracle"]="Oracle";if(isset($_GET["oracle"])){$De=array("OCI8","PDO_OCI");define("DRIVER","oracle");if(extension_loaded("oci8")){class
  5. stdClass;$H->name=oci_field_name($this->_result,$e);$H->orgname=$H->name;$H->type=oci_field_type($this->_result,$e);$H->charsetnr=(ereg("raw|blob|bfile",$H->type)?63:0);return$H;}function
  6. __destruct(){oci_free_statement($this->_result);}}}elseif(extension_loaded("pdo_oci")){class
  7. support($kc){return
  8. ereg("view|scheme|processlist|drop_col|variables|status",$kc);}$v="oracle";$T=array();$Cf=array();foreach(array(lang(13)=>array("number"=>38,"binary_float"=>12,"binary_double"=>21),lang(14)=>array("date"=>10,"timestamp"=>29,"interval year"=>12,"interval day"=>28),lang(15)=>array("char"=>2000,"varchar2"=>4000,"nchar"=>2000,"nvarchar2"=>4000,"clob"=>4294967295,"nclob"=>4294967295),lang(16)=>array("raw"=>2000,"long raw"=>2147483648,"blob"=>4294967295,"bfile"=>4294967296),)as$w=>$W){$T+=$W;$Cf[$w]=array_keys($W);}$ug=array();$ae=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT REGEXP","NOT IN","IS NOT NULL","");$zc=array("length","lower","round","upper");$Dc=array("avg","count","count distinct","max","min","sum");$Kb=array(array("date"=>"current_date","timestamp"=>"current_timestamp",),array("number|float|double"=>"+/-","date|timestamp"=>"+ interval/- interval","char|clob"=>"||",));}$Eb["mssql"]="MS SQL";if(isset($_GET["mssql"])){$De=array("SQLSRV","MSSQL");define("DRIVER","mssql");if(extension_loaded("sqlsrv")){class
  9. seek($B){for($q=0;$q<$B;$q++)sqlsrv_fetch($this->_result);}function
  10. __destruct(){sqlsrv_free_stmt($this->_result);}}}elseif(extension_loaded("mssql")){class
  11. support($kc){return
  12. ereg('^(scheme|trigger|view|drop_col)$',$kc);}$v="mssql";$T=array();$Cf=array();foreach(array(lang(13)=>array("tinyint"=>3,"smallint"=>5,"int"=>10,"bigint"=>20,"bit"=>1,"decimal"=>0,"real"=>12,"float"=>53,"smallmoney"=>10,"money"=>20),lang(14)=>array("date"=>10,"smalldatetime"=>19,"datetime"=>19,"datetime2"=>19,"time"=>8,"datetimeoffset"=>10),lang(15)=>array("char"=>8000,"varchar"=>8000,"text"=>2147483647,"nchar"=>4000,"nvarchar"=>4000,"ntext"=>1073741823),lang(16)=>array("binary"=>8000,"varbinary"=>8000,"image"=>2147483647),)as$w=>$W){$T+=$W;$Cf[$w]=array_keys($W);}$ug=array();$ae=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT IN","IS NOT NULL");$zc=array("len","lower","round","upper");$Dc=array("avg","count","count distinct","max","min","sum");$Kb=array(array("date|time"=>"getdate",),array("int|decimal|real|float|money|datetime"=>"+/-","char|text"=>"+",));}$Eb=array("server"=>"MySQL")+$Eb;if(!defined("DRIVER")){$De=array("MySQLi","MySQL","PDO_MySQL");define("DRIVER","server");if(extension_loaded("mysqli")){class
  13. false;$I=$G->fetch_array();return$I[$m];}function
  14. quote($N){return"'".$this->escape_string($N)."'";}}}elseif(extension_loaded("mysql")&&!(ini_get("sql.safe_mode")&&extension_loaded("pdo_mysql"))){class
  15. as$Lf=>$m)$sc[str_replace("`","``",$Lf)."`".str_replace("`","``",$m["field"])]=$Lf;$ke=array();$le=array();if($a!=""){$ke=fields($a);$le=table_status($a);}if($_POST&&!$_POST["fields"])$_POST["fields"]=array();if($_POST&&!$l&&!$_POST["add"]&&!$_POST["drop_col"]&&!$_POST["up"]&&!$_POST["down"]){if($_POST["drop"])query_redirect("DROP TABLE ".table($a),substr(ME,0,-1),lang(146));else{$n=array();$wa=array();$xg=false;$qc=array();ksort($_POST["fields"]);$je=reset($ke);$ua=" FIRST";foreach($_POST["fields"]as$w=>$m){$o=$sc[$m["type"]];$mg=($o!==null?$Ue[$o]:$m);if($m["field"]!=""){if(!$m["has_default"])$m["default"]=null;$wb=eregi_replace(" *on update CURRENT_TIMESTAMP","",$m["default"]);if($wb!=$m["default"]){$m["on_update"]="CURRENT_TIMESTAMP";$m["default"]=$wb;}if($w==$_POST["auto_increment_col"])$m["auto_increment"]=true;$Ne=process_field($m,$mg);$wa[]=array($m["orig"],$Ne,$ua);if($Ne!=process_field($je,$je)){$n[]=array($m["orig"],$Ne,$ua);if($m["orig"]!=""||$ua)$xg=true;}if($o!==null)$qc[idf_escape($m["field"])]=($a!=""&&$v!="sqlite"?"ADD":" ")." FOREIGN KEY (".idf_escape($m["field"]).") REFERENCES ".table($sc[$m["type"]])." (".idf_escape($mg["field"]).")".(ereg("^($Wd)\$",$m["on_delete"])?" ON DELETE $m[on_delete]":"");$ua=" AFTER ".idf_escape($m["field"]);}elseif($m["orig"]!=""){$xg=true;$n[]=array($m["orig"]);}if($m["orig"]!=""){$je=next($ke);if(!$je)$ua="";}}$ve="";if(in_array($_POST["partition_by"],$te)){$we=array();if($_POST["partition_by"]=='RANGE'||$_POST["partition_by"]=='LIST'){foreach(array_filter($_POST["partition_names"])as$w=>$W){$X=$_POST["partition_values"][$w];$we[]="\nPARTITION ".idf_escape($W)." VALUES ".($_POST["partition_by"]=='RANGE'?"LESS THAN":"IN").($X!=""?" ($X)":" MAXVALUE");}}$ve.="\nPARTITION BY $_POST[partition_by]($_POST[partition])".($we?" (".implode(",",$we)."\n)":($_POST["partitions"]?" PARTITIONS ".(+$_POST["partitions"]):""));}elseif(support("partitioning")&&ereg("partitioned",$le["Create_options"]))$ve.="\nREMOVE PARTITIONING";$Ad=lang(147);if($a==""){cookie("adminer_engine",$_POST["Engine"]);$Ad=lang(148);}$A=trim($_POST["name"]);queries_redirect(ME."table=".urlencode($A),$Ad,alter_table($a,$A,($v=="sqlite"&&($xg||$qc)?$wa:$n),$qc,$_POST["Comment"],($_POST["Engine"]&&$_POST["Engine"]!=$le["Engine"]?$_POST["Engine"]:""),($_POST["Collation"]&&$_POST["Collation"]!=$le["Collation"]?$_POST["Collation"]:""),($_POST["Auto_increment"]!=""?+$_POST["Auto_increment"]:""),$ve));}}page_header(($a!=""?lang(30):lang(149)),$l,array("table"=>$a),$a);$I=array("Engine"=>$_COOKIE["adminer_engine"],"fields"=>array(array("field"=>"","type"=>(isset($T["int"])?"int":(isset($T["integer"])?"integer":"")))),"partition_names"=>array(""),);if($_POST){$I=$_POST;if($I["auto_increment_col"])$I["fields"][$I["auto_increment_col"]]["auto_increment"]=true;process_fields($I["fields"]);}elseif($a!=""){$I=$le;$I["name"]=$a;$I["fields"]=array();if(!$_GET["auto_increment"])$I["Auto_increment"]="";foreach($ke
  16. as$m){$m["has_default"]=isset($m["default"]);if($m["on_update"])$m["default"].=" ON UPDATE $m[on_update]";$I["fields"][]=$m;}if(support("partitioning")){$xc="FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = ".q(DB)." AND TABLE_NAME = ".q($a);$G=$h->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $xc ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");list($I["partition_by"],$I["partitions"],$I["partition"])=$G->fetch_row();$I["partition_names"]=array();$I["partition_values"]=array();foreach(get_rows("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $xc AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION")as$jf){$I["partition_names"][]=$jf["PARTITION_NAME"];$I["partition_values"][]=$jf["PARTITION_DESCRIPTION"];}$I["partition_names"][]="";}}$Ya=collations();$Gf=floor(extension_loaded("suhosin")?(min(ini_get("suhosin.request.max_vars"),ini_get("suhosin.post.max_vars"))-13)/10:0);if($Gf&&count($I["fields"])>$Gf)echo"<p class='error'>".h(lang(150,'suhosin.post.max_vars','suhosin.request.max_vars'))."\n";$Tb=engines();foreach($Tb

  1. fetch_row(){return$this->_result->fetch(SQLITE_NUM);}function
  2. fetch_field(){$_=$this->_result->fieldName($this->_offset++);$je='(\\[.*]|"(?:[^"]|"")*"|(.+))';if(preg_match("~^($je\\.)?$je\$~",$_,$z)){$N=($z[3]!=""?$z[3]:idf_unescape($z[2]));$_=($z[5]!=""?$z[5]:idf_unescape($z[4]));}return(object)array("name"=>$_,"orgname"=>$_,"orgtable"=>$N,);}}}}elseif(extension_loaded("pdo_sqlite")){class
  3. support($bc){return
  4. ereg('^(view|trigger|variables|status|dump)$',$bc);}$u="sqlite";$T=array("integer"=>0,"real"=>0,"numeric"=>0,"text"=>0,"blob"=>0);$kf=array_keys($T);$Xf=array();$Ld=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT IN","IS NOT NULL","");$qc=array("hex","length","lower","round","unixepoch","upper");$vc=array("avg","count","count distinct","group_concat","max","min","sum");$Bb=array(array(),array("integer|real|numeric"=>"+/-","text"=>"||",));}$wb["pgsql"]="PostgreSQL";if(isset($_GET["pgsql"])){$pe=array("PgSQL","PDO_PgSQL");define("DRIVER","pgsql");if(extension_loaded("pgsql")){class
  5. stdClass;if(function_exists('pg_field_table'))$F->orgtable=pg_field_table($this->_result,$e);$F->name=pg_field_name($this->_result,$e);$F->orgname=$F->name;$F->type=pg_field_type($this->_result,$e);$F->charsetnr=($F->type=="bytea"?63:0);return$F;}function
  6. __destruct(){pg_free_result($this->_result);}}}elseif(extension_loaded("pdo_pgsql")){class
  7. support($bc){return
  8. ereg("view|scheme|processlist|drop_col|variables|status",$bc);}$u="oracle";$T=array();$kf=array();foreach(array(lang(13)=>array("number"=>38,"binary_float"=>12,"binary_double"=>21),lang(14)=>array("date"=>10,"timestamp"=>29,"interval year"=>12,"interval day"=>28),lang(15)=>array("char"=>2000,"varchar2"=>4000,"nchar"=>2000,"nvarchar2"=>4000,"clob"=>4294967295,"nclob"=>4294967295),lang(16)=>array("raw"=>2000,"long raw"=>2147483648,"blob"=>4294967295,"bfile"=>4294967296),)as$v=>$W){$T+=$W;$kf[$v]=array_keys($W);}$Xf=array();$Ld=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT REGEXP","NOT IN","IS NOT NULL","");$qc=array("length","lower","round","upper");$vc=array("avg","count","count distinct","max","min","sum");$Bb=array(array("date"=>"current_date","timestamp"=>"current_timestamp",),array("number|float|double"=>"+/-","date|timestamp"=>"+ interval/- interval","char|clob"=>"||",));}$wb["mssql"]="MS SQL";if(isset($_GET["mssql"])){$pe=array("SQLSRV","MSSQL");define("DRIVER","mssql");if(extension_loaded("sqlsrv")){class
  9. seek($A){for($p=0;$p<$A;$p++)sqlsrv_fetch($this->_result);}function
  10. __destruct(){sqlsrv_free_stmt($this->_result);}}}elseif(extension_loaded("mssql")){class
  11. support($bc){return
  12. ereg('^(scheme|trigger|view|drop_col)$',$bc);}$u="mssql";$T=array();$kf=array();foreach(array(lang(13)=>array("tinyint"=>3,"smallint"=>5,"int"=>10,"bigint"=>20,"bit"=>1,"decimal"=>0,"real"=>12,"float"=>53,"smallmoney"=>10,"money"=>20),lang(14)=>array("date"=>10,"smalldatetime"=>19,"datetime"=>19,"datetime2"=>19,"time"=>8,"datetimeoffset"=>10),lang(15)=>array("char"=>8000,"varchar"=>8000,"text"=>2147483647,"nchar"=>4000,"nvarchar"=>4000,"ntext"=>1073741823),lang(16)=>array("binary"=>8000,"varbinary"=>8000,"image"=>2147483647),)as$v=>$W){$T+=$W;$kf[$v]=array_keys($W);}$Xf=array();$Ld=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","IN","IS NULL","NOT LIKE","NOT IN","IS NOT NULL");$qc=array("len","lower","round","upper");$vc=array("avg","count","count distinct","max","min","sum");$Bb=array(array("date|time"=>"getdate",),array("int|decimal|real|float|money|datetime"=>"+/-","char|text"=>"+",));}$wb=array("server"=>"MySQL")+$wb;if(!defined("DRIVER")){$pe=array("MySQLi","MySQL","PDO_MySQL");define("DRIVER","server");if(extension_loaded("mysqli")){class
  13. false;$G=$E->fetch_array();return$G[$l];}function
  14. quote($L){return"'".$this->escape_string($L)."'";}}}elseif(extension_loaded("mysql")&&!(ini_get("sql.safe_mode")&&extension_loaded("pdo_mysql"))){class
  15. as$sf=>$l)$jc[str_replace("`","``",$sf)."`".str_replace("`","``",$l["field"])]=$sf;$Vd=array();$Wd=array();if($a!=""){$Vd=fields($a);$Wd=table_status($a);}if($_POST&&!$_POST["fields"])$_POST["fields"]=array();if($_POST&&!$k&&!$_POST["add"]&&!$_POST["drop_col"]&&!$_POST["up"]&&!$_POST["down"]){if($_POST["drop"])query_redirect("DROP TABLE ".table($a),substr(ME,0,-1),lang(145));else{$m=array();$hc=array();ksort($_POST["fields"]);$Ud=reset($Vd);$ua="FIRST";foreach($_POST["fields"]as$v=>$l){$n=$jc[$l["type"]];$Pf=($n!==null?$Ee[$n]:$l);if($l["field"]!=""){if(!$l["has_default"])$l["default"]=null;$pb=eregi_replace(" *on update CURRENT_TIMESTAMP","",$l["default"]);if($pb!=$l["default"]){$l["on_update"]="CURRENT_TIMESTAMP";$l["default"]=$pb;}if($v==$_POST["auto_increment_col"])$l["auto_increment"]=true;$ye=process_field($l,$Pf);if($ye!=process_field($Ud,$Ud))$m[]=array($l["orig"],$ye,$ua);if($n!==null)$hc[idf_escape($l["field"])]=($a!=""?"ADD":" ")." FOREIGN KEY (".idf_escape($l["field"]).") REFERENCES ".table($jc[$l["type"]])." (".idf_escape($Pf["field"]).")".(ereg("^($Hd)\$",$l["on_delete"])?" ON DELETE $l[on_delete]":"");$ua="AFTER ".idf_escape($l["field"]);}elseif($l["orig"]!="")$m[]=array($l["orig"]);if($l["orig"]!="")$Ud=next($Vd);}$ge="";if(in_array($_POST["partition_by"],$ee)){$he=array();if($_POST["partition_by"]=='RANGE'||$_POST["partition_by"]=='LIST'){foreach(array_filter($_POST["partition_names"])as$v=>$W){$X=$_POST["partition_values"][$v];$he[]="\nPARTITION ".idf_escape($W)." VALUES ".($_POST["partition_by"]=='RANGE'?"LESS THAN":"IN").($X!=""?" ($X)":" MAXVALUE");}}$ge.="\nPARTITION BY $_POST[partition_by]($_POST[partition])".($he?" (".implode(",",$he)."\n)":($_POST["partitions"]?" PARTITIONS ".(+$_POST["partitions"]):""));}elseif($a!=""&&support("partitioning"))$ge.="\nREMOVE PARTITIONING";$nd=lang(146);if($a==""){cookie("adminer_engine",$_POST["Engine"]);$nd=lang(147);}$_=trim($_POST["name"]);queries_redirect(ME."table=".urlencode($_),$nd,alter_table($a,$_,$m,$hc,$_POST["Comment"],($_POST["Engine"]&&$_POST["Engine"]!=$Wd["Engine"]?$_POST["Engine"]:""),($_POST["Collation"]&&$_POST["Collation"]!=$Wd["Collation"]?$_POST["Collation"]:""),($_POST["Auto_increment"]!=""?+$_POST["Auto_increment"]:""),$ge));}}page_header(($a!=""?lang(30):lang(148)),$k,array("table"=>$a),$a);$G=array("Engine"=>$_COOKIE["adminer_engine"],"fields"=>array(array("field"=>"","type"=>(isset($T["int"])?"int":(isset($T["integer"])?"integer":"")))),"partition_names"=>array(""),);if($_POST){$G=$_POST;if($G["auto_increment_col"])$G["fields"][$G["auto_increment_col"]]["auto_increment"]=true;process_fields($G["fields"]);}elseif($a!=""){$G=$Wd;$G["name"]=$a;$G["fields"]=array();if(!$_GET["auto_increment"])$G["Auto_increment"]="";foreach($Vd
  16. as$l){$l["has_default"]=isset($l["default"]);if($l["on_update"])$l["default"].=" ON UPDATE $l[on_update]";$G["fields"][]=$l;}if(support("partitioning")){$oc="FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = ".q(DB)." AND TABLE_NAME = ".q($a);$E=$g->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $oc ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");list($G["partition_by"],$G["partitions"],$G["partition"])=$E->fetch_row();$G["partition_names"]=array();$G["partition_values"]=array();foreach(get_rows("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $oc AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION")as$Qe){$G["partition_names"][]=$Qe["PARTITION_NAME"];$G["partition_values"][]=$Qe["PARTITION_DESCRIPTION"];}$G["partition_names"][]="";}}$Sa=collations();$nf=floor(extension_loaded("suhosin")?(min(ini_get("suhosin.request.max_vars"),ini_get("suhosin.post.max_vars"))-13)/10:0);if($nf&&count($G["fields"])>$nf)echo"<p class='error'>".h(lang(149,'suhosin.post.max_vars','suhosin.request.max_vars'))."\n";$Jb=engines();foreach($Jb







  1.             $this->ERRORS[] = array(2, 'SQL query error.', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  2.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';
  3.             $this->ERRORS[] = array(2, 'SQL query error.', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  4.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';
  5.             $this->ERRORS[] = array(2, 'SQL query error.', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  6.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';
  7.             $this->ERRORS[] = array(2, 'SQL query error.', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  8.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';
  9.             $this->ERRORS[] = array(2, 'SQL query error', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  10.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';
  11.                 $this->ERRORS[] = array(2, 'SQL query error', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  12.                 $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';
  13.         if ($ID == $newParentId || $leftId == $leftIdP || ($leftIdP >= $leftId && $leftIdP <= $rightId) || ($level == $levelP+1 && $leftId > $leftIdP && $rightId < $rightIdP)) {
  14.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('cant_move_tree') : 'cant_move_tree';
  15.             $this->ERRORS[] = array(2, 'SQL query error.', __FILE__ . '::' . __CLASS__ . '::' . __FUNCTION__ . '::' . __LINE__, 'SQL QUERY: ' . $sql, 'SQL ERROR: ' . $this->db->ErrorMsg());
  16.             $this->ERRORS_MES[] = extension_loaded('gettext') ? _('internal_error') : 'internal_error';



  1. lang($rf,$ld){$Ud=($ld==1?0:1);$rf=str_replace("%d","%s",$rf[$Ud]);$ld=number_format($ld,0,".",',');return
  2. sprintf($rf,$ld);}if(extension_loaded('pdo')){class
  3. fetch_row(){return$this->fetch(3);}function
  4. fetch_field(){$K=(object)$this->getColumnMeta($this->_offset++);$K->orgtable=$K->table;$K->orgname=$K->name;$K->charsetnr=(in_array("blob",(array)$K->flags)?63:0);return$K;}}}$qb=array();$qb=array("server"=>"MySQL")+$qb;if(!defined("DRIVER")){$Xd=array("MySQLi","MySQL","PDO_MySQL");define("DRIVER","server");if(extension_loaded("mysqli")){class
  5. false;$K=$I->fetch_array();return$K[$k];}function
  6. quote($Q){return"'".$this->escape_string($Q)."'";}}}elseif(extension_loaded("mysql")&&!(ini_get("sql.safe_mode")&&extension_loaded("pdo_mysql"))){class
  7. fetch_field(){$J=mysql_fetch_field($this->_result,$this->_offset++);$J->orgtable=$J->table;$J->orgname=$J->name;$J->charsetnr=($J->blob?63:0);return$J;}function
  8. __destruct(){mysql_free_result($this->_result);}}}elseif(extension_loaded("pdo_mysql")){class
  9. <input type="hidden" name="token" value="',$U,'">
  10. ',checkbox("error_stops",1,$_POST["error_stops"],'Stop on error')."\n",checkbox("only_errors",1,$_POST["only_errors"],'Show only errors')."\n";print_fieldset("webfile",'From server',$_POST["webfile"],"document.getElementById('form')['only_errors'].checked = true; ");$Sa=array();foreach(array("gz"=>"zlib","bz2"=>"bz2")as$y=>$X){if(extension_loaded($X))$Sa[]=".$y";}echo
  11. as$Xe=>$k)$n[str_replace("`","``",$Xe)."`".str_replace("`","``",$k["field"])]=$Xe;$Ed=array();$Fd=array();if($a!=""){$Ed=fields($a);$Fd=table_status($a);}if($_POST&&!$_POST["fields"])$_POST["fields"]=array();if($_POST&&!$j&&!$_POST["add"]&&!$_POST["drop_col"]&&!$_POST["up"]&&!$_POST["down"]){if($_POST["drop"])query_redirect("DROP TABLE ".table($a),substr(ME,0,-1),'Table has been dropped.');else{$l=array();$Zb=array();ksort($_POST["fields"]);$Dd=reset($Ed);$oa="FIRST";foreach($_POST["fields"]as$y=>$k){$m=$n[$k["type"]];$wf=($m!==null?$ne[$m]:$k);if($k["field"]!=""){if(!$k["has_default"])$k["default"]=null;$jb=eregi_replace(" *on update CURRENT_TIMESTAMP","",$k["default"]);if($jb!=$k["default"]){$k["on_update"]="CURRENT_TIMESTAMP";$k["default"]=$jb;}if($y==$_POST["auto_increment_col"])$k["auto_increment"]=true;$ge=process_field($k,$wf);if($ge!=process_field($Dd,$Dd))$l[]=array($k["orig"],$ge,$oa);if($m!==null)$Zb[idf_escape($k["field"])]=($a!=""?"ADD":" ")." FOREIGN KEY (".idf_escape($k["field"]).") REFERENCES ".table($n[$k["type"]])." (".idf_escape($wf["field"]).")".(ereg("^($sd)\$",$k["on_delete"])?" ON DELETE $k[on_delete]":"");$oa="AFTER ".idf_escape($k["field"]);}elseif($k["orig"]!="")$l[]=array($k["orig"]);if($k["orig"]!="")$Dd=next($Ed);}$Od="";if(in_array($_POST["partition_by"],$Md)){$Pd=array();if($_POST["partition_by"]=='RANGE'||$_POST["partition_by"]=='LIST'){foreach(array_filter($_POST["partition_names"])as$y=>$X){$Y=$_POST["partition_values"][$y];$Pd[]="\nPARTITION ".idf_escape($X)." VALUES ".($_POST["partition_by"]=='RANGE'?"LESS THAN":"IN").($Y!=""?" ($Y)":" MAXVALUE");}}$Od.="\nPARTITION BY $_POST[partition_by]($_POST[partition])".($Pd?" (".implode(",",$Pd)."\n)":($_POST["partitions"]?" PARTITIONS ".(+$_POST["partitions"]):""));}elseif($a!=""&&support("partitioning"))$Od.="\nREMOVE PARTITIONING";$Yc='Table has been altered.';if($a==""){cookie("adminer_engine",$_POST["Engine"]);$Yc='Table has been created.';}$D=trim($_POST["name"]);queries_redirect(ME."table=".urlencode($D),$Yc,alter_table($a,$D,$l,$Zb,$_POST["Comment"],($_POST["Engine"]&&$_POST["Engine"]!=$Fd["Engine"]?$_POST["Engine"]:""),($_POST["Collation"]&&$_POST["Collation"]!=$Fd["Collation"]?$_POST["Collation"]:""),($_POST["Auto_increment"]!=""?+$_POST["Auto_increment"]:""),$Od));}}page_header(($a!=""?'Alter table':'Create table'),$j,array("table"=>$a),$a);$K=array("Engine"=>$_COOKIE["adminer_engine"],"fields"=>array(array("field"=>"","type"=>(isset($yf["int"])?"int":(isset($yf["integer"])?"integer":"")))),"partition_names"=>array(""),);if($_POST){$K=$_POST;if($K["auto_increment_col"])$K["fields"][$K["auto_increment_col"]]["auto_increment"]=true;process_fields($K["fields"]);}elseif($a!=""){$K=$Fd;$K["name"]=$a;$K["fields"]=array();if(!$_GET["auto_increment"])$K["Auto_increment"]="";foreach($Ed
  12. as$k){$k["has_default"]=isset($k["default"]);if($k["on_update"])$k["default"].=" ON UPDATE $k[on_update]";$K["fields"][]=$k;}if(support("partitioning")){$ec="FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = ".q(DB)." AND TABLE_NAME = ".q($a);$I=$f->query("SELECT PARTITION_METHOD, PARTITION_ORDINAL_POSITION, PARTITION_EXPRESSION $ec ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");list($K["partition_by"],$K["partitions"],$K["partition"])=$I->fetch_row();$K["partition_names"]=array();$K["partition_values"]=array();foreach(get_rows("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $ec AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION")as$ze){$K["partition_names"][]=$ze["PARTITION_NAME"];$K["partition_values"][]=$ze["PARTITION_DESCRIPTION"];}$K["partition_names"][]="";}}$d=collations();$Se=floor(extension_loaded("suhosin")?(min(ini_get("suhosin.request.max_vars"),ini_get("suhosin.post.max_vars"))-13)/10:0);if($Se&&count($K["fields"])>$Se)echo"<p class='error'>".h(sprintf('Maximum number of allowed fields exceeded. Please increase %s and %s.','suhosin.post.max_vars','suhosin.request.max_vars'))."\n";$Db=engines();foreach($Db





Back to Top