本文整理汇总了PHP中professions::GetProfsAddSpec方法的典型用法代码示例。如果您正苦于以下问题:PHP professions::GetProfsAddSpec方法的具体用法?PHP professions::GetProfsAddSpec怎么用?PHP professions::GetProfsAddSpec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类professions
的用法示例。
在下文中一共展示了professions::GetProfsAddSpec方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
//.........这里部分代码省略.........
示例2: array
?>
<br />
<script type="text/javascript">var HTML_KWORDTMPL='<?php
echo $html_keyword_js;
?>
'</script>
<table cellspacing="0" cellpadding="0" style="width:100%;" class="cpt-info">
<tr>
<td style="width:45%;vertical-align:top;padding:16px 16px 32px 19px;">
<div style="padding-bottom:15px;vertical-align:top;white-space:nowrap;">Специализация: <?php
echo professions::GetProfNameWP($user->spec, ' / ', 'Нет специализации');
?>
</div>
<?php
$specs_add = professions::GetProfsAddSpec($user->uid);
$specs_add_string = null;
if ($specs_add) {
$specs_add_array = array();
for ($si = 0; $si < sizeof($specs_add); $si++) {
$specs_add_array[$si] = professions::GetProfNameWP($specs_add[$si], ' / ');
}
$specs_add_string = join(", ", $specs_add_array);
} else {
$specs_add_string = "Нет";
}
?>
<?php
if ($specs_add_string) {
?>
示例3: header
<?php
if (!$_in_setup) {
header("HTTP/1.0 403 Forbidden");
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/portfolio.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
$prfs = new professions();
if (!is_object($user)) {
$user = new freelancer();
$user->GetUser($_SESSION['login']);
}
$is_exec_action = isset($action) && $action == 'serv_change' && $error_serv != '';
$frm_serv_val = array('tab_name_id' => $is_exec_action ? floatval($tab_name_id) : $user->tab_name_id, 'exp' => $is_exec_action ? floatval($exp) : $user->exp, 'cost_hour' => $is_exec_action ? $cost_hour : $user->cost_hour, 'cost_month' => $is_exec_action ? $cost_month : $user->cost_month, 'cost_type_hour' => $is_exec_action ? $cost_type_hour : $user->cost_type_hour, 'cost_type_month' => $is_exec_action ? $cost_type_month : $user->cost_type_month, 'text' => $is_exec_action ? $text : $user->spec_text, 'in_office' => $is_exec_action ? $in_office : $user->in_office);
$specs_add = array();
if ($is_pro) {
$specs_add = $prfs->GetProfsAddSpec(get_uid());
}
if (!empty($specs_add)) {
$specs_add_array = array();
for ($si = 0; $si < sizeof($specs_add); $si++) {
$specs_add_array[$si] = professions::GetProfNameWP($specs_add[$si], ' / ');
}
$specs_add_string = join(", ", $specs_add_array);
} else {
$specs_add_string = "Нет";
}
示例4: offerSpecIsAllowed
/**
* Проверяет по специализациям, может ли текущий пользователь ответить на проект.
*
* @param int $projec_id ид проекта
*
* @return boolean
*/
public static function offerSpecIsAllowed($projec_id)
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
// ПРО отвечают без ограничений
if (is_pro()) {
return true;
}
if (!get_uid(false)) {
return false;
}
$is_send_offers = false;
$spec_project = new_projects::getSpecs($projec_id);
$user_spec = professions::GetProfsAddSpec($_SESSION['uid']);
if (is_array($user_spec)) {
$user_spec = array_merge($user_spec, $_SESSION['specs']);
} else {
$user_spec = $_SESSION['specs'];
}
if ($user_spec) {
$user_spec = array_merge($user_spec, professions::GetMirroredProfs(professions::GetProfessionOrigin(implode(',', $user_spec))));
$user_spec = array_unique($user_spec);
//@todo запехать в один запрос
foreach ($user_spec as $spec) {
$prof_group[$spec] = professions::GetProfField($spec, 'prof_group');
}
}
foreach ($spec_project as $specs) {
if (is_array($prof_group) && in_array($specs['category_id'], $prof_group)) {
$is_send_offers = true;
// Разрашаем оставлять отзыв
break;
}
}
return $is_send_offers;
}
示例5: rtrim
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '512M');
if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) {
$_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../../'), '/');
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
$p = new professions();
$data = $p->GetProfsAddSpec(79000);
print_r($data);
exit;
示例6: header
if (!$_in_setup) {
header("HTTP/1.0 403 Forbidden");
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
$prfs = new professions();
$profs = $prfs->GetAllProfessionsSpec($user->uid);
$main_spec = null;
foreach ($profs as $p) {
if ($p['checked']) {
$main_spec = $p['id'];
}
}
$specs_add = array();
if (is_pro()) {
$specs_add = $prfs->GetProfsAddSpec($uid);
}
$mirr_specs = array();
$all_checked = $specs_add;
if (count($all_checked)) {
$mirr_specs = $prfs->GetMirroredProfs(implode(",", $all_checked));
if (count($mirr_specs)) {
$mirr_specs = array_diff($mirr_specs, $all_checked);
}
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/quickpro.common.php";
$xajax->printJavascript('/xajax/');
?>
<div class="b-layout b-layout_padtop_20">
<form id='idProfs' action="/users/<?php
echo $user->login;
示例7: rating
$rating = new rating($user->uid, $user->is_pro, $user->is_verify, $user->is_profi);
}
$r_data = $rating->data;
if ($iWantPro) {
$r_data['total'] = rating::GetPredictionPRO($p_user->uid, 't', $p_user->is_verify);
}
//$samerank = rating::CountByRank($r_data['rank']);
$banblog = $user->GetBan($user->uid, 1);
if ($user->birthday && $user->birthday > "1910-01-01") {
$user_ago = ElapsedYears(strtotime($user->birthday));
}
$info_for_reg = @unserialize($user->info_for_reg);
$rating_pos = NULL;
if (($user->is_pro == 'f' || $user->cat_show == 't') && ($user_profs = professions::GetProfessionsByUser($user->uid))) {
if ($user->is_pro == 'f') {
$dop_user_profs = professions::GetProfsAddSpec($user->uid);
if (is_array($dop_user_profs)) {
$user_profs = array_merge($user_profs, $dop_user_profs);
}
}
foreach ($user_profs as $up) {
$rating_pos[] = professions::GetCatalogPosition($user->uid, $user->spec_orig, $r_data['total'], $up, $user->is_pro == 't');
}
}
$team = new teams();
switch ($user->status_type) {
case 1:
$status_cls = 'b-status_busy';
break;
case 2:
$status_cls = 'b-status_abs';