function message_to_html($msg) { global $kind_to_string, $kind_avatar; if ($msg['ikind'] == $kind_avatar) { return ""; } $message = "<span>" . date("H:i:s", $msg['created']) . "</span> "; $kind = $kind_to_string[$msg['ikind']]; if ($msg['tname']) { $message .= "<span class='n{$kind}'>" . htmlspecialchars($msg['tname']) . "</span>: "; } $message .= "<span class='m{$kind}'>" . prepare_html_message($msg['tmessage']) . "</span><br/>"; return $message; }
function tpl_content() { global $page, $mibewroot, $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(safe_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(safe_htmlspecialchars($notification['vcsubject'])); ?> </div> <br clear="all"/> </div> <div class="message"> <?php echo topage(prepare_html_message($notification['tmessage'])); ?> </div> </div> <br /> <a href="<?php echo $mibewroot; ?> /operator/notifications.php"> <?php echo getlocal("notification.back_to_list"); ?> </a> <br /> <?php }