本文整理汇总了PHP中country类的典型用法代码示例。如果您正苦于以下问题:PHP country类的具体用法?PHP country怎么用?PHP country使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了country类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: list_countries
function list_countries()
{
$query = $this->con->genericQuery("select * from " . $this->table . " order by name");
$objReturn = array();
foreach ($query as $value) {
$country = new country();
$country->open($value);
$objReturn[] = $country;
}
return $objReturn;
}
开发者ID:FlushOut,项目名称:folearn,代码行数:11,代码来源:country.php
示例2: pickrandom
function pickrandom($time)
{
$active = contest::active();
$activeCountries = country::stateSortVotes('active');
if ($activeCountries->count() == 0) {
$final = country::stateSortVotes('finale');
$finalCount = $final->count();
$ranks = [1 => 'gold', 2 => 'silver', 3 => 'bronze'];
for ($i = 1; $i <= 3 && $i <= $finalCount; $i++) {
$final->found();
new medal(['type' => $ranks[$i], 'votes' => $final->votes, 'contest#' => $active->id, 'country#' => $final->id]);
}
country::resetVotes();
$active->end = $time;
$new = contest::nextActive();
$new->start = $time;
$new->update();
pickFromQueue();
} else {
$activeCountries->state = 'finale';
$activeCountries->votes = 0;
while ($activeCountries->found()) {
$activeCountries->state = 'eliminated';
}
pickFromQueue();
}
}
开发者ID:Amirzaidi,项目名称:wwwroot,代码行数:27,代码来源:pickrandom.php
示例3: RFGetCitysByCid
/**
* Возвращает select со списком городов указанной страны в для фильтра регионов в каталоге фрилансеров.
*
* @param int $country название страны транслит
* @param array $attr опционально. атрибуты select например: array('name'=>'pf_city', 'class'=>'flt-p-sel',...);
*
* @return unknown
*/
function RFGetCitysByCid($country, $attr = array())
{
$objResponse = new xajaxResponse();
if (!$attr) {
$attr = array('name' => 'pf_city', 'class' => 'b-select__select');
}
$sAttr = '';
foreach ($attr as $key => $val) {
$sAttr .= ' ' . $key . '="' . $val . '"';
}
if ($country) {
$cities = city::GetCities(country::getCountryIDByTranslit($country));
}
$objResponse->script('$("b-select__city").set("html","");');
$objResponse->script('new Element("option", { value: "0", text: "Все города" }).inject($("b-select__city"));');
$js = '';
if ($cities) {
foreach ($cities as $cityid => $city) {
$js .= 'new Element("option", { value: "' . translit(strtolower($city)) . '", text: "' . $city . '" }).inject($("b-select__city"));' . "\n";
}
}
if ($js) {
$objResponse->script($js);
}
return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:34,代码来源:countrys.server.php
示例4: actionAjaxState
public function actionAjaxState()
{
$country = country::model()->findByPk($_POST['address']['address_country_ID']);
if ($country && $country->contain_states == 1) {
echo CHtml::dropDownList('address[address_state_ID]', '', state::items($country->country_ID), array('id' => 'state'));
} else {
echo CHtml::dropDownList('address[address_state_ID]', '', array(0 => '----------------------------------------'), array('id' => 'state'));
}
}
开发者ID:htom78,项目名称:XZB2c,代码行数:9,代码来源:AddressController.php
示例5: loadModel
public function loadModel()
{
if ($this->_model == null) {
if (isset($_GET['id'])) {
$condition = '';
$this->_model = country::model()->findByPk($_GET['id'], $condition);
}
if ($this->_model == null) {
throw new CHttpException(404, "The requested page does not exist!");
}
}
return $this->_model;
}
开发者ID:htom78,项目名称:XZB2c,代码行数:13,代码来源:CountryController.php
示例6: store
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store(Request $request)
{
$insert = $request->all();
$safeName = false;
//upload image
if ($file = Input::file('image')) {
$fileName = $file->getClientOriginalName();
$extension = $file->getClientOriginalExtension() ?: 'png';
$folderName = '/uploads/';
$destinationPath = Config::get('app.path') . $folderName;
$safeName = time() . "_" . str_random(10) . '.' . $extension;
$file->move($destinationPath, $safeName);
$insert['image'] = $safeName ? $folderName . $safeName : '';
}
if (isset(Country::$boolean)) {
foreach (country::$boolean as $field) {
if (isset($insert[$field]) && $insert[$field] == "on") {
$insert[$field] = 1;
}
}
}
country::create($insert);
return redirect('admin/countries')->with('success', Lang::get('message.success.create'));
}
开发者ID:nirlewin,项目名称:test,代码行数:29,代码来源:CountriesController.php
示例7: getInformationUser
public function getInformationUser($uid = false)
{
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/employer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php";
if (!$uid) {
$uid = $_SESSION['uid'];
}
if (is_emp()) {
$user = new employer();
} else {
$user = new freelancer();
}
$user->GetUserByUID($uid);
$this->setFieldInfo('uname', $user->uname);
$this->setFieldInfo('usurname', $user->usurname);
$this->setFieldInfo('birthday', $user->birthday);
$this->setFieldInfo('country', $user->country);
$this->setFieldInfo('country_name', country::GetCountryName($user->country));
$this->setFieldInfo('city', $user->city);
$this->setFieldInfo('city_name', city::GetCityName($user->city));
$this->setFieldInfo('sex', $user->sex == 't' ? 1 : ($user->sex == 'f' ? 0 : -1));
$this->setFieldInfo('info_for_reg', unserialize($user->info_for_reg));
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:25,代码来源:registration.php
示例8: processRequest
//.........这里部分代码省略.........
$membuf->add($memkey, $result, $expire);
}
return json_encode($result);
case 'getprofessions':
$n = __paramInit('integer', '', 'id');
if ($n !== false) {
$membuf = new memBuff();
$memkey = "b-combo-getprofbygroup{$n}";
$result = $membuf->get($memkey);
if (!$result) {
$rows = professions::GetProfs($n);
$result = array(0 => iconv('WINDOWS-1251', 'UTF-8//IGNORE', 'Все специальности'));
foreach ($rows as $k => $i) {
$result[$i['id']] = iconv('WINDOWS-1251', 'UTF-8//IGNORE', $i['name']);
}
$membuf->add($memkey, $result, $expire);
}
$data = array(array('parentId' => "{$n}"), $result);
return json_encode($data);
}
case 'get_pro_types':
$membuf = new memBuff();
$memkey = 'b-combo-get_pro_type';
$result = $membuf->get($memkey);
if (!$result) {
$rows = op_codes::getCodes(array(47, 48, 49, 50, 51));
$result = array();
foreach ($rows as $k => $i) {
$result[$i['id']] = iconv('WINDOWS-1251', 'UTF-8//IGNORE', $i['op_name']);
}
$result[76] = iconv('WINDOWS-1251', 'UTF-8//IGNORE', 'На несколько недель');
$membuf->add($memkey, $result, $expire);
}
return json_encode($result);
case 'getcountries':
case 'getrelevantcountries':
$membuf = new memBuff();
$memkey = 'b-combo-getcountriesr';
$result = $membuf->get($memkey);
if (!$result) {
$rows = country::GetCountriesByCountUser();
$result = array();
foreach ($rows as $k => $i) {
$result[$i['id']] = iconv('WINDOWS-1251', 'UTF-8//IGNORE', $i['name']);
}
$membuf->add($memkey, $result, $expire);
}
return json_encode($result);
case 'getcities':
$n = __paramInit('integer', '', 'id');
if ($n !== false) {
$membuf = new memBuff();
$memkey = "b-combo-getcitybycountry{$n}";
$result = $membuf->get($memkey);
if (!$result) {
$rows = city::GetCities($n);
$result = array('0' => iconv('WINDOWS-1251', 'UTF-8//IGNORE', 'Все города'));
if (is_array($rows)) {
foreach ($rows as $k => $i) {
$result[$k] = iconv('WINDOWS-1251', 'UTF-8//IGNORE', $i);
}
}
$membuf->add($memkey, $result, $expire);
}
$data = array(array('parentId' => "{$n}"), $result);
return json_encode($data);
}
case 'getcitiesbyid':
$n = __paramInit('integer', '', 'id');
if ($n !== false) {
$membuf = new memBuff();
$memkey = "b-combo-getcitybycountry{$n}";
$result = $membuf->get($memkey);
if (!$result) {
$rows = city::GetCities($n);
$result = array('0' => iconv('WINDOWS-1251', 'UTF-8//IGNORE', 'Все города'));
foreach ($rows as $k => $i) {
$result[$k] = iconv('WINDOWS-1251', 'UTF-8//IGNORE', $i);
}
$membuf->add($memkey, $result, $expire);
}
return json_encode($result);
}
case 'getuserlistbysbr':
case 'getuserlistold':
case 'getuserlist':
return $this->getUsersList($_POST['word'], (int) $_POST['limit'], (int) $_POST['userType'], (int) $_POST['scope']);
case 'get_user_info':
return json_encode(users::GetUserShortInfo((int) $_POST['uid']));
case 'getusersandcompanies':
return $this->getUsersAndCompany($_POST['word'], (int) $_POST['limit'], (int) $_POST['userType'], (int) $_POST['scope'], false);
case 'get_user_or_company_info':
return $this->getUserOrCompanyRecord();
case 'getsms':
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/registration.php';
$registration = new registration();
$registration->listenerAction(__paramInit('string', null, 'action'));
}
return false;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:b_combo_box_request_handler.php
示例9: 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;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:29,代码来源:content.php
示例10: 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;
//.........这里部分代码省略.........
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:101,代码来源:page_bill.class.php
示例11: print
$_SESSION['no_of_room'] = $no_of_room;
$room_type_id = $_REQUEST['room_type_id'];
print("
<script type='text/javascript'>
var check_in_date='" . $check_in_date . "';
var check_out_date='" . $check_out_date . "';
var room_type_id='" . $room_type_id . "';
var room_bed_type='" . $room_bed_type . "';
var room_meal_type='" . $_SESSION['room_meal_type'] . "';
var num_rooms='" . $no_of_room . "';
</script>
");
$hotel_room_type = new HotelRoomType();
$hotel = new Hotels();
$country = new country();
$hotel->setHotelId($hotels_id);
$hotel->extractor($hotel->getHotelFromId());
$country->setCountryId($_SESSION['country_id']);
$hotel_room_type->setRoomTypeId($room_type_id);
$hotel_room_type->extractor($hotel_room_type->getHotelRoomTypeFromId());
if ($hotels_id != $hotel_room_type->roomTypeHotelId()) {
echo "Error";
die();
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:30,代码来源:room_reservation.php
示例12: completeData
public function completeData($type_role = 1)
{
if ($this->isDisable()) {
header("Location: /wizard/registration/?step=1");
exit;
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/employer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/freelancer.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/blogs.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/commune.php";
$themes_blogs = blogs::getRandomThemes(5);
$themes_commune = commune::getRandomCommunes(3);
$month = array('1' => 'января', '2' => 'февраля', '3' => 'марта', '4' => 'апреля', '5' => 'мая', '6' => 'июня', '7' => 'июля', '8' => 'августа', '9' => 'сентября', '10' => 'октября', '11' => 'ноября', '12' => 'декабря');
if ($type_role == step_wizard_registration::TYPE_WIZARD_EMP) {
$user = new employer();
$checkPRO = $this->checkWizardPRO(array(step_employer::OP_CODE_PRO));
$pro_emp = $checkPRO['id'] > 0 ? 1 : 0;
if ($pro_emp) {
$week_pro = round($checkPRO['ammount'] / 10);
}
} else {
$user = new freelancer();
$checkPRO = $this->checkWizardPRO(step_freelancer::getOperationCodePRO());
$pro_frl = $checkPRO['id'] > 0 ? 1 : 0;
if ($pro_frl) {
$op_code = $checkPRO['op_code'];
}
}
$user->GetUserByUID(wizard::getUserIDReg());
$info_for_reg = unserialize($user->info_for_reg);
$uname = $user->uname;
$usurname = $user->usurname;
$sex = $user->sex == 't' ? 1 : ($user->sex == 'f' ? 0 : -1);
$birthday = strtotime($user->birthday);
if ($birthday) {
$bday = date('d', $birthday);
$bmonth = (int) date('m', $birthday);
$bmonth_value = $month[$bmonth];
$byear = date('Y', $birthday);
} else {
$bday = '';
$bmonth = (int) date('m', $birthday);
$bmonth_value = $month[$bmonth];
$byear = '';
}
$city = $user->city;
if ($city) {
$city_value = city::GetCityName($city);
}
$country = $user->country;
if ($country) {
$country_value = country::GetCountryName($country);
}
if ($type_role == step_wizard_registration::TYPE_WIZARD_EMP) {
$company = $user->compname;
$about_company = $user->company;
$logo_name = $user->logo;
$dir = "users/" . substr($user->login, 0, 2) . "/" . $user->login . "/logo/";
$logo_path = WDCPREFIX . "/" . $dir . $user->logo;
}
$info['site'] = $this->loadMultiVal('site', 'site', $user);
$info['email'] = $this->loadMultiVal('second_email', 'email', $user);
$info['phone'] = $this->loadMultiVal('phone', 'phone', $user);
$info['icq'] = $this->loadMultiVal('icq', 'icq', $user);
$info['skype'] = $this->loadMultiVal('skype', 'skype', $user);
$info['jabber'] = $this->loadMultiVal('jabber', 'jabber', $user);
$info['lj'] = $this->loadMultiVal('ljuser', 'lj', $user);
$action = __paramInit('string', null, 'action');
if ($action == 'upd_info') {
$info_for_reg = $_POST['info_for_reg'];
if ($info_for_reg['email_0'] !== null) {
$info_for_reg['second_email'] = $info_for_reg['email_0'];
unset($info_for_reg['email_0']);
}
if ($info_for_reg['phone_0'] !== null) {
$info_for_reg['phone'] = $info_for_reg['phone_0'];
unset($info_for_reg['phone_0']);
}
if ($info_for_reg['site_0'] !== null) {
$info_for_reg['site'] = $info_for_reg['site_0'];
unset($info_for_reg['site_0']);
}
if ($info_for_reg['lj_0'] !== null) {
$info_for_reg['ljuser'] = $info_for_reg['lj_0'];
unset($info_for_reg['lj_0']);
}
if ($info_for_reg['jabber_0'] !== null) {
$info_for_reg['jabber'] = $info_for_reg['jabber_0'];
unset($info_for_reg['jabber_0']);
}
if ($info_for_reg['skype_0'] !== null) {
$info_for_reg['skype'] = $info_for_reg['skype_0'];
unset($info_for_reg['skype_0']);
}
if ($info_for_reg['icq_0'] !== null) {
$info_for_reg['icq'] = $info_for_reg['icq_0'];
unset($info_for_reg['icq_0']);
}
//.........这里部分代码省略.........
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:101,代码来源:step_wizard_registration.php
示例13: elseif
if (!($info_for_reg['country'] && !$uid) && $user->country) {
?>
<div class="b-layout__hover_bg_f0ffdf b-layout_padlr_10 b-layout_pad_3">
<div class="b-layout__txt b-layout__txt_padleft_35 b-layout__txt_lineheight_1 b-layout__txt_padtop_1">
<span class="b-icon b-icon__cont b-icon__cont_map b-icon_margleft_-35"></span>
<?php
if ($info_for_reg['country'] && !$uid) {
?>
<?php
echo $reg_string;
?>
<?php
} elseif ($user->country) {
?>
<?php
echo country::GetCountryName($user->country);
if ($user->city && !($info_for_reg['city'] && !$uid)) {
?>
, <?php
echo city::GetCityName($user->city);
}
?>
<?php
}
?>
</div>
</div>
<?php
}
?>
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:30,代码来源:contacts_info.php
示例14: country
</div>
</div>
<div class="<?php
echo $color[$c++ % 2];
?>
" id="leaderboard">
<div class="headconbody">
<div class="row">
<div class="description">
<h3>[nav_leaderboard]</h3>
<p>[leaderboarddesc]</p>
<div class="contentrow">
<?php
$country = new country(false);
while ($country->found()) {
?>
<div class="col-md-4">
<div class="conx">
<h1><?php
echo $country->name;
?>
</h1>
<div class="medals">
<p><?php
echo $country->medal()->count();
?>
开发者ID:Amirzaidi,项目名称:wwwroot,代码行数:31,代码来源:index.php
示例15: country
<?php
$a = $_POST['Data'];
include_once '../config/country.php';
$ob = new country();
$res = $ob->select_location($a);
echo '<option value="0">--Select--</option>';
while ($r = mysqli_fetch_array($res)) {
echo '<option value="' . $r['id'] . '">' . $r['location'] . "</option>";
}
开发者ID:salajss,项目名称:eRecruitment,代码行数:10,代码来源:location.php
示例16: 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']);
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:add.php
示例17: array
$filter_prof = array(1 => array($prof_id => 1));
} elseif ($prof_group_id > 0) {
$profs = professions::GetProfs($prof_group_id);
$filter_prof = array();
foreach ($profs as $prof) {
$filter_prof[1][$prof['id']] = 1;
}
}
$filter = array("is_pro" => $is_pro, 'prof' => $filter_prof);
$string_professions = '';
if ($action == "search_advanced") {
$filter = array("active" => "t", "prof" => $filter_prof, "cost_type" => intval(@$_POST['cost_type_db_id']), "from_cost" => $from_cost, "to_cost" => $to_cost, "curr_type" => intval(@$_POST['curr_type_db_id']), "exp" => is_array($_POST['exp']) ? array_map("intval", $_POST['exp']) : @$_POST['exp'], "exp_from" => $exp[0], "exp_to" => $exp[1], "age" => is_array($_POST['age']) ? array_map("intval", $_POST['age']) : @$_POST['age'], "age_from" => $age[0], "age_to" => $age[1], "country" => (int) @$_POST['location_columns'][0], "city" => (int) @$_POST['location_columns'][1], "in_office" => (bool) @$_POST['in_office'], "in_fav" => (bool) @$_POST['in_fav'], "only_free" => (bool) @$_POST['only_free'], "is_pro" => $is_pro, "is_verify" => (bool) @$_POST['is_verify'], "is_preview" => (bool) @$_POST['is_preview'], "sbr_is_positive" => (bool) @$_POST['sbr_is_positive'], "sbr_not_negative" => (bool) @$_POST['sbr_not_negative'], "opi_is_positive" => (bool) @$_POST['sbr_is_positive'], "opi_not_negative" => (bool) @$_POST['sbr_not_negative']);
if ($filter['cost_type']) {
$filter['cost'][] = array('cost_type' => $filter['curr_type'], 'cost_from' => $filter['from_cost'], 'cost_to' => $filter['to_cost'], 'type_date' => $filter['cost_type']);
}
$countryObj = new country();
$countryCityName = $countryObj->getCountryAndCityNames($filter['country'], $filter['city']);
$countryCityName = @$countryCityName['name'];
}
if (!empty($filter["prof"]) && is_array($filter["prof"][1])) {
$raw_professions = professions::GetProfessionsTitles(array_keys($filter["prof"][1]));
$a_professions = array();
foreach ($raw_professions as $profession_item) {
$a_professions[$profession_item["name"]] = '(@name_prof "' . $profession_item["name"] . '" | @additional_specs "' . $profession_item["name"] . '")';
}
$string_professions = '(' . join(" | ", $a_professions) . ')';
}
$string_query = $search_string;
// @todo Кажется, это никогда не используется?
$string_query .= !empty($string_professions) ? ' ' . $string_professions : '';
$type = 'users_ext';
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php
示例18: hookDisplayCarrierList
public function hookDisplayCarrierList($params)
{
$parcelStoresAllInOne = DpdDeliveryPoints::collectDeliveryPoints(country::getIsoById(country::getIdByName(null, $params['address']->country)), false, false);
$parcelStoresAllInOne = $this->parcelSort($parcelStoresAllInOne, 'company');
$parcel_stores_city = array();
foreach ($parcelStoresAllInOne as $company) {
$parcel_stores_city[trim($company['city'])][] = $company;
}
ksort($parcel_stores_city);
self::setKeyPriority($parcel_stores_city, self::stringToarray(',', ',' . Configuration::get(self::CONST_PREFIX . 'CITY_PRIORITY')));
$carrier_id = (int) $this->context->cart->id_carrier;
if ($carrier_id == Configuration::get('DELIVERYPOINTS_CARRIER_ID')) {
$this->context->smarty->assign(array('id_carrier' => $params['cart']->id_carrier, 'id_address' => $params['address']->id, 'delivery_terminals' => $parcel_stores_city, 'delivery_option' => $params['address']->id, 'current_city' => $params['address']->city, 'carrier_name' => $this->getCarrierName($carrier_id), 'type_parcel_display' => Configuration::get(self::CONST_PREFIX . 'TYPE_PARCEL_DISPLAY'), 'short_office_name' => Configuration::get(self::CONST_PREFIX . 'SHORT_OFFICE_NAME')));
//$this->context->controller->addJS(_PS_MODULE_DIR_.'dynamicparceldistribution/views/js/script.js', 'all');
//$this->context->controller->addJS(_PS_MODULE_DIR_.'dynamicparceldistribution/views/js/script.js');
//print_r(_PS_MODULE_DIR_.'dynamicparceldistribution/views/js/script.js');
//$this->context->controller->addCSS($this->_path.'/views/css/mycss.css');
if (count($parcel_stores_city)) {
//return $this->display(__FILE__, 'views/templates/hook/deliverypoints.tpl');
$output = $this->context->smarty->fetch($this->local_path . 'views/templates/hook/deliverypoints.tpl');
return $output;
} else {
self::log('hookDisplayCarrierList -> Not found any parcel stores. maybe user and password is not correct?');
}
return '';
}
if ($carrier_id == Configuration::get('COURIERSERVICE_CARRIER_ID')) {
if (Configuration::get(self::CONST_PREFIX . 'SHOW_DELIVERY_TIME')) {
$this->getDeliveryTimeAvailable($params['address']->city);
//Leave only available times
if (empty(self::$delivery_time)) {
//Last check for how much available
return '';
}
$this->context->smarty->assign(array('delivery_option' => $params['address']->id, 'id_carrier' => $params['cart']->id_carrier, 'id_address' => $params['address']->id, 'carrier_name' => $this->getCarrierName($carrier_id), 'delivery_time' => self::$delivery_time));
if (count(self::$delivery_time)) {
//return $this->display(__FILE__, 'views/templates/hook/courierservice.tpl');
$output = $this->context->smarty->fetch($this->local_path . 'views/templates/hook/courierservice.tpl');
return $output;
} else {
self::log('hookDisplayCarrierList -> Not found any delivery time');
}
}
}
return '';
}
开发者ID:uab-balticode,项目名称:dpd-shipping-module-prestashop-2,代码行数:46,代码来源:dynamicparceldistribution.php
示例19: foreach
<br><br>
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td style="padding: 5px;"><b>Страны</b></td>
<td style="padding: 5px;"><b>Города</b></td>
<td style="padding: 5px;"><b>Возраст</b></td>
</tr>
<tr>
<td valign="top" style="padding: 5px;">
<table width="100%" cellspacing="2" cellpadding="2" border="0" class="brd-tbl">
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
$countr = country::CountAll(10);
if ($countr) {
foreach ($countr as $ikey => $cntr) {
?>
<tr>
<td width="130"><?php
echo $cntr['country_name'];
?>
</td>
<td><?php
echo $cntr['cnt'];
?>
</td>
</tr>
<?php
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:inner_index_c.php
示例20: getCountryTitle
/**
* Возвращает название текущей страны.
*
* @return mixed
*/
public function getCountryTitle()
{
if (is_null($this->_country)) {
$this->_country = '';
if ($this->filter->country) {
$countryModel = new country();
$this->_country = $countryModel->getCountryName($this->filter->country) . ': Все города';
}
}
return $this->_country;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:16,代码来源:TServiceFilter.php
注:本文中的country类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论