Compare commits
2 Commits
ff2c51d505
...
74f6779c63
Author | SHA1 | Date | |
---|---|---|---|
74f6779c63 | |||
181a65a99b |
@ -22,11 +22,15 @@ class SettingsManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function update ($name, $value) {
|
public static function update ($name, $value) {
|
||||||
try {
|
if ($this.getByName($name)){
|
||||||
Db::edit ('settings', ['value' => $value], 'WHERE name = ?', array($name));
|
$this->create($name, $value);
|
||||||
} catch(PDOException $error) {
|
} else {
|
||||||
echo $error->getMessage();
|
try {
|
||||||
die();
|
Db::edit ('settings', ['value' => $value], 'WHERE name = ?', array($name));
|
||||||
|
} catch(PDOException $error) {
|
||||||
|
echo $error->getMessage();
|
||||||
|
die();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,7 @@ class Automation extends Template
|
|||||||
|
|
||||||
$template = new Template('automation');
|
$template = new Template('automation');
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('debugMod', DEBUGMOD);
|
$template->prepare('debugMod', DEBUGMOD);
|
||||||
$template->prepare('title', 'Automation');
|
$template->prepare('title', 'Automation');
|
||||||
$template->prepare('langMng', $langMng);
|
$template->prepare('langMng', $langMng);
|
||||||
|
@ -19,6 +19,7 @@ class Log extends Template
|
|||||||
$result = $this->logFinder ('../logs/', $result);
|
$result = $this->logFinder ('../logs/', $result);
|
||||||
|
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('debugMod', DEBUGMOD);
|
$template->prepare('debugMod', DEBUGMOD);
|
||||||
$template->prepare('logToLiveTime', LOGTIMOUT);
|
$template->prepare('logToLiveTime', LOGTIMOUT);
|
||||||
$template->prepare('title', 'Logy');
|
$template->prepare('title', 'Logy');
|
||||||
|
@ -12,6 +12,7 @@ class Login extends Template
|
|||||||
|
|
||||||
$template = new Template('login');
|
$template = new Template('login');
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('title', 'Home');
|
$template->prepare('title', 'Home');
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ class Oauth extends Template
|
|||||||
|
|
||||||
$template = new Template('oauth');
|
$template = new Template('oauth');
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('title', 'Simple Home - Oauth');
|
$template->prepare('title', 'Simple Home - Oauth');
|
||||||
|
|
||||||
if (isset($_GET['redirect_uri'])) {
|
if (isset($_GET['redirect_uri'])) {
|
||||||
|
@ -25,6 +25,7 @@ class Plugins extends Template
|
|||||||
|
|
||||||
$template = new Template('plugins');
|
$template = new Template('plugins');
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('debugMod', DEBUGMOD);
|
$template->prepare('debugMod', DEBUGMOD);
|
||||||
$template->prepare('title', 'Plugins');
|
$template->prepare('title', 'Plugins');
|
||||||
$template->prepare('langMng', $langMng);
|
$template->prepare('langMng', $langMng);
|
||||||
|
@ -36,6 +36,7 @@ class Server extends Template
|
|||||||
$template->prepare('title', 'Server');
|
$template->prepare('title', 'Server');
|
||||||
|
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('debugMod', DEBUGMOD);
|
$template->prepare('debugMod', DEBUGMOD);
|
||||||
$template->prepare('langMng', $langMng);
|
$template->prepare('langMng', $langMng);
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ class Setting extends Template
|
|||||||
|
|
||||||
$template = new Template('setting');
|
$template = new Template('setting');
|
||||||
$template->prepare('baseDir', BASEDIR);
|
$template->prepare('baseDir', BASEDIR);
|
||||||
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('debugMod', DEBUGMOD);
|
$template->prepare('debugMod', DEBUGMOD);
|
||||||
$template->prepare('title', 'Automation');
|
$template->prepare('title', 'Automation');
|
||||||
$template->prepare('langMng', $langMng);
|
$template->prepare('langMng', $langMng);
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
<?php
|
<?php
|
||||||
$partial = new Partial('head');
|
$partial = new Partial('head');
|
||||||
$partial->prepare('baseDir',$BASEDIR);
|
$partial->prepare('baseDir',$BASEDIR);
|
||||||
|
$partial->prepare('baseUrl',$BASEURL);
|
||||||
|
|
||||||
$partial->render();
|
$partial->render();
|
||||||
?>
|
?>
|
||||||
<title><?php echo $TITLE ?></title>
|
<title><?php echo $TITLE ?></title>
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<?php
|
<?php
|
||||||
$partial = new Partial('head');
|
$partial = new Partial('head');
|
||||||
$partial->prepare('baseDir', $BASEDIR);
|
$partial->prepare('baseDir', $BASEDIR);
|
||||||
|
$partial->prepare('baseUrl', $BASEURL);
|
||||||
$partial->render();
|
$partial->render();
|
||||||
?>
|
?>
|
||||||
<title><?php echo $TITLE ?></title>
|
<title><?php echo $TITLE ?></title>
|
||||||
|
Loading…
Reference in New Issue
Block a user