Controllers
[ class tree: Controllers ] [ index: Controllers ] [ all elements ]

Source for file applicationSetupOne.php

Documentation is available at applicationSetupOne.php

  1. <?php
  2. /**
  3.  * <b>Class Description</b>: Controller for the system's initial setup screen
  4.  * Created On: 30 March 2009
  5.  * @author Jan van der Breggen
  6.  * @package Controllers
  7.  * @subpackage SystemSetupScreens
  8.  * @see controllersPackage.php
  9.  * @todo
  10.  ***/
  11. {
  12.  
  13.     function index()
  14.     {
  15.         $this->_init($GLOBALS['lang']['setupHeader'],$GLOBALS['lang']['setupScreenText']);
  16.         $this->setPackageInfo("SystemSetupScreens");
  17.         $this->View['page_to_display''view_applicationSetupOne';
  18.         $db new model_students();
  19.         $countries $this->convertRowsArrayToColumnsArray($db->getCountries());//    $this->searchResult->getSelectValues('student_uid', 'first', 'last');
  20.         $this->View['countryCode'$countries['code'];
  21.         $this->View['countryLabel'$countries['stdName'];
  22.         display_view($this->viewTemplate$this->View);
  23.         $_SESSION['countries']=$countries;
  24.     if (!isset($_SESSION['rvtwo']['locale'])){
  25.       
  26.             $_SESSION['rvtwo']['locale']serialize(new localeSettings());
  27.         }
  28.          
  29.     }
  30.  
  31.     function verification ()
  32.     {
  33.         $countryConfig unserialize($_SESSION['rvtwo']['locale']);
  34.         $countryConfig->setCountry($_POST['selectValues'],$_SESSION['countries']['iso3'][$_POST['selectValues']],
  35.         $_SESSION['countries']['stdName'][$_POST['selectValues']]);
  36.  
  37.         //need to find a way to make setlocale to work reliably for all main countries
  38.         //or otherwise store this kind of information in a config text file
  39.         if (setlocale(LC_ALL$countryConfig->getCountryIsoCode().'.utf8@euro',$countryConfig->getCountryIsoCode().'.utf8',$countryConfig->getCountryCode(),$countryConfig->getCountryIsoCode(),
  40.         $countryConfig->getCountryLabel()))
  41.         {
  42.             $locale_info localeconv();
  43.             $countryConfig->setCurrencyNumberConfig(utf8_encode($locale_info['currency_symbol']),utf8_encode($locale_info['int_curr_symbol']),
  44.             utf8_encode($locale_info['decimal_point']),utf8_encode($locale_info['thousands_sep']));
  45.         }
  46.         $_SESSION['rvtwo']['locale'serialize($countryConfig);
  47.         redirect (applicationSetupTwo);
  48.  
  49.  
  50.  
  51.     }
  52.  
  53.     /*---------------------------------------------------------------------------------*/
  54.     /* Set locale
  55.      /* based on what's in core.php                                                        */
  56.     /*---------------------------------------------------------------------------------*/
  57.     function _setLocale($country)
  58.     {
  59.         //look at core.php and lookup online resources to find
  60.         //a way to set the locale based on the selected country
  61.     }
  62.  
  63. }
  64. ?>

Documentation generated on Mon, 18 May 2009 11:21:34 +0200 by phpDocumentor 1.4.1