本文整理汇总了PHP中professions::GetProfessions方法的典型用法代码示例。如果您正苦于以下问题:PHP professions::GetProfessions方法的具体用法?PHP professions::GetProfessions怎么用?PHP professions::GetProfessions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类professions
的用法示例。
在下文中一共展示了professions::GetProfessions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSuccessInfo
/**
* Информация о успешно прошедшей операции
*
* @param array $data - Информация об операции
* @return array информация
*/
function getSuccessInfo($data)
{
global $DB;
if (in_array($data['op_code'], array(17, 84, 85))) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/present.php";
$present = new present();
return $present->getSuccessInfo($data);
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
$uid = get_uid(false);
$sql = "SELECT o.*, u.login FROM users u, users_first_page o WHERE u.uid = ?i AND o.user_id = u.uid AND o.billing_id = ?i";
$asc = $DB->row($sql, $uid, $data['id']);
$profs[] = $asc['profession'];
$prof_info = professions::GetProfessions($profs);
$poss = firstpage::GetPositions($uid, $profs);
$is_up = $poss[$asc['profession']] > 1;
$login_pp = "{$asc['login']}_pp";
$linktopage = "/freelancers/#{$login_pp}";
if ($prof_info[$profs[0]]["id"] == -1) {
$linktopage = "/#{$login_pp}";
} elseif ($prof_info[$profs[0]]["id"]) {
$linktopage = "/freelancers/{$prof_info[$profs[0]]["link"]}/#{$login_pp}";
}
$name = "Платные места в разделах (<a class=\"b-layout__link b-layout__link_bold\" href=\"{$linktopage}\">{$prof_info[$asc['profession']]['name']}</a> — {$poss[$asc['profession']]}-е место" . ($is_up ? " <a class=\"b-layout__link b-layout__link_bold\" href=\"/firstpage/position.php?cur_prof={$asc['profession']}\">подняться выше</a>?)" : ")");
$data['ammount'] = abs($data['ammount']);
$suc = array("date" => $data['op_date'], "name" => $name, "descr" => "", "sum" => "{$data['ammount']} руб.");
return $suc;
}