* move the notify link to common model.

This commit is contained in:
wangchunsheng
2013-01-17 07:10:46 +00:00
parent 9e468efa69
commit 55fed43318
2 changed files with 21 additions and 3 deletions

View File

@@ -429,6 +429,24 @@ class commonModel extends model
}
}
/**
* Print the link for notify file.
*
* @static
* @access public
* @return void
*/
public static function printNotifyLink()
{
if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false)
{
global $app, $lang;
$notifyFile = $app->getBasePath() . 'www/data/notify/notify.zip';
if(!file_exists($notifyFile)) return false;
echo html::a(helper::createLink('misc', 'downNotify'), $lang->downNotify);
}
}
/**
* Diff two string. (see phpt)

View File

@@ -1,8 +1,8 @@
</div>
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='<?php $config->debug ? print("debugwin") : print('hidden')?>'></iframe>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='<?php echo zget($config, 'debug', 'hidden', 'debugwin');?>'></iframe>
<div id='divider'></div>
<?php $onlybody = isset($_GET['onlybody']) ? $_GET['onlybody'] : 'no';?>
<?php $onlybody = zget($_GET, 'onlybody', 'no');?>
<?php if($onlybody != 'yes'):?>
</div>
<div id='footer'>
@@ -12,7 +12,7 @@
<td class='a-right' id='poweredby'>
<span>Powered by <a href='http://www.zentao.net' target='_blank'>ZenTaoPMS</a> (<?php echo $config->version;?>)</span>
<?php echo $lang->proVersion;?>
<?php if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false) echo html::a($this->createLink('misc', 'downNotify'), $lang->downNotify);?>
<?php commonModel::printNotifyLink();?>
</td>
</tr>
</table>