echo $form->dropDownList($model, 'default_locale', OmmuLocale::getLocale());
?>
				<?php 
echo $form->error($model, 'default_locale');
?>
			</div>
		</div>

		<div class="clearfix">
			<?php 
echo $form->labelEx($model, 'timezone');
?>
			<div class="desc">
				<?php 
$model->timezone = OmmuTimezone::getDefault();
echo $form->dropDownList($model, 'timezone', OmmuTimezone::getTimezone());
?>
				<?php 
echo $form->error($model, 'timezone');
?>
			</div>
		</div>

		<div class="clearfix">
			<?php 
echo $form->labelEx($model, 'dateformat');
?>
			<div class="desc">
				<?php 
$dateformat = "1986-08-11 16:25:50";
$model->dateformat = $setting->site_dateformat;
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionSetting()
 {
     $model = new OmmuLocale();
     $setting = OmmuSettings::model()->findByPk(1);
     // Uncomment the following line if AJAX validation is needed
     $this->performAjaxValidation($model);
     if (isset($_POST['OmmuLocale'])) {
         $model->attributes = $_POST['OmmuLocale'];
         $jsonError = CActiveForm::validate($model);
         if (strlen($jsonError) > 2) {
             echo $jsonError;
         } else {
             if (isset($_GET['enablesave']) && $_GET['enablesave'] == 1) {
                 if ($model->validate()) {
                     $locale = OmmuLocale::model()->findByPk($model->default_locale);
                     $timezone = OmmuTimezone::model()->findByPk($model->timezone);
                     $setting->site_dateformat = $model->dateformat;
                     $setting->site_timeformat = $model->timeformat;
                     if ($locale->update() && $timezone->update() && $setting->update()) {
                         echo CJSON::encode(array('type' => 0, 'msg' => '<div class="errorSummary success"><strong>' . Yii::t('phrase', 'Locale setting success updated.') . '</strong></div>'));
                     }
                 } else {
                     print_r($model->getErrors());
                 }
             }
         }
         Yii::app()->end();
     } else {
         $this->pageTitle = Yii::t('phrase', 'Locale Settings');
         $this->pageDescription = Yii::t('phrase', 'Please select a default timezone setting for your social network. This will be the default timezone applied to users\' accounts if they do not select a timezone during signup, or if they are not signed in. Select the default locale you want to use on your social network. This will affect the language of the dates that appear on your social network pages.');
         $this->pageMeta = '';
         $this->render('admin_setting', array('model' => $model, 'setting' => $setting));
     }
 }