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


PHP Countries::convertIso2to3方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $lang = JFactory::getLanguage();
     $document =& JFactory::getDocument();
     // 		if ($this->getLayout()=='form')
     // 		{
     // 			$this->_displayForm($tpl);
     // 			return;
     // 		}
     // 		if ($this->getLayout()=='info')
     // 		{
     // 			$this->_displayInfo($tpl);
     // 			return;
     // 		}
     // 		if ($this->getLayout()=='selectpage')
     // 		{
     // 			$this->_displaySelectpage($tpl);
     // 			return;
     // 		}
     $stylelink = '<link rel="stylesheet" href="' . JURI::root() . 'administrator/components/com_joomleague/assets/css/jlextusericons.css' . '" type="text/css" />' . "\n";
     $document->addCustomTag($stylelink);
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_LMO_IMPORT_TITLE_1'), 'lmo-cpanel');
     JLToolBarHelper::onlinehelp();
     $uri = JFactory::getURI();
     $config =& JComponentHelper::getParams('com_media');
     $post = JRequest::get('post');
     $files = JRequest::get('files');
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('config', $config);
     $teile = explode("-", $lang->getTag());
     $country = Countries::convertIso2to3($teile[1]);
     $this->assignRef('country', $country);
     $countries = Countries::getCountryOptions();
     $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox" size="1"', 'value', 'text', $country);
     $this->assignRef('countries', $lists['countries']);
     //$this->assignRef('form',  $this->get('form'));
     parent::display($tpl);
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:41,代码来源:view.html.php

示例2: getData

 function getData()
 {
     global $mainframe, $option;
     $mainframe =& JFactory::getApplication();
     $document =& JFactory::getDocument();
     $lang = JFactory::getLanguage();
     $teile = explode("-", $lang->getTag());
     $country = Countries::convertIso2to3($teile[1]);
     $post = JRequest::get('post');
     $convert = array('&nbsp;' => '');
     $exportpositioneventtype = array();
     $exportplayer = array();
     $exportpersons = array();
     $exportpersonstemp = array();
     $exportclubs = array();
     $exportclubsstandardplayground = array();
     $exportteams = array();
     $exportteamstemp = array();
     $exportteamplayer = array();
     $exportprojectteam = array();
     $exportprojectteams = array();
     $exportreferee = array();
     $exportprojectposition = array();
     $exportposition = array();
     $exportparentposition = array();
     $exportplayground = array();
     $exportplaygroundtemp = array();
     $exportteamplaygroundtemp = array();
     $exportround = array();
     $exportmatch = array();
     $exportmatchplayer = array();
     $exportmatchevent = array();
     $exportevent = array();
     $exportpositiontemp = array();
     $exportposition = array();
     $exportparentposition = array();
     $exportprojectposition = array();
     $exportmatchreferee = array();
     $exportmatchplan = array();
     $temp_match_number = array();
     /*
     echo 'post <br>';  
     echo '<pre>';
     print_r($post);
     echo '</pre>';   
     */
     $derlink = $post['dbblink'];
     $teamart = $post['teamart'];
     $chx = curl_init();
     curl_setopt($chx, CURLOPT_URL, $derlink);
     curl_setopt($chx, CURLOPT_TIMEOUT, 200);
     curl_setopt($chx, CURLOPT_RETURNTRANSFER, 1);
     $buffer = parse_url($derlink);
     $resulttab = curl_exec($chx);
     curl_close($chx);
     // alle spiele der seite holen
     $pattern1 = '!<table(.*?)class="sportView">(.*?)</table>!isU';
     $pattern2 = '!<tr>(.*?)</tr>!isS';
     $pattern3 = '!<td(.*?)>(.*?)</td>!isS';
     $pattern4 = '!<td(.*?)class="sportViewTitle">(.*?)</td>!isS';
     // RegEx mit preg_match_all() auswerten
     preg_match_all($pattern1, $resulttab, $spielplan, PREG_PATTERN_ORDER);
     $this->dump_variable("getData spielplan", $spielplan);
     preg_match_all($pattern4, $spielplan[1][0], $liganame, PREG_PATTERN_ORDER);
     $this->dump_variable("getData liganame", $liganame);
     $projectname = utf8_encode(trim(strip_tags($liganame[2][0])));
     $this->dump_variable("getData projectname", $projectname);
     $spielplan[2][0] = str_replace(array_keys($convert), array_values($convert), $spielplan[2][0]);
     preg_match_all($pattern2, $spielplan[2][0], $matches, PREG_PATTERN_ORDER);
     $this->dump_variable("getData matches", $matches);
     $lfdnumber = 0;
     $lfdnumbermatch = 0;
     $lfdnumberteam = 1;
     $lfdnumberplayground = 1;
     $start = 6;
     $spielplan = false;
     $team1_result_split = '';
     $team2_result_split = '';
     if (preg_match("/SpielplanViewPublic/i", $derlink)) {
         $start = 7;
         $spielplan = true;
     }
     $this->dump_variable("getData start ab position", $start);
     for ($a = $start; $a < sizeof($matches[1]); $a++) {
         if (empty($lfdnumber)) {
             $temp = new stdClass();
             $temp->name = $projectname;
             $temp->exportRoutine = '2010-09-19 23:00:00';
             $this->_datas['exportversion'] = $temp;
             $temp = new stdClass();
             $temp->name = preg_replace('/\\D/', '', $projectname);
             $this->_datas['season'] = $temp;
             $temp = new stdClass();
             $temp->name = $projectname;
             $temp->alias = $projectname;
             $temp->short_name = $projectname;
             $temp->middle_name = $projectname;
             $temp->country = $country;
             $this->_datas['league'] = $temp;
             $temp = new stdClass();
//.........这里部分代码省略.........
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:101,代码来源:jlextdbbimports.php

示例3: getData

 function getData()
 {
     global $mainframe, $option;
     $mainframe =& JFactory::getApplication();
     $document =& JFactory::getDocument();
     $lang = JFactory::getLanguage();
     if ($this->debug_info) {
         $this->pane =& JPane::getInstance('sliders');
         echo $this->pane->startPane('pane');
     }
     // die einstellungen der user holen
     $option = JRequest::getCmd('option');
     $params = JComponentHelper::getParams($option);
     $jlxmlfile = JPATH_ADMINISTRATOR . DS . 'components' . DS . $option . DS . 'config.xml';
     $jRegistry = new JRegistry();
     $jRegistry->loadString($params->toString('ini'), 'ini');
     //   echo 'Die aktuelle Sprache lautet: ' . $lang->getName() . '<br>';
     $teile = explode("-", $lang->getTag());
     $country = Countries::convertIso2to3($teile[1]);
     //   echo 'Das aktuelle Land lautet: ' . $country . '<br>';
     $option = JRequest::getCmd('option');
     $project = $mainframe->getUserState($option . 'project', 0);
     $lmoimportuseteams = $mainframe->getUserState($option . 'lmoimportuseteams');
     $whichfile = $mainframe->getUserState($option . 'whichfile');
     $mainframe->enqueueMessage(JText::_('welches land ? ' . $country), '');
     $mainframe->enqueueMessage(JText::_('welche art der datei ? ' . $whichfile), '');
     $delimiter = $mainframe->getUserState($option . 'delimiter');
     $post = JRequest::get('post');
     $this->_league_new_country = $country;
     $exportpositioneventtype = array();
     $exportplayer = array();
     $exportpersons = array();
     $exportpersonstemp = array();
     $exportclubs = array();
     $exportclubsstandardplayground = array();
     $exportplaygroundclubib = array();
     $exportteams = array();
     $exportteamstemp = array();
     $exportteamplayer = array();
     $exportprojectteam = array();
     $exportprojectteams = array();
     $exportreferee = array();
     $exportprojectposition = array();
     $exportposition = array();
     $exportparentposition = array();
     $exportplayground = array();
     $exportplaygroundtemp = array();
     $exportteamplaygroundtemp = array();
     $exportround = array();
     $exportmatch = array();
     $exportmatchplayer = array();
     $exportmatchevent = array();
     $exportevent = array();
     $exportpositiontemp = array();
     $exportposition = array();
     $exportparentposition = array();
     $exportprojectposition = array();
     $exportmatchreferee = array();
     $exportmatchplan = array();
     $temp_match_number = array();
     $startline = 0;
     // echo 'post <br>';
     // echo '<pre>';
     // print_r($post[projects]);
     // echo '</pre>';
     if (isset($post['projects'])) {
         $this->_project_id = $post['projects'];
     }
     $file = JPATH_SITE . DS . 'tmp' . DS . 'joomleague_import.csv';
     $mainframe->enqueueMessage(JText::_('datei = ' . $file), '');
     //$mainframe->enqueueMessage(JText::_('csv result<br><pre>'.print_r($csvdata->data,true).'</pre>'   ),'');
     if ($whichfile == 'playerfile') {
         $startline = 9;
     } elseif ($whichfile == 'matchfile') {
         $startline = 1;
     } elseif ($whichfile == 'icsfile') {
         // kalender file vom bfv anfang
         $ical = new ical();
         $ical->parse($file);
         $icsfile = $ical->get_all_data();
         if ($this->debug_info) {
             echo $this->pane->startPanel('icsfile', 'icsfile');
             $this->dump_header("icsfile");
             $this->dump_variable("icsfile", $icsfile);
             echo $this->pane->endPanel();
             echo $this->pane->startPanel('icsfile termine', 'icsfile termine');
             $this->dump_header("icsfile termine");
             $this->dump_variable("icsfile termine", $icsfile['VEVENT']);
             echo $this->pane->endPanel();
             //echo 'icsfile -> <br /><pre>~'.print_r($icsfile,true).'~</pre><br />';
             //echo 'icsfile termine -> <br /><pre>~'.print_r($icsfile['VEVENT'],true).'~</pre><br />';
         }
         //
         $lfdnumber = 0;
         $lfdnumberteam = 1;
         $lfdnumbermatch = 1;
         $lfdnumberplayground = 1;
         for ($a = 0; $a < sizeof($icsfile['VEVENT']); $a++) {
             $icsfile['VEVENT'][$a]['UID'] = $lfdnumbermatch;
             $exportmatchplan[$icsfile['VEVENT'][$a]['UID']]['match_date'] = date('Y-m-d', $icsfile['VEVENT'][$a]['DTSTART']) . " " . date('H:i', $icsfile['VEVENT'][$a]['DTSTART']);
//.........这里部分代码省略.........
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:101,代码来源:jlextdfbnetplayerimport.php


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