本文整理汇总了PHP中country::GetCountries方法的典型用法代码示例。如果您正苦于以下问题:PHP country::GetCountries方法的具体用法?PHP country::GetCountries怎么用?PHP country::GetCountries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类country
的用法示例。
在下文中一共展示了country::GetCountries方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// $filter_page -- код страницы (см. таблицу projects_filters).
// $filter_show -- 1: фильтр развернут, 0: свернут. /Параметр больше не используется - Эдуард, 8.10.2009/
// $filter_inputs -- дополнительные INPUT-ы в форму.
// $kind -- ид. закладки (если фильтр на главной странице).
// $page -- номер страницы (если фильтр на главной странице).
// Плюс должны быть включены заранее все xajax функции, которые тут используются.
if (!$uid) {
return 0;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php";
$has_hidd = TRUE;
$filter_apply = $filter['active'] == "t";
$filter_categories = professions::GetAllGroupsLite(TRUE);
$filter_countries = country::GetCountries();
if ($filter['country']) {
$filter_cities = city::GetCities($filter['country']);
}
switch ($filter_page) {
case 1:
$frm_action = '/proj/?p=list';
$prmd = '&';
$has_hidd = FALSE;
break;
default:
$frm_action = '/';
$prmd = '?';
}
if (!$filter) {
$filter = array('user_id' => $uid, 'cost_from' => '', 'cost_to' => '', 'currency' => 0, 'wo_cost' => 't', 'only_sbr' => 'f', 'country' => 0, 'city' => 0, 'keywords' => '', 'categories' => array());
示例2: _admEditProjectsParseForm
/**
* Отдает HTML для Редактирование проектов и конкурсов
*
* @param object $objResponse xajaxResponse
* @param string $rec_id идентификатор записи
* @param string $rec_type тип записи
* @param array $aParams дополнительные параметры с UID отправителя. остальные - опционально
* @return string
*/
function _admEditProjectsParseForm(&$objResponse, $rec_id = '', $rec_type = '', $aParams = array())
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/professions.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/attachedfiles.php';
$sTmpKey = md5(uniqid($_SESSION['uid']));
$tmpPrj = new tmp_project($sTmpKey);
$prj = $tmpPrj->init(1, $rec_id);
$tmpPrj->fix();
// $aFolders = projects::getUserFolders( $prj['user_id'] ); // папки
$remTPeriod = $tmpPrj->getRemainingTopPeriod($remTD, $remTH, $remTM, $remtverb);
// закрепление
// страны и города
$countries = country::GetCountries();
if ($prj['country']) {
$cities = city::GetCities($prj['country']);
}
// разделы
$categories = professions::GetAllGroupsLite();
$professions = professions::GetAllProfessions();
array_group($professions, 'groupid');
$professions[0] = array();
$project_categories = new_projects::getSpecs($rec_id);
if (empty($project_categories)) {
$project_categories[] = array('category_id' => 0, 'subcategory_id' => 0);
}
ob_start();
include_once $_SERVER['DOCUMENT_ROOT'] . '/user/adm_edit_tpl/projects.php';
$sHtml = ob_get_contents();
ob_end_clean();
// текст
$sOnReady = "if(document.getElementById('adm_edit_descr')) \n document.getElementById('adm_edit_descr').value = (\$('adm_edit_descr_source')? \$('adm_edit_descr_source').value : null);";
// аттачи
$sAttach = getAttachedFilesJs(projects::GetAllAttach($rec_id), tmp_project::MAX_FILE_COUNT, tmp_project::MAX_FILE_SIZE, 'project');
$objResponse->assign('h4_adm_edit', 'innerHTML', 'Редактировать ' . ($rec_type == '7' ? 'конкурс' : 'проект'));
$objResponse->assign('div_adm_edit', 'innerHTML', $sHtml);
$objResponse->script("\$('div_adm_reason').setStyle('display', 'none');");
$objResponse->script("adm_edit_content.editMenuItems = ['', 'Основное', 'Файлы', 'Платные услуги'];");
$objResponse->script('adm_edit_content.edit();');
$objResponse->script($sAttach);
$objResponse->script($sOnReady);
$objResponse->script("var mx = new MultiInput('adm_edit_professions','category_line'); mx.init();");
$objResponse->script('xajax_getAdmEditReasons(' . admin_log::ACT_ID_EDIT_PROJECTS . ');');
// для конкурса даты окончания и определения победителей
if ($prj['kind'] == 7) {
$objResponse->script("new tcal ({ 'formname': 'adm_edit_frm', 'controlname': 'adm_edit_end_date', 'iconId': 'end_date_btn', 'clickEvent': function(){ adm_edit_content.hideError('end_date'); } });");
$objResponse->script("new tcal ({ 'formname': 'adm_edit_frm', 'controlname': 'adm_edit_win_date', 'iconId': 'win_date_btn', 'clickEvent': function(){ adm_edit_content.hideError('win_date'); } });");
}
}
示例3: isset
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/countrys.common.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";
$xajax->printJavascript('/xajax/');
$is_show_adv = isset($_SESSION['search_advanced'][$type]);
if (!$filter) {
$filter = $_SESSION['search_advanced'][$type];
}
$categories = professions::GetAllGroupsLite(TRUE);
$subcategories = professions::GetAllProfessions(1);
$countries = country::GetCountries();
if ($filter['country']) {
$cities = city::GetCities($filter['country']);
}
$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'];
}
//создаем массив специализаций (для фильтра на главной он уже есть в $prfs, для фильтра в проектах фрилансера его нет, поэтому делаем проверку на существование
if (!sizeof($profs)) {
$all_specs = professions::GetAllProfessions("", 0, 1);
} else {
$all_specs = $profs;
}
?>
<script type="text/javascript">
示例4: foreach
<div class="b-menu b-menu_line b-menu_relative b-menu_padbot_10 b-menu__cat b-menu_zindex_6" >
<?php
if (false) {
$region_filter_txt = '<strong>Все</strong>';
if ($filter_apply) {
$region_filter_country_id = $mFilter['country'];
$region_filter_city_id = $mFilter['city'];
} else {
$region_filter_country_id = $_SESSION['region_filter_country'];
$region_filter_city_id = $_SESSION['region_filter_city'];
}
$_SESSION['region_filter_country'] = $region_filter_country_id;
$_SESSION['region_filter_city'] = $region_filter_city_id;
$region_filter_countries = country::GetCountries();
if ($region_filter_country_id) {
$region_filter_cities = city::GetCities($region_filter_country_id);
}
if ($region_filter_country_id) {
foreach ($region_filter_countries as $countid => $country) {
if ($countid == $region_filter_country_id) {
$region_filter_country_txt = $country;
}
}
$region_filter_txt = '<strong>' . $region_filter_country_txt . '</strong>';
if ($region_filter_city_id) {
foreach ($region_filter_cities as $cityid => $city) {
if ($cityid == $region_filter_city_id) {
$region_filter_city_txt = $city;
}
示例5: session_start
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/masssending.php';
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';
session_start();
if (!($uid = get_uid())) {
header('Location: /fbd.php');
exit;
}
$masssending = new masssending();
$countries = country::GetCountries(true);
$prof_groups = professions::GetAllGroupsLite(true);
$professions = professions::GetProfList();
$exrates = project_exrates::GetAll();
if (!empty($_POST)) {
$frm = $_POST;
//$params['msg'] = stripslashes($frm['msg']);
$params['msg'] = "Здравствуйте!\n\nПриглашаю ознакомиться с проектом '" . change_q_x(stripslashes($frm['title']), false, false, 'b|i|p|ul|li|s|h[1-6]{1}', false, false) . "' " . str_replace('www.n.fl.ru', 'n.fl.ru', $host) . $frm['link'] . " \n\n\n" . LenghtFormatEx(change_q_x(stripslashes($frm['msg']), false, false, 'b|i|p|ul|li|s|h[1-6]{1}', false, false), 300);
$params['max_users'] = intval($_POST['max_users']);
$params['max_cost'] = intval($_POST['max_cost']);
$params['is_pro'] = stripslashes($frm['pro']);
$params['favorites'] = stripslashes($frm['favorites']);
$params['free'] = stripslashes($frm['free']);
$params['sbr'] = stripslashes($frm['bs']);
$params['portfolio'] = stripslashes($frm['withworks']);
$params['inoffice'] = stripslashes($frm['office']);
$params['opi_is_verify'] = stripslashes($frm['ver']);
示例6: bankAction
/**
* Перевод для юр лиц - "Банковский перевод для юридических лиц (рубли)".
*/
public function bankAction()
{
front::og('tpl')->page = 'index';
$act = $this->uri[0];
if ($act == 'delete') {
unset($_SESSION['sum']);
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php';
$did = intval($this->uri[1]);
if ($did) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php';
$reqv = new reqv();
$reqv->Del($did, " AND user_id='" . get_uid() . "'");
header("Location: /{$this->name_page}/bank/");
exit;
}
unset($reqv);
}
if ($_POST['sum'] > 0) {
$_SESSION['sum'] = floatval($_POST['sum']);
} else {
front::og('tpl')->sum = floatval($_SESSION['sum']);
}
// Обработка подстраницы редактирования данных для перевода
if ($act == 'edit') {
/**
* Подключение всех необходимых классов для вывода данной страницы.
*/
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv_ordered.php';
if ($_POST['update']) {
$reqv = new reqv();
$reqv->BindRequest($_POST);
$error = $reqv->CheckInput();
if (!$error) {
$reqv->user_id = get_uid();
$reqv->Update($reqv->id, " AND user_id='" . get_uid() . "'");
header("Location: /{$this->name_page}/bank/#reqv" . $reqv->id);
exit;
} else {
$action = 'edit';
$edit_mode = 1;
$eid = intval($reqv->id);
}
front::og('tpl')->error = $error;
}
front::og('tpl')->countries = country::GetCountries();
$reqvs = new reqv();
$reqvByUid = $reqvs->GetByUid(get_uid());
$reqvs_ord = new reqv_ordered();
$billNum = sizeof($reqvs_ord->GetByUid(get_uid()));
$sum = trim($this->uri[2]);
$norisk_id = intval(trim($_REQUEST['noriskId']));
front::og('tpl')->reqvs = $reqvs;
front::og('tpl')->sum = $sum;
front::og('tpl')->reqvByUid = $reqvByUid;
front::og('tpl')->reqvs_ord = $reqvs_ord;
front::og('tpl')->billNum = $billNum;
front::og('tpl')->norisk_id = $norisk_id;
front::og('tpl')->edit_mode = $edit_mode = 1;
front::og('tpl')->eid = $eid = intval($this->uri[1]);
// Событие нажатия кнопки - Обновить
if (!$_POST['update']) {
foreach ($reqvByUid as $ikey => $value) {
$reqvs->BindRequest($value);
if ($edit_mode && $reqvs->id == $eid) {
$reqvkey = $ikey;
}
}
$reqv = new reqv();
if ($act == 'edit' && !$error) {
$reqv->BindRequest($reqvByUid[$reqvkey]);
} elseif ($error) {
$reqv->BindRequest($_POST);
}
}
front::og('tpl')->reqv = $reqv;
front::og('tpl')->display('bill/bill_bank_step2.tpl');
exit;
} else {
// Иначе выводим главную страницу, где необходимо заполнять поля
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/reqv_ordered.php';
front::og('tpl')->countries = country::GetCountries();
$reqvs = new reqv();
$reqvByUid = $reqvs->GetByUid(get_uid());
$reqvs_ord = new reqv_ordered();
$billNum = sizeof($reqvs_ord->GetByUid(get_uid()));
$sum = trim(!$_POST['sum'] ? $_SESSION['sum'] : floatval($_POST['sum']));
$norisk_id = intval(trim($_REQUEST['noriskId']));
front::og('tpl')->reqvs = $reqvs;
front::og('tpl')->sum = $sum;
front::og('tpl')->reqvByUid = $reqvByUid;
front::og('tpl')->reqvs_ord = $reqvs_ord;
front::og('tpl')->billNum = $billNum;
//.........这里部分代码省略.........
示例7: session_start
return $a;
}
session_start();
$uid = get_uid();
if (isset($_GET['unset'])) {
setcookie('mass-files');
unset($_SESSION['masssending']);
}
$fromSearch = __paramInit('int', 'from_search', null, 0);
// если пришли сюда из поиска пользователей
if ($fromSearch === 2) {
// количество найденых
$searchCount = __paramInit('int', 'search_count', 'search_count', false);
}
$masssending = new masssending();
$countries = country::GetCountries(TRUE);
$prof_groups = professions::GetAllGroupsLite(TRUE);
$professions = professions::GetProfList();
$exrates = project_exrates::GetAll();
//print_r($_POST);
//die;
$dc = 0;
if (!empty($_GET['g'])) {
if (preg_match("/^([0-9]+)\\:([0-9]+)\$/", $_GET['g'], $o)) {
$dc = $_GET['g'];
$dcg = $o[1];
$dcp = $o[2];
} else {
if (preg_match("/^[0-9]+\$/", $_GET['g'])) {
$dc = "{$_GET['g']}:0";
$dcg = $_GET['g'];
示例8: 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);');
//.........这里部分代码省略.........