Code Duplication    Length = 22-22 lines in 2 locations

include/adminer.php 1 location

@@ 162-183 (lines=22) @@
159
';}global$b,$e,$Eb,$Lb,$Vb,$k,$xc,$_c,$ba,$Oc,$y,$ca,$ed,$Vd,$ze,$Hf,$Dc,$T,$og,$tg,$_g,$ga;if(!$_SERVER["REQUEST_URI"])$_SERVER["REQUEST_URI"]=$_SERVER["ORIG_PATH_INFO"];if(!strpos($_SERVER["REQUEST_URI"],'?')&&$_SERVER["QUERY_STRING"]!="")$_SERVER["REQUEST_URI"].="?$_SERVER[QUERY_STRING]";$ba=$_SERVER["HTTPS"]&&strcasecmp($_SERVER["HTTPS"],"off");@ini_set("session.use_trans_sid",false);session_cache_limiter("");if(!defined("SID")){session_name("adminer_sid");$pe=array(0,preg_replace('~\\?.*~','',$_SERVER["REQUEST_URI"]),"",$ba);if(version_compare(PHP_VERSION,'5.2.0')>=0)$pe[]=true;call_user_func_array('session_set_cookie_params',$pe);session_start();}remove_slashes(array(&$_GET,&$_POST,&$_COOKIE),$oc);if(get_magic_quotes_runtime())set_magic_quotes_runtime(false);@set_time_limit(0);@ini_set("zend.ze1_compatibility_mode",false);@ini_set("precision",20);function
160
get_lang(){return'en';}function
161
lang($ng,$Md=null){if(is_array($ng)){$Be=($Md==1?0:1);$ng=$ng[$Be];}$ng=str_replace("%d","%s",$ng);$Md=format_number($Md);return
162
sprintf($ng,$Md);}if(extension_loaded('pdo')){class
163
Min_PDO
164
extends
165
PDO{var$_result,$server_info,$affected_rows,$errno,$error;function
166
__construct(){global$b;$Be=array_search("SQL",$b->operators);if($Be!==false)unset($b->operators[$Be]);}function
167
dsn($Ib,$V,$we){try{parent::__construct($Ib,$V,$we);}catch(Exception$ac){auth_error($ac->getMessage());}$this->setAttribute(13,array('Min_PDOStatement'));$this->server_info=$this->getAttribute(4);}function
168
query($I,$ug=false){$J=parent::query($I);$this->error="";if(!$J){list(,$this->errno,$this->error)=$this->errorInfo();return
169
false;}$this->store_result($J);return$J;}function
170
multi_query($I){return$this->_result=$this->query($I);}function
171
store_result($J=null){if(!$J){$J=$this->_result;if(!$J)return
172
false;}if($J->columnCount()){$J->num_rows=$J->rowCount();return$J;}$this->affected_rows=$J->rowCount();return
173
true;}function
174
next_result(){if(!$this->_result)return
175
false;$this->_result->_offset=0;return@$this->_result->nextRowset();}function
176
result($I,$l=0){$J=$this->query($I);if(!$J)return
177
false;$L=$J->fetch();return$L[$l];}}class
178
Min_PDOStatement
179
extends
180
PDOStatement{var$_offset=0,$num_rows;function
181
fetch_assoc(){return$this->fetch(2);}function
182
fetch_row(){return$this->fetch(3);}function
183
fetch_field(){$L=(object)$this->getColumnMeta($this->_offset++);$L->orgtable=$L->table;$L->orgname=$L->name;$L->charsetnr=(in_array("blob",(array)$L->flags)?63:0);return$L;}}}$Eb=array();class
184
Min_SQL{var$_conn;function
185
__construct($e){$this->_conn=$e;}function
186
select($Q,$N,$Z,$s,$de=array(),$_=1,$G=0,$Ie=false){global$b,$y;$Vc=(count($s)<count($N));$I=$b->selectQueryBuild($N,$Z,$s,$de,$_,$G);if(!$I)$I="SELECT".limit(($_GET["page"]!="last"&&+$_&&$s&&$Vc&&$y=="sql"?"SQL_CALC_FOUND_ROWS ":"").implode(", ",$N)."\nFROM ".table($Q),($Z?"\nWHERE ".implode(" AND ",$Z):"").($s&&$Vc?"\nGROUP BY ".implode(", ",$s):"").($de?"\nORDER BY ".implode(", ",$de):""),($_!=""?+$_:null),($G?$_*$G:0),"\n");$Cf=microtime(true);$K=$this->_conn->query($I);if($Ie)echo$b->selectQuery($I,format_time($Cf));return$K;}function

include/editor.php 1 location

@@ 162-183 (lines=22) @@
159
';}global$b,$f,$jb,$mb,$ub,$k,$Tb,$Vb,$aa,$lc,$v,$ba,$tc,$Rc,$gd,$Wd,$Zb,$qe,$te,$we,$Ce,$ca;if(!$_SERVER["REQUEST_URI"])$_SERVER["REQUEST_URI"]=$_SERVER["ORIG_PATH_INFO"];if(!strpos($_SERVER["REQUEST_URI"],'?')&&$_SERVER["QUERY_STRING"]!="")$_SERVER["REQUEST_URI"].="?$_SERVER[QUERY_STRING]";$aa=$_SERVER["HTTPS"]&&strcasecmp($_SERVER["HTTPS"],"off");@ini_set("session.use_trans_sid",false);session_cache_limiter("");if(!defined("SID")){session_name("adminer_sid");$ed=array(0,preg_replace('~\\?.*~','',$_SERVER["REQUEST_URI"]),"",$aa);if(version_compare(PHP_VERSION,'5.2.0')>=0)$ed[]=true;call_user_func_array('session_set_cookie_params',$ed);session_start();}remove_slashes(array(&$_GET,&$_POST,&$_COOKIE),$Hb);if(get_magic_quotes_runtime())set_magic_quotes_runtime(false);@set_time_limit(0);@ini_set("zend.ze1_compatibility_mode",false);@ini_set("precision",20);function
160
get_lang(){return'en';}function
161
lang($se,$Oc=null){if(is_array($se)){$jd=($Oc==1?0:1);$se=$se[$jd];}$se=str_replace("%d","%s",$se);$Oc=format_number($Oc);return
162
sprintf($se,$Oc);}if(extension_loaded('pdo')){class
163
Min_PDO
164
extends
165
PDO{var$_result,$server_info,$affected_rows,$errno,$error;function
166
__construct(){global$b;$jd=array_search("SQL",$b->operators);if($jd!==false)unset($b->operators[$jd]);}function
167
dsn($kb,$T,$G){try{parent::__construct($kb,$T,$G);}catch(Exception$xb){auth_error($xb->getMessage());}$this->setAttribute(13,array('Min_PDOStatement'));$this->server_info=$this->getAttribute(4);}function
168
query($I,$xe=false){$J=parent::query($I);$this->error="";if(!$J){list(,$this->errno,$this->error)=$this->errorInfo();return
169
false;}$this->store_result($J);return$J;}function
170
multi_query($I){return$this->_result=$this->query($I);}function
171
store_result($J=null){if(!$J){$J=$this->_result;if(!$J)return
172
false;}if($J->columnCount()){$J->num_rows=$J->rowCount();return$J;}$this->affected_rows=$J->rowCount();return
173
true;}function
174
next_result(){if(!$this->_result)return
175
false;$this->_result->_offset=0;return@$this->_result->nextRowset();}function
176
result($I,$l=0){$J=$this->query($I);if(!$J)return
177
false;$L=$J->fetch();return$L[$l];}}class
178
Min_PDOStatement
179
extends
180
PDOStatement{var$_offset=0,$num_rows;function
181
fetch_assoc(){return$this->fetch(2);}function
182
fetch_row(){return$this->fetch(3);}function
183
fetch_field(){$L=(object)$this->getColumnMeta($this->_offset++);$L->orgtable=$L->table;$L->orgname=$L->name;$L->charsetnr=(in_array("blob",(array)$L->flags)?63:0);return$L;}}}$jb=array();class
184
Min_SQL{var$_conn;function
185
__construct($f){$this->_conn=$f;}function
186
select($R,$N,$Y,$p,$E=array(),$y=1,$F=0,$nd=false){global$b,$v;$u=(count($p)<count($N));$I=$b->selectQueryBuild($N,$Y,$p,$E,$y,$F);if(!$I)$I="SELECT".limit(($_GET["page"]!="last"&&+$y&&$p&&$u&&$v=="sql"?"SQL_CALC_FOUND_ROWS ":"").implode(", ",$N)."\nFROM ".table($R),($Y?"\nWHERE ".implode(" AND ",$Y):"").($p&&$u?"\nGROUP BY ".implode(", ",$p):"").($E?"\nORDER BY ".implode(", ",$E):""),($y!=""?+$y:null),($F?$y*$F:0),"\n");$Td=microtime(true);$K=$this->_conn->query($I);if($nd)echo$b->selectQuery($I,format_time($Td));return$K;}function