Exemplo n.º 1
0
 public static function getType($type)
 {
     $arr = PremiumAdDisplayType::findAll();
     foreach ($ass as $value) {
         foreach ($value as $id => $name) {
             if ($id == $type) {
                 return $name;
             }
         }
     }
     return 'Unknown';
 }
Exemplo n.º 2
0
echo $form->labelEx($model, 'position');
?>
		<?php 
echo $form->dropDownList($model, 'position', CHtml::listData(PremiumAdPosition::findAll(), 'id', 'name'));
?>
		<?php 
echo $form->error($model, 'position');
?>
	</div>

	<div class="select-menu">
		<?php 
echo $form->labelEx($model, 'display_type');
?>
		<?php 
echo $form->dropDownList($model, 'display_type', CHtml::listData(PremiumAdDisplayType::findAll(), 'id', 'name'));
?>
		<?php 
echo $form->error($model, 'display_type');
?>
	</div>

	<div class="select-menu">
		<?php 
echo $form->labelEx($model, 'p_categories');
?>
		<?php 
echo $form->dropDownList($model, 'p_categories', Category::model()->getCategories(false), array('multiple' => 'multiple', 'size' => 4));
?>
		<?php 
echo $form->error($model, 'p_categories');