show notification details

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@723 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2010-01-10 23:58:05 +00:00
parent 9f4db8d39d
commit b39c9a8d33
5 changed files with 136 additions and 1 deletions

View File

@ -230,6 +230,12 @@ menu.updates.content=Check for news and updates.
menu.updates=Updates
my_settings.error.password_match=Entered passwords do not match
no_such_operator=No such operator
notification.back_to_list=Back to the list
notification.intro=Contents of sent notification.
notification.label.subj=Subject
notification.label.time=Time
notification.label.to=To
notification.title=Notification details
notifications.head.msg=Text
notifications.head.subj=Subject
notifications.head.time=Time

View File

@ -230,6 +230,12 @@ menu.updates.content=
menu.updates=Îáíîâëåíèÿ
my_settings.error.password_match=Ââåäåííûå ïàðîëè äîëæíû ñîâïàäàòü
no_such_operator=Çàïðàøèâàåìàÿ ó÷åòíàÿ çàïèñü íå ñóùåñòâóåò
notification.back_to_list=Âåðíóòüñÿ ê ñïèñêó
notification.intro=Ñîäåðæàíèå îòïðàâëåííîãî óâåäîìëåíèÿ.
notification.label.subj=Òåìà
notification.label.time=Âðåìÿ îòïðàâêè
notification.label.to=Êîìó
notification.title=Äåòàëè óâåäîìëåíèÿ
notifications.head.msg=Òåêñò
notifications.head.subj=Òåìà
notifications.head.time=Âðåìÿ

View File

@ -0,0 +1,48 @@
<?php
/*
* This file is part of Mibew Messenger project.
*
* Copyright (c) 2005-2010 Mibew Messenger Community
* All rights reserved. The contents of this file are subject to the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and
* is available at http://www.eclipse.org/legal/epl-v10.html
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU General Public License Version 2 or later (the "GPL"), in which case
* the provisions of the GPL are applicable instead of those above. If you wish
* to allow use of your version of this file only under the terms of the GPL, and
* not to allow others to use your version of this file under the terms of the
* EPL, indicate your decision by deleting the provisions above and replace them
* with the notice and other provisions required by the GPL.
*
* Contributors:
* Evgeny Gryaznov - initial API and implementation
*/
require_once('../libs/common.php');
require_once('../libs/operator.php');
require_once('../libs/chat.php');
$operator = check_login();
$page = array();
setlocale(LC_TIME, getstring("time.locale"));
function notification_info($id) {
$link = connect();
$notification = select_one_row(db_build_select(
"id, locale, vckind, vcto, unix_timestamp(dtmcreated) as created, vcsubject, tmessage, refoperator", "chatnotification",
array("id = $id"), ""), $link);
mysql_close($link);
return $notification;
}
$notificationid = verifyparam( "id", "/^(\d{1,9})$/");
$page['notification'] = notification_info($notificationid);
prepare_menu($operator, false);
start_html_output();
require('../view/notification.php');
?>

View File

@ -0,0 +1,75 @@
<?php
/*
* This file is part of Mibew Messenger project.
*
* Copyright (c) 2005-2010 Mibew Messenger Community
* All rights reserved. The contents of this file are subject to the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and
* is available at http://www.eclipse.org/legal/epl-v10.html
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU General Public License Version 2 or later (the "GPL"), in which case
* the provisions of the GPL are applicable instead of those above. If you wish
* to allow use of your version of this file only under the terms of the GPL, and
* not to allow others to use your version of this file under the terms of the
* EPL, indicate your decision by deleting the provisions above and replace them
* with the notice and other provisions required by the GPL.
*
* Contributors:
* Evgeny Gryaznov - initial API and implementation
*/
$page['title'] = getlocal("notification.title");
function tpl_content() { global $page, $webimroot, $errors;
$notification = $page['notification'];
?>
<?php echo getlocal("notification.intro") ?>
<br/><br/>
<div class="logpane">
<div class="header">
<div class="wlabel">
<?php echo getlocal("notification.label.to") ?>:
</div>
<div class="wvalue">
<?php echo topage(htmlspecialchars($notification['vcto'])) ?>
</div>
<br clear="all"/>
<div class="wlabel">
<?php echo getlocal("notification.label.time") ?>:
</div>
<div class="wvalue">
<?php echo date_to_text($notification['created']) ?>
</div>
<br clear="all"/>
<div class="wlabel">
<?php echo getlocal("notification.label.subj") ?>:
</div>
<div class="wvalue">
<?php echo topage(htmlspecialchars($notification['vcsubject'])) ?>
</div>
<br clear="all"/>
</div>
<div class="message">
<?php echo topage(prepare_html_message(htmlspecialchars($notification['tmessage']))) ?>
</div>
</div>
<br />
<a href="<?php echo $webimroot ?>/operator/notifications.php">
<?php echo getlocal("notification.back_to_list") ?></a>
<br />
<?php
} /* content */
require_once('inc_main.php');
?>

View File

@ -93,7 +93,7 @@ if( $page['pagination.items'] ) {
foreach( $page['pagination.items'] as $b ) { ?>
<tr>
<td class="notlast">
<a href="#" class="<?php echo $b['vckind'] == 'xmpp' ? 'xmpp' : 'mail' ?>">
<a href="<?php echo $webimroot ?>/operator/notification.php?id=<?php echo $b['id'] ?>" target="_blank" onclick="this.newWindow = window.open('<?php echo $webimroot ?>/operator/notification.php?id=<?php echo $b['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;" class="<?php echo $b['vckind'] == 'xmpp' ? 'xmpp' : 'mail' ?>">
<?php echo htmlspecialchars(shorten(topage($b['vcto']),30)) ?>
</a>
</td>