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


PHP professions::GetAllProfessions方法代码示例

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


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

示例1: run

 public function run()
 {
     //на случай если уже есть глобальная
     //переменная в нужными данными
     global $profs;
     if (!isset($profs)) {
         $prfs = new professions();
         $profs = $prfs->GetAllProfessions("", 0, 1);
         //@todo: передлагаю закешировать навечно чейчас на 60 сек в методе выше
     }
     $this->render('t-service-freelancers-categories', array('profs' => $profs));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:12,代码来源:TServiceFreelancersCategories.php

示例2: foreach

    $filter_query = '';
    foreach ($filter_params as $pn => $pv) {
        $filter_inputs .= '<input type="hidden" name="' . $pn . '" value="' . $pv . '" />';
        $filter_query .= "&amp;{$pn}={$pv}";
    }
}
$all_mirrored_specs = professions::GetAllMirroredProfsId();
$mirrored_specs = array();
for ($is = 0; $is < sizeof($all_mirrored_specs); $is++) {
    $mirrored_specs[$all_mirrored_specs[$is]['main_prof']] = $all_mirrored_specs[$is]['mirror_prof'];
    $mirrored_specs[$all_mirrored_specs[$is]['mirror_prof']] = $all_mirrored_specs[$is]['main_prof'];
}
$_SESSION['ph_categories'] = $filter['categories'];
//создаем массив специализаций (для фильтра на главной он уже есть в $prfs, для фильтра в проектах фрилансера его нет, поэтому делаем проверку на существование
if (!sizeof($profs)) {
    $all_specs = professions::GetAllProfessions("", 0, 1);
} else {
    $all_specs = $profs;
}
//  if(isset($_COOKIE['new_pf'.$filter_page]))
//    $filter_show = $_COOKIE['new_pf'.$filter_page];
//  else {
//    $filter_show = 1;
//    setcookie("new_pf".$filter_page, $filter_show, time()+60*60*24*30, "/");
//  }
?>
<script type="text/javascript">
//1 = фильтр проектов
//2 = фильтр фрилансеров
var curFBulletsBox = 1;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:30,代码来源:filter_prj_list.php

示例3: header

<?php

if (!defined('IS_SITE_ADMIN')) {
    header('Location: /404.php');
    exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
$profs = professions::GetAllProfessions();
if (!(hasPermissions('adm') && hasPermissions('adminspam'))) {
    header("Location: /404.php");
    exit;
}
?>
<script type="text/javascript">
CKEDITOR.config.customConfig = '/scripts/ckedit/config_simple.js';

function checkexts() {
            var val = 0;
            var grp = document.getElementById('idForm')['attach[]'];
            if (typeof grp.length != 'undefined') {
                for (i=0; i<grp.length; i++) {
                    if (!allowedExt(grp[i].value)) return false;
                }
            } else {
                if (!allowedExt(grp.value)) return false;
            }
            return true;
        }
</script>
<style>
	.addButton INPUT { width: 28px; }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:inner_index.php

示例4: _admEditSdelauParseForm

/**
 * Отдает HTML для предложений фрилансеров Сделаю
 * 
 * @param  object $objResponse xajaxResponse
 * @param  string $rec_id идентификатор записи
 * @param  string $rec_type тип записи
 * @param  array $aParams массив дополнительных параметров
 * @return string
 */
function _admEditSdelauParseForm(&$objResponse, $rec_id = '', $rec_type = '', $aParams = array())
{
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/freelancer_offers.php';
    $oFreelancerOffers = new freelancer_offers();
    $offer = $oFreelancerOffers->getOfferById($rec_id, false);
    $objUser = new users();
    $objUser->GetUserByUID($offer['user_id']);
    // разделы
    $categories = professions::GetAllGroupsLite();
    $professions = professions::GetAllProfessions();
    array_group($professions, 'groupid');
    $professions[0] = array();
    ob_start();
    include_once $_SERVER['DOCUMENT_ROOT'] . '/user/adm_edit_tpl/sdelau.php';
    $sHtml = ob_get_contents();
    ob_end_clean();
    // текст
    $sOnReady = "if(\$('adm_edit_msg')) \$('adm_edit_msg').set('value', (\$('adm_edit_msg_source')? \$('adm_edit_msg_source').get('value') : null));";
    $objResponse->assign('h4_adm_edit', 'innerHTML', 'Редактировать предложение');
    $objResponse->assign('div_adm_edit', 'innerHTML', $sHtml);
    $objResponse->script($sOnReady);
    $objResponse->script("\$('div_adm_reason').setStyle('display', 'none');");
    $objResponse->script("adm_edit_content.editMenuItems = ['', 'Основное'];");
    $objResponse->script('adm_edit_content.edit();');
    $objResponse->script('xajax_getAdmEditReasons(' . admin_log::ACT_ID_EDIT_SDELAU . ');');
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:37,代码来源:adm_edit_content.server.php

示例5: var_dump

//}
//
//if ($_GET['firstpage'] == 1 && isset($_GET['hour'])) {
//    firstpage::autoPayedReminder($_GET['firstpage'], 'hour', true);
//}
//
?>
<!--<p>Чтобы проверить резервы вручную используйте ссылку beta.free-lance.ru/test/test-payed.php?check_reserve=1</p>--><?php 
//
//if ($_GET['check_reserve']) {
//    billing::checkOldReserve();
//    echo '<p><strong>Проверка резерва</strong> - ОК</p>';
//}
//$pmail = new pmail;
//$pmail->DepositMail(329);
//firstpage::autoPayedReminder(3, true);
$profs = new professions();
$allProfs = $profs->GetAllProfessions();
$allProfsID = array();
foreach ($allProfs as $prof) {
    $allProfsID[$prof['id']] = $prof['profname'];
}
?>
<p>Айдишники профессий [в квадратных скобках]</p>
<pre><?php 
echo var_dump($allProfsID);
?>
</pre>


开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:28,代码来源:test-payed.php

示例6: professions

                quickPaymentPopupTservicebind::getInstance()->init(array('uid' => $uid, 'kind' => tservices_binds::KIND_LANDING));
            }
            $popup_id = quickPaymentPopupTservicebind::getInstance()->getPopupId($tservice['id']);
            $popups[] = quickPaymentPopupTservicebind::getInstance()->render(array('is_prolong' => true, 'date_stop' => $tservice['date_stop'], 'popup_id' => $popup_id, 'tservices_cur' => $tservice['id'], 'tservices_cur_text' => $tservice['title']));
            if ($key > 0) {
                $isExistsBindUp = true;
                require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/quick_payment/quickPaymentPopupTservicebindup.php';
                if (quickPaymentPopupTservicebindup::getInstance()->inited == false) {
                    quickPaymentPopupTservicebindup::getInstance()->init(array('uid' => $uid, 'tservices_id' => $tservice['id'], 'tservices_title' => $tservice['title'], 'kind' => tservices_binds::KIND_LANDING));
                }
                $popup_id = quickPaymentPopupTservicebindup::getInstance()->getPopupId($tservice['id']);
                $popups[] = quickPaymentPopupTservicebindup::getInstance()->render(array('popup_id' => $popup_id, 'tservices_cur' => $tservice['id'], 'tservices_cur_text' => $tservice['title']));
            }
        }
    }
    if ($isExistsBindUp) {
        $tservicesBinds = new tservices_binds(tservices_binds::KIND_LANDING);
        $bindUpPrice = $tservicesBinds->getPrice(true, $uid);
    }
}
$suffix = $uid <= 0 ? '_anon' : (is_emp() ? '_emp' : '_frl');
$content_landing_image = $_SERVER['DOCUMENT_ROOT'] . "/templates/landings/tpl.landing_image{$suffix}.php";
$content = $_SERVER['DOCUMENT_ROOT'] . "/templates/landings/tpl.landing_tservices.php";
// Список профессий
$prfs = new professions();
$profs = $prfs->GetAllProfessions("", 0, 1);
// Сортировка категорий профессий по названию
//usort($profs, function($a, $b) { return strcmp($a['groupname'], $b['groupname']);});
$page_title = 'Фриланс сайт удаленной работы №1. Фрилансеры, работа на дому, freelance : FL.ru';
// отрисовка страницы
include $_SERVER['DOCUMENT_ROOT'] . "/template3.php";
开发者ID:upovod,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例7: GetPreview

/**
 * формирует превью проекта на главной странице.
 */
function GetPreview($data)
{
    $objResponse = new xajaxResponse();
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/attachedfiles.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/CFile.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/HTML/projects_lenta.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/project_exrates.php';
    require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/memBuff2.php';
    $kind = 1;
    $memBuff = new memBuff();
    $htmlLenta = $memBuff->get('projectsLentaHTML');
    if (!$htmlLenta) {
        $prj = new new_projects();
        $prjs = $prj->getProjects($num_prjs, -1, 1, false, null, true);
        foreach ($prjs as &$proj) {
            // стираем принадлежность проекта к пользователю, чтобы не появилось кнопок РЕДАКТИРОВАТЬ и пр.
            unset($proj['user_id']);
        }
        unset($proj);
        $htmlPrj = new HTMLProjects();
        $htmlPrj->template = '/projects/tpl.lenta.new.php';
        $prj_content = $htmlPrj->ShowProjects($num_prjs, $prjs, 1, 1, null, true);
        $prfs = new professions();
        $profs = $prfs->GetAllProfessions('', 0, 1);
        // подложка с лентой проектов
        ob_start();
        include $_SERVER['DOCUMENT_ROOT'] . '/templates/main.php';
        $htmlLenta = ob_get_clean();
        // кэшируем ленту проектов
        $memBuff->set('projectsLentaHTML', $htmlLenta, 1800);
    }
    // подготавливаем данные для шаблона в ленту проектов
    $row = array();
    $row['kind'] = __paramValue('int', $data['kind']);
    $row['cost'] = __paramValue('int', $data['cost']);
    $row['currency'] = __paramValue('int', $data['currency_db_id']);
    $row['priceby'] = __paramValue('int', $data['priceby_db_id']);
    $row['name'] = stripslashes(__paramValue('html', $data['name'], null, true));
    $contacts = array('phone' => array('name' => 'Телефон', 'value' => ''), 'site' => array('name' => 'Сайт', 'value' => ''), 'icq' => array('name' => 'ICQ', 'value' => ''), 'skype' => array('name' => 'Skype', 'value' => ''), 'email' => array('name' => 'E-mail', 'value' => ''));
    if (isset($data['contacts'])) {
        foreach ($data['contacts'] as $name => $value) {
            if (!isset($contacts[$name])) {
                continue;
            }
            switch ($name) {
                case 'site':
                    if (!url_validate(ltrim(ltrim($value, 'http://'), 'https://')) && trim($value) != '') {
                        $error["contact_{$name}"] = 'Поле заполнено некорректно';
                    }
                    if (strpos($value, 'htt') === false && trim($value) != '') {
                        $value = 'http://' . $value;
                    }
                    break;
                case 'email':
                    if (!is_email($value) && trim($value) != '') {
                        $error["contact_{$name}"] = 'Поле заполнено некорректно';
                    }
                    break;
            }
            $contacts[$name]['value'] = __paramValue('htmltext', stripslashes($value));
        }
        $row['contacts'] = serialize($contacts);
    }
    $descrFull = stripslashes(__paramValue('html', $data['descr'], null, true));
    $descr = preg_replace('/^ /', "", $descrFull);
    $descr = preg_replace("/(\n) /", "\$1", $descr);
    $descr = reformat(strip_tags(htmlspecialchars(LenghtFormatEx(htmlspecialchars_decode($descr, ENT_QUOTES), 180), ENT_QUOTES), '<br />'), 50, 1, 0, 1);
    $descr = preg_replace("//", '&nbsp;', $descr);
    $row['descr'] = $descr;
    $row['t_is_payed'] = $data['logo_ok'] || $data['top_ok'];
    $row['t_is_ontop'] = __paramValue('bool', $data['top_ok']);
    $row['t_pro_only'] = $data['pro_only'] ? 't' : 'f';
    $row['t_verify_only'] = $data['verify_only'] ? 't' : 'f';
    $row['t_urgent'] = $data['urgent'] ? 't' : 'f';
    $row['t_hide'] = $data['hide'] ? 't' : 'f';
    $row['create_date'] = date('Y-m-d H:i', strtotime(date('Y-m-d H:i:s')) - 120);
    // делаем дату публикации 2 минуты назад
    $row['end_date'] = __paramValue('string', $data['end_date']);
    $row['win_date'] = __paramValue('string', $data['win_date']);
    $row['country'] = __paramValue('int', $data['project_location_columns'][0]);
    $row['city'] = __paramValue('int', $data['project_location_columns'][1]);
    list($row['country_name'], $row['city_name']) = explode(': ', __paramValue('string', $data['location']));
    $logoOK = __paramValue('bool', $data['logo_ok']);
    $topOK = __paramValue('bool', $data['top_ok']);
    $row['link'] = __paramValue('string', $data['link']);
    if ($logoOK) {
        $logoAttach = new attachedfiles($data['logo_attachedfiles_session']);
        $logoFiles = $logoAttach->getFiles(array(1));
        if (count($logoFiles)) {
            $logoFile = array_pop($logoFiles);
            // загружено может быть несколько файлов, берем последний
            $logoCFile = new CFile($logoFile['id']);
        } elseif (__paramValue('int', $data['logo_file_id'])) {
            $logoCFile = new CFile(__paramValue('int', $data['logo_file_id']));
        }
        $row['logo_name'] = $logoCFile->name;
//.........这里部分代码省略.........
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:public.server.php

示例8: webprofGenerateRss

 /**
  * Создает xml файл webprof
  * 
  * @return text $filename полный путь к файлу куда webdav должен сохранить получившийся xml
  */
 public function webprofGenerateRss($filename)
 {
     global $DB, $GLOBALS;
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
     require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/kwords.php";
     function getProfessionName($id, $professions)
     {
         foreach ($professions as $profession) {
             if ($profession['id'] == $id) {
                 return "{$profession['groupname']} / {$profession['profname']}";
             }
         }
     }
     $spec = array(9, 37, 27, 86, 8, 164, 10);
     $users = self::getListForWebprof($spec);
     $professions = professions::GetAllProfessions();
     $xml = '';
     $host = str_replace(HTTP_PREFIX, '', $GLOBALS['host']);
     $HTTP_PREFIX = "https://";
     $XMLData = '';
     $xml .= '<?xml version="1.0" encoding="utf-8"?>' . "\n";
     $xml .= '<!DOCTYPE source>' . "\n";
     $xml .= '<source creation-time="' . date('Y-m-d H:i:s') . ' GMT+3" host="' . $host . '">' . "\n";
     $xml .= '   <users>' . "\n";
     if (is_array($users) && count($users)) {
         $XMLData = '';
         foreach ($users as $user) {
             $frl_name = trim("{$user['uname']} {$user['usurname']}");
             $frl_name = iconv('CP1251', 'UTF-8', htmlspecialchars($frl_name, ENT_QUOTES));
             $frl_spec_main = iconv('CP1251', 'UTF-8', htmlspecialchars(getProfessionName($user['spec'], $professions), ENT_QUOTES));
             switch ($user['status_type']) {
                 case '0':
                     $frl_status = 'free';
                     break;
                 case '1':
                     $frl_status = 'busy';
                     break;
                 case '2':
                     $frl_status = 'absent';
                     break;
                 default:
                     $frl_status = 'no status';
                     break;
             }
             $frl_spec_ext = '';
             $spec_ext_ids = professions::GetProfsAddSpec($user['uid']);
             if ($spec_ext_ids) {
                 foreach ($spec_ext_ids as $spec_id) {
                     $frl_spec_ext .= "<spec>" . iconv('CP1251', 'UTF-8', htmlspecialchars(getProfessionName($spec_id, $professions), ENT_QUOTES)) . "</spec>";
                 }
             }
             $frl_tags = '';
             $tags = kwords::getUserKeys($user['uid'], $user['spec']);
             $bIsModer = kwords::isModerUserKeys($user['uid'], $user['spec']);
             if ($tags && !$bIsModer) {
                 foreach ($tags as $tag) {
                     $frl_tags .= "<tag>" . iconv('CP1251', 'UTF-8', htmlspecialchars($tag, ENT_QUOTES)) . "</tag>";
                 }
             }
             $frl_cost_hour = '';
             $frl_cost_month = '';
             if ($user['cost_hour'] != 0) {
                 $frl_cost_hour = (double) $user['cost_hour'];
                 switch ($user['cost_type_hour']) {
                     case '1':
                         $frl_cost_hour .= " Euro";
                         break;
                     case '2':
                         $frl_cost_hour .= " Руб";
                         break;
                     case '3':
                         $frl_cost_hour .= " FM";
                         break;
                     default:
                         $frl_cost_hour .= " USD";
                         break;
                 }
                 $frl_cost_hour = iconv('CP1251', 'UTF-8', $frl_cost_hour);
             }
             if ($user['cost_month'] != 0) {
                 $frl_cost_month = (double) $user['cost_month'];
                 switch ($user['cost_type_month']) {
                     case '1':
                         $frl_cost_month .= " Euro";
                         break;
                     case '2':
                         $frl_cost_month .= " Руб";
                         break;
                     case '3':
                         $frl_cost_month .= " FM";
                         break;
                     default:
                         $frl_cost_month .= " USD";
                         break;
                 }
//.........这里部分代码省略.........
开发者ID:amage,项目名称:fl-ru-damp,代码行数:101,代码来源:freelancer.php

示例9: updateBudget

 /**
  * Изменить информацию о бюджете проекта
  *
  * @param   integer $prj_id         ID проекта
  * @param   float   $prj_cost       Стоимость
  * @param   integer $prj_currency   Валюта
  * @param   integer $prj_costby     Тип стоимости(за час/проект/месяц)
  * @param   boolean $prj_agreement  true - стоимость по договоренности
  * @return  array                   информация о бюджете проекта
  */
 function updateBudget($prj_id, $prj_cost, $prj_currency, $prj_costby, $prj_agreement)
 {
     global $DB;
     if ($prj_agreement) {
         $prj_cost = 0;
         $prj_currency = 0;
         $prj_costby = 0;
         $prj_budget_type = 0;
     } else {
         $prj_cost = floatval($prj_cost);
         $prj_currency = intval($prj_currency);
         $prj_costby = intval($prj_costby);
         $prj_budget_type = 0;
         require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
         $categories = professions::GetAllGroupsLite();
         $professions = professions::GetAllProfessions();
         array_group($professions, 'groupid');
         $professions[0] = array();
         $professions_cost = array();
         $professions_cost['prj'] = array();
         $professions_cost['hour'] = array();
         $professions_cost['prj']['min'] = array();
         $professions_cost['prj']['avg'] = array();
         $professions_cost['prj']['max'] = array();
         $professions_cost['hour']['min'] = array();
         $professions_cost['hour']['avg'] = array();
         $professions_cost['hour']['max'] = array();
         foreach ($categories as $cat) {
             $professions_cost['prj']['min'][$cat['id']] = array();
             $professions_cost['prj']['avg'][$cat['id']] = array();
             $professions_cost['prj']['max'][$cat['id']] = array();
             $professions_cost['hour']['min'][$cat['id']] = array();
             $professions_cost['hour']['avg'][$cat['id']] = array();
             $professions_cost['hour']['max'][$cat['id']] = array();
             $ncount_prj = 0;
             $ncount_hour = 0;
             $nsum_min_prj = 0;
             $nsum_max_prj = 0;
             $nsum_avg_prj = 0;
             $nsum_min_hour = 0;
             $nsum_max_hour = 0;
             $nsum_avg_hour = 0;
             if (!is_array($professions[$cat['id']])) {
                 continue;
             }
             foreach ($professions[$cat['id']] as $subcat) {
                 $professions_cost['hour']['min'][$cat['id']][$subcat['id']] = $subcat['min_cost_hour'];
                 $professions_cost['hour']['avg'][$cat['id']][$subcat['id']] = $subcat['avg_cost_hour'];
                 $professions_cost['hour']['max'][$cat['id']][$subcat['id']] = $subcat['max_cost_hour'];
                 $professions_cost['prj']['min'][$cat['id']][$subcat['id']] = $subcat['min_cost_prj'];
                 $professions_cost['prj']['avg'][$cat['id']][$subcat['id']] = $subcat['avg_cost_prj'];
                 $professions_cost['prj']['max'][$cat['id']][$subcat['id']] = $subcat['max_cost_prj'];
                 $nsum_min_prj = $nsum_min_prj + $subcat['min_cost_prj'];
                 $nsum_max_prj = $nsum_max_prj + $subcat['max_cost_prj'];
                 $nsum_avg_prj = $nsum_avg_prj + $subcat['avg_cost_prj'];
                 $nsum_min_hour = $nsum_min_hour + $subcat['min_cost_hour'];
                 $nsum_max_hour = $nsum_max_hour + $subcat['max_cost_hour'];
                 $nsum_avg_hour = $nsum_avg_hour + $subcat['avg_cost_hour'];
                 if ($subcat['avg_cost_prj'] != 0) {
                     $ncount_prj++;
                 }
                 if ($subcat['avg_cost_hour'] != 0) {
                     $ncount_hour++;
                 }
             }
             if ($ncount_prj == 0) {
                 $ncount_prj = 1;
             }
             if ($ncount_hour == 0) {
                 $ncount_hour = 1;
             }
             $professions_cost['prj']['min'][$cat['id']][0] = round($nsum_min_prj / $ncount_prj, 0);
             $professions_cost['prj']['avg'][$cat['id']][0] = round($nsum_avg_prj / $ncount_prj, 0);
             $professions_cost['prj']['max'][$cat['id']][0] = round($nsum_max_prj / $ncount_prj, 0);
             $professions_cost['hour']['min'][$cat['id']][0] = round($nsum_min_hour / $ncount_hour, 0);
             $professions_cost['hour']['avg'][$cat['id']][0] = round($nsum_avg_hour / $ncount_hour, 0);
             $professions_cost['hour']['max'][$cat['id']][0] = round($nsum_max_hour / $ncount_hour, 0);
         }
         switch ($prj_costby) {
             case '1':
                 $itype = 'hour';
                 $ctype = 1;
                 break;
             case '2':
                 $itype = 'hour';
                 $ctype = 8;
                 break;
             case '3':
                 $itype = 'hour';
                 $ctype = 22 * 8;
//.........这里部分代码省略.........
开发者ID:amage,项目名称:fl-ru-damp,代码行数:101,代码来源:projects.php

示例10: getSitemapUrls

 /**
  * Генерирует данные для карты сайта
  *
  * @param inetger $key Номер файла
  * @return array
  */
 function getSitemapUrls($key = 0)
 {
     global $DB;
     switch ($this->type) {
         case 'freelancers':
             $result = array();
             require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
             $prfs = new professions();
             $profs = $prfs->GetAllProfessions("", 0, 1);
             foreach ($profs as $prof) {
                 $result[] = array('loc' => '/freelancers/' . $prof['link'] . '/', 'lastmod' => date('Y-m-d H:i:s'), 'posttime' => date('Y-m-d H:i:s'));
                 $sql = "SELECT COUNT(s.uid) as count  \n                            FROM ( SELECT * FROM fu WHERE spec_orig = '81' UNION ALL SELECT fu.* FROM fu INNER JOIN spec_add_choise sp ON sp.user_id = fu.uid AND sp.prof_id = '81' WHERE fu.is_pro = true \n                            UNION ALL \n                            SELECT fu.* FROM fu INNER JOIN spec_paid_choise pc ON pc.user_id = fu.uid AND pc.prof_id = '81' AND pc.paid_to > NOW() ) as s WHERE s.is_banned = '0'";
                 $count_pages = ceil($DB->val($sql) / FRL_PP);
                 for ($n = $count_pages; $n > 1; $n--) {
                     $result[] = array('loc' => '/freelancers/' . $prof['link'] . '/?page=' . $n, 'lastmod' => date('Y-m-d H:i:s'), 'posttime' => date('Y-m-d H:i:s'));
                 }
             }
             break;
         case 'other':
             $sql = "SELECT loc, NOW() AS lastmod, NOW() AS posttime FROM vw_sitemap_other";
             $result = $DB->rows($sql);
             break;
         default:
             $sql = $this->_rtSql ? $this->_rtSql : $this->sql;
             $result = $DB->rows($sql);
             break;
     }
     $strlen = $this->sitemap_lngth;
     if (!$result) {
         return false;
     }
     foreach ($result as $val) {
         switch ($this->type) {
             case 'projects':
                 $loc = sitemap::PUBLIC_HOST . getFriendlyURL('project', $val['p_id']);
                 break;
             case 'blogs':
                 $loc = sitemap::PUBLIC_HOST . getFriendlyURL("blog", $val['b_id']);
                 break;
             case 'commune':
                 $loc = sitemap::PUBLIC_HOST . getFriendlyURL('commune', $val['m_id']);
                 break;
             case 'articles':
                 $loc = sitemap::PUBLIC_HOST . getFriendlyURL('article', $val['a_id']);
                 break;
             case 'interview':
                 $loc = sitemap::PUBLIC_HOST . getFriendlyURL('interview', $val['i_id']);
                 break;
             case 'regions':
                 $loc = sitemap::PUBLIC_HOST . '/freelancers/' . ($val['link'] ? $val['link'] . '/' : '') . $val['translit_country_name'] . '/' . ($val['translit_city_name'] ? $val['translit_city_name'] . '/' : '');
                 break;
             case 'tservices':
                 $loc = sitemap::PUBLIC_HOST . tservices_helper::card_link($val['t_id'], $val['t_name']);
                 break;
             default:
                 $loc = sitemap::PUBLIC_HOST . $val['loc'];
                 break;
         }
         if ($this->type == 'userpages') {
             $x = "<url>";
             $x .= "<loc>{$loc}/info/</loc>";
             $x .= "<lastmod>" . date("c", strtotime($val['lastmod'])) . "</lastmod>";
             $x .= "<priority>{$this->priority}</priority>";
             $x .= "</url>";
             $x .= "<url>";
             $x .= "<loc>{$loc}/opinions/</loc>";
             $x .= "<lastmod>" . date("c", strtotime($val['lastmod'])) . "</lastmod>";
             $x .= "<priority>{$this->priority}</priority>";
             $x .= "</url>";
             $x .= "<url>";
             $x .= "<loc>{$loc}/journal/</loc>";
             $x .= "<lastmod>" . date("c", strtotime($val['lastmod'])) . "</lastmod>";
             $x .= "<priority>{$this->priority}</priority>";
             $x .= "</url>";
         } else {
             $x = "<url>";
             $x .= "<loc>{$loc}</loc>";
             $x .= "<lastmod>" . date("c", strtotime($val['lastmod'])) . "</lastmod>";
             $x .= "<priority>{$this->priority}</priority>";
             $x .= "</url>";
         }
         $strlen = $strlen + strlen($x);
         // Максимальный вес файла
         if ($strlen >= sitemap::MAX_SIZE_FILE) {
             $strlen = $this->sitemap_lngth;
             $key = $key + 1;
         }
         $ret[$key][] = $x;
         // Максимальное количество ссылок
         if (count($ret[$key]) >= sitemap::MAX_SIZE_COUNT / ($this->type == 'userpages' ? 5 : 1)) {
             $strlen = $this->sitemap_lngth;
             $key = $key + 1;
         }
         $this->end_date = $val['lastmod'];
//.........这里部分代码省略.........
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:101,代码来源:sitemap.php

示例11: giftAction


//.........这里部分代码省略.........
                         $alert['login'] = 'Вы не можете сделать подарок самому себе';
                     }
                     if (defined('SPEC_USER') && get_uid() == SPEC_USER) {
                         $alert['login'] = 'Использование этой услуги запрещено для вашего аккаунта';
                     }
                     if (!$alert) {
                         /**
                          * Класс для работы с оплатой подарка.
                          */
                         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/pay_place.php';
                         $place = new pay_place(1);
                         $tarif = 83;
                         $profs = $place->gift($bill_id, $gift_id, $tr_id, $gid, get_uid(), $msg, $tarif);
                         // Оплачиваем подарок
                         if ($profs) {
                             $_SESSION['success_aid'] = $bill_id;
                             header("Location: /{$this->name_page}/success/");
                             // Все прошло успешно
                             exit;
                         }
                     }
                 } else {
                     $alert['login'] = 'Данное поле является обязательным';
                 }
                 front::og('tpl')->error = @$alert;
                 // Переменная ошибок
             }
             front::og('tpl')->display('bill/bill_gift_cattop.tpl');
             break;
         case 'catalog':
             // Обработка подстраницы "Платные места в каталоге в подарок"
             // Событие нажатия кнопки "Подарить"
             front::og('tpl')->filter_categories = professions::GetAllGroupsLite(true);
             front::og('tpl')->filter_subcategories = professions::GetAllProfessions(1);
             $x = new op_codes();
             $x->GetRow(84);
             $top_p = $x->sum;
             $x->GetRow(85);
             $inside_p = $x->sum;
             front::og('tpl')->price_top = $top_p;
             front::og('tpl')->price_inside = $inside_p;
             if ($_POST['act']) {
                 $login = trim(strip_tags($_POST['login']));
                 // Логин
                 $msg = change_q_x(__paramInit('string', null, 'msg', null, 300));
                 $pf_category = __paramInit('int', null, 'pf_category', 0);
                 $pf_subcategory = __paramInit('int', null, 'pf_subcategory', 0);
                 //echo '<pre>'; print_r($_POST); exit('</pre>');
                 $tr_id = $_REQUEST['transaction_id'];
                 if (!$tr_id) {
                     $this->account->view_error('Невозможно завершить транзакцию. Попробуйте повторить операцию с самого начала.');
                 }
                 front::og('tpl')->tr_id = $tr_id;
                 front::og('tpl')->login = $login;
                 front::og('tpl')->msg = $msg;
                 front::og('tpl')->pf_category = $pf_category;
                 front::og('tpl')->pf_subcategory = $pf_subcategory;
                 if ($login) {
                     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
                     $user = new users();
                     $gid = $user->GetUid($error, $login);
                     $user->GetUser($login);
                     if (!$gid) {
                         $alert['login'] = 'Нет такого пользователя';
                     }
                     if (is_emp($user->role)) {
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:67,代码来源:page_bill.class.php

示例12: intval

         $page = intval($_POST['page']);
     }
     $page_uri = "";
     if ($page < 0) {
         $page = 0;
     }
     if ($page > 0) {
         $page_uri = "&page={$page}";
     }
     $back = __paramInit('string', 'red', 'red', '');
     $back = $back ? $back : '/projects/?kind=8' . $page_uri . '#o_' . $fid;
     header("Location: {$back}");
     break;
 case "edit":
     $is_edit = true;
     $categories_specs = professions::GetAllProfessions($offer['category_id']);
     break;
 case "delete":
     $frl_offers->Delete($fid);
     $success_text = "Предложение удалено";
     $content = "tpl.success-offers.php";
     break;
 case "open":
     $update = array("is_closed" => 'f');
 case "close":
     if (!$update) {
         $update = array("is_closed" => 't');
     }
     $frl_offers->Update($fid, $update);
     $success_text = "Предложение снято с публикации";
     $content = "tpl.success-offers.php";
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例13: quickprjedit_get_prj

function quickprjedit_get_prj($prj_id)
{
    $objResponse = new xajaxResponse();
    if (hasPermissions('projects')) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
        $categories = professions::GetAllGroupsLite();
        $professions = professions::GetAllProfessions();
        array_group($professions, 'groupid');
        $professions[0] = array();
        $oprj = new new_projects();
        $project = $oprj->getPrj($prj_id);
        if ($project['id']) {
            $project_categories = $oprj->getSpecs($project['id']);
            if (empty($project_categories)) {
                $project_categories[] = array('category_id' => 0, 'subcategory_id' => 0);
            }
            $html_categories = '';
            foreach ($project_categories as $project_category) {
                $html_categories .= "<div id='category_line'>\n                                        <select name='categories[]' class='b-select__select b-select__select_width_180' onchange='popupQEditPrjRefreshSubCategory(this);'>\n                                            <option value='0'>Выберите раздел</option>\n                                     ";
                foreach ($categories as $cat) {
                    if ($cat['id'] <= 0) {
                        continue;
                    }
                    $html_categories .= "<option value='{$cat['id']}' " . ($project_category['category_id'] == $cat['id'] ? ' selected' : '') . ">{$cat['name']}</option>";
                }
                $html_categories .= "</select>\n                                        <select name='subcategories[]' class='b-select__select b-select__select_width_180'>\n                                    ";
                $categories_specs = $professions[$project_category['category_id']];
                for ($i = 0; $i < sizeof($categories_specs); ++$i) {
                    $html_categories .= "<option value='{$categories_specs[$i]['id']}'" . ($categories_specs[$i]['id'] == $project_category['subcategory_id'] ? ' selected' : '') . ">{$categories_specs[$i]['profname']}</option>";
                }
                $html_categories .= "      <option value='0' " . ($project_category['subcategory_id'] == 0 ? ' selected' : '') . '>Все специализации</option>
                                        </select>
                                     </div>
                                     ';
            }
            $countries = country::GetCountries();
            if ($project['country']) {
                $cities = city::GetCities($project['country']);
            }
            $html_location = '';
            $html_location .= "<div><select id='popup_qedit_prj_fld_country' name='country' onChange='popupQEditPrjCityUpd(this.value);'><option value='0'>Страна</option>";
            foreach ($countries as $country_id => $country) {
                $html_location .= "<option value='{$country_id}' " . ($country_id == $project['country'] ? 'selected' : '') . ">{$country}</option>";
            }
            $html_location .= '</select></div>';
            $html_location .= "<div id='frm_city'><select name='city'><option value='0'>Город</option>";
            if ($cities) {
                foreach ($cities as $city_id => $city) {
                    $html_location .= "<option value='{$city_id}' " . ($city_id == $project['city'] ? 'selected' : '') . ">{$city}</option>";
                }
            }
            $html_location .= '</select>';
            $objResponse->assign('popup_qedit_prj_fld_id', 'value', $project['id']);
            $objResponse->assign('popup_qedit_prj_fld_name', 'value', htmlspecialchars_decode($project['name'], ENT_QUOTES));
            $objResponse->assign('popup_qedit_prj_fld_descr', 'value', htmlspecialchars_decode($project['descr'], ENT_QUOTES));
            $objResponse->assign('popup_qedit_prj_fld_categories', 'innerHTML', $html_categories);
            $objResponse->assign('popup_qedit_prj_fld_location', 'innerHTML', $html_location);
            $objResponse->script('$("popup_qedit_prj_fld_kind_1").set("checked", false);');
            switch ($project['kind']) {
                case 1:
                    $objResponse->script('$("popup_qedit_prj_cal1").setStyle("display", "none");');
                    $objResponse->script('$("popup_qedit_prj_cal2").setStyle("display", "none");');
                    $objResponse->script('$("popup_qedit_prj_kind").setStyle("display", "block");');
                    $objResponse->script('$("popup_qedit_prj_fld_kind_1").set("checked", true);');
                    $objResponse->script('$("popup_qedit_prj_fld_location").setStyle("display", "none");');
                    break;
                case 2:
                    //$objResponse->script('$("sbr_text_block").setStyle("display", "none");');
                    break;
                case 4:
                    $objResponse->script('$("popup_qedit_prj_cal1").setStyle("display", "none");');
                    $objResponse->script('$("popup_qedit_prj_cal2").setStyle("display", "none");');
                    $objResponse->script('$("popup_qedit_prj_kind").setStyle("display", "block");');
                    $objResponse->script('$("popup_qedit_prj_fld_kind_2").set("checked", true);');
                    $objResponse->script('$("popup_qedit_prj_fld_location").setStyle("display", "block");');
                    break;
                case 7:
                    $objResponse->script('$("popup_qedit_prj_cal1").setStyle("display", "block");');
                    $objResponse->script('$("popup_qedit_prj_cal2").setStyle("display", "block");');
                    $objResponse->script('$("popup_qedit_prj_kind").setStyle("display", "none");');
                    $objResponse->script('$("popup_qedit_prj_fld_location").setStyle("display", "none");');
                    $objResponse->script('$("popup_qedit_prj_fld_end_date").set("value", "' . date('d-m-Y', strtotime($project['end_date'])) . '");');
                    $objResponse->script('$("popup_qedit_prj_fld_win_date").set("value", "' . date('d-m-Y', strtotime($project['win_date'])) . '");');
                    break;
            }
            if ($project['pro_only'] == 't') {
                $objResponse->script('$("popup_qedit_prj_fld_pro_only").set("checked", true);');
            } else {
                $objResponse->script('$("popup_qedit_prj_fld_pro_only").set("checked", false);');
            }
            if ($project['verify_only'] == 't') {
                $objResponse->script('$("popup_qedit_prj_fld_verify_only").set("checked", true);');
            } else {
                $objResponse->script('$("popup_qedit_prj_fld_verify_only").set("checked", false);');
            }
            if ($project['prefer_sbr'] == 't') {
                $objResponse->script('$("popup_qedit_prj_fld_prefer_sbr").set("checked", true);');
//.........这里部分代码省略.........
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:projects-quick-edit.server.php

示例14: ShowRSSPopup

 /**
  * Генерирует попап для выбора раздела в RSS.
  */
 public function ShowRSSPopup($kind)
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
     switch ($kind) {
         case 0:
         case 1:
             $rss_link = 'projects.xml';
             break;
         case 2:
             $rss_link = 'competition.xml';
             break;
         case 4:
             $rss_link = 'office.xml';
             break;
         case 6:
             $rss_link = 'pro.xml';
             break;
         case 5:
             $rss_link = 'all.xml';
             break;
         default:
             $rss_link = 'all.xml';
             break;
     }
     $categories = professions::GetAllGroupsLite();
     //        $subcat = professions::GetAllProfessions();
     //        var_dump(professions::GetAllProfessions());
     $script = "\n            <script type='text/javascript'>\n            var sub = new Array();\n        ";
     $professions = professions::GetAllProfessions();
     array_group($professions, 'groupid');
     $professions[0] = array();
     foreach ($categories as $cat) {
         $out_s = array();
         $script .= "\n                sub[{$cat['id']}] = new Array(\n            ";
         if (is_array($professions[$cat['id']])) {
             foreach ($professions[$cat['id']] as $subcat) {
                 $out_s[] = " new Array({$subcat['id']}, '" . clearTextForJS($subcat['profname']) . "') ";
             }
             $script .= implode(', ', $out_s);
         }
         $script .= '
             );
         ';
     }
     $script .= "\n            function applySubcat(cat){\n                if(typeof sub[cat] != 'undefined')\n                for(var i = 0; i < sub[cat].length; i++){\n                    var option = document.createElement('option');\n                    option.value = sub[cat][i][0];\n                    option.innerHTML = sub[cat][i][1];\n                    document.getElementById('rss_sub').appendChild(option);\n                }\n            }\n\n            function getRssUri(){\n                var cat = document.getElementById('rss_cat').value;\n                var sub = document.getElementById('rss_sub').value;\n                var xml_path = '/rss/{$rss_link}';\n                if(sub){\n                    return xml_path+'?subcategory='+sub+(cat ? '&category='+cat : '');\n                }else if(cat){\n                    return xml_path+'?category='+cat;\n                }else{\n                    return xml_path;\n                }\n            }\n\n            function gotoRSS(){\n                document.location.href = getRssUri();\n            }\n\n            function clearSelect(sid)\n            {\n\n            var oListbox = document.getElementById(sid);\n            for (var i=oListbox.options.length-1; i >= 0; i--)\n            {\n                oListbox.remove(i);\n            }\n\n            }\n\n            function showRSS(){\n                clearSelect('rss_sub');\n                // var newoption = new Option('Весь раздел', '');\n                var newoption = document.createElement('option');\n                newoption.value = '';\n                newoption.innerHTML = 'Весь раздел';\n                document.getElementById('rss_sub').appendChild(newoption);\n                document.getElementById('rss_cat').value = '';\n                document.getElementById('rsso').style.display='block';\n            }\n\n\n            function FilterSubCategoryRSS(category)\n            {\n                var objSel = \$('rss_sub');\n                objSel.options.length = 0;\n                objSel.disabled = 'disabled';\n                objSel.options[objSel.options.length] = new Option('Весь раздел', 0);\n                if(category == 0) {\n                    objSel.set('disabled', true);\n                } else {\n                    objSel.set('disabled', false);\n                }\n                //  var ft = true;\n                applySubcat(category);\n                //  for (i in filter_specs[category]) {\n                //  if (filter_specs[category][i][0]) {\n                //  objSel.options[objSel.options.length] = new Option(filter_specs[category][i][1], filter_specs[category][i][0], ft, ft);\n                //  ft = false;\n                //  }\n                //  }\n                objSel.value = 0;\n            }\n            </script>\n        ";
     // $subcategories = professions::Get
     $select = '<select style="width:340px"  onchange="FilterSubCategoryRSS(this.value);" name="rss_cat" id="rss_cat">><option value="">Все разделы</option>';
     foreach ($categories as $cat) {
         if (!$cat['id']) {
             continue;
         }
         $select .= "<option value=\"{$cat['id']}\">{$cat['name']}</option>";
     }
     $select .= '</select>';
     return "\n        {$script}\n        <div style=\"display: none;\" class=\"overlay ov-out\" id=\"rsso\">\n            <b class=\"c1\"></b>\n            <b class=\"c2\"></b>\n            <b class=\"ov-t\"></b>\n            <div class=\"ov-r\">\n               <div class=\"ov-l\">\n                       <div class=\"ov-in\" style=\"height:110px\">\n                            <label for=\"rss\">Укажите разделы:</label>&nbsp;&nbsp;<br/>{$select}<br/>\n                            <label for=\"rss_sub\">Укажите подразделы:</label>&nbsp;&nbsp;<br/><select style=\"width:340px\" name=\"rss_sub\" id=\"rss_sub\">\n                            <option value=\"\">Весь раздел</option>\n                            </select>\n                            <div class=\"ov-btns\">\n                                <input value=\"Подписаться\" class=\"i-btn i-bold\" type=\"button\" onClick=\"gotoRSS(); document.getElementById('rsso').style.display='none'; return false;\">\n                                <input value=\"Отменить\" class=\"i-btn\" onclick=\"\$(this).getParent('div.overlay').setStyle('display', 'none'); return false;\" type=\"button\">\n                           </div>\n                       </div>\n                    </div>\n                 </div>\n              <b class=\"ov-b\"></b>\n              <b class=\"c3\"></b>\n               <b class=\"c4\"></b>\n           </div>";
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:59,代码来源:projects_lenta.php

示例15: actionProjects

 /**
  * Обработка информации шага проекты.
  */
 public function actionProjects()
 {
     $prj_id = $_SESSION['view_wizard_project'];
     if (!$prj_id) {
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/attachedfiles.php';
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/project_exrates.php';
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
         require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
         $prj_exrates = project_exrates::GetAll();
         $categories = professions::GetAllGroupsLite();
         $professions = professions::GetAllProfessions();
         array_group($professions, 'groupid');
         $professions[0] = array();
         $addedPrc = is_pro() ? 0 : new_projects::PRICE_ADDED;
         $colorPrc = new_projects::PRICE_COLOR * ($addedPrc > 0 ? 1 : 0);
         $boldPrc = new_projects::PRICE_BOLD + $addedPrc;
         $logoPrc = new_projects::PRICE_LOGO + $addedPrc;
         $cTopPrice = new_projects::PRICE_CONTEST_TOP1DAY + $addedPrc;
         $pTopPrice = new_projects::PRICE_TOP1DAY + $addedPrc;
         $action = __paramInit('string', 'action', 'action', null);
         $attachedfiles_session = __paramInit('string', 'attachedfiles_session', 'attachedfiles_session', false);
         // проверяем есть ли уже созданый проект
         $projects = $this->getCreatedProjects();
         $existPrjID = count($projects) > 0 ? $projects[0][id] : null;
         // выводим ранее сохраненный проект
         if ($action != 'create_project' && $existPrjID) {
             $data = $projects[0];
             list($category, $subcategory) = explode('|', $data['categories']);
             $currency_name = $this->CURRENCY_TYPE[$data['currency']];
             $priceby_name = $this->PRICEBY_TYPE[$data['priceby']];
             $data['pro_only'] = $data['pro_only'] === 't';
             $price = $data['payed'];
             $option = array();
             $option['top'] = $data['top_count'] > 0;
             $option['top_count'] = $data['top_count'];
             $option['color'] = $data['is_color'] === 't';
             $option['bold'] = $data['is_bold'] === 't';
             $option['logo'] = $data['logo_id'] > 0;
         } elseif ($action == 'create_project') {
             // сохраняем новый проект или изменяем старый
             $in_office = __paramInit('int', null, 'in_office', 0);
             $type = __paramInit('string', null, 'kind');
             if ($type == 'contest') {
                 $data['kind'] = 7;
                 $data['end_date'] = date('d-m-Y', strtotime(__paramInit('string', null, 'end_date_eng_format', 0)));
                 $data['win_date'] = date('d-m-Y', strtotime(__paramInit('string', null, 'win_date_eng_format', 0)));
             } elseif ($in_office == 1) {
                 $location = __paramInit('integer', null, 'location_column_id');
                 if ($location == 1) {
                     $data['city'] = __paramInit('integer', null, 'location_db_id');
                     $data['country'] = country::getCountryByCityId($data['city']);
                 } else {
                     $data['country'] = __paramInit('integer', null, 'location_db_id');
                 }
                 $data['kind'] = 4;
             } else {
                 $data['kind'] = 1;
             }
             $data['name'] = __paramInit('string', null, 'name');
             $data['descr'] = __paramInit('string', null, 'descr');
             $category = __paramInit('int', null, 'r_category');
             $subcategory = __paramInit('int', null, 'r_subcategory');
             $agreement = __paramInit('int', null, 'agreement', 0);
             $data['pro_only'] = __paramInit('int', null, 'pro_only', 0) == 1 ? true : false;
             if ($agreement != 1) {
                 $data['cost'] = __paramInit('int', null, 'cost', 0);
                 $data['priceby'] = __paramInit('int', null, 'r_priceby', 0);
                 $data['currency'] = __paramInit('int', null, 'r_currency', 0);
                 $data['budget_type'] = __paramInit('int', null, 'budget_type', 0);
             }
             if (is_empty_html($data['descr'])) {
                 $error['descr'] = 'Поле не заполнено';
             }
             if (is_empty_html($data['name'])) {
                 $error['name'] = 'Поле не заполнено';
             }
             // проверяем длину необработанной строки, а иначе спецсимволы считаются как несколько символов
             if (strlen(stripslashes($_POST['name'])) > 60) {
                 $error['name'] = 'Превышен лимит - 60 символов';
             }
             if (!$category) {
                 $error['category'] = 'Не выбран раздел';
             } elseif ($subcategory) {
                 $data['categories'] = "{$category}|{$subcategory}";
             } else {
                 $data['categories'] = $category;
             }
             if ($data['cost'] < 0) {
                 $error['cost'] = 'Введите положительную сумму';
             }
             if ($data['cost'] > 999999) {
                 $error['cost'] = 'Слишком большая сумма';
             }
             if ($data['cost'] > 0 && ($data['currency'] < 0 || $data['currency'] > 3)) {
                 $error['currency'] = 'Валюта не определена';
//.........这里部分代码省略.........
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:step_employer.php


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