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


PHP Province::getDropdown方法代码示例

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


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

示例1: dirname

  <!-- hinh anh -->
  <?php 
require_once dirname(__FILE__) . './../jfileupload/_upload.php';
?>
  
  <div class="control-group">
    <div class="control-label"><?php 
echo $form->labelEx($model, 'scope');
?>
</div>
    <div class="controls">
	<?php 
$province = $model->isNewRecord ? '' : $model->district->parent->id;
$district = $model->isNewRecord ? '' : $model->district->id;
$provinces = new Province();
echo CHtml::dropDownList('ArticleOfArea[province]', $province, $provinces->getDropdown(), array('prompt' => 'Chọn tỉnh/thành', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('LoadDistricts'), 'update' => '#ArticleOfArea_scope', 'data' => array('province' => 'js:this.value', 'district' => $district))));
?>
    <?php 
echo CHtml::dropDownList('ArticleOfArea[scope]', '', array(), array('prompt' => 'Chọn quận/huyện'));
?>
    </div>
  </div>
  
  <div class="control-group">
    <div class="control-label"><?php 
echo $form->labelEx($model, 'summary');
?>
</div>
    <div class="controls"><?php 
echo $form->textArea($model, 'summary', array('class' => 'input-xxlarge', 'size' => 60, 'maxlength' => 500));
?>
开发者ID:phantsang,项目名称:xzsUuJg0keDWW5Rx679PHBVBJ,代码行数:31,代码来源:_form.php

示例2: Province

?>
                            <?php 
echo $form->textField($model, 'price');
?>
                            <?php 
echo $form->error($model, 'price');
?>
                        </div>
                    
                       <div class="newrow">
                            <?php 
echo $form->labelEx($model, 'scope');
?>
                            <?php 
$provinces = new Province();
echo $form->dropDownList($model, 'scope', $provinces->getDropdown(), array('empty' => 'Toàn quốc'));
?>
                            <?php 
echo $form->error($model, 'scope');
?>
                        </div>
                    
                        <div class="newrow">
                            <?php 
echo $form->labelEx($model, 'category');
?>
                            <?php 
$adsCategories = new AdvertisingCategory();
echo $form->dropDownList($model, 'category', $adsCategories->getDropdown());
?>
                            <?php 
开发者ID:phantsang,项目名称:xzsUuJg0keDWW5Rx679PHBVBJ,代码行数:31,代码来源:createAdvertising.php

示例3: array

                        <?php 
}
?>
                    </ul>
                </div>
                <div class="col-right">
                	<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'article-of-area-filter', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>
					<fieldset>
					  <legend>Lọc theo khu vực</legend>
                       <div class="newrow">
                            <label>Tỉnh/Thành phố</label>
                            <?php 
$province = new Province();
echo CHtml::dropDownList('Province', '', $province->getDropdown(), array('prompt' => 'Chọn tỉnh/thành phố', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('LoadDistricts'), 'update' => '#District', 'data' => array('province' => 'js:this.value'))));
?>
                        </div>
                        <div class="newrow">
                            <label>Quận/Huyện</label>
                            <?php 
echo CHtml::dropDownList('District', '', array(), array('prompt' => 'Chọn quận/huyện'));
?>
                        </div>
                        </fieldset>
                    
                        <div class="newrow buttonRow fright">
                            <?php 
echo CHtml::submitButton('Tìm kiếm', array('class' => 'button_send'));
?>
                        </div>
开发者ID:phantsang,项目名称:xzsUuJg0keDWW5Rx679PHBVBJ,代码行数:31,代码来源:articleOfArea.php


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