Example #1
0
 * @package             core
 * @since               2.0.0
 */
include __DIR__ . '/mainfile.php';
$xoopsPreload = XoopsPreload::getInstance();
$xoopsPreload->triggerEvent('core.pmlite.start');
xoops_loadLanguage('pmsg');
XoopsLoad::load('XoopsRequest');
include $GLOBALS['xoops']->path('class/xoopsformloader.php');
$icon = '';
$icons_radio = new XoopsFormRadio(_MESSAGEICON, 'icon', $icon);
$subject_icons = XoopsLists::getSubjectsList();
$op = XoopsRequest::getCmd('op', '', 'POST');
$reply = XoopsRequest::getBool('reply', 0, 'GET');
$send = XoopsRequest::getBool('send', 0, 'GET');
$send2 = XoopsRequest::getBool('send2', 0, 'GET');
$to_userid = XoopsRequest::getInt('to_userid', 0, 'GET');
$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;
}
Example #2
0
        $edituser->setVar('user_sig', xoops_substr(XoopsRequest::getString('user_sig', ''), 0, 255));
        $edituser->setVar('user_viewemail', XoopsRequest::getBool('user_viewemail', 0));
        $edituser->setVar('user_aim', XoopsRequest::getString('user_aim', ''));
        $edituser->setVar('user_yim', XoopsRequest::getString('user_yim', ''));
        $edituser->setVar('user_msnm', XoopsRequest::getString('user_msnm', ''));
        $edituser->setVar('attachsig', XoopsRequest::getBool('attachsig', 0));
        $edituser->setVar('timezone_offset', XoopsRequest::getFloat('timezone_offset', 0.0));
        $edituser->setVar('uorder', XoopsRequest::getInt('uorder', 0));
        $edituser->setVar('umode', XoopsRequest::getString('umode', 'flat'));
        $edituser->setVar('notify_method', XoopsRequest::getInt('notify_method', 1));
        $edituser->setVar('notify_mode', XoopsRequest::getInt('notify_mode', 1));
        $edituser->setVar('bio', substr(XoopsRequest::getString('bio', ''), 0, 255));
        $edituser->setVar('user_occ', XoopsRequest::getString('user_occ', ''));
        $edituser->setVar('user_intrest', XoopsRequest::getString('user_intrest', ''));
        $edituser->setVar('user_mailok', XoopsRequest::getBool('user_mailok', 0));
        if (XoopsRequest::getBool('usecookie')) {
            setcookie($xoopsConfig['usercookie'], $xoopsUser->getVar('uname'), time() + 31536000, '/', XOOPS_COOKIE_DOMAIN);
        } else {
            setcookie($xoopsConfig['usercookie']);
        }
        if (!$member_handler->insertUser($edituser)) {
            include $GLOBALS['xoops']->path('header.php');
            echo $edituser->getHtmlErrors();
            include $GLOBALS['xoops']->path('footer.php');
        } else {
            redirect_header('userinfo.php?uid=' . $uid, 1, _US_PROFUPDATED);
        }
        exit;
    }
}
if ($op === 'editprofile') {
Example #3
0
        echo '<br><br><div><h4>' . _PM_USERNOEXIST . '<br>';
        echo _PM_PLZTRYAGAIN . '</h4><br>';
        echo "[ <a href='javascript:history.go(-1)'>" . _PM_GOBACK . '</a> ]</div>';
    } elseif ($GLOBALS['xoopsSecurity']->check()) {
        $pm_handler = xoops_getModuleHandler('message', 'pm');
        $pm = $pm_handler->create();
        $pm->setVar('msg_time', time());
        $msg_image = XoopsRequest::getCmd('icon', null, 'POST');
        if (in_array($msg_image, $subject_icons)) {
            $pm->setVar('msg_image', $msg_image);
        }
        $pm->setVar('subject', XoopsRequest::getString('subject', null, 'POST'));
        $pm->setVar('msg_text', XoopsRequest::getString('message', null, 'POST'));
        $pm->setVar('to_userid', XoopsRequest::getInt('to_userid', 0, 'POST'));
        $pm->setVar('from_userid', $GLOBALS['xoopsUser']->getVar('uid'));
        if (XoopsRequest::getBool('savecopy', 0)) {
            //PMs are by default not saved in outbox
            $pm->setVar('from_delete', 0);
        }
        if (!$pm_handler->insert($pm)) {
            echo $pm->getHtmlErrors();
            echo "<br><a href='javascript:history.go(-1)'>" . _PM_GOBACK . '</a>';
        } else {
            // @todo: Send notification email if user has selected this in the profile
            echo "<br><br><div style='text-align:center;'><h4>" . _PM_MESSAGEPOSTED . "</h4><br><a href=\"javascript:window.opener.location='" . XOOPS_URL . "/viewpmsg.php';window.close();\">" . _PM_CLICKHERE . "</a><br><br><a href=\"javascript:window.close();\">" . _PM_ORCLOSEWINDOW . '</a></div>';
        }
    } else {
        echo implode('<br>', $GLOBALS['xoopsSecurity']->getErrors());
        echo "<br><a href=\"javascript:window.close();\">" . _PM_ORCLOSEWINDOW . '</a>';
    }
} elseif ($reply == 1 || $send == 1 || $send2 == 1 || $sendmod == 1) {