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


PHP professions::UpdateProfDesc方法代码示例

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


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

示例1: _admEditPortfChoiceSaveForm

/**
 * Сохранение уточнения к разделам в портфолио
 * 
 * @param object $objResponse xajaxResponse
 * @param  string $user_id UID пользователя
 * @param string $rec_type тип записи
 * @param array $aForm массив данных
 * @param string $sDrawFunc имя функции для выполнения после сохранения
 */
function _admEditPortfChoiceSaveForm(&$objResponse, $user_id = '', $rec_type = '', $aForm = array(), $sDrawFunc = '')
{
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/kwords.php';
    $kwords = new kwords();
    $aOldIds = array_keys($kwords->getUserKeys($user_id, $aForm['prof_id']));
    $ids = array();
    $kwords->delUserKeys($user_id, $aForm['prof_id']);
    if (trim($aForm['prof_keys'])) {
        $ukey = explode(',', $aForm['prof_keys']);
        if (count($ukey) > 0) {
            $ids = $kwords->add($ukey, true);
            $kwords->addUserKeys($user_id, $ids, $aForm['prof_id']);
        }
    }
    $kwords->moderUserKeys($user_id, $aForm['prof_id'], $aOldIds, $ids, $_SESSION['uid']);
    $sReason = _parseReason($aForm['user_id'], $aForm['adm_edit_text']);
    $obj_prof = new professions();
    $error_prof = $obj_prof->UpdateProfDesc($user_id, $aForm['prof_id'], str_replace(" ", "", $aForm['prof_cost_from']), str_replace(" ", "", $aForm['prof_cost_to']), str_replace(" ", "", $aForm['prof_cost_hour']), str_replace(" ", "", $aForm['prof_cost_1000']), $aForm['prof_cost_type'], $aForm['prof_cost_type_hour'], $aForm['prof_time_type'], $aForm['prof_time_from'], $aForm['prof_time_to'], $aForm['prof_text'], $errorProfText, $_SESSION['uid'], $sReason);
    if (!$error_prof) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/portfolio.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
        $user = new users();
        $projs = array();
        $user->GetUserByUID($user_id);
        if ($user->is_pro == 't') {
            $show_preview = isset($aForm['show_preview']) && $aForm['show_preview'] ? $aForm['show_preview'] : 0;
            portfolio::ChangeGrPrev($user_id, $aForm['prof_id'], $projs, $show_preview);
        }
        messages::portfChoiceModifiedNotification($user_id, $aForm['prof_id'], $sReason);
        $objResponse->script('adm_edit_content.cancel();');
        if ($sDrawFunc == 'stream0' || $sDrawFunc == 'stream1' || $sDrawFunc == 'stream2') {
            // если случаев будет больше - вынести в отдельную функцию
            $objResponse->script('parent.adm_edit_content.cancel();');
            $objResponse->script('user_content.getContents()');
        } elseif ($sDrawFunc == 'suspect') {
            // шерстим все профили на наличие контактов в админке
            $objResponse->script("window.location = '/siteadmin/suspicious_contacts/?site={$aForm['p_site']}&action=resolve&sid={$aForm['p_sid']}&page={$aForm['p_page']}'");
        } else {
            // действие после редактирования по умолчанию
            $objResponse->script('window.location.reload(true)');
        }
    } else {
        $sParent = $sDrawFunc == 'stream0' || $sDrawFunc == 'stream1' || $sDrawFunc == 'stream2' ? 'parent.' : '';
        $error_prof = str_replace(array('<br />', '<br/>', '<br>'), "\n", $error_prof);
        $objResponse->alert($error_prof);
        $objResponse->script("{$sParent}adm_edit_content.disabled = false; {$sParent}adm_edit_content.button();");
    }
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:59,代码来源:adm_edit_content.server.php

示例2: array

             $aOldIds = array_keys($kwords->getUserKeys($uid, $prof_id));
             $ids = array();
             $kwords->delUserKeys($uid, $prof_id);
             if (trim($keys)) {
                 $ukey = explode(",", $keys);
                 if (count($ukey) > 0) {
                     $ids = $kwords->add($ukey, true);
                     $kwords->addUserKeys($uid, $ids, $prof_id);
                 }
             }
             $kwords->moderUserKeys($uid, $prof_id, $aOldIds, $ids, $uid, $keys);
         }
     }
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     $obj_prof = new professions();
     $error_prof .= $obj_prof->UpdateProfDesc($uid, $_POST['prof_id'], str_replace(" ", "", $_POST['prof_cost_from']), str_replace(" ", "", $_POST['prof_cost_to']), str_replace(" ", "", $_POST['prof_cost_hour']), str_replace(" ", "", $_POST['prof_cost_1000']), $_POST['prof_cost_type'], $_POST['prof_cost_type_hour'], $_POST['prof_time_type'], $_POST['prof_time_from'], $_POST['prof_time_to'], $_POST['prof_text'], $errorProfText);
     if (!$error_prof) {
         $info_prof = "Изменения внесены";
     }
     $saved_prof_id = intval($_POST['prof_id']);
     break;
 case "spec_change":
     $spec = trim($_POST['spec']);
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     $or_spec = professions::GetProfessionOrigin($spec);
     $frl = new freelancer();
     $frl->spec = $spec;
     $frl->spec_orig = $or_spec;
     professions::setLastModifiedSpec($uid, $spec);
     $error .= $frl->Update($uid, $res);
     $_SESSION['specs'] = $frl->GetAllSpecs($uid);
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php


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