Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1167

Přidáno uživatelem Ondřej Fibich před asi 13 roky(ů)

Upravy:

- pocet novych zprav preveden z view main do preprocesoru

Opravy:

- zasilani spravne hlavicky u e404

Zobrazit rozdíly:

freenetis/branches/testing/application/hooks/err404.php
*
*/
/**
* Triggers E404 error
*/
function e404()
{
// call function site_lang from another same-name hook, important for right locale
site_lang();
// send error header
@header("HTTP/1.0 404 Not Found");
// call function site_lang from another same-name hook, important for right locale
site_lang();
$controller = new Errors_Controller();
$controller->e404();
die();
$controller = new Errors_Controller();
$controller->e404();
die();
}
Event::replace('system.404', array('Kohana', 'show_404'), 'e404');
freenetis/branches/testing/application/libraries/MY_Controller.php
// boolean variable if user has active voip number (for menu rendering)
$this->user_has_voip = (bool) ORM::factory('voip_sip')
->has_voip_sips($this->user_id);
// count of unread mail messages of user
$this->unread_user_mails = ORM::factory('mail_message')
->count_all_unread_inbox_messages_by_user_id($this->user_id);
// ip address span
$this->ip_address_span = server::remote_addr();
......
/**
* Function to update paths
*
* @author Michal Kliment
*/
private function update_paths()
freenetis/branches/testing/application/views/main.php
</head>
<body<?php echo (isset($body_extra) ? ' '.$body_extra : '') ?>>
<?php if (!$this->popup): ?>
<div id="main">
<div id="main"><?php echo $_SERVER['HTTP_REFERER'] ?><br><br><br><br>
<div id="header">
<h1 id="logo"><span>Free<em>Net</em>IS</span></h1>
<div class="separator1"></div>
......
<span><?php echo $this->session->get('user_id', 0) ? __('Logged user') : __('Unlogged user') ?></span>&nbsp;
<a href="<?php echo url_lang::base() ?>languages/change" title="<?php echo __('Change language') ?>" class="change_language_link"><img src="<?php echo url::base() ?>media/images/flags/<?php echo Config::get('lang') ?>.jpg" alt="print icon" alt="<?php echo __('Change language') ?>" class="change_language_link"/></a> |
<?php
if ($this->session->get('user_id', 0))
{
$mail_message_model = new Mail_message_Model();
$unread_mails = $mail_message_model->count_all_unread_inbox_messages_by_user_id($this->session->get('user_id', 0));
$src = (!$unread_mails) ? url::base().'media/images/inbox.png' : url::base().'media/images/inbox_warning.png';
$title = ($unread_mails) ? __('Mail inbox').' ('.$unread_mails.')' : __('Mail inbox');
echo html::anchor(url_lang::base().'mail/inbox',html::image(array('src' => $src, 'alt' => $title, 'title' => $title))).' | ';
$title = __('Mail inbox');
if ($this->unread_user_mails)
{
$title .= ' ('.$this->unread_user_mails.')';
}
$src = (!$this->unread_user_mails) ?
url::base().'media/images/inbox.png' :
url::base().'media/images/inbox_warning.png';
echo html::anchor(
url_lang::base().'mail/inbox', html::image(array
(
'src' => $src,
'alt' => $title,
'title' => $title
))
) . ' | ';
}
?>
<a href="javascript: window.print();"><img src="<?php echo url::base() ?>media/images/print.png" alt="print icon" /></a>
<?php
if ($this->session->get('user_id', 0))
/* if ($this->session->get('user_id', 0))
{
$model_sms_message = new Sms_message_Model();
// @todo unuset get - replace by count
$unread_sms = count($model_sms_message->get_unread_messages());
if ($unread_sms)
echo html::anchor(url_lang::base().'sms/show_unread', ($unread_sms != 0 )?'<b class="orange" >SMS('.$unread_sms.')</b>':'SMS()', array('class' => 'orange', 'style' => 'margin-left: 20px;text-decoration: none;', 'title' => __('Show unread messages')));
}
}*/
?>
<table>
<tr>

Také k dispozici: Unified diff