notify about new features

This commit is contained in:
Evgeny Gryaznov 2011-02-26 13:15:35 +01:00
parent 3ca088f197
commit 2dd0839f0d
6 changed files with 15 additions and 3 deletions

View File

@ -397,9 +397,9 @@ input.formauth {
border: 1px solid #4C96D4;
background-color: #E7F1F9;
padding: 8px 11px;
font-size: 11px;
font-size: 0.85em;
font-weight:bold;
width : 400px;
max-width: 700px;
margin: 0px 2px 10px;
color: #515151;
}

View File

@ -550,9 +550,11 @@ function date_to_text($unixtime) {
}
$dbversion = '1.6.3';
$featuresversion = '1.6.4';
$settings = array(
'dbversion' => 0,
'featuresversion' => 0,
'title' => 'Your Company',
'hosturl' => 'http://mibew.org',
'logo' => '',

View File

@ -182,6 +182,7 @@ install.kill_tables.notice=Impossible to update tables structure. Try to do it m
install.kill_tables=Drop existing tables from database
install.license=Software license agreement
install.message=Follow the wizard to setup your database.
install.newfeatures=Congratulations! You now have Mibew Messenger {1} installed. Turn on more features on <a href="{0}">Optional services</a> page.
install.next=Next step:
install.title=Installation
install.updatedb=Please, run <a href="{0}">Update wizard</a> to adjust your database.

View File

@ -36,6 +36,10 @@ $options = array(
'enablecaptcha');
loadsettings();
if($settings['featuresversion'] != $featuresversion) {
$settings['featuresversion'] = $featuresversion;
update_settings();
}
$params = array();
foreach($options as $opt) {
$params[$opt] = $settings[$opt];

View File

@ -30,6 +30,8 @@ $page = array(
'localeLinks' => get_locale_links("$webimroot/operator/index.php"),
'needUpdate' => $settings['dbversion'] != $dbversion,
'updateWizard' => "$webimroot/install/",
'newFeatures' => $settings['featuresversion'] != $featuresversion,
'featuresPage' => "$webimroot/operator/features.php",
);
prepare_menu($operator);

View File

@ -38,13 +38,16 @@ function menuseparator() {
if(($menuItemsCount%3) == 0) { echo "</tr><tr>"; }
}
function tpl_content() { global $page, $webimroot, $current_locale, $menuItemsCount;
function tpl_content() { global $page, $webimroot, $current_locale, $menuItemsCount, $version;
?>
<br/>
<?php if( $page['needUpdate'] ) { ?>
<div id="formmessage"><?php echo getlocal2("install.updatedb",array($page['updateWizard'])) ?></div>
<br/>
<?php } else if($page['newFeatures']) { ?>
<div><div id="formmessage"><?php echo getlocal2("install.newfeatures",array($page['featuresPage'], $version)) ?></div></div>
<br/>
<?php } ?>
<table id="dashboard">