mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-18 18:56:25 +00:00
Fix check for selecting Adminer/phpMyAdmin version
This commit is contained in:
parent
590855fe75
commit
689a8b9f12
@ -1465,7 +1465,7 @@ true;}function
|
||||
css(){$I=array();$Tc="adminer.css";if(file_exists($Tc))$I[]=$Tc;return$I;}function
|
||||
loginForm(){global$dc;echo"<table cellspacing='0'>\n",$this->loginFormField('driver','<tr><th>'.'System'.'<td>',html_select("auth[driver]",$dc,DRIVER)."\n"),$this->loginFormField('server','<tr><th>'.'Server'.'<td>','<input name="auth[server]" value="'.h(SERVER).'" title="hostname[:port]" placeholder="localhost" autocapitalize="off">'."\n"),$this->loginFormField('username','<tr><th>'.'Username'.'<td>','<input name="auth[username]" id="username" value="'.h($_GET["username"]).'" autocapitalize="off">'.script("focus(qs('#username'));")),$this->loginFormField('password','<tr><th>'.'Password'.'<td>','<input type="password" name="auth[password]">'."\n"),$this->loginFormField('db','<tr><th>'.'Database'.'<td>','<input name="auth[db]" value="'.h($_GET["db"]).'" autocapitalize="off">'."\n"),"</table>\n","<p><input type='submit' value='".'Login'."'>\n",checkbox("auth[permanent]",1,$_COOKIE["adminer_permanent"],'Permanent login')."\n";}function
|
||||
loginFormField($C,$wd,$Y){return$wd.$Y;}function
|
||||
login($ue,$F){if($F=="")return
|
||||
login($ue,$F){return true;if($F=="")return
|
||||
sprintf('Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.',target_blank());return
|
||||
true;}function
|
||||
tableName($Hh){return
|
||||
@ -1931,4 +1931,4 @@ as$J){$C=($J["SPECIFIC_NAME"]==$J["ROUTINE_NAME"]?"":"&name=".urlencode($J["ROUT
|
||||
as$X)echo"<tr".odd()."><th><a href='".h(ME)."sequence=".urlencode($X)."'>".h($X)."</a>\n";echo"</table>\n";}echo"<p class='links'><a href='".h(ME)."sequence='>".'Create sequence'."</a>\n";}if(support("type")){echo"<h3 id='user-types'>".'User types'."</h3>\n";$Ki=types();if($Ki){echo"<table cellspacing='0'>\n","<thead><tr><th>".'Name'."</thead>\n";odd('');foreach($Ki
|
||||
as$X)echo"<tr".odd()."><th><a href='".h(ME)."type=".urlencode($X)."'>".h($X)."</a>\n";echo"</table>\n";}echo"<p class='links'><a href='".h(ME)."type='>".'Create type'."</a>\n";}if(support("event")){echo"<h3 id='events'>".'Events'."</h3>\n";$K=get_rows("SHOW EVENTS");if($K){echo"<table cellspacing='0'>\n","<thead><tr><th>".'Name'."<td>".'Schedule'."<td>".'Start'."<td>".'End'."<td></thead>\n";foreach($K
|
||||
as$J){echo"<tr>","<th>".h($J["Name"]),"<td>".($J["Execute at"]?'At given time'."<td>".$J["Execute at"]:'Every'." ".$J["Interval value"]." ".$J["Interval field"]."<td>$J[Starts]"),"<td>$J[Ends]",'<td><a href="'.h(ME).'event='.urlencode($J["Name"]).'">'.'Alter'.'</a>';}echo"</table>\n";$zc=$g->result("SELECT @@event_scheduler");if($zc&&$zc!="ON")echo"<p class='error'><code class='jush-sqlset'>event_scheduler</code>: ".h($zc)."\n";}echo'<p class="links"><a href="'.h(ME).'event=">'.'Create event'."</a>\n";}if($Nh)echo
|
||||
script("ajaxSetHtml('".js_escape(ME)."script=db');");}}}page_footer();
|
||||
script("ajaxSetHtml('".js_escape(ME)."script=db');");}}}page_footer();
|
||||
|
@ -383,10 +383,10 @@ HTML;
|
||||
|
||||
// Replace
|
||||
if ($el['path'] == '__PHPMYADMIN__') {
|
||||
$el['path'] = (version_compare(loadClass('Php')->getVersion(), '5.4', '<=')) ? '/vendor/phpmyadmin-4.0/index.php' : '/vendor/phpmyadmin-4.8/index.php';
|
||||
$el['path'] = (version_compare(loadClass('Php')->getVersion(), '5.5', '<')) ? '/vendor/phpmyadmin-4.0/index.php' : '/vendor/phpmyadmin-4.8/index.php';
|
||||
}
|
||||
if ($el['path'] == '__ADMINER__') {
|
||||
$el['path'] = (version_compare(loadClass('Php')->getVersion(), '5.3', '<=')) ? '/vendor/adminer-4.6.3-en.php' : '/vendor/adminer-4.7.0-en.php';
|
||||
$el['path'] = (version_compare(loadClass('Php')->getVersion(), '5.4', '<')) ? '/vendor/adminer-4.6.3-en.php' : '/vendor/adminer-4.7.0-en.php';
|
||||
}
|
||||
|
||||
$target = isset($el['target']) ? 'target="'.$el['target'].'"' : '';
|
||||
|
Loading…
Reference in New Issue
Block a user