//
// ------------------------------------------------------------------------- //
// Original Author: The Xoops Project
// Author Website : http://www.xoops.org
// License Type : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
$xoopsOption['pagetype'] = 'pmsg';
$xoopsOption['page_style'] = 8;
include_once('mainfile.php');
include_once(XOOPS_ROOT_PATH.'/class/xoopspm.php');
if (!$xoopsUser) {
$errormessage = _PM_SORRY.'
'._PM_PLZREG;
redirect_header('user.php', 2, $errormessage);
exit();
}
// ------------------------------------------------------------------------- //
if ( !empty($_POST['delete']) ) {
$pm = new XoopsPM(intval($_POST['msg_id']));
if ($pm->getVar('to_userid') == $xoopsUser->getVar('uid')) {
$pm->delete();
redirect_header('viewpmsg.php', 1, _PM_DELETED);
exit();
}
}
$start = !empty($_GET['start']) ? intval($_GET['start']) : 0;
$total_messages = !empty($_GET['total_messages']) ? intval($_GET['total_messages']) : 0;
$pm_arr =& XoopsPM::getAllPM(array("to_userid=".$xoopsUser->getVar("uid").""), true, "msg_time", "ASC", 1, $start);
if (!defined('EXOOPS_PM_INCLUDED')) {
define('EXOOPS_PM_INCLUDED', 1);
}
include_once('header.php');
OpenTable();
?>
">
»»
»»
setRead();
$allow_html = $bcoosConfig['allow_html'] ? 1 : 0;
$pm_arr[0]->setVar('allow_html', $allow_html);
$pm_arr[0]->setVar('allow_smileys', 1);
$pm_arr[0]->setVar('allow_bbcode', 1);
$subject_image = "
";
$subject = $pm_arr[0]->getVar("subject");
$text = $pm_arr[0]->getVar("msg_text");
$post_date = formatTimestamp($pm_arr[0]->getVar("msg_time"), 'm');
$message_id = $pm_arr[0]->getVar("msg_id");
$delete_image = "
";
$poster = new XoopsUser($pm_arr[0]->getVar("from_userid"));
if ($poster->isActive()) {
$userrank = $poster->rank();
if ( $userrank['image'] ) {
$rank_image = "
";
}
if ( $userrank['title'] ) {
$rank_title = $userrank['title'];
}
if ( $poster->getVar("user_avatar") != "" ) {
$avatar_image = "
";
}
if ( $poster->getVar("user_from") != "" ) {
$user_from = _PM_FROMC."".$poster->getVar("user_from");
}
if ( $poster->isOnline() ) {
$username = ''.$poster->getVar("uname").'';
} else
{
$username = ''.$poster->getVar("uname").'';
}
if ( $xoopsUser->isAdmin() || $poster->getVar("user_viewemail") == 1 ) {
$email_image = "
";
}
if ( $poster->getVar("url") != "" ) {
$www_image = "
";
}
if ( $poster->getVar("user_icq") != "" ) {
$icq_image = "
";
}
if ( $poster->getVar("user_aim") != "" ) {
$aim_image = "
";
}
if ( $poster->getVar("user_yim") != "" ) {
$yim_image = "
";
}
if ( $poster->getVar("user_msnm") != "" ) {
$msnm_image = "
";
}
$profile_image = "
";
$reply_image = "
";
$reg_date = _JOINED;
$reg_date .= formatTimestamp($poster->getVar("user_regdate"), "s");
$posts = _POSTS;
$posts .= $poster->getVar("posts");
$user_from = _FROM;
$user_from .= $poster->getVar("user_from");
$user_from .=": ";
if ( ($poster->getVar("attachsig") == 1) && ($poster->getVar("user_sig") != "") ) {
$text .= "
--
";
$text .= $myts->makeTareaData4Show($poster->getVar("user_sig", "N"), 0, 1, 1);
}
} else {
$username = $bcoosConfig['anonymous'];
}
showThread(
1,
$subject_image,
$subject,
$text,
$post_date,
$ip_image,
$reply_image,
$edit_image,
$delete_image,
$username,
$rank_title,
$rank_image,
$avatar_image,
$reg_date,
$posts,
$user_from,
$online_image,
$profile_image,
$pm_image,
$email_image,
$www_image,
$icq_image,
$aim_image,
$yim_image,
$msnm_image);
echo "
";
}
CloseTable();
include_once('footer.php');
?>