removing sidebar from config page;
moving update message to the footer and adding new version number changing CHANGELOG to markdown format changing template directory structure to match module structurepull/46/head
parent
9fc6c60f9b
commit
a120c877bb
78
CHANGELOG
78
CHANGELOG
|
@ -1,78 +0,0 @@
|
|||
#########################
|
||||
#
|
||||
# Version 2.2.0
|
||||
# ?, 2014
|
||||
#
|
||||
#########################
|
||||
- New project url: http://www.phpservermonitor.org
|
||||
- Added user login system with 2 user levels (administrator and regular user).
|
||||
- Added warning threshold option (set number of failed checks before server goes offline).
|
||||
- Added SMTP support.
|
||||
- Adding Bulgarian language file (thanks to Plamen Vasilev).
|
||||
- Added user profile page.
|
||||
- Added history tracking of server uptime.
|
||||
- Added history graphs of server uptime and latency (thanks to Jérôme Cabanis).
|
||||
- Date and time formats are taken from language file and localized per language (thanks to Jérôme Cabanis).
|
||||
- When checking a website, the updater will now follow 302 Location headers.
|
||||
- String/pattern search on websites did not work for websites with compression turned on.
|
||||
- Switched from mysql_* to PDO.
|
||||
- Updated PHPMailer package to v5.2.6.
|
||||
- Fixed several XSS vulnerabilities.
|
||||
|
||||
#########################
|
||||
#
|
||||
# Version 2.1.0
|
||||
# February 8, 2014
|
||||
#
|
||||
#########################
|
||||
- Merged PHP Server Monitor Plus project by Luiz Alberto S. Ribeiro (https://github.com/madeinnordeste/PHP-Server-Monitor-Plus).
|
||||
-- New layout (thanks to twitter bootstrap)
|
||||
- New install module.
|
||||
- Regex search on website has been added by Paul Feakins.
|
||||
- Support for mosms provider by Andreas Ek.
|
||||
- Support for Textmarketer provider by Perri Vardy-Mason.
|
||||
- Language files are now automatically detected, instead of a hardcoded list.
|
||||
- Adding Korean language file (thanks to Ik-Jun).
|
||||
- Adding Portuguese / Brazilian language file (thanks to Luiz Alberto S. Ribeiro).
|
||||
- Large status page by Michael Greenhill.
|
||||
- New config file (see install instructions in README).
|
||||
- Cronjob will be prevented from running multiple times at the same time (with a 10 mins timeout).
|
||||
|
||||
#########################
|
||||
#
|
||||
# Version 2.0.1
|
||||
# October 29, 2011
|
||||
#
|
||||
#########################
|
||||
- Adding German language file (thanks to Brunbaur Herbert).
|
||||
- Adding French language file (thanks to David Ribeiro).
|
||||
- classes/sm/smUpdaterStatus.class.php: the curl option CURLOPT_CUSTOMREQUEST has been changed to CURLOPT_NOBODY.
|
||||
- Servers page: auto refresh can be configured at the config page.
|
||||
- Servers page: if the server is a website, the "Domain/Ip" field will be a link to the website.
|
||||
- New text message gateway: Clickatell.com (thanks to Simon).
|
||||
- If cURL is not installed, the install.php script will throw an error.
|
||||
- HTTP status codes 5xx will also be treated as error.
|
||||
|
||||
#########################
|
||||
#
|
||||
# Version 2.0.0
|
||||
# October 19, 2009
|
||||
#
|
||||
#########################
|
||||
- Server type ("service" or "website").
|
||||
- Different types of notification.
|
||||
- New text message gateways.
|
||||
- Code rewrite.
|
||||
- New layout.
|
||||
- Check for updates function.
|
||||
|
||||
#########################
|
||||
#
|
||||
# Version 1.0.1
|
||||
# September 18, 2008
|
||||
#
|
||||
#########################
|
||||
- log.php
|
||||
- tpl/log.tpl.html
|
||||
- Select order by clause used datetime field after DATE_FORMAT had been performed,
|
||||
resulting in a wrong list of log entries shown.
|
|
@ -0,0 +1,70 @@
|
|||
# PHP Server Monitor
|
||||
|
||||
## Changelog
|
||||
|
||||
### v2.2.0 (not yet released, 2014)
|
||||
|
||||
* New module structure (not backwards compatible).
|
||||
* Template directory restructured to correspond with module structure.
|
||||
* Added user login system with 2 user levels (administrator and regular user).
|
||||
* Added warning threshold option (set number of failed checks before server goes offline).
|
||||
* Added SMTP support.
|
||||
* Adding Bulgarian language file (thanks to Plamen Vasilev).
|
||||
* Added user profile page.
|
||||
* Added history tracking of server uptime.
|
||||
* Added history graphs of server uptime and latency (thanks to Jérôme Cabanis).
|
||||
* Status page is now default homepage.
|
||||
* Updated French translation.
|
||||
* Date and time formats are taken from language file and localized per language (thanks to Jérôme Cabanis).
|
||||
* When checking a website, the updater will now follow 302 Location headers.
|
||||
* String/pattern search on websites did not work for websites with compression turned on.
|
||||
* Switched from mysql_* to PDO.
|
||||
* Updated PHPMailer package to v5.2.6.
|
||||
* Fixed several XSS vulnerabilities.
|
||||
* Project website updated to <http://www.phpservermonitor.org>
|
||||
|
||||
|
||||
### v2.1.0 (released February 8, 2014)
|
||||
|
||||
* PHP 5.3+ required
|
||||
* Merged PHP Server Monitor Plus project by Luiz Alberto S. Ribeiro (<https://github.com/madeinnordeste/PHP-Server-Monitor-Plus>).
|
||||
* New layout (thanks to twitter bootstrap)
|
||||
* New install module.
|
||||
* Regex search on website has been added by Paul Feakins.
|
||||
* Support for mosms provider by Andreas Ek.
|
||||
* Support for Textmarketer provider by Perri Vardy-Mason.
|
||||
* Language files are now automatically detected, instead of a hardcoded list.
|
||||
* Adding Korean language file (thanks to Ik-Jun).
|
||||
* Adding Portuguese / Brazilian language file (thanks to Luiz Alberto S. Ribeiro).
|
||||
* Large status page by Michael Greenhill.
|
||||
* New config file (see install instructions in README).
|
||||
* Cronjob will be prevented from running multiple times at the same time (with a 10 mins timeout).
|
||||
|
||||
|
||||
### v2.0.1 (released October 29, 2011)
|
||||
|
||||
* Adding German language file (thanks to Brunbaur Herbert).
|
||||
* Adding French language file (thanks to David Ribeiro).
|
||||
* classes/sm/smUpdaterStatus.class.php: the curl option CURLOPT_CUSTOMREQUEST has been changed to CURLOPT_NOBODY.
|
||||
* Servers page: auto refresh can be configured at the config page.
|
||||
* Servers page: if the server is a website, the "Domain/Ip" field will be a link to the website.
|
||||
* New text message gateway: Clickatell.com (thanks to Simon).
|
||||
* If cURL is not installed, the install.php script will throw an error.
|
||||
* HTTP status codes 5xx will also be treated as error.
|
||||
|
||||
|
||||
### v2.0.0 (released October 19, 2009)
|
||||
|
||||
* Server type ("service" or "website").
|
||||
* Different types of notification.
|
||||
* New text message gateways.
|
||||
* Code rewrite.
|
||||
* New layout.
|
||||
* Check for updates function.
|
||||
|
||||
|
||||
### v1.0.1 (released September 18, 2008)
|
||||
|
||||
* log.php
|
||||
* tpl/log.tpl.html
|
||||
* Select order by clause used datetime field after DATE_FORMAT had been performed, resulting in a wrong list of log entries shown.
|
|
@ -159,6 +159,7 @@ function psm_update_conf($key, $value) {
|
|||
array('value' => $value),
|
||||
array('key' => $key)
|
||||
);
|
||||
$GLOBALS['sm_config'][$key] = $value;
|
||||
}
|
||||
|
||||
###############################################
|
||||
|
@ -312,27 +313,42 @@ function psm_date($time) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if an update is available for PHP Server Monitor
|
||||
* Check if an update is available for PHP Server Monitor.
|
||||
*
|
||||
* Will only check for new version if user turned updates on in config.
|
||||
* @global object $db
|
||||
* @return boolean
|
||||
*/
|
||||
function psm_check_updates() {
|
||||
function psm_update_available() {
|
||||
global $db;
|
||||
|
||||
if(!psm_get_conf('show_update')) {
|
||||
// user does not want updates, fair enough.
|
||||
return false;
|
||||
}
|
||||
|
||||
$last_update = psm_get_conf('last_update_check');
|
||||
|
||||
if((time() - (7 * 24 * 60 * 60)) > $last_update) {
|
||||
if((time() - PSM_UPDATE_INTERVAL) > $last_update) {
|
||||
// been more than a week since update, lets go
|
||||
// update "update-date"
|
||||
$db->save(PSM_DB_PREFIX . 'config', array('value' => time()), array('key' => 'last_update_check'));
|
||||
$latest = psm_curl_get('http://www.phpservermonitor.org/version.php');
|
||||
$current = psm_get_conf('version');
|
||||
|
||||
return version_compare($latest, $current, '>');
|
||||
// update last check date
|
||||
psm_update_conf('last_update_check', time());
|
||||
$latest = psm_curl_get(PSM_UPDATE_URL);
|
||||
// add latest version to database
|
||||
if($latest !== false && strlen($latest) < 15) {
|
||||
psm_update_conf('version_update_check', $latest);
|
||||
}
|
||||
} else {
|
||||
$latest = psm_get_conf('version_update_check');
|
||||
}
|
||||
|
||||
if($latest != false) {
|
||||
$current = psm_get_conf('version');
|
||||
return version_compare($latest, $current, '>');
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare a new Mailer util.
|
||||
|
|
|
@ -31,6 +31,18 @@
|
|||
*/
|
||||
define('PSM_VERSION', '2.2.0-dev');
|
||||
|
||||
/**
|
||||
* URL to check for updates. Will not be checked if turned off on config page.
|
||||
* @see psm_update_available()
|
||||
*/
|
||||
define('PSM_UPDATE_URL', 'http://www.phpservermonitor.org/version.php');
|
||||
|
||||
/**
|
||||
* Default update interval (1 week). Only applicable when updates are enabled.
|
||||
* @see psm_update_available()
|
||||
*/
|
||||
define('PSM_UPDATE_INTERVAL', 7 * 24 * 60 * 60);
|
||||
|
||||
/**
|
||||
* Configuration for: Hashing strength
|
||||
* This is the place where you define the strength of your password hashing/salting
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => 'Редактиране на',
|
||||
'insert' => 'Добавяне',
|
||||
'add_new' => 'Добави нов',
|
||||
'update_available' => 'Налична е нова версия. Може да я свалите от <a href="http://www.phpservermonitor.org" target="_blank">тук</a>.',
|
||||
'update_available' => 'Налична е нова версия ({version}). Може да я свалите от <a href="http://www.phpservermonitor.org" target="_blank">тук</a>.',
|
||||
'back_to_top' => 'Нагоре',
|
||||
'go_back' => 'Go back',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => 'Bearbeiten',
|
||||
'insert' => 'Einfügen',
|
||||
'add_new' => 'Neuen Eintrag erstellen',
|
||||
'update_available' => 'Ein neues Update ist verfügbar auf <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'update_available' => 'Ein neues Update ({version}) ist verfügbar auf <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'back_to_top' => 'Back to top',
|
||||
'go_back' => 'Go back',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => 'Edit',
|
||||
'insert' => 'Insert',
|
||||
'add_new' => 'Add new',
|
||||
'update_available' => 'A new update is available from <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'update_available' => 'A new version ({version}) is available from <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'back_to_top' => 'Back to top',
|
||||
'go_back' => 'Go back',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => 'Editer',
|
||||
'insert' => 'Nouveau',
|
||||
'add_new' => 'Nouveau',
|
||||
'update_available' => 'Une nouvelle version est disponible à l\'adresse <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'update_available' => 'Une nouvelle version ({version}) est disponible à l\'adresse <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'back_to_top' => 'Haut de page',
|
||||
'go_back' => 'Retour',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => '수정',
|
||||
'insert' => '삽입',
|
||||
'add_new' => '새계정 추가',
|
||||
'update_available' => '새로운 업데이트가 있습니다. 다음사이트를 방문 해 주십시오. <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'update_available' => '새로운 업데이트가 있습니다 ({version}). 다음사이트를 방문 해 주십시오. <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'back_to_top' => 'Back to top',
|
||||
'go_back' => 'Go back',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => 'Wijzig',
|
||||
'insert' => 'Voeg toe',
|
||||
'add_new' => 'Voeg toe',
|
||||
'update_available' => 'Een nieuwe update is beschikbaar op <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'update_available' => 'Een nieuwe update ({version}) is beschikbaar op <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'back_to_top' => 'Terug naar boven',
|
||||
'go_back' => 'Terug',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -42,7 +42,7 @@ $sm_lang = array(
|
|||
'edit' => 'Editar',
|
||||
'insert' => 'Inserir',
|
||||
'add_new' => 'Adicionar novo',
|
||||
'update_available' => 'Uma atualização disponível em <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'update_available' => 'Uma atualização ({version}) disponível em <a href="http://www.phpservermonitor.org" target="_blank">http://www.phpservermonitor.org</a>.',
|
||||
'back_to_top' => 'Voltar ao topo',
|
||||
'go_back' => 'Go back',
|
||||
// date/time format according the strftime php function format parameter http://php.net/manual/function.strftime.php
|
||||
|
|
|
@ -167,10 +167,6 @@ abstract class AbstractController implements ControllerInterface {
|
|||
* Then the tpl_id set in $this->getTemplateId() will be added to the main template automatically
|
||||
*/
|
||||
protected function createHTML() {
|
||||
if(psm_get_conf('show_update')) {
|
||||
// user wants updates, lets see what we can do
|
||||
$this->createHTMLUpdateAvailable();
|
||||
}
|
||||
$tpl_data = array();
|
||||
|
||||
if(!empty($this->messages)) {
|
||||
|
@ -198,6 +194,10 @@ abstract class AbstractController implements ControllerInterface {
|
|||
$tpl_data['content'] = $this->tpl->getTemplate($tpl_id_content);
|
||||
}
|
||||
|
||||
if(psm_update_available()) {
|
||||
$tpl_data['update_available'] = str_replace('{version}', 'v'.psm_get_conf('version_update_check'), psm_get_lang('system', 'update_available'));
|
||||
}
|
||||
|
||||
// add the module's custom template to the main template to get some content
|
||||
$this->setTemplateId('main');
|
||||
$this->tpl->addTemplatedata($this->getTemplateId(), $tpl_data);
|
||||
|
@ -261,18 +261,6 @@ abstract class AbstractController implements ControllerInterface {
|
|||
return $this->tpl->getTemplate($tpl_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* First check if an update is available, if there is add a message
|
||||
* to the main template
|
||||
*/
|
||||
protected function createHTMLUpdateAvailable() {
|
||||
if(psm_check_updates()) {
|
||||
// yay, new update available =D
|
||||
// @todo perhaps find a way to make the message more persistent?
|
||||
$this->addMessage(psm_get_lang('system', 'update_available'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this to add language specific labels to template
|
||||
*
|
||||
|
|
|
@ -76,16 +76,7 @@ class ConfigController extends AbstractController {
|
|||
* Populate all the config fields with values from the database
|
||||
*/
|
||||
protected function executeIndex() {
|
||||
$this->setTemplateId('config', 'config.tpl.html');
|
||||
$sidebar = new \psm\Util\Module\Sidebar($this->tpl);
|
||||
$this->setSidebar($sidebar);
|
||||
|
||||
$sidebar->addLink(
|
||||
'save',
|
||||
psm_get_lang('system', 'save'),
|
||||
"javascript:$('#edit_config').submit();",
|
||||
'ok'
|
||||
);
|
||||
$this->setTemplateId('config', 'config/config.tpl.html');
|
||||
|
||||
$config_db = $this->db->select(
|
||||
PSM_DB_PREFIX . 'config',
|
||||
|
|
|
@ -62,13 +62,13 @@ class InstallController extends AbstractController {
|
|||
protected function createHTML() {
|
||||
$html_results = '';
|
||||
if(!empty($this->messages)) {
|
||||
$this->tpl->newTemplate('install_results', 'install.tpl.html');
|
||||
$this->tpl->newTemplate('install_results', 'install/install.tpl.html');
|
||||
$this->tpl->addTemplateDataRepeat('install_results', 'resultmsgs', $this->messages);
|
||||
$html_results = $this->tpl->getTemplate('install_results');
|
||||
$this->messages = array();
|
||||
}
|
||||
$tpl_id = $this->getTemplateId();
|
||||
$this->setTemplateId('install', 'install.tpl.html');
|
||||
$this->setTemplateId('install', 'install/install.tpl.html');
|
||||
|
||||
$this->tpl->addTemplateData($this->getTemplateId(), array(
|
||||
'html_install' => $this->tpl->getTemplate($tpl_id),
|
||||
|
@ -82,7 +82,7 @@ class InstallController extends AbstractController {
|
|||
* Say hi to our new user
|
||||
*/
|
||||
protected function executeIndex() {
|
||||
$this->setTemplateId('install_index', 'install.tpl.html');
|
||||
$this->setTemplateId('install_index', 'install/install.tpl.html');
|
||||
|
||||
// build prerequisites
|
||||
$errors = 0;
|
||||
|
@ -113,7 +113,7 @@ class InstallController extends AbstractController {
|
|||
* Help the user create a new config file
|
||||
*/
|
||||
protected function executeConfig() {
|
||||
$this->setTemplateId('install_config_new', 'install.tpl.html');
|
||||
$this->setTemplateId('install_config_new', 'install/install.tpl.html');
|
||||
$tpl_data = array();
|
||||
|
||||
if(!defined('PSM_DB_PREFIX')) {
|
||||
|
@ -165,7 +165,7 @@ class InstallController extends AbstractController {
|
|||
$this->addMessage('Configuration file written successfully.', 'success');
|
||||
} else {
|
||||
$this->addMessage('Config file is not writable, we cannot save it for you.', 'error');
|
||||
$this->tpl->newTemplate('install_config_new_copy', 'install.tpl.html');
|
||||
$this->tpl->newTemplate('install_config_new_copy', 'install/install.tpl.html');
|
||||
$tpl_data['html_config_copy'] = $this->tpl->getTemplate('install_config_new_copy');
|
||||
$tpl_data['php_config'] = $config_php;
|
||||
}
|
||||
|
@ -182,14 +182,14 @@ class InstallController extends AbstractController {
|
|||
if(version_compare(PSM_VERSION, '2.2.0', '<')) {
|
||||
// upgrade from before 2.2, does not have passwords yet.. create new user first
|
||||
$this->addMessage('Your current version does not have an authentication system, but since v2.2 access to the monitor is restricted by user accounts. Please set up a new account to be able to login after the upgrade, and which you can use to change the passwords for your other accounts.', 'info');
|
||||
$this->setTemplateId('install_config_new_user', 'install.tpl.html');
|
||||
$this->setTemplateId('install_config_new_user', 'install/install.tpl.html');
|
||||
} else {
|
||||
$this->setTemplateId('install_config_upgrade', 'install.tpl.html');
|
||||
$this->setTemplateId('install_config_upgrade', 'install/install.tpl.html');
|
||||
$tpl_data['version'] = PSM_VERSION;
|
||||
}
|
||||
} else {
|
||||
// fresh install ahead
|
||||
$this->setTemplateId('install_config_new_user', 'install.tpl.html');
|
||||
$this->setTemplateId('install_config_new_user', 'install/install.tpl.html');
|
||||
|
||||
$tpl_data['username'] = (isset($_POST['username'])) ? $_POST['username'] : '';
|
||||
$tpl_data['email'] = (isset($_POST['email'])) ? $_POST['email'] : '';
|
||||
|
@ -272,7 +272,7 @@ class InstallController extends AbstractController {
|
|||
}
|
||||
}
|
||||
|
||||
$this->setTemplateId('install_success', 'install.tpl.html');
|
||||
$this->setTemplateId('install_success', 'install/install.tpl.html');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,7 +44,7 @@ class LogController extends AbstractServerController {
|
|||
* Prepare the template with a list of all log entries
|
||||
*/
|
||||
protected function executeIndex() {
|
||||
$this->setTemplateId('log_list', 'log.tpl.html');
|
||||
$this->setTemplateId('server_log_list', 'server/log.tpl.html');
|
||||
|
||||
$entries = array();
|
||||
$entries['status'] = $this->getEntries('status');
|
||||
|
@ -80,10 +80,10 @@ class LogController extends AbstractServerController {
|
|||
}
|
||||
|
||||
// add entries to template
|
||||
$this->tpl->newTemplate('log_entries', 'log.tpl.html');
|
||||
$this->tpl->addTemplateDataRepeat('log_entries', 'entries', $records);
|
||||
$this->tpl->newTemplate('server_log_entries', 'server/log.tpl.html');
|
||||
$this->tpl->addTemplateDataRepeat('server_log_entries', 'entries', $records);
|
||||
$this->tpl->addTemplateData(
|
||||
'log_entries',
|
||||
'server_log_entries',
|
||||
array(
|
||||
'logtitle' => $key,
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ class LogController extends AbstractServerController {
|
|||
$this->tpl->addTemplateData(
|
||||
$this->getTemplateId(),
|
||||
array(
|
||||
'content_' . $key => $this->tpl->getTemplate('log_entries'),
|
||||
'content_' . $key => $this->tpl->getTemplate('server_log_entries'),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class ServerController extends AbstractServerController {
|
|||
* Prepare the template to show a list of all servers
|
||||
*/
|
||||
protected function executeIndex() {
|
||||
$this->setTemplateId('servers_list', 'servers.tpl.html');
|
||||
$this->setTemplateId('server_list', 'server/server.tpl.html');
|
||||
$sidebar = new \psm\Util\Module\Sidebar($this->tpl);
|
||||
$this->setSidebar($sidebar);
|
||||
|
||||
|
@ -64,8 +64,8 @@ class ServerController extends AbstractServerController {
|
|||
'plus'
|
||||
);
|
||||
// get the action buttons per server
|
||||
$this->tpl->newTemplate('servers_list_admin_actions', 'servers.tpl.html');
|
||||
$html_actions = $this->tpl->getTemplate('servers_list_admin_actions');
|
||||
$this->tpl->newTemplate('server_list_admin_actions', 'server/server.tpl.html');
|
||||
$html_actions = $this->tpl->getTemplate('server_list_admin_actions');
|
||||
} else {
|
||||
$html_actions = '';
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ class ServerController extends AbstractServerController {
|
|||
* Prepare the template to show the update screen for a single server
|
||||
*/
|
||||
protected function executeEdit() {
|
||||
$this->setTemplateId('servers_update', 'servers.tpl.html');
|
||||
$this->setTemplateId('server_update', 'server/server.tpl.html');
|
||||
$sidebar = new \psm\Util\Module\Sidebar($this->tpl);
|
||||
$this->setSidebar($sidebar);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class StatusController extends AbstractServerController {
|
|||
* @todo move the background colurs to the config
|
||||
*/
|
||||
protected function executeIndex() {
|
||||
$this->setTemplateId('status', 'status.tpl.html');
|
||||
$this->setTemplateId('server_status', 'server/status.tpl.html');
|
||||
$this->addFooter(false);
|
||||
|
||||
// get the active servers from database
|
||||
|
|
|
@ -46,7 +46,7 @@ class LoginController extends AbstractController {
|
|||
}
|
||||
|
||||
protected function executeLogin() {
|
||||
$this->setTemplateId('login', 'login.tpl.html');
|
||||
$this->setTemplateId('user_login', 'user/login.tpl.html');
|
||||
|
||||
if(isset($_POST['user_name']) && isset($_POST['user_password'])) {
|
||||
$rememberme = (isset($_POST['user_rememberme'])) ? true : false;
|
||||
|
@ -83,7 +83,7 @@ class LoginController extends AbstractController {
|
|||
* Show/process the password forgot form (before the mail)
|
||||
*/
|
||||
protected function executeForgot() {
|
||||
$this->setTemplateId('login_forgot', 'login.tpl.html');
|
||||
$this->setTemplateId('user_login_forgot', 'user/login.tpl.html');
|
||||
|
||||
if(isset($_POST['user_name'])) {
|
||||
$user = $this->user->getUserByUsername($_POST['user_name']);
|
||||
|
@ -118,7 +118,7 @@ class LoginController extends AbstractController {
|
|||
* Show/process the password reset form (after the mail)
|
||||
*/
|
||||
protected function executeReset() {
|
||||
$this->setTemplateId('login_reset', 'login.tpl.html');
|
||||
$this->setTemplateId('user_login_reset', 'user/login.tpl.html');
|
||||
|
||||
$user_id = (isset($_GET['user_id'])) ? intval($_GET['user_id']) : 0;
|
||||
$token = (isset($_GET['token'])) ? $_GET['token'] : '';
|
||||
|
|
|
@ -68,7 +68,7 @@ class UserController extends AbstractController {
|
|||
* Prepare the template to show a list of all users
|
||||
*/
|
||||
protected function executeIndex() {
|
||||
$this->setTemplateId('users_list', 'users.tpl.html');
|
||||
$this->setTemplateId('user_list', 'user/user.tpl.html');
|
||||
$sidebar = new \psm\Util\Module\Sidebar($this->tpl);
|
||||
$this->setSidebar($sidebar);
|
||||
|
||||
|
@ -113,7 +113,7 @@ class UserController extends AbstractController {
|
|||
* Prepare the template to show the update screen for a user
|
||||
*/
|
||||
protected function executeEdit() {
|
||||
$this->setTemplateId('users_update', 'users.tpl.html');
|
||||
$this->setTemplateId('user_update', 'user/user.tpl.html');
|
||||
$sidebar = new \psm\Util\Module\Sidebar($this->tpl);
|
||||
$this->setSidebar($sidebar);
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ class Installer {
|
|||
('log_email', '1'),
|
||||
('log_sms', '1'),
|
||||
('version', '" . PSM_VERSION . "'),
|
||||
('version_update_check', '" . PSM_VERSION . "'),
|
||||
('auto_refresh_servers', '0'),
|
||||
('show_update', '1'),
|
||||
('last_update_check', '0'),
|
||||
|
@ -269,6 +270,8 @@ class Installer {
|
|||
$queries[] = "UPDATE `" . PSM_DB_PREFIX . "config` SET `value`='nl_NL' WHERE `key`='language' AND `value`='nl';";
|
||||
$queries[] = "UPDATE `" . PSM_DB_PREFIX . "config` SET `value`='pt_BR' WHERE `key`='language' AND `value`='br';";
|
||||
|
||||
$queries[] = "INSERT INTO `" . PSM_DB_PREFIX . "config` (`key`, `value`) VALUES ('version_update_check', '" . PSM_VERSION . "');";
|
||||
|
||||
$queries[] = "ALTER TABLE `" . PSM_DB_PREFIX . "log` CHANGE `log_id` `log_id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT;";
|
||||
$queries[] = "ALTER TABLE `" . PSM_DB_PREFIX . "log` CHANGE `server_id` `server_id` INT( 11 ) UNSIGNED NOT NULL;";
|
||||
|
||||
|
|
|
@ -102,6 +102,6 @@
|
|||
<!--%tpl_main_footer-->
|
||||
<footer class="footer">
|
||||
<p class="pull-right"><a href="#">{label_back_to_top}</a></p>
|
||||
<p><small>Powered by <a href="http://www.phpservermonitor.org/" target="_blank">PHP Server Monitor</a>.</small></p>
|
||||
<p><small>Powered by <a href="http://www.phpservermonitor.org/" target="_blank">PHP Server Monitor</a>.<br/>{update_available}</small></p>
|
||||
</footer>
|
||||
<!--%%tpl_main_footer-->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--%tpl_log_list-->
|
||||
<!--%tpl_server_log_list-->
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#log_status_content" data-toggle="tab">{label_status}</a></li>
|
||||
|
@ -17,9 +17,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--%%tpl_log_list-->
|
||||
<!--%%tpl_server_log_list-->
|
||||
|
||||
<!--%tpl_log_entries-->
|
||||
<!--%tpl_server_log_entries-->
|
||||
<!-- {logtitle} -->
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
|
@ -42,4 +42,4 @@
|
|||
{entries}
|
||||
</tbody>
|
||||
</table>
|
||||
<!--%%tpl_log_entries-->
|
||||
<!--%%tpl_server_log_entries-->
|
|
@ -1,4 +1,4 @@
|
|||
<!--%tpl_servers_list-->
|
||||
<!--%tpl_server_list-->
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -38,18 +38,18 @@
|
|||
{servers}
|
||||
</tbody>
|
||||
</table>
|
||||
<!--%%tpl_servers_list-->
|
||||
<!--%%tpl_server_list-->
|
||||
|
||||
<!--%tpl_servers_list_admin_actions-->
|
||||
<!--%tpl_server_list_admin_actions-->
|
||||
<a class="btn btn-small" href="index.php?mod=server&action=edit&id={server_id}" title="{label_edit}">
|
||||
<i class="icon-pencil"></i>
|
||||
</a>
|
||||
<a class="btn btn-small btn-danger" href="javascript:sm_delete('{server_id}', 'server');" title="{label_delete}">
|
||||
<i class="icon-remove icon-white"></i>
|
||||
</a>
|
||||
<!--%%tpl_servers_list_admin_actions-->
|
||||
<!--%%tpl_server_list_admin_actions-->
|
||||
|
||||
<!--%tpl_servers_update-->
|
||||
<!--%tpl_server_update-->
|
||||
<form class="form-horizontal well" action="index.php?mod=server&action=save&id={edit_server_id}" method="post">
|
||||
<fieldset>
|
||||
<legend>{titlemode}</legend>
|
||||
|
@ -125,4 +125,4 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<!--%%tpl_servers_update-->
|
||||
<!--%%tpl_server_update-->
|
|
@ -1,4 +1,4 @@
|
|||
<!--%tpl_status-->
|
||||
<!--%tpl_server_status-->
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: {bg};
|
||||
|
@ -73,4 +73,4 @@
|
|||
<!--%%tpl_repeat_servers_online-->
|
||||
{servers_online}
|
||||
</div>
|
||||
<!--%%tpl_status-->
|
||||
<!--%%tpl_server_status-->
|
|
@ -1,4 +1,4 @@
|
|||
<!--%tpl_login-->
|
||||
<!--%tpl_user_login-->
|
||||
<div class="container">
|
||||
<form class="form-signin" method="post">
|
||||
<h3 class="form-signin-heading">{title_sign_in}</h3>
|
||||
|
@ -12,9 +12,9 @@
|
|||
<a class="btn" href="?action=forgot">{label_password_forgot}</a>
|
||||
</form>
|
||||
</div>
|
||||
<!--%%tpl_login-->
|
||||
<!--%%tpl_user_login-->
|
||||
|
||||
<!--%tpl_login_forgot-->
|
||||
<!--%tpl_user_login_forgot-->
|
||||
<div class="container">
|
||||
<form class="form-signin" method="post">
|
||||
<h3 class="form-signin-heading">{title_forgot}</h3>
|
||||
|
@ -23,9 +23,9 @@
|
|||
<a class="btn" href="?">{label_go_back}</a>
|
||||
</form>
|
||||
</div>
|
||||
<!--%%tpl_login_forgot-->
|
||||
<!--%%tpl_user_login_forgot-->
|
||||
|
||||
<!--%tpl_login_reset-->
|
||||
<!--%tpl_user_login_reset-->
|
||||
<div class="container">
|
||||
<form class="form-signin" method="post">
|
||||
<h3 class="form-signin-heading">{title_reset}</h3>
|
||||
|
@ -36,4 +36,4 @@
|
|||
<a class="btn" href="?">{label_go_back}</a>
|
||||
</form>
|
||||
</div>
|
||||
<!--%%tpl_login_reset-->
|
||||
<!--%%tpl_user_login_reset-->
|
|
@ -1,4 +1,4 @@
|
|||
<!--%tpl_users_list-->
|
||||
<!--%tpl_user_list-->
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -33,9 +33,9 @@
|
|||
{users}
|
||||
</tbody>
|
||||
</table>
|
||||
<!--%%tpl_users_list-->
|
||||
<!--%%tpl_user_list-->
|
||||
|
||||
<!--%tpl_users_update-->
|
||||
<!--%tpl_user_update-->
|
||||
<form class="form-horizontal well" action="index.php?mod=user&action=save&id={edit_user_id}" method="post">
|
||||
<fieldset>
|
||||
<legend>{titlemode}</legend>
|
||||
|
@ -110,4 +110,4 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<!--%%tpl_users_update-->
|
||||
<!--%%tpl_user_update-->
|
Loading…
Reference in New Issue