Commit 3b8c8aca authored by changi67's avatar changi67

[FIX] Indent, this time it is :) + a little bit of copyright

parent cd825773
<?php
// $Id: /cvsroot/tikiwiki/tiki/messu-archive.php,v 1.7 2007-10-12 07:55:23 nyloth Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/messu-archive.php,v 1.7 2007-10-12 07:55:23 nyloth Exp $
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
if ($tiki_p_messages != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$maxRecords = $messulib->get_user_preference($user, 'maxRecords', 20);
// Delete messages if the delete button was pressed
if (isset($_REQUEST["delete"]) && isset($_REQUEST["msg"])) {
check_ticket('messu-archive');
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$messulib->delete_message($user, $msg, 'archive');
}
check_ticket('messu-archive');
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$messulib->delete_message($user, $msg, 'archive');
}
}
// Download messages if the download button was pressed
if (isset($_REQUEST["download"])) {
check_ticket('messu-archive');
// if message ids are handed over, use them:
if (isset($_REQUEST["msg"])) {
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$tmp = $messulib->get_message($user, $msg, 'archive');
$items[] = $tmp;
}
} else {
$items = $messulib->get_messages($user, 'archive', '', '', '');
}
$smarty->assign_by_ref('items', $items);
header("Content-Disposition: attachment; filename=tiki-msg-archive-" . time("U") . ".txt ");
$smarty->display('messu-download.tpl', null, null, 'application/download');
die;
check_ticket('messu-archive');
// if message ids are handed over, use them:
if (isset($_REQUEST["msg"])) {
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$tmp = $messulib->get_message($user, $msg, 'archive');
$items[] = $tmp;
}
} else {
$items = $messulib->get_messages($user, 'archive', '', '', '');
}
$smarty->assign_by_ref('items', $items);
header("Content-Disposition: attachment; filename=tiki-msg-archive-" . time("U") . ".txt ");
$smarty->display('messu-download.tpl', null, null, 'application/download');
die;
}
if (isset($_REQUEST['filter'])) {
if ($_REQUEST['flags'] != '') {
$parts = explode('_', $_REQUEST['flags']);
$_REQUEST['flag'] = $parts[0];
$_REQUEST['flagval'] = $parts[1];
}
if ($_REQUEST['flags'] != '') {
$parts = explode('_', $_REQUEST['flags']);
$_REQUEST['flag'] = $parts[0];
$_REQUEST['flagval'] = $parts[1];
}
}
if (!isset($_REQUEST["priority"])) $_REQUEST["priority"] = '';
if (!isset($_REQUEST["flag"])) $_REQUEST["flag"] = '';
if (!isset($_REQUEST["flagval"])) $_REQUEST["flagval"] = '';
if (!isset($_REQUEST["sort_mode"])) {
$sort_mode = 'date_desc';
$sort_mode = 'date_desc';
} else {
$sort_mode = $_REQUEST["sort_mode"];
$sort_mode = $_REQUEST["sort_mode"];
}
if (!isset($_REQUEST["offset"])) {
$offset = 0;
$offset = 0;
} else {
$offset = $_REQUEST["offset"];
$offset = $_REQUEST["offset"];
}
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
$find = $_REQUEST["find"];
} else {
$find = '';
$find = '';
}
$smarty->assign_by_ref('flag', $_REQUEST['flag']);
$smarty->assign_by_ref('priority', $_REQUEST['priority']);
......@@ -95,14 +96,14 @@ $smarty->assign_by_ref('items', $items["data"]);
$cellsize = 200;
$percentage = 1;
if ($prefs['messu_archive_size'] > 0) {
$current_number = $messulib->count_messages($user, 'archive');
$smarty->assign('messu_archive_number', $current_number);
$smarty->assign('messu_archive_size', $prefs['messu_archive_size']);
$percentage = ($current_number / $prefs['messu_archive_size']) * 100;
$cellsize = round($percentage / 100 * 200);
if ($current_number > $prefs['messu_archive_size']) $cellsize = 200;
if ($cellsize < 1) $cellsize = 1;
$percentage = round($percentage);
$current_number = $messulib->count_messages($user, 'archive');
$smarty->assign('messu_archive_number', $current_number);
$smarty->assign('messu_archive_size', $prefs['messu_archive_size']);
$percentage = ($current_number / $prefs['messu_archive_size']) * 100;
$cellsize = round($percentage / 100 * 200);
if ($current_number > $prefs['messu_archive_size']) $cellsize = 200;
if ($cellsize < 1) $cellsize = 1;
$percentage = round($percentage);
}
$smarty->assign('cellsize', $cellsize);
$smarty->assign('percentage', $percentage);
......
<?php
// $Id: /cvsroot/tikiwiki/tiki/messu-broadcast.php,v 1.30.2.1 2007-11-22 17:09:02 sylvieg Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/messu-broadcast.php,v 1.30.2.1 2007-11-22 17:09:02 sylvieg Exp $
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
if ($tiki_p_broadcast != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
if (!isset($_REQUEST['to'])) $_REQUEST['to'] = '';
if (!isset($_REQUEST['cc'])) $_REQUEST['cc'] = '';
......@@ -49,67 +50,67 @@ $smarty->assign('replyto_hash', $_REQUEST['replyto_hash']);
$smarty->assign('mid', 'messu-broadcast.tpl');
$smarty->assign('sent', 0);
if (isset($_REQUEST['group'])) {
if ($_REQUEST['group'] == 'all' && $tiki_p_broadcast_all == 'y') {
$a_all_users = $userlib->get_users(0, -1, 'login_desc', '');
$all_users = array();
foreach($a_all_users['data'] as $a_user) {
$all_users[] = $a_user['user'];
}
} else {
$all_users = $userlib->get_group_users($_REQUEST['group']);
}
if ($_REQUEST['group'] == 'all' && $tiki_p_broadcast_all == 'y') {
$a_all_users = $userlib->get_users(0, -1, 'login_desc', '');
$all_users = array();
foreach($a_all_users['data'] as $a_user) {
$all_users[] = $a_user['user'];
}
} else {
$all_users = $userlib->get_group_users($_REQUEST['group']);
}
}
if (isset($_REQUEST['send'])) {
check_ticket('messu-broadcast');
$message = '';
// Validation:
// must have a subject or body non-empty (or both)
if (empty($_REQUEST['subject']) && empty($_REQUEST['body'])) {
$smarty->assign('message', tra('ERROR: Either the subject or body must be non-empty'));
$smarty->display("tiki.tpl");
die;
}
// Remove invalid users from the to, cc and bcc fields
$users = array();
foreach($all_users as $a_user) {
if (!empty($a_user)) {
if ($userlib->user_exists($a_user)) {
if ($tikilib->get_user_preference($a_user, 'allowMsgs', 'y')) {
$users[] = $a_user;
} else {
// TODO: needs translation as soon as there is a solution for strings with embedded variables
$message.= "User $a_user can not receive messages<br />";
}
} else {
$message.= tra("Invalid user") . "$a_user<br />";
}
}
}
$users = array_unique($users);
// Validation: either to, cc or bcc must have a valid user
if (count($users) > 0) {
$message.= tra("Message sent to") . ': ' . implode(',', $users) . "<br />";
} else {
$message = tra('ERROR: No valid users to send the message');
$smarty->assign('message', $message);
$smarty->display("tiki.tpl");
die;
}
$smarty->assign('sent', 1);
// Insert the message in the inboxes of each user
foreach($users as $a_user) {
$messulib->post_message($a_user, $user, $a_user, '', $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority']);
// if this is a reply flag the original messages replied to
if ($_REQUEST['replyto_hash'] <> '') {
$messulib->mark_replied($a_user, $_REQUEST['replyto_hash']);
}
}
// Insert a copy of the message in the sent box of the sender
$messulib->save_sent_message($user, $user, $_REQUEST['to'], $_REQUEST['cc'], $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority'], $_REQUEST['replyto_hash']);
$smarty->assign('message', $message);
if ($prefs['feature_actionlog'] == 'y') {
$logslib->add_action('Posted', '', 'message', 'add=' . strlen($_REQUEST['body']));
}
check_ticket('messu-broadcast');
$message = '';
// Validation:
// must have a subject or body non-empty (or both)
if (empty($_REQUEST['subject']) && empty($_REQUEST['body'])) {
$smarty->assign('message', tra('ERROR: Either the subject or body must be non-empty'));
$smarty->display("tiki.tpl");
die;
}
// Remove invalid users from the to, cc and bcc fields
$users = array();
foreach($all_users as $a_user) {
if (!empty($a_user)) {
if ($userlib->user_exists($a_user)) {
if ($tikilib->get_user_preference($a_user, 'allowMsgs', 'y')) {
$users[] = $a_user;
} else {
// TODO: needs translation as soon as there is a solution for strings with embedded variables
$message.= "User $a_user can not receive messages<br />";
}
} else {
$message.= tra("Invalid user") . "$a_user<br />";
}
}
}
$users = array_unique($users);
// Validation: either to, cc or bcc must have a valid user
if (count($users) > 0) {
$message.= tra("Message sent to") . ': ' . implode(',', $users) . "<br />";
} else {
$message = tra('ERROR: No valid users to send the message');
$smarty->assign('message', $message);
$smarty->display("tiki.tpl");
die;
}
$smarty->assign('sent', 1);
// Insert the message in the inboxes of each user
foreach($users as $a_user) {
$messulib->post_message($a_user, $user, $a_user, '', $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority']);
// if this is a reply flag the original messages replied to
if ($_REQUEST['replyto_hash'] <> '') {
$messulib->mark_replied($a_user, $_REQUEST['replyto_hash']);
}
}
// Insert a copy of the message in the sent box of the sender
$messulib->save_sent_message($user, $user, $_REQUEST['to'], $_REQUEST['cc'], $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority'], $_REQUEST['replyto_hash']);
$smarty->assign('message', $message);
if ($prefs['feature_actionlog'] == 'y') {
$logslib->add_action('Posted', '', 'message', 'add=' . strlen($_REQUEST['body']));
}
}
ask_ticket('messu-broadcast');
$groups = $userlib->list_all_groups();
......
This diff is collapsed.
<?php
// $Id: /cvsroot/tikiwiki/tiki/messu-mailbox.php,v 1.26 2007-10-15 07:43:28 sept_7 Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/messu-mailbox.php,v 1.26 2007-10-15 07:43:28 sept_7 Exp $
$section = 'user_messages';
require_once ('tiki-setup.php');
if ($prefs['feature_ajax'] == "y") {
require_once ('lib/ajax/ajaxlib.php');
require_once ('lib/ajax/ajaxlib.php');
}
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->assign('errortype', '402');
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->assign('errortype', '402');
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
}
if ($tiki_p_messages != 'y') {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("Permission denied"));
$smarty->display("error.tpl");
die;
}
$maxRecords = $messulib->get_user_preference($user, 'mess_maxRecords', 20);
// auto-archiving of read mails?
$mess_archiveAfter = $messulib->get_user_preference($user, 'mess_archiveAfter', 0);
$smarty->assign_by_ref('mess_archiveAfter', $mess_archiveAfter);
if ($mess_archiveAfter > 0) {
// get date of last check. if not set yet, set it to 'before 10 minutes'
$mess_archiveLast = $messulib->get_user_preference($user, 'mess_archiveLast', $tikilib->now - 600);
// only run auto-archive job every 10 minutes:
if ($tikilib->now - $mess_archiveLast >= 600) {
$messulib->set_user_preference($user, 'mess_archiveLast', $tikilib->now);
$messulib->archive_messages($user, $mess_archiveAfter);
}
// get date of last check. if not set yet, set it to 'before 10 minutes'
$mess_archiveLast = $messulib->get_user_preference($user, 'mess_archiveLast', $tikilib->now - 600);
// only run auto-archive job every 10 minutes:
if ($tikilib->now - $mess_archiveLast >= 600) {
$messulib->set_user_preference($user, 'mess_archiveLast', $tikilib->now);
$messulib->archive_messages($user, $mess_archiveAfter);
}
}
// Mark messages if the mark button was pressed
if (isset($_REQUEST["mark"]) && isset($_REQUEST["msg"])) {
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$parts = explode('_', $_REQUEST['action']);
$messulib->flag_message($user, $msg, $parts[0], $parts[1]);
}
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$parts = explode('_', $_REQUEST['action']);
$messulib->flag_message($user, $msg, $parts[0], $parts[1]);
}
}
// Delete messages if the delete button was pressed
if (isset($_REQUEST["delete"]) && isset($_REQUEST["msg"])) {
check_ticket('messu-mailbox');
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$messulib->delete_message($user, $msg);
}
check_ticket('messu-mailbox');
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$messulib->delete_message($user, $msg);
}
}
// Archive messages if the archive button was pressed
if (isset($_REQUEST["archive"]) && isset($_REQUEST["msg"])) {
check_ticket('messu-mailbox');
$tmp = $messulib->count_messages($user, 'archive');
foreach(array_keys($_REQUEST["msg"]) as $msg) {
if (($prefs['messu_archive_size'] > 0) && ($tmp >= $prefs['messu_archive_size'])) {
$smarty->assign('msg', tra("Archive is full. Delete some messages from archive first."));
$smarty->display("error.tpl");
die;
}
$messulib->archive_message($user, $msg);
$tmp++;
}
check_ticket('messu-mailbox');
$tmp = $messulib->count_messages($user, 'archive');
foreach(array_keys($_REQUEST["msg"]) as $msg) {
if (($prefs['messu_archive_size'] > 0) && ($tmp >= $prefs['messu_archive_size'])) {
$smarty->assign('msg', tra("Archive is full. Delete some messages from archive first."));
$smarty->display("error.tpl");
die;
}
$messulib->archive_message($user, $msg);
$tmp++;
}
}
// Download messages if the download button was pressed
if (isset($_REQUEST["download"])) {
check_ticket('messu-mailbox');
// if message ids are handed over, use them:
if (isset($_REQUEST["msg"])) {
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$tmp = $messulib->get_message($user, $msg, 'messages');
$items[] = $tmp;
}
} else {
$items = $messulib->get_messages($user, 'messages', '', '', '');
}
$smarty->assign_by_ref('items', $items);
header("Content-Disposition: attachment; filename=tiki-msg-mailbox-" . time("U") . ".txt ");
$smarty->display('messu-download.tpl', null, null, 'application/download');
die;
check_ticket('messu-mailbox');
// if message ids are handed over, use them:
if (isset($_REQUEST["msg"])) {
foreach(array_keys($_REQUEST["msg"]) as $msg) {
$tmp = $messulib->get_message($user, $msg, 'messages');
$items[] = $tmp;
}
} else {
$items = $messulib->get_messages($user, 'messages', '', '', '');
}
$smarty->assign_by_ref('items', $items);
header("Content-Disposition: attachment; filename=tiki-msg-mailbox-" . time("U") . ".txt ");
$smarty->display('messu-download.tpl', null, null, 'application/download');
die;
}
if (isset($_REQUEST['filter'])) {
if ($_REQUEST['flags'] != '') {
$parts = explode('_', $_REQUEST['flags']);
$_REQUEST['flag'] = $parts[0];
$_REQUEST['flagval'] = $parts[1];
}
if ($_REQUEST['flags'] != '') {
$parts = explode('_', $_REQUEST['flags']);
$_REQUEST['flag'] = $parts[0];
$_REQUEST['flagval'] = $parts[1];
}
}
$orig_or_reply = "r";
if (!isset($_REQUEST["replyto"])) $_REQUEST["replyto"] = '';
if (isset($_REQUEST["origto"])) {
$_REQUEST["replyto"] = $_REQUEST["origto"];
$orig_or_reply = "o";
$_REQUEST["replyto"] = $_REQUEST["origto"];
$orig_or_reply = "o";
}
if (!isset($_REQUEST["priority"])) $_REQUEST["priority"] = '';
if (!isset($_REQUEST["flag"])) $_REQUEST["flag"] = '';
if (!isset($_REQUEST["flagval"])) $_REQUEST["flagval"] = '';
if (!isset($_REQUEST["sort_mode"])) {
$sort_mode = 'date_desc';
$sort_mode = 'date_desc';
} else {
$sort_mode = $_REQUEST["sort_mode"];
$sort_mode = $_REQUEST["sort_mode"];
}
if (!isset($_REQUEST["offset"])) {
$offset = 0;
$offset = 0;
} else {
$offset = $_REQUEST["offset"];
$offset = $_REQUEST["offset"];
}
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
$find = $_REQUEST["find"];
} else {
$find = '';
$find = '';
}
$smarty->assign_by_ref('flag', $_REQUEST['flag']);
$smarty->assign_by_ref('priority', $_REQUEST['priority']);
......@@ -138,14 +139,14 @@ $smarty->assign_by_ref('items', $items["data"]);
$cellsize = 200;
$percentage = 1;
if ($prefs['messu_mailbox_size'] > 0) {
$current_number = $messulib->count_messages($user);
$smarty->assign('messu_mailbox_number', $current_number);
$smarty->assign('messu_mailbox_size', $prefs['messu_mailbox_size']);
$percentage = ($current_number / $prefs['messu_mailbox_size']) * 100;
$cellsize = round($percentage / 100 * 200);
if ($current_number > $prefs['messu_mailbox_size']) $cellsize = 200;
if ($cellsize < 1) $cellsize = 1;
$percentage = round($percentage);
$current_number = $messulib->count_messages($user);
$smarty->assign('messu_mailbox_number', $current_number);
$smarty->assign('messu_mailbox_size', $prefs['messu_mailbox_size']);
$percentage = ($current_number / $prefs['messu_mailbox_size']) * 100;
$cellsize = round($percentage / 100 * 200);
if ($current_number > $prefs['messu_mailbox_size']) $cellsize = 200;
if ($cellsize < 1) $cellsize = 1;
$percentage = round($percentage);
}
$smarty->assign('cellsize', $cellsize);
$smarty->assign('percentage', $percentage);
......@@ -153,14 +154,14 @@ include_once ('tiki-section_options.php');
include_once ('tiki-mytiki_shared.php');
ask_ticket('messu-mailbox');
if ($prefs['feature_ajax'] == "y") {
function user_messages_ajax() {
global $ajaxlib, $xajax;
$ajaxlib->registerTemplate("messu-mailbox.tpl");
$ajaxlib->registerFunction("loadComponent");
$ajaxlib->processRequests();
}
user_messages_ajax();
$smarty->assign("mootab", 'y');
function user_messages_ajax() {
global $ajaxlib, $xajax;
$ajaxlib->registerTemplate("messu-mailbox.tpl");
$ajaxlib->registerFunction("loadComponent");
$ajaxlib->processRequests();
}
user_messages_ajax();
$smarty->assign("mootab", 'y');
}
$smarty->assign('mid', 'messu-mailbox.tpl');
$smarty->display("tiki.tpl");
<?php
// $Id: /cvsroot/tikiwiki/tiki/messu-read.php,v 1.26 2007-10-12 07:55:23 nyloth Exp $
// Copyright (c) 2002-2007, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// (c) Copyright 2002-2009 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/messu-read.php,v 1.26 2007-10-12 07:55:23 nyloth Exp $
$section = 'user_messages';
require_once ('tiki-setup.php');
include_once ('lib/messu/messulib.php');
if (!$user) {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("You are not logged in"));
$smarty->display("error.tpl");
die;
}
}
if ($prefs['feature_messages'] != 'y') {
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");
$smarty->display("error.tpl");
die;
}
if ($prefs['feature_redirect_on_error'] == 'y') {
header('location: ' . $prefs['tikiIndex']);
die;
} else {
$smarty->assign('msg', tra("This feature is disabled") . ": feature_messages");