本文整理汇总了PHP中city::GetCities方法的典型用法代码示例。如果您正苦于以下问题:PHP city::GetCities方法的具体用法?PHP city::GetCities怎么用?PHP city::GetCities使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类city
的用法示例。
在下文中一共展示了city::GetCities方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ChangeCity
/**
* Формирует список городов для выбранной страны.
*
* @param integer $country_id код страны
* @param integer $city_id код города
*/
function ChangeCity($country_id, $city_id)
{
$objResponse = new xajaxResponse();
// $countries = country::GetCountries();
$cities = city::GetCities($country_id);
$select = "<select name=\"ff_city\" id=\"ff_city\" ";
$select .= "style=\"width:254px;\">";
$select .= "<option value=\"0\"";
if ($city_id == 0) {
$select .= " selected";
}
$select .= ">Все города</option>";
if ($cities) {
foreach ($cities as $id => $city) {
$select .= "<option value=\"" . $id . "\"";
if ($id == $city_id) {
$select .= " selected";
}
$select .= ">" . $city . "</option>";
}
$select .= "</select>";
}
$objResponse->assign("city_select", "innerHTML", $select);
return $objResponse;
}
示例2: 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;
}
示例3: GetCities
function GetCities($country, $city)
{
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
$response = new xajaxResponse();
$cities = city::GetCities(intval($country));
/*$html = '<option value="0">Все города</option>';
foreach ($cities as $id=>$val) {
$html .= '<option value="'.$id.'">'.htmlspecialchars($val).'</option>';
}*/
$script = "document.getElementById('cities').options.length = 0; \n";
$script .= "document.getElementById('cities').options[0] = new Option('Все города', 0); \n";
$i = 1;
foreach ($cities as $id => $val) {
$script .= "document.getElementById('cities').options[{$i}] = new Option('" . htmlspecialchars($val) . "', {$id}); \n";
++$i;
}
$response->assign('cities', 'innerHTML', $html);
$response->assign('cities', 'disabled', false);
$script .= "document.getElementById('btnAddLocation').onclick = function() { locations.add(); return false; }; \n";
if ($city) {
$script .= "\n\t\t\tfor (var i=0; i<document.getElementById('cities').options.length; i++) {\n\t\t\t\tif (document.getElementById('cities').options[i].value == {$city}) {\n\t\t\t\t\tdocument.getElementById('cities').selectedIndex = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t} \n\n\t\t";
}
$script .= 'if (spam.busy > 1) { spam.busy = 0; spam.send(); } spam.busy = 0;';
$response->script($script);
return $response;
}
示例4: ChangeCity
/**
* Формирует список городов для выбранной страны.
*
* @param integer $country_id код страны
* @param integer $city_id код города
*/
function ChangeCity($country_id, $city_id)
{
$objResponse = new xajaxResponse();
// $countries = country::GetCountries();
$cities = city::GetCities($country_id);
$select = '<select name="ff_city" id="ff_city" ';
$select .= 'style="width:254px;">';
$select .= '<option value="0"';
if ($city_id == 0) {
$select .= ' selected';
}
$select .= '>Все города</option>';
if ($cities) {
foreach ($cities as $id => $city) {
$select .= '<option value="' . $id . '"';
if ($id == $city_id) {
$select .= ' selected';
}
$select .= '>' . $city . '</option>';
}
$select .= '</select>';
}
$objResponse->assign('city_select', 'innerHTML', $select);
return $objResponse;
}
示例5: GetCitysByCid
function GetCitysByCid($country_id)
{
$objResponse = new xajaxResponse();
if ($country_id) {
$cities = city::GetCities($country_id);
}
$out_text = '<select name="city" class="apf-select"><option value="0">Не выбрано</option>';
if ($cities) {
foreach ($cities as $cityid => $city) {
$out_text .= '<option value=' . $cityid . '>' . $city . '</option>';
}
}
$out_text .= '</select>';
$objResponse->assign('frm_city', 'innerHTML', $out_text);
return $objResponse;
}
示例6: GetCitysByCid
function GetCitysByCid($country_id)
{
$objResponse = new xajaxResponse();
if ($country_id) {
$cities = city::GetCities($country_id);
}
$out_text = "<select name=\"city\" class=\"apf-select\"><option value=\"0\">Не выбрано</option>";
if ($cities) {
foreach ($cities as $cityid => $city) {
$out_text .= "<option value=" . $cityid . ">" . $city . "</option>";
}
}
$out_text .= "</select>";
$objResponse->assign("frm_city", "innerHTML", $out_text);
return $objResponse;
}
示例7: array
// $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());
}
if ($filter_params && is_array($filter_params)) {
示例8: _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'); } });");
}
}
示例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;
}
}
$region_filter_txt .= ', <strong>' . $region_filter_city_txt . '</strong>';
示例10: 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;
}
示例11: str_replace
$i = str_replace('"', '"', $i);
$i = str_replace("'", "\\'", $i);
$cResult[$k] = "'{$k}' : '{$i}'";
}
$result[2] = $cResult;
//города Беларусии 10
$rows = city::GetCities(10);
$cResult = array('0' => "'0' : 'Беларусь'", 'undefined_value' => "'undefined_value' : 'Все города'");
foreach ($rows as $k => $i) {
$i = str_replace('"', '"', $i);
$i = str_replace("'", "\\'", $i);
$cResult[$k] = "'{$k}' : '{$i}'";
}
$result[10] = $cResult;
//города Казахстана 38
$rows = city::GetCities(38);
$cResult = array('0' => "'0' : 'Казахстан'", 'undefined_value' => "'undefined_value' : 'Все города'");
foreach ($rows as $k => $i) {
$i = str_replace('"', '"', $i);
$i = str_replace("'", "\\'", $i);
$cResult[$k] = "'{$k}' : '{$i}'";
}
$result[38] = $cResult;
$tdata = array();
foreach ($result as $k => $i) {
$inner = "'{$i}'";
$item = "'{$k}' : {$inner}";
if (is_array($i)) {
$inner = implode(',', $i);
//join(",\n\t\t\t",
$item = "'{$k}' : " . '{' . $inner . '}';
示例12: foreach
}
if ($user->birthday == "1910-01-01") {
$mnth = 01;
$day = "";
$year = "";
}
if ($_SESSION['uid']) {
$note = notes::GetNotes($_SESSION['uid'], null, $error);
if (count($note) > 0) {
foreach ($note as $key => $value) {
$notes[$value['to_id']] = $value;
}
}
}
$info_for_reg = @unserialize($user->info_for_reg);
$cities = city::GetCities($user->country);
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/commune.common.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/countrys.common.php";
$xajax->printJavascript('/xajax/');
$sGrafExt = "var grafExt = ['" . implode("','", $GLOBALS['graf_array']) . "'];";
$nParam = __paramInit('int', 'msg', null, 0);
if ($error_flag) {
?>
<script type="text/javascript">
<!--
window.location.hash = 'frm';
//-->
</script>
<?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);');
//.........这里部分代码省略.........
示例14: __paramInit
break;
case 'edit':
$specs = professions::GetAllGroupsLite();
$countries = country::GetCountries();
$id = __paramInit('int', 'id');
if (!$pAction) {
$message = $mailer->getMailerById($id);
}
if (empty($count)) {
list($rec_emp_count, $rec_frl_count) = $mailer->getCountRecipients(array('emp', 'frl'), $message);
} else {
list($rec_emp_count, $rec_frl_count) = $count;
}
$is_sub_regular = !empty(mailer::$SUB_TYPE_REGULAR[$message['type_regular']]);
if ($message['flocation']['country'] > 0) {
$citys = city::GetCities($message['flocation']['country']);
}
$inner_page = 'tpl.create.php';
$js_file = array('highlight.min.js', 'highlight.init.js', 'mailer.js', 'attachedfiles.js');
$js_file_utf8[] = '/scripts/ckedit/ckeditor.js';
break;
case 'report':
$specs = professions::GetAllGroupsLite();
$countries = country::GetCountries();
$id = __paramInit('int', 'id');
$message = $mailer->getMailerById($id);
$sum_rec = $mailer->calcSumRecipientsCount($message, array($message['count_rec_emp'], $message['count_rec_frl']));
if ($message['is_digest']) {
$inner_page = $_SERVER['DOCUMENT_ROOT'] . '/siteadmin/mailer/digest/tpl.report.php';
} else {
$attachedfiles_files = $mailer->getAttach($message['id']);
示例15: intval
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/xajax/public.common.php";
$xajax->printJavascript('/xajax/');
$categories = professions::GetAllGroupsLite();
$categories_specs = professions::GetAllProfessions(intval($project['category']) ? intval($project['category']) : $categories[0]['id']);
$aCnt = (int) count($tmpPrj->getAttach());
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/country.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/city.php";
$countries = country::GetCountries();
if ($project['country']) {
$cities = city::GetCities($project['country']);
}
$project['end_date'] = $_POST['end_date'] ? $_POST['end_date'] : ($project['end_date'] ? date('d-m-Y', strtotime($project['end_date'])) : '');
$project['win_date'] = $_POST['win_date'] ? $_POST['win_date'] : ($project['win_date'] ? date('d-m-Y', strtotime($project['win_date'])) : '');
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/project_exrates.php";
$oprj_exrates = new project_exrates();
$prj_exrates = $oprj_exrates->GetAll();
$professions = professions::GetAllProfessions();
array_group($professions, 'groupid');
$professions[0] = array();
?>
<?php
$templates = array(uploader::getTemplate('uploader', 'project/'), uploader::getTemplate('uploader.file', 'project/'), uploader::getTemplate('uploader.popup', ''));
uploader::init(array('attachedfiles' => uploader::sgetLoaderOptions($uploader->resource)), $templates);
?>
<script type="text/javascript">
var draft_saved = 0;
</script>