Example #1
0
 public static function getType($type)
 {
     $arr = PremiumAdPosition::findAll();
     foreach ($ass as $value) {
         foreach ($value as $id => $name) {
             if ($id == $type) {
                 return $name;
             }
         }
     }
     return 'Unknown';
 }
Example #2
0
echo $form->labelEx($model, 'link_url');
?>
		<?php 
echo $form->textField($model, 'link_url', array('size' => 60, 'maxlength' => 250, 'class' => "full"));
?>
		<?php 
echo $form->error($model, 'link_url');
?>
	</div>

	<div class="select-menu">
		<?php 
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');