Add favicon configuration #760

This commit is contained in:
Ulrich Block 2016-03-06 10:16:33 +01:00
parent b4c11f0d37
commit 07b0787d15
17 changed files with 36 additions and 11 deletions

View File

@ -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.

View File

@ -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;
include(IncludeTemplate($template_to_use, 'admin_footer.tpl'));

BIN
web/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -129,6 +129,9 @@ if ($ui->w('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'];

View File

@ -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"=>""),

View File

@ -11,6 +11,8 @@
<meta name="description" content="">
<meta name="author" content="2012 - <?php echo date('Y'); ?> <?php if(isset($ewCfg['title'])) echo $ewCfg['title']; ?>">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<!-- Bootstrap CSS -->
<link href="css/default/bootstrap.min.css" rel="stylesheet">

View File

@ -117,6 +117,13 @@
</div>
</div>
<div class="form-group">
<label for="inputFavicon">Favicon</label>
<div class="controls">
<input class="form-control" id="inputFavicon" type="text" name="favicon" value="<?php echo $favicon;?>">
</div>
</div>
<div class="form-group">
<label for="inputHeaderIcon">Header Icon</label>
<div class="controls">

View File

@ -9,6 +9,8 @@
<meta name="description" content="">
<meta name="author" content="2012 - <?php echo date('Y'); ?> Ulrich Block">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link rel="canonical" href="<?php echo $page_data->canurl;?>" />
<link href="<?php echo $page_data->getDefaultUrl();?>" hreflang="x-default" rel="alternate">
<?php foreach ($page_data->getLangLinks() as $l=>$v){ ?>

View File

@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

View File

@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

View File

@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

View File

@ -10,6 +10,7 @@
<link rel="shortcut icon" href="images/favicon.png" type="image/png">
<meta name="robots" content="noindex">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<!-- bootstrap -->
<link href="css/default/bootstrap.min.css" rel="stylesheet">

View File

@ -7,10 +7,8 @@
<title><?php if(isset($title)) echo $title;?></title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link rel="shortcut icon" href="images/favicon.png" type="image/png">
<meta name="robots" content="noindex">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<!-- bootstrap -->
<link href="css/default/bootstrap.min.css" rel="stylesheet">
@ -24,7 +22,6 @@
<?php echo implode('',$htmlExtraInformation['css']);?>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>

View File

@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

View File

@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

View File

@ -9,6 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<link href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>

View File

@ -11,6 +11,8 @@
<meta name="description" content="">
<meta name="author" content="2012 - <?php echo date('Y'); ?> <?php if(isset($ewCfg['title'])) echo $ewCfg['title']; ?>">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo (isset($rSA['favicon'])) ? $rSA['favicon'] : 'images/favicon.ico';?>" />
<!-- Bootstrap CSS -->
<link href="css/default/bootstrap.min.css" rel="stylesheet">