From 07b0787d1570d78c67006785fb79b0645755dae3 Mon Sep 17 00:00:00 2001 From: Ulrich Block Date: Sun, 6 Mar 2016 10:16:33 +0100 Subject: [PATCH] Add favicon configuration #760 --- README.md | 4 ++-- web/admin.php | 9 ++++++--- web/images/favicon.ico | Bin 0 -> 1150 bytes web/stuff/admin/panel_settings.php | 8 ++++++-- web/stuff/data/table_settings.php | 1 + web/template/default/admin/admin_header.tpl | 2 ++ web/template/default/admin/admin_settings.tpl | 7 +++++++ web/template/default/cms/page_header.tpl | 2 ++ web/template/default/standalone/lend.tpl | 1 + web/template/default/standalone/lenddata.tpl | 1 + .../default/standalone/lenddata_ipblock.tpl | 1 + web/template/default/standalone/login.tpl | 1 + .../default/standalone/login_mutiple.tpl | 5 +---- .../default/standalone/passwordrecovery.tpl | 1 + .../default/standalone/passwordrecovery_vo.tpl | 1 + .../default/standalone/protectioncheck.tpl | 1 + web/template/default/user/userpanel_header.tpl | 2 ++ 17 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 web/images/favicon.ico diff --git a/README.md b/README.md index 9249c72d..29609dfd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The development goal is always to automate as far as possible. The daily work wh Requirements ------------------------ -* Web installation requires PHP 5.3.7 or later where the extensions openssl, json, hash, ftp, SimpleXML, curl, gd, PDO, pdo_mysql and fopen are installed +* Web installation requires PHP 5.4 or later where the extensions openssl, json, hash, ftp, SimpleXML, curl, gd, PDO, pdo_mysql and fopen are installed * The gameserver module requires sudo, cron, proftpd and the bash shell at the game root * The Voicemodule works best with a linux based TS3 server @@ -23,7 +23,7 @@ Which functions and modules are available? ------------------------ What drives the development is the goal to automate all processes. Listing all available functions would result in an exploding thread. So here is the summary with the main features: * Mobile ready. The default template has been made with Twitter Bootstrap and is responsive. That way Easy-WI becomes a Web App which can be easily used with a mobile or tablet. -* Multilingual. Currently supported are English, Danish and German. The text is maintained with XML files. +* Multilingual. Currently supported are English, Danish, Italian and German. The text is maintained with XML files. * We have a strict separation between PHP modules and HTML views. In case a view is missing at your custom templates the default will be used as fall-back. * Gameserver management is nearly fully automated. All you need to do is updating add-ons at your central image server from time to time. After that the deployment to the individual servers is automated. * The same applies to TS3 voiceserver. diff --git a/web/admin.php b/web/admin.php index fc25a745..ff70cfa7 100644 --- a/web/admin.php +++ b/web/admin.php @@ -48,6 +48,7 @@ include(EASYWIDIR . '/stuff/settings.php'); include(EASYWIDIR . '/stuff/admin/init_admin.php'); include(EASYWIDIR . '/stuff/admin/adminhome.php'); +// Modul is loaded. Controller is set if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file((EASYWIDIR . '/stuff/admin/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]))) { include(EASYWIDIR . '/stuff/admin/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]); } else if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file((EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]))) { @@ -59,20 +60,22 @@ if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui- $template_file = 'admin_home.tpl'; } +// Existing DB connection is closed unset($dbConnect); +// No template defined, use default if (!isset($template_to_use) or !isset($template_to_use) ) { $template_to_use = 'default'; } +// No template file specified, or specified as a string if (!isset($template_file) or is_array($template_file)) { $template_file = ''; } else if (is_object($template_file)) { $template_file = (string) $template_file; } +// Load header, body and footer include(IncludeTemplate($template_to_use, 'admin_header.tpl')); include(IncludeTemplate($template_to_use, (preg_match('/^(.*)\.tpl$/', $template_file)) ? $template_file : 'general.tpl', (isset($customModule)) ? 'custom_modules' : 'admin')); -include(IncludeTemplate($template_to_use, 'admin_footer.tpl')); - -$sql = null; \ No newline at end of file +include(IncludeTemplate($template_to_use, 'admin_footer.tpl')); \ No newline at end of file diff --git a/web/images/favicon.ico b/web/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..764fb39dd23956e69cdba0761bf3e69c0b3a796f GIT binary patch literal 1150 zcmb7D?MqWp96oDq(`}d5`-cj&j3kIeilw9kk>wH~sQS8yRD11WHk6K2L!$+WW_l(cU`3`V~O2Oh=iQF2S&eK(T0_1Y?$jdV_?Ur4qU- zC0J@C^wddserg`X=N84dRiZ&tu?ER&Wk_Bl!yS_b&rWJ#C3M$nVbZIRqLU#jRe=|z z!NGNiyow;}ELUT0ZcYF+oK7cNNYhfS#mBMFOMBDP(-^e9Mo-*>nj474Vkk4{ai4U) zzUu{FciwJBkGVk1pODVe8m*Xf4I}yKt`+ACel+?AJ2#MTqZ)TjYVftk;}Nm1uOE-9 zGB7IcP=)J-3jB&h z5e)t$1O+0I2xf`9h#2*_lj`GrYM^(!$iI@W#Nizbqobq3Lm&_k_1o=s3=Ivz?RGD$ zCsD3fiau56#QBYR3iy0}n2WcfrD7L+em|{!2!n?R;v|FR9|zE3XM68e0Y(ziJ?><=f66i3O}8>d9@7O z%ekXEjEs!neg8}0+pt@XYX!VVD*Cou$j{t{f(*e=T?s&kV`&}C~!7gj;Sff5-uH6;xhG{ fDExo@uMwU3CSOhfDGgBeDygj$1N5w&IGpw('action', 4, 'post') and !token(true)) { $nopassword = $ui->id('nopassword', 1, 'post'); $tohighslots = $ui->id('tohighslots', 1, 'post'); $cronjobIPs = $ui->ips('cronjobIPs', 'post'); + + // Panel head data + $favicon = $ui->config('favicon', 'post'); $headerIcon = $ui->config('headerIcon', 'post'); $headerText = $ui->escaped('headerText', 'post'); $headerHref = $ui->url('headerHref', 'post'); @@ -148,8 +151,8 @@ if ($ui->w('action', 4, 'post') and !token(true)) { } } - $query = $sql->prepare("UPDATE `settings` SET `header_icon`=?,`header_text`=?,`header_href`=?,`cronjob_ips`=?,`template`=?,`templateColor`=?,`voice_autobackup`=?,`voice_autobackup_intervall`=?,`voice_maxbackup`=?,`language`=?,`imageserver`=?,`master`=?,`prefix1`=?,`prefix2`=?,`faillogins`=?,`brandname`=?,`timezone`=?,`supportnumber`=?,`noservertag`=?,`nopassword`=?,`tohighslots`=?,`down_checks`=?,`lastCronWarnStatus`=?,`lastCronWarnReboot`=?,`lastCronWarnUpdates`=?,`lastCronWarnJobs`=?,`lastCronWarnCloud`=? WHERE `resellerid`=? LIMIT 1"); - $query->execute(array($headerIcon, $headerText, $headerHref, $cronjobIPs, $template, $templateColor, $voice_autobackup, $voice_autobackup_intervall, $voice_maxbackup, $language, $imageserver, $master, $prefix1, $prefix2, $faillogins, $brandname, $timezone, $supportnumber, $noservertag, $nopassword, $tohighslots, $down_checks, $lastCronWarnStatus, $lastCronWarnReboot, $lastCronWarnUpdates, $lastCronWarnJobs, $lastCronWarnCloud, $reseller_id)); + $query = $sql->prepare("UPDATE `settings` SET `favicon`=?,`header_icon`=?,`header_text`=?,`header_href`=?,`cronjob_ips`=?,`template`=?,`templateColor`=?,`voice_autobackup`=?,`voice_autobackup_intervall`=?,`voice_maxbackup`=?,`language`=?,`imageserver`=?,`master`=?,`prefix1`=?,`prefix2`=?,`faillogins`=?,`brandname`=?,`timezone`=?,`supportnumber`=?,`noservertag`=?,`nopassword`=?,`tohighslots`=?,`down_checks`=?,`lastCronWarnStatus`=?,`lastCronWarnReboot`=?,`lastCronWarnUpdates`=?,`lastCronWarnJobs`=?,`lastCronWarnCloud`=? WHERE `resellerid`=? LIMIT 1"); + $query->execute(array($favicon, $headerIcon, $headerText, $headerHref, $cronjobIPs, $template, $templateColor, $voice_autobackup, $voice_autobackup_intervall, $voice_maxbackup, $language, $imageserver, $master, $prefix1, $prefix2, $faillogins, $brandname, $timezone, $supportnumber, $noservertag, $nopassword, $tohighslots, $down_checks, $lastCronWarnStatus, $lastCronWarnReboot, $lastCronWarnUpdates, $lastCronWarnJobs, $lastCronWarnCloud, $reseller_id)); if ($query->rowCount() > 0) { $loguseraction = "%mod% %settings%"; @@ -170,6 +173,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) { $query = $sql->prepare("SELECT * FROM `settings` WHERE `resellerid`=? LIMIT 1"); $query->execute(array($reseller_id)); while ($row = $query->fetch(PDO::FETCH_ASSOC)) { + $favicon = $row['favicon']; $headerIcon = $row['header_icon']; $headerText = $row['header_text']; $headerHref = $row['header_href']; diff --git a/web/stuff/data/table_settings.php b/web/stuff/data/table_settings.php index d42d1a02..8ea73f1d 100644 --- a/web/stuff/data/table_settings.php +++ b/web/stuff/data/table_settings.php @@ -42,6 +42,7 @@ $defined['settings'] = array( 'version' => array("Type"=>"decimal(4,2)","Null"=>"YES","Key"=>"","Default"=>"5.21","Extra"=>""), 'releasenotesDE' => array("Type"=>"int(11) unsigned","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""), 'releasenotesEN' => array("Type"=>"int(11) unsigned","Null"=>"YES","Key"=>"","Default"=>"","Extra"=>""), + 'favicon' => array("Type"=>"varchar(100)","Null"=>"YES","Key"=>"","Default"=>"images/favicon.ico","Extra"=>""), 'header_icon' => array("Type"=>"varchar(100)","Null"=>"YES","Key"=>"","Default"=>"logo_180px.png","Extra"=>""), 'header_text' => array("Type"=>"varchar(100)","Null"=>"YES","Key"=>"","Default"=>"Easy-Wi","Extra"=>""), 'header_href' => array("Type"=>"varchar(100)","Null"=>"YES","Key"=>"","Default"=>"https://easy-wi.com","Extra"=>""), diff --git a/web/template/default/admin/admin_header.tpl b/web/template/default/admin/admin_header.tpl index aace1b0f..68c7efb6 100644 --- a/web/template/default/admin/admin_header.tpl +++ b/web/template/default/admin/admin_header.tpl @@ -11,6 +11,8 @@ + + diff --git a/web/template/default/admin/admin_settings.tpl b/web/template/default/admin/admin_settings.tpl index 2a665a27..bb13aeb1 100644 --- a/web/template/default/admin/admin_settings.tpl +++ b/web/template/default/admin/admin_settings.tpl @@ -117,6 +117,13 @@ +
+ +
+ +
+
+
diff --git a/web/template/default/cms/page_header.tpl b/web/template/default/cms/page_header.tpl index 82779a19..7effc6dc 100644 --- a/web/template/default/cms/page_header.tpl +++ b/web/template/default/cms/page_header.tpl @@ -9,6 +9,8 @@ + + getLangLinks() as $l=>$v){ ?> diff --git a/web/template/default/standalone/lend.tpl b/web/template/default/standalone/lend.tpl index f735b54a..7deaeb32 100644 --- a/web/template/default/standalone/lend.tpl +++ b/web/template/default/standalone/lend.tpl @@ -9,6 +9,7 @@ + diff --git a/web/template/default/standalone/lenddata.tpl b/web/template/default/standalone/lenddata.tpl index a07553e1..00c3a502 100644 --- a/web/template/default/standalone/lenddata.tpl +++ b/web/template/default/standalone/lenddata.tpl @@ -9,6 +9,7 @@ + diff --git a/web/template/default/standalone/lenddata_ipblock.tpl b/web/template/default/standalone/lenddata_ipblock.tpl index 13cd317e..064f2ff6 100644 --- a/web/template/default/standalone/lenddata_ipblock.tpl +++ b/web/template/default/standalone/lenddata_ipblock.tpl @@ -9,6 +9,7 @@ + diff --git a/web/template/default/standalone/login.tpl b/web/template/default/standalone/login.tpl index 9fac3f9f..a9638162 100644 --- a/web/template/default/standalone/login.tpl +++ b/web/template/default/standalone/login.tpl @@ -10,6 +10,7 @@ + diff --git a/web/template/default/standalone/login_mutiple.tpl b/web/template/default/standalone/login_mutiple.tpl index 5e861a14..089a3d02 100644 --- a/web/template/default/standalone/login_mutiple.tpl +++ b/web/template/default/standalone/login_mutiple.tpl @@ -7,10 +7,8 @@ <?php if(isset($title)) echo $title;?> - - - + @@ -24,7 +22,6 @@ -