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


PHP Languages::model方法代码示例

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


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

示例1: DropDown

 public static function DropDown()
 {
     $res = array();
     foreach (Languages::model()->findAll() as $record) {
         $res[$record->idLanguages] = $record->LanguagesName;
     }
     return $res;
 }
开发者ID:upmunspel,项目名称:abiturient,代码行数:8,代码来源:Languages.php

示例2: GetLngArray

 public static function GetLngArray()
 {
     /* @var $item Languages */
     $lngArr = array();
     //if admin controller - arrington controller
     if (Yii::app()->controller->id == 'panel') {
         $all = Languages::model()->findAllByAttributes(array('status' => Constants::STATUS_VISIBLE), array('order' => 'priority ASC'));
     } elseif (Yii::app()->controller->id == 'lmt') {
         $all = LmtLanguages::model()->findAllByAttributes(array('status' => Constants::STATUS_VISIBLE), array('order' => 'priority ASC'));
     } else {
         $all = LuxLanguages::model()->findAllByAttributes(array('status' => Constants::STATUS_VISIBLE), array('order' => 'priority ASC'));
     }
     foreach ($all as $item) {
         $lngArr[$item->notification] = $item->prefix;
     }
     if (empty($lngArr) || count($lngArr) == 0) {
         $lngArr[strtoupper(DEFAULT_LANGUAGE)] = DEFAULT_LANGUAGE;
     }
     return $lngArr;
 }
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:20,代码来源:Constants.php

示例3: run

 public function run()
 {
     $model = new Filter();
     $model->city = $this->city;
     $model->date_n = $this->date_n;
     $model->time_n = $this->time_n;
     $model->language = $this->language;
     $model->guide = $this->guide;
     /*CITY*/
     $citys = SegCities::model()->findAll();
     /*TIME*/
     $times = SegStarttimes::model()->findAll();
     /*LANGUAGE*/
     $languages = Languages::model()->findAll();
     /*GUIDE*/
     $criteria = new CDbCriteria();
     $criteria->condition = 'cities_id=:cities_id';
     $criteria->params = array(':cities_id' => $this->city);
     //$criteria->join = 'LEFT JOIN `users` ON (`users`.`id` = `t`.`users_id`)';
     $guides_link = SegGuidesCities::model()->findAll($criteria);
     $guides = array();
     $i = 0;
     foreach ($guides_link as $item) {
         $criteria_1 = new CDbCriteria();
         $criteria_1->condition = 'id=:id';
         $criteria_1->params = array(':id' => $item->users_id);
         $guides_contact = User::model()->find($criteria_1);
         // print_r($guides_contact);
         $criteria_2 = new CDbCriteria();
         $criteria_2->condition = 'idcontacts=:idcontacts';
         $criteria_2->params = array(':idcontacts' => $guides_contact->id_contact);
         $guides[$i] = SegContacts::model()->find($criteria_2);
         $i++;
     }
     $this->render('dopMenuFilter', array('citys' => $citys, 'times' => $times, 'languages' => $languages, 'guides' => $guides, 'model' => $model));
 }
开发者ID:emisdb,项目名称:cherry,代码行数:36,代码来源:DopMenuFilter.php

示例4: array

		foreach($data as $d=>$row)
		{
			 $langss=$row['languages_known1'];
		}

		$langArr = array();
		$as=explode(',',$langss);

		foreach($as as $ai)
		{
		  $langArr[$ai] =  array('selected'=>true);
		}

		echo $form->labelEx($lang,'Languages Known',array('style'=>'width:143px')); 
		echo "</td><td>";
		echo $form->dropDownList($lang, 'languages_known1[]', CHtml::listData(Languages::model()->findAll(), 'languages_name', 'languages_name'), array(
		        'class'=>'chosen-select input-xxlarge',
			'multiple'=>'multiple',
		        'maxlength'=>200,
		        'options' => $langArr,
		
	    ));	
	echo "</td><td><span class=\"status\" style='margin-left:-4px'>&nbsp;</span></td></tr></table>";							
	?>
	<?php echo $form->error($lang,'languages_known1'); ?> 
	</div>
</div>
	<div class="row">
	<div class = "row-left">
		<?php echo $form->labelEx($info,'passport_exp_date'); ?>
		<?php if($info->passport_exp_date != '' && $info->passport_exp_date != 0000-00-00)
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:31,代码来源:updateproftab1.php

示例5: array

echo $form->labelEx($model, 'organizationID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'organizationID', CHtml::listData(Organizations::model()->findAll(), 'organizationID', 'organizationName'), array('empty' => 'Select Organization'));
?>
		<?php 
echo $form->error($model, 'organizationID');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'languageID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'languageID', CHtml::listData(Languages::model()->findAll(), 'languageID', 'languageName'), array('empty' => 'Select Language'));
?>
		<?php 
echo $form->error($model, 'languageID');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'personnelTypeID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'personnelTypeID', CHtml::listData(PersonnelTypes::model()->findAll(), 'personnelTypeID', 'personnelTypeName'), array('empty' => 'Select Personnel Type'));
?>
		<?php 
echo $form->error($model, 'personnelTypeID');
开发者ID:reubsc,项目名称:sds,代码行数:31,代码来源:_form.php

示例6: array

		<?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('name' => 'SegScheduledTours[date]', 'attribute' => 'date', 'model' => $model, 'options' => array('showAnim' => 'fold', 'dateFormat' => 'dd.mm.yy'), 'htmlOptions' => array('class' => 'form-control-date-filter')));
//			echo $form->textField($model,'date');
?>
		</div>
	</div>
	<div class="row-filter">
		<div class="form-group">
				<?php 
echo $form->dropDownList($model, 'starttime', CHtml::listData(SegStarttimes::model()->findAll(), 'timevalue', 'timevalue'), array('empty' => 'Uhrzeit', 'id' => 'picktime'));
?>
		</div>
		</div>
	<div class="row-filter">
				<?php 
echo $form->dropDownList($model, 'language_id', CHtml::listData(Languages::model()->findAll(), 'id_languages', 'germanname'), array('empty' => 'Sprache', 'id' => 'picklang'));
?>
	</div>
	<div class="row-filter">
				<?php 
$gui = new User('search_gn');
echo $form->dropDownList($model, 'guide1_id', CHtml::listData($gui->search_gn(), 'id', 'guidename'), array('empty' => 'Guide', 'id' => 'pickguide'));
?>
	</div>

	<div class="row-filter">
	         	<button class="but-filter" type="submit"><?php 
echo 'SUCHE';
?>
</button>
   	<?php 
开发者ID:emisdb,项目名称:cherry,代码行数:31,代码来源:_select.php

示例7: _setDefaults

 protected function _setDefaults($model)
 {
     if ($model->PersonID > 0) {
         $lng = Languages::model()->findByPk($model->person->LanguageID);
         if (!empty($lng)) {
             $id = Languagesex::model()->find("LanguageExName='{$lng->LanguagesName}'");
             if (!empty($id)) {
                 $model->LanguageExID = $id->idLanguageEx;
             }
         }
     }
     //$model = new Personspeciality();
     $user = User::model()->findByPk(Yii::app()->user->id);
     //debug(print_r($user->syspk, true));
     if (!empty($user->syspk)) {
         $pk = $user->syspk;
         //$pk=new SysPk();
         $model->CourseID = $pk->CourseID;
         $model->QualificationID = $pk->QualificationID;
         $model->isBudget = $pk->isBudget;
         $model->isContract = $pk->isContract;
         $model->EducationFormID = $pk->EducationFormID;
     }
 }
开发者ID:upmunspel,项目名称:abiturient,代码行数:24,代码来源:PersonspecialityController.php

示例8:

if (LanguagesKnown::model()->findByPk($langknownid)->languages_known3 != 0) {
    echo Languages::model()->findByPk(LanguagesKnown::model()->findByPk($langknownid)->languages_known3)->languages_name;
    echo "</br>";
} else {
    echo "N/A.</br>";
}
?>
 
			</div>	
		</div>		
		<div class="rowv">
				<?php 
echo '<lable><b>Language 4 :</b></lable>';
?>
			<div class="rown"> 
				
				<?php 
if (LanguagesKnown::model()->findByPk($langknownid)->languages_known4 != 0) {
    echo Languages::model()->findByPk(LanguagesKnown::model()->findByPk($langknownid)->languages_known4)->languages_name;
    echo "</br>";
} else {
    echo "N/A.</br>";
}
?>

			</div>
		</div>
	</div>	


开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:28,代码来源:view_tab3.php

示例9: getLanguagesUrl

 public function getLanguagesUrl($faculty, $lang)
 {
     $WU = new WebUser();
     $model = $WU->getUserModel();
     if (empty($model->syspk) || empty($model->syspk->printIP)) {
         throw new Exception("Необхідно визначити адресу серверу друку документів!");
     }
     $ip = $model->syspk->printIP;
     $_faculty = Facultets::model()->find("idFacultet={$faculty}");
     $_lang = Languages::model()->find("idLanguages={$lang}");
     if (empty($_faculty) || empty($_lang) && $lang != '0') {
         throw new Exception("Помилка вхідних даних!");
     }
     return "http://" . $ip . ":8080/request_report-1.0/language.jsp?faculty={$faculty}&lang={$lang}&iframe=true&width=1024&height=600";
 }
开发者ID:upmunspel,项目名称:abiturient,代码行数:15,代码来源:WebUser.php

示例10: foreach

<?php

if (file_exists(Yii::getPathOfAlias('webroot') . '/public/images/logo_' . $currentLang . '.png')) {
    echo CHtml::link('<img src="/public/images/logo_' . $currentLang . '.png" alt=""/>', '/');
} else {
    $model = Languages::model()->findAll('active=1');
    $finded = false;
    foreach ($model as $element) {
        if (file_exists(Yii::getPathOfAlias('webroot') . '/public/images/logo_' . $element->code . '.png')) {
            echo CHtml::link('<img src="/public/images/logo_' . $element->code . '.png" alt=""/>', '/');
            $finded = true;
            break;
        }
    }
    if (!$finded) {
        echo CHtml::link('<img src="/public/images/logo_en.png" alt=""/>', '/');
    }
}
开发者ID:ArseniyDyupin,项目名称:SimpleCRM2,代码行数:18,代码来源:siteLogo.php

示例11: actionLanguages

 /**
  * Метод асинхронно повертає усі іноземні мови
  */
 public function actionLanguages()
 {
     $models = Languages::model()->findAll();
     $result = array();
     foreach ($models as $model) {
         /* @var $model Languages */
         $result[] = array('text' => $model->LanguagesName, 'id' => $model->idLanguages);
     }
     echo CJSON::encode($result);
 }
开发者ID:upmunspel,项目名称:abiturient,代码行数:13,代码来源:StatController.php

示例12: loadLang

	public function loadLang($id)
	{
		$model=Languages::model()->findByPk($id);
		if($model===null)
			throw new CHttpException(404,'The requested page does not exist.');
		return $model;
	}
开发者ID:emisdb,项目名称:cherry,代码行数:7,代码来源:RootController.php

示例13: actionShow

 public function actionShow($id)
 {
     $id_control = Yii::app()->user->id;
     // $update_user = User::model()->findByPk($id_user);
     $role_control = User::model()->findByPk($id_control)->id_usergroups;
     //  $id_guide = SegGuidesdata::model()->findByPk($update_user->id_guide)->idseg_guidesdata;
     if ($role_control == 1) {
         $this->layout = "root";
     }
     if ($role_control == 2) {
         $this->layout = "admin";
     }
     if ($role_control == 3) {
         $this->layout = "office";
     }
     if ($role_control == 5) {
         $this->layout = "guide";
     }
     $model = $this->loadModel($id);
     //city
     //$citie->seg_cityname = '';
     $j = 0;
     $criteria_city = new CDbCriteria();
     $criteria_city->condition = 'users_id=:users_id';
     $criteria_city->params = array(':users_id' => $model->guide1_id);
     $city = SegGuidesCities::model()->find($criteria_city);
     if (isset($city)) {
         $criteria_c = new CDbCriteria();
         $criteria_c->condition = 'idseg_cities=:idseg_cities';
         $criteria_c->params = array(':idseg_cities' => $city->cities_id);
         $citie = SegCities::model()->find($criteria_c);
         $model->city_id_all = $citie->seg_cityname;
         $j = $citie->idseg_cities;
     } else {
         $model->city_id_all = 'no element';
     }
     //language
     if ($model->language_id == NULL) {
         $i = 0;
         $criteria_language = new CDbCriteria();
         $criteria_language->condition = 'users_id=:users_id';
         $criteria_language->params = array(':users_id' => $model->guide1_id);
         $language = SegLanguagesGuides::model()->findAll($criteria_language);
         if (isset($language)) {
             foreach ($language as $item) {
                 $criteria_i = new CDbCriteria();
                 $criteria_i->condition = 'id_languages=:id_languages';
                 $criteria_i->params = array(':id_languages' => $item->languages_id);
                 $languages = Languages::model()->findAll($criteria_i);
                 $model->language_id_all[$i] = $languages;
                 $i++;
             }
         } else {
             $model->language_id_all[0] = 'no element';
         }
     } else {
         $criteria_i = new CDbCriteria();
         $criteria_i->condition = 'id_languages=:id_languages';
         $criteria_i->params = array(':id_languages' => $model->language_id);
         $language = Languages::model()->find($criteria_i);
         $model->language_id_all[0] = $language;
     }
     //tour canegories + tourroute
     //$tourroute_id_all;
     $z = 0;
     $criteria_tour = new CDbCriteria();
     $criteria_tour->condition = 'usersid=:usersid';
     $criteria_tour->params = array(':usersid' => $model->guide1_id);
     $tourcats = SegGuidesTourroutes::model()->findAll($criteria_tour);
     if (isset($tourcats)) {
         foreach ($tourcats as $tourroute) {
             $criteria_t = new CDbCriteria();
             $criteria_t->condition = 'id_tour_categories=:id_tour_categories AND cityid=:cityid';
             $criteria_t->params = array(':id_tour_categories' => $tourroute->tourroutes_id, ':cityid' => $j);
             $tourroutes = SegTourroutes::model()->find($criteria_t);
             $model->tourroute_id_all[$z] = $tourroutes->name;
             $z++;
         }
     } else {
         $model->tourroute_id_all[0] = 'no element';
     }
     $this->render('show', array('model' => $model));
 }
开发者ID:emisdb,项目名称:cherry,代码行数:83,代码来源:SegScheduledToursController.php

示例14: run

 public function run()
 {
     $currentLang = Yii::app()->language;
     $languages = CHtml::listData(Languages::model()->findAllByAttributes(array('active' => 1)), 'code', 'name');
     $this->render('siteLogo', array('currentLang' => $currentLang, 'languages' => $languages));
 }
开发者ID:ArseniyDyupin,项目名称:SimpleCRM2,代码行数:6,代码来源:SiteLogo.php

示例15:

    } else {
        echo "N/A.</br>";
    }
    ?>
 
				</div>	
			</div>		
				<div class="rowv">
				<?php 
    echo '<lable><b>Language 4 :</b></lable>';
    ?>
				<div class="rown"> 
				
				<?php 
    if ($model->Rel_languages_known->languages_known4 != 0) {
        echo Languages::model()->findByPk($model->Rel_languages_known->languages_known4)->languages_name;
        echo "</br>";
    } else {
        echo "N/A.</br>";
    }
    ?>

		</div>
		<?php 
}
?>
	</div>
</div>


开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:28,代码来源:view_tab3.php


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