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


PHP CHtml::DropDownList方法代码示例

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


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

示例1:

<div class="middlenarrow">
    <h1> Setup SMS Port </h1>


    <p><b>Selected Port:</b> <?php 
echo $SMSCOMPort->COM;
?>
</p> <br/>
    <form action="<?php 
echo Yii::app()->urlManager->createUrl('admin/smscommandsetup');
?>
" method="POST">
        <?php 
echo CHtml::DropDownList('setup_com', $SMSCOMPort->COM, SysFunc::getAvailableComPortsList());
?>
 <br> <br>
        <input type="submit" value="Apply"/>
    </form>

</div>
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:20,代码来源:setup_sms_command.php

示例2: array

			<?php 
    echo CHtml::ajaxSubmitButton("Pick", array("almacendocs/expedicion"), array("type" => "POST", "data" => array("codiguito" => "js:cbopuntoexped.value", "identidad" => "js:Almacendocs_id.value", "responsable" => "js:cboresponsable.value"), "update" => "#zonadespacho"), array('onClick' => 'Loading.show();Loading.hide(); return false;'));
    ?>
		</div>

		<?php 
    if (is_null($model->alkardex_almacendocs->codtrabajador) or empty($model->alkardex_almacendocs->codtrabajador)) {
        ?>
			<div class="row">
				<?php 
        echo CHtml::label('Responsable', 'Responsable');
        ?>
				<?php 
        $datos = CHtml::listData(VwTrabajadores::model()->findAll(array('order' => 'ap')), 'codigotra', 'nombrecompleto');
        echo CHtml::DropDownList('cboresponsable', 'responsable', $datos, array('empty' => '--Seleccione un responsable--'));
        ?>
			</div>
		<?php 
    } else {
        echo CHtml::hiddenField('cboresponsable', $model->codtrabajador);
    }
    ?>


	<?php 
}
?>
	

	
开发者ID:hipogea,项目名称:zega,代码行数:27,代码来源:_form_detalle.php

示例3: array

			<h1><span class="date">Сохраненный список ям от <?php 
echo CHtml::encode(Y::dateFromTimeShort($list->date_created));
?>
</span></h1>
			<p>Отдел ГИБДД: "<?php 
echo $list->gibdd->gibdd_name;
?>
"</p>
			<p><?php 
echo CHtml::link('изменить', '#', array('onclick' => '$("#change_gibdd").show("slow"); $(this).hide("slow"); return false;'));
?>
</p>
			<div id="change_gibdd" style="display:none;">
			<form method="post">
			<?php 
echo CHtml::DropDownList('gibdd_change_id', '', CHtml::listData(GibddHeads::model()->findAll(array('condition' => 't.subject_id=' . $list->gibdd->subject_id . ' AND t.id !=' . $list->gibdd->id, 'order' => 't.name')), 'id', 'gibdd_name'), array());
?>
			<?php 
echo CHtml::submitButton('Изменить');
?>
			</form>

			
			</div>
			
			<div class="control">			
				<div class="progress">
							<div class="lc">
							<?php 
echo CHtml::link('Распечатать заявление', array('requestForm', 'id' => $list->gibdd_id, 'type' => 'gibdd', 'holes' => implode(',', CHtml::listData($list->holes, 'ID', 'ID'))), array('class' => 'show_form'));
?>
开发者ID:ASDAFF,项目名称:RosYama.2,代码行数:31,代码来源:selected.php

示例4: if

	<?php 
echo CHtml::encode($data->ct->title);
?>
	<br />
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('quantity'));
?>
:</b>
	<?php 
echo CHtml::encode($data->quantity);
?>
	<br />

	<b>Покупаю:</b>
	<? if (!$data->quantity) { ?>
           <b>Товара нет в наличии</b>  
    <? } else {
        echo CHtml::DropDownList('quantity'.$data->product_id,1,$quantityArray);       
    }?>
 <br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('price'));
?>
:</b>
	<?php 
echo round(CHtml::encode($data->price), 0);
?>
 р.
</div>
开发者ID:nellka,项目名称:mebel,代码行数:30,代码来源:_productlist_item.php

示例5: getPropOptionValues

 public function getPropOptionValues($label = '', $selected = '')
 {
     $cri = new CDbCriteria(array('condition' => 'prop_id =' . $this->prop_id, 'order' => 'sort_order asc, value_id asc'));
     $PropValues = PropValue::model()->findAll($cri);
     $list = CHtml::listData($PropValues, 'value_id', 'value_name');
     echo CHtml::DropDownList('Item[props][' . $this->prop_id . ']', $selected, $list, array('empty' => '请选择', 'label' => $label));
 }
开发者ID:yinhe,项目名称:yincart,代码行数:7,代码来源:ItemProp.php

示例6: array

<div class="row">

<?php 
$datos1 = CHtml::listData(Docompratemp::model()->findAll("hidguia=:hu", array(":hu" => $model->idguia)), 'id', 'descri');
echo CHtml::DropDownList('selector_item', '', $datos1, array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('Ocompra/cargaentregas'), 'update' => '#division_entregas'), 'prompt' => 'Seleccione un item'));
?>

<?php 
echo $form->HiddenField($model, 'idguia');
?>

</div>
<div id="division_entregas">


</div>

开发者ID:hipogea,项目名称:zega,代码行数:16,代码来源:tab_cinco.php

示例7: CDbCriteria

                    <tr id="add-template">
                        <td class="icons">
                            <img class="drag-handle" src="<?php 
    echo Yii::app()->theme->baseUrl;
    ?>
/images/small_icons/drag.png" alt="click and drag to rearrange" />
                        </td>
                        <td>
                            <input id="tf1" type="text" name="PropValue[value_name][]" />
                        </td>
                        <td>
                            <?php 
    $cri = new CDbCriteria(array('condition' => 'parent_id = 0'));
    $cat = Category::model()->findAll($cri);
    $list = CHtml::listData($cat, 'category_id', 'name');
    echo CHtml::DropDownList('PropValue[category_id][]', '', $list, array('id' => 'tf2__c'));
    ?>
                        </td>
                        <td>
                            <input id="tf3" type="text" name="PropValue[sort_order][]" />
                        </td>
                        <td class="icons">
                            <img class="row-cloner" src="<?php 
    echo Yii::app()->theme->baseUrl;
    ?>
/images/small_icons/clone.png" alt="Clone Row" />
                        </td>
                        <td class="icons">
                            <img class="row-remover" src="<?php 
    echo Yii::app()->theme->baseUrl;
    ?>
开发者ID:rainsongsky,项目名称:yincart,代码行数:31,代码来源:_form.php

示例8: array

echo CHtml::label('c_codep', 'trtur');
?>
		<?php 
$datos1 = CHtml::listData(Embarcaciones::model()->findAll(array('order' => 'nomep')), 'codep', 'nomep');
echo CHtml::DropDownList('c_codep', '', $datos1, array('empty' => '--Seleccione una referencia--'));
?>
		
	</div>

	<div class="row">
		<?php 
echo CHtml::label('c_edgui', 'ieyietiette');
?>
		<?php 
$datos1 = CHtml::listData(Paraqueva::model()->findAll(array('order' => 'motivo')), 'cmotivo', 'motivo');
echo CHtml::DropDownList('c_edgui', '', $datos1, array('empty' => '--Seleccione un destino--'));
?>
		
	</div>
	

	<div class="row buttons">
		<?php 
echo CHtml::submitButton('Establecer');
?>
	</div>
   	
<?php 
$this->endWidget();
?>
开发者ID:hipogea,项目名称:zega,代码行数:30,代码来源:_form_opciones_default.php

示例9: getPropOptionValues

 public function getPropOptionValues()
 {
     $cri = new CDbCriteria(array('condition' => 'prop_id =' . $this->prop_id, 'order' => 'sort_order asc, value_id asc'));
     $PropValues = PropValue::model()->findAll($cri);
     $list = CHtml::listData($PropValues, 'value_id', 'value_name');
     echo CHtml::DropDownList('pid_' . $this->prop_id, '', $list, array('empty' => '请选择'));
 }
开发者ID:rainsongsky,项目名称:yincart,代码行数:7,代码来源:ItemProp.php

示例10: array_merge

        $rootLevelCats = array_merge($rootLevelCats, $child->childs);
    }
}
$rootobj = new Category();
$rootobj->id = 0;
$rootobj->name = "At Root Level";
$root = array($rootobj);
$rootLevelCats = array_merge($root, $rootLevelCats);
if (isset($model->id) && $model->id == 1) {
    echo "This is the root node and can't be moved.";
    $model->pid = 0;
} else {
    if (isset($_GET['categorypid'])) {
        echo CHtml::DropDownList('Category[pid]', $_GET['Categorypid'], CHtml::listData($rootLevelCats, 'id', 'name'));
    } else {
        echo CHtml::DropDownList('Category[pid]', 1, CHtml::listData($rootLevelCats, 'id', 'name'));
    }
}
?>
			
                </div>
            </div>
        </tr>
    </table>
	
    <div style="text-align: center;">
    <?php 
echo CHtml::ajaxSubmitButton(Yii::t('category', 'Submit'), CHtml::normalizeUrl(array('category/addnew', 'render' => false)), array('success' => 'js: function(data) {
                        $("#Commodity_categories").append(data);
                        $("#divDialog").dialog("close");
                    }'), array('class' => 'btn btn-success', 'id' => uniqid()));
开发者ID:anjanababu,项目名称:Asset-Management,代码行数:31,代码来源:_formDialog.php

示例11: array

<div id="confirmDiv"></div>
<div class='gridview-control-line'>
	<?php 
echo CHtml::beginForm($this->createUrl($url), 'post', array('id' => 'itemsSelected-form'));
?>
	<img alt="" src="<?php 
echo Yii::app()->theme->baseUrl;
?>
/images/arrow_ltr.png"/>
	<?php 
echo Yii::t('common', 'With selected') . ': ';
echo CHtml::DropDownList('workWithItemsSelected', $model->WorkItemsSelected, $options) . ' ';
Yii::app()->clientScript->registerScript('confirm-mass-action', "\n\t\t\tfunction processMassAction(){\n\t\t\t\t\$('#itemsSelected-form input[name=\"itemsSelected[]\"]').remove();\n\t\t\t\t\$('#" . $id . " input[name=\"itemsSelected[]\"]:checked').each(function(){\n\t\t\t\t\t\$('#itemsSelected-form').append('<input type=\"hidden\" name=\"itemsSelected[]\" value=\"' + \$(this).val() + '\" />');\n\t\t\t\t});\n\t\t\t\t\$.ajax({\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\turl: '" . $this->createUrl($url) . "',\n\t\t\t\t\tdata: \$('#itemsSelected-form').serialize(),\n\t\t\t\t\tsuccess: function (html) {\n\t\t\t\t\t\t\$.fn.yiiGridView.update('" . $id . "');\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t", CClientScript::POS_END);
echo CHtml::button(Yii::t('common', 'Do'), array('class' => 'btn btn-primary', 'onclick' => "\n\t\t\t\t\tif(\$('#workWithItemsSelected').val() != 'delete'){\n\t\t\t\t\t\tprocessMassAction();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\$(\"#confirmDiv\").confirmModal({\n\t\t\t\t\t\t\theading: '" . tc('Request for confirmation') . "',\n\t\t\t\t\t\t\tbody: '" . tc('Are you sure?') . "',\n\t\t\t\t\t\t\tconfirmButton: '" . tc('Yes') . "',\n\t\t\t\t\t\t\tcloseButton: '" . tc('Cancel') . "',\n\t\t\t\t\t\t\tcallback: function () {\n\t\t\t\t\t\t\t\tprocessMassAction();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t"));
echo CHtml::endForm();
?>
</div>
开发者ID:barricade86,项目名称:raui,代码行数:17,代码来源:admin-select-items.php

示例12: function

	<?php 
Yii::app()->clientScript->registerScript('grabPageNo', "\n    \$('.bolsita').on('change', function(event){\n      \$.ajax({\n      url: '/recurso/index.php?r=loginventario/update',\n\t\ttype: 'POST',\n\t  data: {   vlugar : event.target.value,\n\t\t\t\tvidinventario :event.target.vidinventario,\n\t\t\t\tvidlog:event.target.vidlog\n\t\t\t\t} ,\n       datatype: 'json',\n        success: function(datos){\n\t\t\t\t\t\t\t\talert( 'Se ha actualizado el registro del inventario  '+datos);\n\t\t\t\t\t\t\t\t\t//\$.fn.yiiGridView.update('inventario-grid');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\n    });\n", CClientScript::POS_READY);
?>
	<div id="papito"> </div>




	<?php 
$form = $this->beginWidget('CActiveForm', array('enableAjaxValidation' => true));
?>


	<?php 
echo CHtml::DropDownList("lugarcitos", "", CHtml::listData(Lugares::model()->findAll(array("condition" => " codpro='R00001'", "order" => "deslugar ASC")), "codlugar", "deslugar"), array("empty" => "--Escoja un lugar--", "class" => "bolsitas"));
?>
	<?php 
echo CHtml::ajaxSubmitButton('Confirmar', array('loginventario/actualiza'), array('success' => 'reloadGrid'));
?>


	<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'inventario-grid', 'dataProvider' => $proveedor, 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array(array('name' => 'cod_cen', 'type' => 'raw', 'value' => 'CHTml::OpenTag("span",array("class"=>"label label-".$data->cod_cen)).$data->cod_cen.CHTml::CloseTag("span")'), array('name' => 'coddocu', 'header' => '.', 'type' => 'raw', 'value' => '($data->coddocu=="001")?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."arriba.png","",array("width"=>10, "height"=>10)):CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."abajo.png","",array("width"=>10, "height"=>10))'), array('name' => 'despro', 'type' => 'raw', 'value' => 'CHTml::OpenTag("span",array("style"=>"color:#6B1A80;font-weight:bold;")).$data->despro.CHTml::CloseTag("span")'), array('name' => 'c_direc', 'header' => 'Punto de Transporte', 'type' => 'raw', 'value' => '$data->c_direc'), array('name' => 'numerodocumento', 'header' => 'N° Documento', 'type' => 'raw', 'value' => 'CHTml::link($data->numerodocumento,yii::app()->createUrl("/guia/update",array("id"=>$data->iddocu)))'), array('class' => 'CCheckBoxColumn', 'selectableRows' => 20, 'value' => '$data->idlog', 'checkBoxHtmlOptions' => array('name' => 'cajita[]')), array('name' => 'imagen', 'type' => 'raw', 'value' => '(file_exists(Yii::app()->params["rutafotosinventario"].trim($data->codigosap).".JPG"))?
						CHtml::image(Yii::app()->params["rutafotosinventario_"].trim($data->codigosap).".JPG",$data->codigosap,array(\'width\'=>50,\'height\'=>35)):
						"--"'), array('name' => 'fecha', 'header' => 'Fecha', 'value' => 'date("d/m/Y",strtotime($data->fecha))'), array('name' => 'codigoaf', 'header' => 'Plaquita', 'type' => 'raw', 'value' => 'CHTml::link($data->codigoaf,yii::app()->createUrl("/inventario/detalle",array("id"=>$data->hidinventario)))'), 'descripcion', 'barcoactual', array('name' => 'cE', 'header' => '', 'type' => 'raw', 'value' => 'CHtml::link("+",Yii::app()->createUrl("/Lugares/create",array("codpro"=>$data->codpro)),array("id"=>"cumple_$data->idlog", "vidinventario"=>"$data->hidinventario","vidlog"=>"$data->idlog", "class"=>"periquito"))'), array('name' => 'codlugar', 'type' => 'raw', 'value' => '(($data->codpro <> "R00001") and ($data->coddocu=="001") ) ?
																				CHtml::ajaxSubmitButton("Ok",
																				array("loginventario/actualizaprov"),
																				array("type"=>"POST",
																					"data"=>array("codpro"=>$data->codpro,"idlog"=>$data->idlog,"hidinventario"=>$data->hidinventario),
																					"success"=>"reloadGrid"
开发者ID:hipogea,项目名称:zega,代码行数:30,代码来源:vw_log.php

示例13: array

<div class="wide form">

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'maestro-valores-form', 'enableAjaxValidation' => false));
?>

	<?php 
echo $form->errorSummary($model);
?>

	

			<div class="row">	
		<?php 
echo CHtml::Label('Grupo', '3');
echo CHtml::DropDownList("lugarcitos", "", CHtml::listData(MaestroGrupos::model()->findAll(), 'id', 'descri'), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('Maestrovalores/cargaatributos'), 'update' => '#MaestroValores_hidat'), 'prompt' => 'Seleccione un grupo'));
?>
	
	</div>
	
	
	<div class="row">
		 <?php 
echo $form->labelEx($model, 'hidat');
echo $form->dropDownList($model, 'hidat', array(), array('prompt' => 'Seleccione una organizacion'));
?>
	</div>
	
	
	<div class="row">
		<?php 
开发者ID:hipogea,项目名称:zega,代码行数:31,代码来源:_form.php

示例14: array

$data_url = Yii::app()->request->url . '/Getjson';
?>

<div class="row">
    <div class="col-md-3">
        

        <div class="form-group">
           <h3>統計時間選擇</h3>
           <?php 
$fa = Task::model()->findAll(array('order' => 'TaskID DESC', 'limit' => 10));
//print(arg)
//public static array listData(array $models, string $valueField, string $textField, string $groupField='')
$ld = CHtml::listData($fa, 'TaskID', 'date');
//print_r($ld);
echo CHtml::DropDownList('TaskID', 'date', $ld, array('class' => 'form-control', 'onchange' => 'changeTaskID();'));
?>
           </div>
           <a href="<?php 
echo Yii::app()->request->url . '/report';
?>
" target="_blank" class="btn btn-primary">列印版</a>
           <div class="panel panel-info">
             <div class="panel-heading"><i class="fa fa-book"></i> 說明</div>
             <div class="panel-body">
               <ul>
                   <li> <i class="fa fa-line-chart"></i> 排名依照總分。</li>
                   <li>總分=Impacts*0.5+Presence*0.17</li>
                   <li>
                       Presence指標,最新指標為檔案數量,統計<code>PDF/Word/Power Point/PS/EPS檔</code>。
                   </li>
开发者ID:wishnoblog,项目名称:SitePageRank,代码行数:31,代码来源:index.php

示例15: array

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'escoje-form', 'action' => Yii::app()->createUrl('/Almacendocs/create'), 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

        <?php 
echo "<div class='botones'>";
echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/siga.png', array('value' => 'Crear'));
echo "</div>";
?>

	<div class="row">
		
		<?php 
$datos1 = CHtml::listData(Almacenmovimientos::model()->findAll(array('order' => 'movimiento')), 'codmov', 'movimiento');
echo CHtml::DropDownList('opciondocu', '', $datos1, array('empty' => '--Seleccione un movimiento--'));
?>
		
	</div>

	

	


<?php 
$this->endWidget();
?>
</div><!-- form -->
</div><!-- form -->
开发者ID:hipogea,项目名称:zega,代码行数:29,代码来源:vw_escojer.php


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