示例#1
0
<?php

$sendEmail = '';
$dao_preference = new Preference();
if (Params::getParam('sendEmail') != '') {
    $sendEmail = Params::getParam('sendEmail');
} else {
    $sendEmail = sendEmail() != '' ? sendEmail() : '';
}
$maxPm = '';
$dao_preference = new Preference();
if (Params::getParam('maxPm') != '') {
    $maxPm = Params::getParam('maxPm');
} else {
    $maxPm = maxPMs() != '' ? maxPMs() : '';
}
$deletePM = '';
$dao_preference = new Preference();
if (Params::getParam('deletePM') != '') {
    $deletePM = Params::getParam('deletePM');
} else {
    $deletePM = deletePM() != '' ? deletePM() : '';
}
$pmBlocking = '';
$dao_preference = new Preference();
if (Params::getParam('pmBlocking') != '') {
    $locking = Params::getParam('pmBlocking');
} else {
    $locking = pmBlocking() != '' ? pmBlocking() : '';
}
$pmDrafts = '';
示例#2
0
<?php

$userId = Params::getParam('userId');
$itemId = Params::getParam('itemId');
$mType = Params::getParam('mType');
$messId = Params::getParam('messId');
if (osc_is_web_user_logged_in()) {
    if ($userId != 0) {
        $messCount = ModelPM::newInstance()->countRecipientMessages($userId);
    } else {
        $messCount = 0;
    }
    if ($messCount < maxPMs()) {
        $pm = ModelPM::newInstance()->getByPrimaryKey($messId, 0);
        if ($userId == 0 && $userId != '') {
            $user['s_name'] = pmAdmin();
        } else {
            $user = User::newInstance()->findByPrimaryKey($userId);
        }
        if ($itemId != '') {
            $item = Item::newInstance()->findByPrimaryKey($itemId);
        }
        if ($pm['recip_id'] != osc_logged_user_id() && ($mType == 'reply' || $mType == 'quote')) {
            // send user back to the inbox page since they where trying to access another users messages.
            ?>
   <script>location.href="<?php 
            echo osc_base_url(true) . '?page=custom&file=osclass_pm/user-inbox.php';
            ?>
"</script>
   <?php 
        } else {