<body> class for project-specific styles
Signed-off-by: Lucas Sandery <lucas-sandery@users.noreply.github.com>
This commit is contained in:
parent
7a3e3e5b4c
commit
12d431fca7
|
@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<body class="<?php echo lang('ltr'); ?> nojs">
|
<body class="<?php echo lang('ltr'); ?> nojs <?php echo $GLOBALS['project']; ?>">
|
||||||
<?php
|
<?php
|
||||||
$filename = get_temp_dir() . "/adminer.version";
|
$filename = get_temp_dir() . "/adminer.version";
|
||||||
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$GLOBALS['project'] = basename(dirname(__FILE__));
|
||||||
include "./include/bootstrap.inc.php";
|
include "./include/bootstrap.inc.php";
|
||||||
include "./include/tmpfile.inc.php";
|
include "./include/tmpfile.inc.php";
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ header("Cache-Control: immutable");
|
||||||
$return = preg_replace('~^if \(isset\(\$_GET\["' . $driver . '"]\)\) \{(.*)^}~ms', '\1', $return);
|
$return = preg_replace('~^if \(isset\(\$_GET\["' . $driver . '"]\)\) \{(.*)^}~ms', '\1', $return);
|
||||||
}
|
}
|
||||||
if (basename($match[2]) != "lang.inc.php" || !$_SESSION["lang"]) {
|
if (basename($match[2]) != "lang.inc.php" || !$_SESSION["lang"]) {
|
||||||
|
$return = str_replace('<?php echo $GLOBALS[\'project\']; ?>', $project, $return);
|
||||||
if (basename($match[2]) == "lang.inc.php") {
|
if (basename($match[2]) == "lang.inc.php") {
|
||||||
$return = str_replace('function lang($idf, $number = null) {', 'function lang($idf, $number = null) {
|
$return = str_replace('function lang($idf, $number = null) {', 'function lang($idf, $number = null) {
|
||||||
if (is_string($idf)) { // compiled version uses numbers, string comes from a plugin
|
if (is_string($idf)) { // compiled version uses numbers, string comes from a plugin
|
||||||
|
@ -388,6 +389,7 @@ include dirname(__FILE__) . "/adminer/include/driver.inc.php";
|
||||||
$features = array("call" => "routine", "dump", "event", "privileges", "procedure" => "routine", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "user" => "privileges", "variables", "view");
|
$features = array("call" => "routine", "dump", "event", "privileges", "procedure" => "routine", "processlist", "routine", "scheme", "sequence", "status", "trigger", "type", "user" => "privileges", "variables", "view");
|
||||||
$lang_ids = array(); // global variable simplifies usage in a callback function
|
$lang_ids = array(); // global variable simplifies usage in a callback function
|
||||||
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
|
$file = file_get_contents(dirname(__FILE__) . "/$project/index.php");
|
||||||
|
$file = preg_replace('/\\$GLOBALS\\[\'project\'\\][^;]+;\\s+/', '', $file);
|
||||||
if ($driver) {
|
if ($driver) {
|
||||||
$_GET[$driver] = true; // to load the driver
|
$_GET[$driver] = true; // to load the driver
|
||||||
include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php";
|
include_once dirname(__FILE__) . "/adminer/drivers/$driver.inc.php";
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$GLOBALS['project'] = basename(dirname(__FILE__));
|
||||||
include "../adminer/include/bootstrap.inc.php";
|
include "../adminer/include/bootstrap.inc.php";
|
||||||
$drivers[DRIVER] = lang('Login');
|
$drivers[DRIVER] = lang('Login');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue