本文整理汇总了PHP中getCountryList函数的典型用法代码示例。如果您正苦于以下问题:PHP getCountryList函数的具体用法?PHP getCountryList怎么用?PHP getCountryList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCountryList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCountryFullName
function getCountryFullName($abbr)
{
if (strlen($abbr) == 2) {
$countries = getCountryList();
return isset($countries[$abbr]) ? $countries[$abbr] : '';
}
return $abbr;
}
示例2: getCountries
function getCountries()
{
include_once ROOT . API_FOLDER . "helpers/countries.php";
$arr = getCountryList();
foreach ($arr as $a => $b) {
unset($arr[$a]);
$arr[$b] = $b;
}
return $arr;
}
示例3: getUTCSelector
function getUTCSelector($default = "")
{
$arr = getCountryList();
$utc = getCountryUTC();
$s = "<option value=''>None</option>";
foreach ($arr as $a => $b) {
$x = $utc[$a];
if ($b == $default) {
$s .= "<option value='{$x}' selected>{$b}</option>";
} else {
$s .= "<option value='{$x}'>{$b}</option>";
}
}
return $s;
}
示例4: welcome
/**
* Welcome page
*
* @return string
*/
public function welcome()
{
$oSession = $this->getInstance("oxSetupSession");
//setting admin area default language
$sAdminLang = $oSession->getSessionParam('setup_lang');
$this->getInstance("oxSetupUtils")->setCookie("oxidadminlanguage", $sAdminLang, time() + 31536000, "/");
$oView = $this->getView();
$oView->setTitle('STEP_1_TITLE');
$oView->setViewParam("aCountries", getCountryList());
$oView->setViewParam("aLocations", getLocation());
$oView->setViewParam("sSetupLang", $this->getInstance("oxSetupLang")->getSetupLang());
$oView->setViewParam("sLocationLang", $oSession->getSessionParam('location_lang'));
$oView->setViewParam("sCountryLang", $oSession->getSessionParam('country_lang'));
return "welcome.php";
}
示例5: getCountryList
* *
* This software is provided by the copyright holders and contributors "as is" *
* and any express or implied warranties, including, but not limited to, the *
* implied warranties of merchantability and fitness for a particular purpose *
* are disclaimed. In no event shall the copyright owner or contributors be *
* liable for any direct, indirect, incidental, special, exemplary, or *
* consequential damages (including, but not limited to, procurement of *
* substitute goods or services; loss of use, data, or profits; or business *
* interruption) however caused and on any theory of liability, whether in *
* contract, strict liability, or tort (including negligence or otherwise) *
* arising in any way out of the use of this software, even if advised of the *
* possibility of such damage. *
* *
********************************************************************************/
include_once "../config.php";
$countries = getCountryList();
?>
/**
* set which tab to show and load first
*/
Event.observe(window, 'load', function() {
var itemobj = renderGroup(groupObj, 760, "", true, false);
$('maingroupdiv').insert(itemobj);
refreshIssues();
});
function changeGroupMode(obj, mode) {
var wasPressed = false
if (obj.className == "radiobuttonpressed") {
wasPressed = true;
示例6: load
/**
* Loads the data for the user from the database
* This will not return a "group" (even though groups are
* stored in the Users table)
*
* @param String $style (optional - default 'long') may be 'short' or 'long'
* @return User object (this) (or Error object)
*/
function load($style = 'long')
{
global $DB, $USER, $CFG, $ERROR, $HUB_FLM, $HUB_SQL, $HUB_CACHE;
$this->style = $style;
if (isset($HUB_CACHE)) {
$cachedused = $HUB_CACHE->getObjData($this->userid . $style);
if ($cachedused !== FALSE) {
return $cachedused;
}
}
$params = array();
$params[0] = $this->userid;
$resArray = $DB->select($HUB_SQL->DATAMODEL_USER_SELECT, $params);
if ($resArray !== false) {
$count = count($resArray);
if ($count == 0) {
$ERROR = new error();
$ERROR->createUserNotFoundError($this->userid);
return $ERROR;
} else {
for ($i = 0; $i < $count; $i++) {
$array = $resArray[$i];
$this->name = stripslashes($array['Name']);
$this->isgroup = $array['IsGroup'];
$this->creationdate = $array['CreationDate'];
$this->testgroup = $array['TestGroup'];
if ($array['Photo']) {
//set user photo and thumb the thumb creation is done during registration
$originalphotopath = $HUB_FLM->createUploadsDirPath($this->userid . "/" . stripslashes($array['Photo']));
if (file_exists($originalphotopath)) {
$this->photo = $HUB_FLM->getUploadsWebPath($this->userid . "/" . stripslashes($array['Photo']));
$this->thumb = $HUB_FLM->getUploadsWebPath($this->userid . "/" . str_replace('.', '_thumb.', stripslashes($array['Photo'])));
if (!file_exists($this->thumb)) {
create_image_thumb($array['Photo'], $CFG->IMAGE_THUMB_WIDTH, $this->userid);
}
} else {
//if the file does not exists how to get it from a upper level? change it to
//if file doesnot exists directly using default photo
if ($this->isgroup == "Y") {
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
} else {
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
}
}
} else {
if ($this->isgroup == "Y") {
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
} else {
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
}
}
$this->lastlogin = $array['LastLogin'];
$this->followsendemail = $array['FollowSendEmail'];
$this->followruninterval = $array['FollowRunInterval'];
$this->followlastrun = $array['FollowLastRun'];
if (isset($array['Newsletter'])) {
$this->newsletter = $array['Newsletter'];
}
if (isset($array['RecentActivitiesEmail'])) {
$this->recentactivitiesemail = $array['RecentActivitiesEmail'];
}
if (isset($array['CurrentStatus'])) {
$this->status = $array['CurrentStatus'];
}
if ($style == 'long') {
$this->description = stripslashes($array['Description']);
$this->modificationdate = $array['ModificationDate'];
$this->privatedata = $array['Private'];
$this->isadmin = $array['IsAdministrator'];
$this->authtype = $array['AuthType'];
$this->password = $array['Password'];
$this->website = $array['Website'];
$this->email = $array['Email'];
if (isset($array['Interest'])) {
$this->interest = $array['Interest'];
}
if (isset($array['LocationText'])) {
$this->location = $array['LocationText'];
} else {
$this->location = "";
}
if (isset($array['LocationCountry'])) {
$cs = getCountryList();
$this->countrycode = $array['LocationCountry'];
if (isset($cs[$array['LocationCountry']])) {
$this->country = $cs[$array['LocationCountry']];
}
} else {
//.........这里部分代码省略.........
示例7: session_start
session_start();
//mail Settings
include "inc/dbconn.php";
include "inc/function.php";
include "apis/get_user_details.php";
if (isset($_POST['action']) && !empty($_POST['action'])) {
$action = $_POST['action'];
} elseif (isset($_GET['action']) && !empty($_GET['action'])) {
$action = $_GET['action'];
}
switch ($action) {
case 'fcr_dashboard':
fcr_dashboard();
break;
case 'getCountryList':
getCountryList();
break;
case 'getCountryDetails':
getCountryDetails();
break;
case 'getCustomerVoice':
getCustomerVoice();
break;
case 'getLocations':
getLocations();
break;
case 'getModels':
getModels();
break;
case 'getCategories':
getCategories();
示例8: edit_hotel_action
public function edit_hotel_action($hotel_id)
{
$data = $this->input->post();
$requested_mod = 'hotel';
if (!$this->acl->hasPermission($requested_mod)) {
redirect('admin/dashboard');
}
$this->validation_rules = array(array('field' => 'sb_hotel_country', 'label' => 'Country', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_state', 'label' => 'State', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_city', 'label' => 'City', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_address', 'label' => 'Address', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_zipcode', 'label' => 'Postal Code', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_owner', 'label' => 'Hotel Owner', 'rules' => 'required', 'class' => 'text-danger'), array('field' => 'sb_hotel_website', 'label' => 'Hotel Website', 'rules' => 'required|prep_url', 'class' => 'text-danger'), array('field' => 'sb_hotel_email', 'label' => 'Hotel Email', 'rules' => 'required|valid_email', 'class' => 'text-danger'));
$this->form_validation->set_error_delimiters('<div class="text-danger">', '</div>');
$this->form_validation->set_rules($this->validation_rules);
if ($this->form_validation->run() == FALSE) {
$this->data['action'] = "admin/hotel/edit_hotel_action/{$hotel_id}";
$this->data['countrylist'] = getCountryList();
$this->data['languagelist'] = getAllLanguages();
$this->data['hoteldata'] = $this->Hotel_model->get_hotel_data($hotel_id);
$this->template->load('page_tpl', 'create_hotel', $this->data);
} else {
$this->data['hoteldata'] = $this->Hotel_model->get_hotel_data($hotel_id);
$data["sb_hotel_pic"] = $this->data['hoteldata']['sb_hotel_pic'];
if (!empty($_FILES['sb_hotel_pic']['name'])) {
$folderName = HOTEL_PIC;
$pic1 = upload_image($folderName, "sb_hotel_pic");
if ($pic1 != 0) {
$data["sb_hotel_pic"] = $pic1;
}
}
$hoteldata = array('sb_hotel_category' => $data['sb_hotel_category'], 'sb_hotel_star' => $data['sb_hotel_star'], 'sb_hotel_email' => $data['sb_hotel_email'], 'sb_hotel_website' => $data['sb_hotel_website'], 'sb_hotel_owner' => $data['sb_hotel_owner'], 'sb_hotel_country' => $data['sb_hotel_country'], 'sb_hotel_state' => $data['sb_hotel_state'], 'sb_hotel_city' => $data['sb_hotel_city'], 'sb_hotel_address' => $data['sb_hotel_address'], 'sb_hotel_zipcode' => $data['sb_hotel_zipcode'], 'sb_hotel_pic' => $data['sb_hotel_pic'], 'sb_property_built_month' => $data['sb_property_built_month'], 'sb_property_built_year' => $data['sb_property_built_year'], 'sb_property_open_year' => $data['sb_property_open_year']);
$result = $this->Hotel_model->edit_hotel($hoteldata, $hotel_id);
if ($result == '1') {
$languageresult = $this->Hotel_model->set_hotel_languages($hotel_id, $data['sb_languages']);
$this->session->set_flashdata('category_success', HOTEL_UPDATION_SUCCESS);
redirect("admin/hotel/edit_hotel/{$hotel_id}");
} else {
$this->session->set_flashdata('category_error', HOTEL_UPDATION_FAIL);
redirect("admin/hotel/edit_hotel/{$hotel_id}");
}
}
}
示例9: load
/**
* Loads the data for the group from the database
*
* @return Group object (this)
*/
function load()
{
global $DB, $CFG, $HUB_FLM, $HUB_SQL, $LNG;
$params = array();
$params[0] = $this->groupid;
$resArray = $DB->select($HUB_SQL->DATAMODEL_GROUP_SELECT, $params);
if ($resArray !== false) {
$count = count($resArray);
if ($count == 0) {
global $ERROR;
$ERROR = new Error();
$ERROR->createGroupNotFoundError($this->groupid);
return $ERROR;
}
for ($i = 0; $i < $count; $i++) {
$array = $resArray[$i];
$this->name = stripslashes($array['Name']);
$this->description = stripslashes($array['Description']);
$this->website = stripslashes($array['Website']);
$this->isopenjoining = $array['IsOpenJoining'];
if ($array['Photo']) {
//set user photo and thumb the thumb creation is done during registration
$originalphotopath = $HUB_FLM->createUploadsDirPath($this->groupid . "/" . stripslashes($array['Photo']));
if (file_exists($originalphotopath)) {
$this->photo = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . stripslashes($array['Photo']));
$this->thumb = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . str_replace('.', '_thumb.', stripslashes($array['Photo'])));
if (!file_exists($this->thumb)) {
create_image_thumb($array['Photo'], $CFG->IMAGE_THUMB_WIDTH, $this->groupid);
}
} else {
//if the file does not exists how to get it from a upper level? change it to
//if file doesnot exists directly using default photo
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
}
} else {
$this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
$this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
}
if (isset($array['LocationText'])) {
$this->location = $array['LocationText'];
} else {
$this->location = "";
}
if (isset($array['LocationCountry'])) {
$cs = getCountryList();
$this->countrycode = $array['LocationCountry'];
if (isset($cs[$array['LocationCountry']])) {
$this->country = $cs[$array['LocationCountry']];
}
} else {
$this->countrycode = "";
$this->country = "";
}
if (isset($array['LocationLat'])) {
$this->locationlat = $array['LocationLat'];
}
if (isset($array['LocationLng'])) {
$this->locationlng = $array['LocationLng'];
}
}
} else {
return database_error();
}
$this->loadmembers();
$this->loadpendingmembers();
$this->getDebateCount();
$this->getVoteCount();
return $this;
}
示例10: stripslashes
}
} else {
$photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
$thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
}
} else {
$photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_USER_PHOTO);
$thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_USER_PHOTO)));
}
$location = "";
$country = "";
if (isset($array['LocationText'])) {
$location = $array['LocationText'];
}
if (isset($array['LocationCountry'])) {
$cs = getCountryList();
if (isset($cs[$array['LocationCountry']])) {
$country = $cs[$array['LocationCountry']];
}
}
echo '<tr>';
echo '<td valign="top">';
echo '<a title="' . $LNG->SPAM_USER_ADMIN_VIEW_BUTTON . '" href="' . $CFG->homeAddress . 'user.php?userid=' . $userid . '"><img style="padding:5px;padding-bottom:10px;max-width:150px;max-height:100px;" border="0" src="' . $thumb . '" /></a>';
echo '</td>';
echo '<td valign="top">';
echo $name;
echo '</td>';
echo '<td valign="top">';
echo strftime('%d/%m/%Y', $date);
echo '</td>';
echo '<td valign="top">';
示例11: getCountryList
</div>
<div class="control-group">
<div class="control-label">
<span class="editlinktip hasTip" title="<?php
echo JText::_('AUP_COUNTRY');
?>
">
<?php
echo JText::_('AUP_COUNTRY');
?>
:
</span>
</div>
<div class="controls">
<?php
echo getCountryList($row->country);
?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<span class="editlinktip hasTip" title="<?php
echo JText::_('AUP_COLLEGE_UNIVERSITY');
?>
">
<?php
echo JText::_('AUP_COLLEGE_UNIVERSITY');
?>
:
</span>
</div>
示例12: getCountryList
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="city">Ville : </label>
<div class="col-sm-8">
<input class="form-control" name="city" id="city" placeholder="ex : Paris">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="country">Pays : </label>
<div class="col-sm-8">
<select class="form-control" name="country" id="country">
<?php
echo getCountryList($bdd);
?>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-8">
<button type="submit" class="btn btn-default">Inscription</button>
</div>
</div>
</form>
</body>
</html>
示例13: test_getCountryList
public function test_getCountryList()
{
$arr = getCountryList();
$this->assertEquals($arr['AD'], "Andorra");
}
示例14: getLocation
/**
* tries to fetch location information out of text in html
*/
function getLocation($href)
{
global $counter;
$unknown = array('country' => 'unknown', 'continent' => 'unknown');
if (!$href || $href == "") {
return $unknown;
}
// check store for known
$store = getData("* FROM swdata where link LIKE '{$href}'");
if ($store && count(array_diff_assoc($store, $unknown))) {
return array('country' => $store[0]['country'], 'continent' => $store[0]['continent']);
}
$counter++;
$list = getCountryList();
$html = scraperWiki::scrape("http://www.who.int/{$href}");
$dom = new simple_html_dom();
$dom->load($html);
// seek location in text
foreach ($dom->find("div[@id='primary']") as $data) {
$text = removeSpecialChars(strtolower($data->plaintext));
// tries to find a country name in the text
foreach ($list as $key => $value) {
// stripos = case insensitive strpos
if (stripos($text, $key) !== false) {
return array('country' => $key, 'continent' => $value);
}
}
}
// seek location in link
foreach ($dom->find("div[@id='primary'] a") as $data) {
$result = getLocation($data->href);
if (count(array_diff_assoc($result, $unknown))) {
return $result;
}
}
return $unknown;
}
示例15: index
public function index()
{
$this->data['title'] = 'Available Vendor List';
$this->data['countrylist'] = getCountryList();
$this->template->load('page_tpl', 'vendor_list_vw', $this->data);
}