Exemple #1
0
$msg_id = XoopsRequest::getInt('msg_id', 0, 'GET');
if (empty($_GET['refresh']) && $op !== 'submit') {
    $jump = 'pmlite.php?refresh=' . time() . '';
    if ($send == 1) {
        $jump .= '&send=' . $send . '';
    } elseif ($send2 == 1) {
        $jump .= '&send2=' . $send2 . '&to_userid=' . $to_userid . '';
    } elseif ($reply == 1) {
        $jump .= '&reply=' . $reply . '&msg_id=' . $msg_id . '';
    } else {
    }
    echo "<html><head><meta http-equiv='Refresh' content='0; url=" . $jump . "' /></head><body></body></html>";
    exit;
}
xoops_header();
$method = XoopsRequest::getMethod();
$safeMethods = array('GET', 'HEAD');
if (!in_array($method, $safeMethods)) {
    if (!$GLOBALS['xoopsSecurity']->check()) {
        echo '<br><br><div><h4>' . _ERRORS . '</h4><br>';
        echo "[ <a href='javascript:history.go(-1)' title=''>" . _PM_GOBACK . '</a> ]</div>';
        xoops_footer();
        exit;
    }
}
if (is_object($xoopsUser)) {
    $myts = MyTextSanitizer::getInstance();
    if ($op === 'submit') {
        $res = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('users') . ' WHERE uid=' . XoopsRequest::getInt('to_userid', 0, 'POST') . '');
        list($count) = $xoopsDB->fetchRow($res);
        if ($count != 1) {