notify about new features

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@719 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2010-01-09 22:01:19 +00:00
parent d98d0e04d8
commit ecfe7ebfc4
6 changed files with 15 additions and 3 deletions

View File

@ -405,9 +405,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

@ -559,9 +559,11 @@ function webim_mail($toaddr, $reply_to, $subject, $body) {
}
$dbversion = '1.6.3';
$featuresversion = '1.6.4';
$settings = array(
'dbversion' => 0,
'featuresversion' => 0,
'title' => 'Your Company',
'hosturl' => 'http://mibew.org',
'logo' => '',

View File

@ -185,6 +185,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">