当前位置: 首页>>代码示例>>PHP>>正文


PHP messages::prjOfferModifiedNotification方法代码示例

本文整理汇总了PHP中messages::prjOfferModifiedNotification方法的典型用法代码示例。如果您正苦于以下问题:PHP messages::prjOfferModifiedNotification方法的具体用法?PHP messages::prjOfferModifiedNotification怎么用?PHP messages::prjOfferModifiedNotification使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在messages的用法示例。


在下文中一共展示了messages::prjOfferModifiedNotification方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _admEditPrjOfferSaveForm

/**
 * Сохранение предложения по проектам
 * 
 * @param object $objResponse xajaxResponse
 * @param string $rec_id идентификатор записи
 * @param string $rec_type тип записи
 * @param array $aForm массив данных
 * @param string $sDrawFunc имя функции для выполнения после сохранения
 */
function _admEditPrjOfferSaveForm(&$objResponse, $rec_id = '', $rec_type = '', $aForm = array(), $sDrawFunc = '')
{
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/user_content.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects_offers.php';
    $obj_offer = new projects_offers();
    $payed_items = $aForm['ps_payed_items'];
    $payed_color = $aForm['ps_payed_items'][0] == '1';
    if ($aForm['is_color'] && !$payed_color) {
        $account = new account();
        $transaction_id = $account->start_transaction(get_uid());
        $error_buy = $account->Buy($billing_id, $transaction_id, $answers->color_op_code, get_uid(), "Выделение ответа на проект цветом", "Выделение <a href='" . getFriendlyURL("project", $project['id']) . "#freelancer_{$_SESSION['uid']}' target='_blank'>предложения</a> цветом", 1, 1);
        $payed_items = '1';
        if ($error_buy) {
            $aForm['is_color'] = false;
            $payed_items = '0';
        }
    }
    $sReason = _parseReason($aForm['user_id'], $aForm['adm_edit_text']);
    $error = $obj_offer->AddOffer($aForm['user_id'], $aForm['pid'], $aForm['ps_cost_from'], $aForm['ps_cost_to'], $aForm['ps_cost_type'], $aForm['ps_time_from'], $aForm['ps_time_to'], $aForm['ps_time_type'], antispam(stripslashes($aForm['ps_text'])), $aForm['ps_work_1_id'], $aForm['ps_work_2_id'], $aForm['ps_work_3_id'], $aForm['ps_work_1_link'], $aForm['ps_work_2_link'], $aForm['ps_work_3_link'], $aForm['ps_work_1_name'], $aForm['ps_work_2_name'], $aForm['ps_work_3_name'], $aForm['ps_work_1_pict'], $aForm['ps_work_2_pict'], $aForm['ps_work_3_pict'], $aForm['ps_work_1_prev_pict'], $aForm['ps_work_2_prev_pict'], $aForm['ps_work_3_prev_pict'], isset($aForm['ps_for_customer_only']), $aForm['edit'], 0, isset($aForm['prefer_sbr']), $aForm['is_color'], null, $payed_items, 0, $_SESSION['uid'], $sReason);
    if (!$error && !$error_buy && !$payed_color && $account) {
        $account->commit_transaction($transaction_id, get_uid(), $billing_id);
        $is_payed_color = true;
    }
    if ($error) {
        $objResponse->alert('Ошибка сохранения предложения' . $error);
        $sParent = $sDrawFunc == 'stream0' || $sDrawFunc == 'stream1' || $sDrawFunc == 'stream2' ? 'parent.' : '';
        $objResponse->script("{$sParent}adm_edit_content.disabled = false; {$sParent}adm_edit_content.button();");
    } else {
        messages::prjOfferModifiedNotification($aForm['user_id'], $aForm['pid'], $sReason);
        $content_id = user_content::MODER_PRJ_OFFERS;
        _admEditAfterAll($objResponse, $content_id, $rec_id, $rec_type, $sDrawFunc, $aForm);
    }
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:43,代码来源:adm_edit_content.server.php


注:本文中的messages::prjOfferModifiedNotification方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。