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


PHP professions::GetProfName方法代码示例

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


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

示例1: quickMASSetCats

function quickMASSetCats($frm)
{
    $objResponse = new xajaxResponse();
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/project_exrates.php';
    if ($frm) {
        global $DB;
        $frm = preg_replace('/,$/', '', $frm);
        $acats = explode(',', $frm);
        $cats_data = array();
        foreach ($acats as $v) {
            $v = preg_replace('/^mass_cat_span_/', '', $v);
            $c = explode('_', $v);
            if ($c[0] == 0) {
                continue;
            }
            if ($c[1] == 0) {
                $sql = 'SELECT prof_group FROM professions WHERE id=?i';
                $p = $DB->val($sql, $c[0]);
                $cats_data[] = $p . ':' . $c[0];
            } else {
                $cats_data[] = $c[0] . ':0';
            }
        }
        $html = '';
        if ($cats_data) {
            $count = 0;
            foreach ($cats_data as $v) {
                ++$count;
                if (count($cats_data) <= 3 || count($cats_data) >= 4 && $count < 3) {
                    $c = explode(':', $v);
                    $sql = 'SELECT name FROM prof_group WHERE id=?i';
                    $p = $DB->val($sql, $c[0]);
                    $html .= $p;
                    if ($c[1]) {
                        $html .= ' - ' . professions::GetProfName($c[1]) . '<br>';
                    } else {
                        $html .= '<br>';
                    }
                }
            }
            if (count($cats_data) >= 4 && $count > 2) {
                $html .= 'и еще ' . ($count - 2) . ' ' . ending($count - 2, 'другой', 'других', 'других');
            }
            $objResponse->script("\$('quickmas_f_mas_c_count').set('html', '" . count($cats_data) . "');");
            $objResponse->script("\$('quickmas_f_mas_subcat_m').show();");
        } else {
            $objResponse->script("\$('quickmas_f_mas_subcat_m').hide();");
        }
        $objResponse->assign('quickmas_f_mas_subcat', 'innerHTML', $html);
    }
    return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:55,代码来源:quickmas.server.php

示例2: getProfessionText

 private function getProfessionText()
 {
     $prof_text = '';
     $prof_group_id = $this->options['prof_group_id'];
     $prof_id = $this->options['prof_id'];
     if ($prof_group_id) {
         $prof_text = professions::GetProfGroupTitle($prof_group_id);
     } elseif ($prof_id) {
         $group_id = professions::GetGroupIdByProf($prof_id);
         $prof_text = professions::GetProfGroupTitle($group_id);
         $prof_text .= ' &mdash; ';
         $prof_text .= professions::GetProfName($prof_id);
     } else {
         $prof_text = 'Каталог фрилансеров';
     }
     return $prof_text;
 }
开发者ID:uadev,项目名称:fl-ru-damp,代码行数:17,代码来源:quickPaymentPopupFrlbind.php

示例3: array

?>
;
var filter_bullets = [[],[]];
<?php 
if (sizeof($_SESSION['ph_categories'])) {
    for ($ci = 0; $ci < 2; $ci++) {
        $ph_categories[$ci] = array();
        if (sizeof($_SESSION['ph_categories'][$ci])) {
            foreach ($_SESSION['ph_categories'][$ci] as $fkey => $fvalue) {
                if ($fkey) {
                    if (!freelancers_filters::mirrorExistsInArray($fkey, $ph_categories[$ci], $mirrored_specs)) {
                        if (!$fvalue) {
                            $proftitle = professions::GetGroup($fkey, $error);
                            $proftitle = $proftitle['name'];
                        } else {
                            $proftitle = professions::GetProfName($fkey);
                            $prof_group = professions::GetProfField($fkey, 'prof_group');
                        }
                        ?>
filter_bullets[<?php 
                        echo $fvalue;
                        ?>
][<?php 
                        echo $fkey;
                        ?>
] = new Array();
filter_bullets[<?php 
                        echo $fvalue;
                        ?>
][<?php 
                        echo $fkey;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:filter_prj_list.php

示例4: ending

        <?php 
if ($service['src_id'] == 0) {
    ?>
            в общем каталоге
        <?php 
} else {
    if ($service['src_id'] == -1) {
        //if
        ?>
            на главной странице
        <?php 
    } else {
        //elseif
        ?>
           в каталоге «<?php 
        echo professions::GetProfName($service['src_id']);
        ?>
»
        <?php 
    }
}
//else
?>
        на <?php 
echo $service['op_count'];
?>
 <?php 
echo ending($service['op_count'], 'неделю', 'недели', 'недель');
?>
    </div>
</div>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.first_page.php

示例5: hasPermissions

    if ($prjid) {
        $error .= $portf->DelPortf(get_uid(false), $prjid, hasPermissions('users'));
    }
    $pattern = "#(/users/[\\w_\\d]+/)viewproj\\.php\\?prjid=[0-9]+.*#";
    $locate_url = preg_replace($pattern, '$1', $_SERVER['REQUEST_URI']);
    header("location: {$locate_url}");
    exit;
}
$proj = portfolio::GetPrj($prjid, $uid);
$width = $height = 0;
if (!$proj || $proj['is_blocked'] == 't' && $uid != get_uid(false) && !hasPermissions('users')) {
    $fpath = '../';
    include ABS_PATH . '/404.php';
    exit;
} else {
    $spec_text = professions::GetProfName($proj['spec']);
    if ($proj['pict']) {
        $imgTitle = $proj['name'] . ' (' . $spec_text . ') - фри-лансер ' . $proj['uname'] . ' ' . $proj['usurname'] . ' [' . $proj['login'] . ']. ';
        $str = viewattach($proj['login'], $proj['pict'], 'upload', $file, -1, -1, 1048576, 0, 0, 'center', false, 1, $proj['name'], true, false, $imgTitle, $proj['wmode']);
    }
    //elseif ($proj['link'] && !$proj['descr']) header("Location: http://" . $proj['link']);
    $pathinfo = pathinfo($proj['pict']);
    $proj['pict_ext'] = strtolower($pathinfo['extension']);
    $js_file = array('banned.js');
    //Мета-теги
    SeoTags::getInstance()->initByPortfolio($proj, $spec_text);
    $page_title = SeoTags::getInstance()->getTitle();
    $page_descr = SeoTags::getInstance()->getDescription();
    $page_keyw = SeoTags::getInstance()->getKeywords();
    $FBShare = array('title' => htmlspecialchars($proj['name'], ENT_QUOTES), 'description' => '', 'image' => HTTP_PREFIX . 'www.free-lance.ru/images/free-lance_logo.jpg');
    $content = 'tpl.viewproj.php';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:viewproj.php

示例6: array

require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/rating.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/projects_ci.common.php";
$xajax->printJavascript('/xajax/');
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/project_exrates.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/HTML/projects_lenta.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/opinions.php";
// Подгружаем данные по мнения создалю проекта
$op_data = opinions::getCounts($project['user_id'], array('frl', 'norisk', 'all', 'total'));
$project_exRates = project_exrates::GetAll();
$exch = array(1 => 'FM', 'USD', 'Euro', 'Руб');
$translate_exRates = array(0 => 2, 1 => 3, 2 => 4, 3 => 1);
$foto_alt = $project['name'];
$answer_button_href = get_uid(FALSE) ? is_emp($_SESSION['role']) ? "/frl_only.php" : ($project['pro_only'] == 't' && !$is_pro && $project['user_id'] != $_SESSION['uid'] && !hasPermissions('projects') ? "/payed/" : "#new_offer") : "/registration/?from_prj=" . $project['id'];
$category = professions::GetGroup($project['category'], $eeee);
if ($category['name'] && $project['subcategory']) {
    $category['name'] .= '&nbsp;/&nbsp;' . professions::GetProfName($project['subcategory']);
}
$can_edit = !!is_numeric(InGet('edit')) && $user_offer['refused'] != 't';
$is_user_offer_exist = (!$user_offer_exist || $can_edit) && $project['closed'] != 't' && $uid > 0;
if ($project['pro_only'] == 't' && !$is_pro && $project['user_id'] != $_SESSION['uid'] && !hasPermissions('projects')) {
    $offers = array();
    $is_user_offer_exist = false;
}
if ($project['verify_only'] == 't') {
    $verify_check = $is_verify;
    if (!$is_verify) {
        //$answer_button_href = '/promo/verification/';
        if (!get_uid(false)) {
            $_SESSION['ref_uri2'] = $project['id'];
            $is_user_offer_exist = false;
        } else {
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:content_frl.php

示例7: actionPortfolio

 /**
  * Обработка информации по шагу портфолио 
  */
 public function actionPortfolio()
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     $category = intval($_COOKIE['your_categories']);
     $spec = intval($_COOKIE['your_subcategories']);
     if ($category > 0) {
         $category_name = professions::GetGroupName($category);
     } else {
         $category = 0;
     }
     if ($spec > 0) {
         $subcategory_name = professions::GetProfName($spec);
     } else {
         $spec = 0;
     }
     $action = __paramInit('string', null, 'action');
     if ($action == 'upd_portf') {
         $error = $this->actionProcessingPortfolio();
         if ($error) {
             $data = $this->request;
             $portf_insert = $this->portf_insert;
             /*if($data['resume'] > 0) {
                   $resume = new CFile($data['resume']);
               }*/
         }
     } else {
         // запись в базе для текущего портфолио
         $field = $this->parent->getFieldsUser();
         // все данные портфолио
         $data = unserialize($field['portfolio']);
         // сохраненные работы для текущего портфолио
         $portf_insert = $this->getWorks();
     }
     if ($data['resume'] > 0) {
         $resume = new CFile($data['resume']);
     }
     $curr_hour_name = $this->CURRENCY_TYPE[$data['cost_type_hour']];
     $curr_month_name = $this->CURRENCY_TYPE[$data['cost_type_month']];
     // подготовка специализации для вывода в шаблон
     $spec = $data['spec'];
     $specString = professions::GetProfNameWP($spec, '/', null, false);
     list($category_name, $subcategory_name) = explode('/', $specString);
     $count_portf = $this->getCountWorks();
     $answersExists = $this->_getCountAnswers();
     include $_SERVER['DOCUMENT_ROOT'] . "/wizard/registration/steps/tpl.step.portfolio.php";
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:49,代码来源:step_freelancer.php

示例8: date

     $_SESSION['i_want_pro'] = true;
     $_SESSION['pro_last'] = date('Y-m-d H:i:s', time());
     $user->is_pro = 't';
     $p_user->is_pro = 't';
     $no_adv = true;
 }
 if ($user->login == $_SESSION['login']) {
     $js_file[] = 'uploader.js';
 }
 $inner = 'tpl.portfolio.pro.php';
 $js_file[] = 'portfolio.js';
 $activ_tab = 1;
 require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
 $prfs = new professions();
 $profs = $prfs->GetSpecs($user->login);
 $spec_text = professions::GetProfName($user->spec);
 $page_descr = 'Удаленная работа (фри-ланс). Портфолио фрилансера: ' . $spec_text . '. ';
 $page_keyw = 'удаленная работа, фри-ланс, фрилансер, ';
 if ($profs) {
     foreach ($profs as $ikey => $prof) {
         $out[] = str_replace('"', '', input_ref($prof['name']));
     }
     $page_descr .= LenghtFormatEx(implode(', ', $out), 250, '');
     $page_keyw .= strtolower(LenghtFormatEx(implode(', ', $out), 250, ''));
 }
 $specs_add = professions::GetProfsAddSpec($user->uid);
 //@todo: этот код ниже нужно переработать с использованием GaJsHelper
 //проверить все варианты чтобы не делать повторные запросы!
 $ga_profs = array_merge(array($user->spec), $specs_add);
 if (isset($ga_profs) && count($ga_profs)) {
     $dimension = array();
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例9: getProfessionText

 /**
  * Возвращает название раздела для истории платежей
  * @param type $prof_id
  * @param type $is_spec
  * @return type
  */
 private function getProfessionText($prof_id, $is_spec)
 {
     $prof_text = '';
     if ($prof_id) {
         if ($is_spec) {
             $group_id = professions::GetGroupIdByProf($prof_id);
             $prof_group_title = professions::GetProfGroupTitle($group_id);
             $prof_title = professions::GetProfName($prof_id);
             $prof_text = sprintf(self::DESCR_PROF, $prof_group_title, $prof_title);
         } else {
             $prof_group_title = professions::GetProfGroupTitle($prof_id);
             $prof_text = sprintf(self::DESCR_PROFGROUP, $prof_group_title);
         }
     } else {
         $prof_text = self::DESCR_CATALOG;
     }
     return $prof_text;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:24,代码来源:freelancer_binds.php

示例10: drawSubscrFilterLine

    /**
     * Возвращает блок для подписки на специализацию?
     * 
     * !!!Пример использования не нашел
     *
     * @param  int $category_id ID группы профессий
     * @param  int $subcategory_id ID профессии
     * @return string
     */
    public static function drawSubscrFilterLine($category_id, $subcategory_id)
    {
        require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
        $grp = professions::GetGroup($category_id, $error);
        $cat_name = $category_id ? $grp['name'] : '<em>Все разделы</em>';
        $sub_name = $subcategory_id ? professions::GetProfName($subcategory_id) : '<em>Все подразделы</em>';
        ob_start();
        ?>
    <tr>
           <th><?php 
        echo $cat_name;
        ?>
            <input type="hidden" name="cats[]" value="<?php 
        echo (int) $category_id;
        ?>
"/>
            <input type="hidden" name="subcats[]" value="<?php 
        echo (int) $subcategory_id;
        ?>
"/>
           </th>
           <td><?php 
        echo $sub_name;
        ?>
</td>
           <td><a href="javascript:void(0)" onclick="document.getElementById('filter_body').removeChild(this.parentNode.parentNode)"><img src="/images/btn-remove2.png" alt="Удалить"></a></td>
    </tr>
                                    <?php 
        $html = ob_get_contents();
        ob_clean();
        return $html;
    }
开发者ID:amage,项目名称:fl-ru-damp,代码行数:41,代码来源:freelancer.php

示例11: getOperationDescr

 /**
  * Вощвращает строку с описанием операции для истории счета
  * @param type $prof_id
  */
 public static function getOperationDescr($prof_id, $prof_group_id)
 {
     $prof_name = '';
     if ($prof_id == -1) {
         $prof_name = 'общем разделе';
     } elseif ($prof_id == 0) {
         $group_title = professions::GetProfGroupTitle($prof_group_id);
         $prof_name = 'разделе ' . $group_title;
     } else {
         $group_id = professions::GetGroupIdByProf($prof_id);
         $group_title = professions::GetProfGroupTitle($group_id);
         $prof_title .= professions::GetProfName($prof_id);
         $prof_name = 'разделе ' . $group_title . ' &mdash; ' . $prof_title;
     }
     return $prof_name;
 }
开发者ID:amage,项目名称:fl-ru-damp,代码行数:20,代码来源:firstpage.php

示例12: remindFreelancerbindsUp

 /**
  * Уведомление фрилансеру за 1 день до окончания 
  * размещения в freelancer_binds.
  */
 public function remindFreelancerbindsUp()
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer_binds.php';
     $binds = freelancer_binds::getDowned();
     if (!$binds) {
         return false;
     }
     foreach ($binds as $val) {
         if ($val['bill_subscribe'] == 'f') {
             continue;
         }
         $catalog_name = '';
         $catalog_url = "{$GLOBALS['host']}/freelancers/";
         if ($val['prof_id'] == 0) {
             $catalog_name = 'общем разделе';
         } elseif ($val['is_spec'] == 'f') {
             $group = professions::GetGroup($val['prof_id'], $error);
             $catalog_url .= $group['link'];
             $catalog_name = "разделе <a href='{$catalog_url}'>{$group['name']}</a>";
         } else {
             $prof_name = professions::GetProfName($val['prof_id']);
             $catalog_url .= professions::GetProfLink($val['prof_id']);
             $catalog_name = "подразделе <a href='{$catalog_url}'>{$prof_name}</a>";
         }
         $this->recipient = "{$val['uname']} {$val['usurname']} [{$val['login']}] <{$val['email']}>";
         $this->message = Template::render($_SERVER['DOCUMENT_ROOT'] . '/templates/mail/freelancer_binds/remind_up.tpl.php', array('smail' => &$this, 'catalog_url' => $catalog_url, 'catalog_name' => $catalog_name));
         $ok = $this->send('text/html');
         if ($ok) {
             freelancer_binds::markSent('up', $val['uid'], $val['prof_id'], $val['is_spec']);
         }
     }
     return 0;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:37,代码来源:smail.php

示例13: foreach

?>
                </select>
              </div>
              <div class="b-select b-select_padbot_10">
                <select id="subscr_sub" class="b-select__select b-select__select_width_220"><option value="0">Весь раздел</option></select>
              </div>
                <button class="b-button b-button_flat b-button_flat_grey b-button_margbot_20" type="button" onclick="addMailerFilter()" disabled="disabled" id="addFilterButton">Добавить</button>
            </div>
    <div id="filter_body" class="b-layout__txt b-layout__txt_padbot_10">
        <?php 
$js = '';
foreach (explode(':', $user->mailer_str) as $vl) {
    if (preg_match("/c([0-9]+)s?([0-9]*)/i", $vl, $res)) {
        $grp = professions::GetGroup($res[1], $error);
        $cat_name = $res[1] ? $grp['name'] : '<em>Все разделы</em>';
        $sub_name = $res[2] ? professions::GetProfName($res[2]) : '<em>Все подразделы</em>';
        ?>
                <div class="b-layout__txt b-layout__txt_padbot_10">
                    <input type="hidden" name="cats[]" value="<?php 
        echo (int) $res[1];
        ?>
" />
                    <input type="hidden" name="subcats[]" value="<?php 
        echo (int) $res[2];
        ?>
" />
                    <span class="b-layout__bold"><?php 
        echo $cat_name;
        ?>
</span> &#160;
                    <?php 
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:subscr_filter.php

示例14: strtolower

    //		unset($wrk_size);
    // Выбираем работы.
    $prof_group_name = '';
    $page_title = 'Фри-лансер. Удаленная работа. Поиск работы. Предложение работы. Портфолио фри-лансеров. FL.ru';
    $page_keyw = 'фри-лансер, удаленная работа, поиск работы, предложение работы, портфолио фри-лансеров, разработка сайтов, программирование, переводы, тексты, дизайн, арт, реклама, маркетинг, прочее, fl.ru';
    $page_descr = 'Фри-лансер. Удаленная работа. Поиск работы. Предложение работы. Портфолио фри-лансеров. Разработка сайтов, Программирование, Переводы, Тексты, Дизайн, Арт, Реклама, Маркетинг, Прочее. FL.ru';
} else {
    // Подсчитываем количество работ.
    $fav_count = 0;
    //    $wrk = $portfolio->GetSpecPortf($prof_id, $fav_count, $wrk_size, 1, 0, $orderby, $direction, 1, $filter_apply, $pf);
    //		unset($wrk);
    //		unset($wrk_size);
    // Выбираем работы.
    //if ($count && $page > ceil($count / $prf_pp)) exit;
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
    $prof_name = professions::GetProfName($prof_id);
    $prof_type = professions::GetProfType($prof_id);
    $prof_link = professions::GetProfField($prof_id, 'link');
    //  $prof_group_name = professions::GetProfGroupName($prof_id);
    $g_page_id = '1|' . $prof_id;
    $page_title = $prof_name . '. Удаленная работа. Поиск работы. Предложение работы. Портфолио фри-лансеров. FL.ru';
    $page_keyw = strtolower($prof_name) . ', удаленная работа, поиск работы, предложение работы, портфолио фри-лансеров, fl.ru';
    $page_descr = $prof_name . '. Удаленная работа. Поиск работы. Предложение работы. Портфолио фри-лансеров. FL.ru';
}
$content = 'content.php';
$content_bgcolor = '#ffffff';
//$buffer_on = false;
if ($page < 20) {
    $buffer_on = true;
}
$header = '../header.php';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例15: actionProjects


//.........这里部分代码省略.........
                     $error['logo_link'] = 'Не верно введен адрес';
                 }
             } else {
                 $data['logo_id'] = null;
             }
             $price = 0;
             // закрепление на верху
             if ($option['top'] == 1 && $option['top_count'] > 0) {
                 if ($option['top_count'] > 999) {
                     $option['top_count'] = 999;
                 }
                 $price = (int) $option['top_count'] * ($data['kind'] == 7 ? $cTopPrice : $pTopPrice);
                 $data['top_count'] = (int) $option['top_count'];
                 $pay_option[] = array('wiz_uid' => $this->getWizardUserID(), 'op_code' => new_projects::OPCODE_PAYED, 'option' => self::PROJECT_OPTION_TOP, 'type' => $data['kind'] == 7 ? self::BILL_TYPE_CONTEST : self::BILL_TYPE_PROJECT, 'ammount' => $price);
             } else {
                 $data['top_count'] = 0;
             }
             // выделение цветом
             if ($option['color'] == 1) {
                 $price += (int) $colorPrc;
                 $data['is_color'] = true;
                 $pay_option[] = array('wiz_uid' => $this->getWizardUserID(), 'op_code' => new_projects::OPCODE_PAYED, 'option' => self::PROJECT_OPTION_COLOR, 'type' => $data['kind'] == 7 ? self::BILL_TYPE_CONTEST : self::BILL_TYPE_PROJECT, 'ammount' => $colorPrc);
             } else {
                 $data['is_color'] = false;
             }
             // выделение жирным
             if ($option['bold'] == 1) {
                 $price += (int) $boldPrc;
                 $data['is_bold'] = true;
                 $pay_option[] = array('wiz_uid' => $this->getWizardUserID(), 'op_code' => new_projects::OPCODE_PAYED, 'option' => self::PROJECT_OPTION_BOLD, 'type' => $data['kind'] == 7 ? self::BILL_TYPE_CONTEST : self::BILL_TYPE_PROJECT, 'ammount' => $boldPrc);
             } else {
                 $data['is_bold'] = false;
             }
             if ($option['logo'] == 1) {
                 $price += (int) $logoPrc;
                 $pay_option[] = array('wiz_uid' => $this->getWizardUserID(), 'op_code' => new_projects::OPCODE_PAYED, 'option' => self::PROJECT_OPTION_LOGO, 'type' => $data['kind'] == 7 ? self::BILL_TYPE_CONTEST : self::BILL_TYPE_PROJECT, 'ammount' => $logoPrc);
             }
             if ($price > 0) {
                 $data['payed'] = (int) $price;
             }
             if (!$error) {
                 $data['wiz_uid'] = $this->getWizardUserID();
                 // если проект уже есть
                 if ($existPrjID) {
                     // то просто обновляем его
                     $prj_id = $this->updateProject($data, $existPrjID);
                     // и очищаем все платные опции для этого проекта
                     wizard_billing::clearPayedOptions($prj_id);
                 } else {
                     $prj_id = $this->createProject($data);
                 }
                 if ($prj_id && $_POST['attachedfiles_session']) {
                     $attachedfiles = new attachedfiles($_POST['attachedfiles_session']);
                     $files = $attachedfiles->getFiles(array(1, 2, 3, 4));
                     $this->parent->addAttachedFiles($files, $prj_id);
                     $attachedfiles->clear();
                 }
                 if ($prj_id && $data['kind'] == 7) {
                     $insert = array('wiz_uid' => $data['wiz_uid'], 'op_code' => new_projects::OPCODE_KON_NOPRO, 'type' => self::BILL_TYPE_CONTEST, 'ammount' => new_projects::getKonkursPrice(), 'parent' => $prj_id);
                     wizard_billing::addPaidOption($insert);
                 }
                 if ($price > 0 && $prj_id) {
                     foreach ($pay_option as $k => $opt) {
                         $opt['parent'] = $prj_id;
                         wizard_billing::addPaidOption($opt);
                     }
                 }
                 if ($prj_id) {
                     $_SESSION['view_wizard_project'] = $prj_id;
                     header('Location: /wizard/registration/');
                     exit;
                 } else {
                     $error['project'] = 'Ошибка записи проекта';
                 }
             }
             $currency_name = __paramInit('string', null, 'currency');
             $priceby_name = __paramInit('string', null, 'priceby');
         }
         // Генерируем данные для вывода ошибок и заполнения полей
         $loc[] = country::GetCountryName($data['country']);
         if ($data['city']) {
             $loc[] = city::GetCityName($data['city']);
         }
         $location_name = implode(': ', $loc);
         $cat[] = professions::GetGroupName($category);
         if ($subcategory) {
             $cat[] = professions::GetProfName($subcategory);
         }
         $category_name = implode(': ', $cat);
         if ($data['logo_id']) {
             $file = new CFile($data['logo_id']);
             $logo_path = WDCPREFIX . '/' . $file->path . $file->name;
         }
         include $_SERVER['DOCUMENT_ROOT'] . '/wizard/registration/steps/tpl.step.project.php';
     } else {
         $project = $this->getProjectById($prj_id);
         $attached = $this->getProjectAttach($prj_id);
         include $_SERVER['DOCUMENT_ROOT'] . '/wizard/registration/steps/tpl.step.project.view.php';
     }
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:step_employer.php


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