当前位置: 首页>>代码示例>>PHP>>正文


PHP Country::GetCountries方法代码示例

本文整理汇总了PHP中Country::GetCountries方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::GetCountries方法的具体用法?PHP Country::GetCountries怎么用?PHP Country::GetCountries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Country的用法示例。


在下文中一共展示了Country::GetCountries方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     camp_load_translation_strings('api');
     camp_load_translation_strings('users');
     camp_load_translation_strings('user_subscriptions');
     $this->repository = $this->_helper->entity->getRepository('Newscoop\\Entity\\User\\Subscriber');
     $this->form = new Admin_Form_Subscriber();
     $this->form->setAction('')->setMethod('post');
     // set form countries
     $countries = array('' => getGS('Select country'));
     foreach (Country::GetCountries(1) as $country) {
         $countries[$country->getCode()] = $country->getName();
     }
     //$this->form->getElement('country')->setMultioptions($countries);
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:15,代码来源:SubscriberController.php

示例2: init

 /**
  * Init
  *
  * @return void
  */
 public function init()
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     $this->repository = $this->_helper->entity->getRepository('Newscoop\\Entity\\User\\Staff');
     $this->form = new Admin_Form_Staff($this->_helper->acl->isAllowed('user', 'manage'));
     $this->form->setAction('')->setMethod('post');
     if ($this->_helper->acl->isAllowed('user', 'manage')) {
         // set form user groups
         $groups = array();
         $groupRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\User\\Group');
         foreach ($groupRepository->findAll() as $group) {
             $groups[$group->getId()] = $group->getName();
         }
         $this->form->getElement('groups')->setMultioptions($groups);
     }
     // set form countries
     $countries = array('' => $translator->trans('Select country', array(), 'user_subscriptions'));
     foreach (Country::GetCountries(1) as $country) {
         $countries[$country->getCode()] = $country->getName();
     }
     $this->form->getElement('country')->setMultioptions($countries);
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:27,代码来源:StaffController.php

示例3: init

 /**
  * Init
  *
  * @return void
  */
 public function init()
 {
     camp_load_translation_strings('api');
     camp_load_translation_strings('users');
     $this->repository = $this->_helper->entity->getRepository('Newscoop\\Entity\\User\\Staff');
     $this->form = new Admin_Form_Staff($this->_helper->acl->isAllowed('user', 'manage'));
     $this->form->setAction('')->setMethod('post');
     if ($this->_helper->acl->isAllowed('user', 'manage')) {
         // set form user groups
         $groups = array();
         $groupRepository = $this->_helper->entity->getRepository('Newscoop\\Entity\\User\\Group');
         foreach ($groupRepository->findAll() as $group) {
             $groups[$group->getId()] = $group->getName();
         }
         $this->form->getElement('groups')->setMultioptions($groups);
     }
     // set form countries
     $countries = array('' => getGS('Select country'));
     foreach (Country::GetCountries(1) as $country) {
         $countries[$country->getCode()] = $country->getName();
     }
     $this->form->getElement('country')->setMultioptions($countries);
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:28,代码来源:StaffController.php

示例4: camp_load_translation_strings

<?php

require_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/country/country_common.php";
require_once $GLOBALS['g_campsiteDir'] . "/classes/SimplePager.php";
camp_load_translation_strings("api");
if (!$g_user->hasPermission('ManageCountries') && !$g_user->hasPermission('DeleteCountries')) {
    camp_html_goto_page("/{$ADMIN}/");
}
$f_country_language_selected = camp_session_get('f_country_language_selected', '');
$f_country_offset = camp_session_get('f_country_offset', 0);
if (empty($f_country_language_selected)) {
    $f_country_language_selected = null;
}
$ItemsPerPage = 20;
$languages = Language::GetLanguages(null, null, null, array(), array(), true);
$countries = Country::GetCountries($f_country_language_selected, null, null, array("LIMIT" => array("START" => $f_country_offset, "MAX_ROWS" => $ItemsPerPage)));
$numCountries = Country::GetNumCountries($f_country_language_selected);
$pager = new SimplePager($numCountries, $ItemsPerPage, "f_country_offset", "index.php?");
$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Countries"), "");
echo camp_html_breadcrumbs($crumbs);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" class="action_buttons">
<?php 
if ($g_user->hasPermission("ManageCountries")) {
    ?>
<TR>
	<TD>
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:index.php

示例5: require_once

<?php
require_once($GLOBALS['g_campsiteDir']. "/$ADMIN_DIR/country/country_common.php");

if (!$g_user->hasPermission('ManageCountries')) {
	camp_html_display_error(getGS("You do not have the right to change country names."));
	exit;
}

$f_country_code = Input::Get('f_country_code');
$f_country_language = Input::Get('f_country_language');

$country = new Country($f_country_code, $f_country_language);
$language = new Language($f_country_language);

$countryTranslations = Country::GetCountries(null, $f_country_code);

$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Countries"), "/$ADMIN/country/");
$crumbs[] = array(getGS("Edit country name"), "");
echo camp_html_breadcrumbs($crumbs);

?>

<P>
<FORM NAME="dialog" METHOD="POST" ACTION="do_edit.php"  >
<?php echo SecurityToken::FormParameter(); ?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="box_table">
<TR>
	<TD COLSPAN="2">
		<B><?php  putGS("Edit country name"); ?></B>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:edit.php

示例6: Publication

$Pub = Input::Get('Pub', 'int');
$Language = Input::Get('Language', 'int', 1, true);

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), $_SERVER['REQUEST_URI']);
	exit;
}

$publicationObj = new Publication($Pub);
$pubTimeUnit = new TimeUnit($publicationObj->getTimeUnit(), $publicationObj->getLanguageId());
if (!$pubTimeUnit->exists()) {
	$pubTimeUnit = new TimeUnit($publicationObj->getTimeUnit(), 1);
}

$countries = Country::GetCountries($Language);

include_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/javascript_common.php");

$crumbs = array(getGS("Subscriptions") => "deftime.php?Pub=$Pub&Language=$Language");
camp_html_content_top(getGS("Set subscription settings for a country"), array("Pub" => $publicationObj), true, false, $crumbs);
?>

<P>
<FORM METHOD="POST" ACTION="do_countryadd.php" onsubmit="return <?php camp_html_fvalidate(); ?>;">
<?php echo SecurityToken::FormParameter(); ?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="box_table">
<INPUT TYPE="HIDDEN" NAME="cPub" VALUE="<?php p($Pub); ?>">
<TR>
	<TD ALIGN="RIGHT" ><?php  putGS("Country"); ?>:</TD>
	<TD>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:30,代码来源:countryadd.php

示例7: array

$fields = array('UName', 'Name', 'Title', 'Gender', 'Age', 'EMail', 'City', 'StrAddress',
	'State', 'CountryCode', 'Phone', 'Fax', 'Contact', 'Phone2', 'PostalCode', 'Employer',
	'EmployerType', 'Position');
if ($isNewUser) {
	$action = 'do_add.php';
	foreach ($fields as $index=>$field) {
		$$field = Input::Get($field, 'string', '');
	}
} else {
	$action = 'do_edit.php';
	foreach ($fields as $index=>$field) {
		$$field = $editUser->getProperty($field);
	}
}
$userTypes = UserType::GetUserTypes();
$countries = Country::GetCountries(1);
$my_user_type = $editUser->getUserType();

?>
<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/campsite.js"></script>

<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/pwd_meter/js/pwd_meter_min.js"></script>
<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/pwd_meter/js/pwd_generator_min.js"></script>
<link href="<?php echo $Campsite['WEBSITE_URL']; ?>/js/pwd_meter/css/default.css" rel="stylesheet" type="text/css" />


<form name="user_add" method="POST" action="<?php echo $action; ?>" onsubmit="return <?php camp_html_fvalidate(); ?>;">
<?php echo SecurityToken::FormParameter(); ?>
<input type="hidden" name="uType" value="<?php echo $uType; ?>">
<?php
if (!$isNewUser) {
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:info.php


注:本文中的Country::GetCountries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。