//
// ------------------------------------------------------------------------- //
// 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_messages']) ) {
$size = count($_POST['msg_id']);
if (empty($size)) {
redirect_header('viewpmsg.php', 1, _TAKINGBACK);
exit();
}
$msg = $_POST['msg_id'];
for ($i=0; $i<$size; $i++) {
$pm = new XoopsPM($msg[$i]);
if ($pm->getVar('to_userid') == $xoopsUser->getVar('uid')) {
$pm->delete();
}
}
redirect_header('viewpmsg.php', 1, _PM_DELETED);
exit();
}
if (!defined('EXOOPS_PM_INCLUDED')) {
define('EXOOPS_PM_INCLUDED', 1);
}
include_once('header.php');
$pm_arr =& XoopsPM::getAllPM(array("to_userid='".$xoopsUser->getVar("uid")."'"), true);
$total_messages = count($pm_arr);
$max_pms = intval($bcoosConfig['max_pms']);
if (!empty($total_messages)) {
$percent = empty($max_pms) ? 0 : round(($total_messages/$max_pms) * 100);
} else {
$percent = 0;
}
OpenTable();
?>
| : |
 |
">
»»
';
CloseTable();
include_once('footer.php');
?>