本文整理汇总了PHP中Helper::selected方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::selected方法的具体用法?PHP Helper::selected怎么用?PHP Helper::selected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper
的用法示例。
在下文中一共展示了Helper::selected方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
</tr>
<tr>
<td>
<select name="Image[special_id]">
<option value="0">==<?php
echo $form->label($model, 'special_id');
?>
==</option>
<?php
foreach ((array) $this->_special as $speical) {
?>
<option value="<?php
echo $speical['id'];
?>
" <?php
Helper::selected($speical['id'], $model->special_id);
?>
><?php
echo $speical['title'];
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td class="tb_title"><?php
echo $form->label($model, 'copy_from');
?>
示例2: foreach
</tr>
<tr>
<td>
<select name="Setting[theme]">
<option value="0">==<?php
echo Yii::t('admin', 'Select Themes');
?>
==</option>
<?php
foreach ((array) $themes as $key => $theme) {
?>
<option value="<?php
echo $theme;
?>
" <?php
Helper::selected($setting['theme'], $theme);
?>
><?php
echo Yii::t('admin', ucfirst($theme)) . '(' . $theme . ')';
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr class="submit">
<td><input type="submit" name="editsubmit" value="<?php
echo Yii::t('common', 'Submit');
?>
示例3: foreach
<tr>
<td class="tb_title"><?php
echo Yii::t('admin', 'Belong Category');
?>
:</td>
</tr>
<tr >
<td ><select name="Goods[catalog_id]" id="Goods_catalog_id" onchange="changeCatalog(this)">
<?php
foreach ((array) Catalog::get(0, $this->_catalog) as $catalog) {
?>
<option value="<?php
echo $catalog['id'];
?>
" <?php
Helper::selected($catalog['id'], $model->catalog_id);
?>
><?php
echo $catalog['str_repeat'];
echo $catalog['catalog_name'];
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td class="tb_title"><?php
示例4:
<td ><input type="text" class="txt validate[required]" name="Setting[upload_allow_ext]" value="<?php
echo $setting['upload_allow_ext'];
?>
"/></td>
</tr>
<tr>
<td class="tb_title">水印开关:</td>
</tr>
<tr >
<td ><select name="Setting[upload_water_status]">
<option value="open" <?php
echo Helper::selected($setting['upload_water_status'], 'open');
?>
>开启</option>
<option value="close" <?php
echo Helper::selected($setting['upload_water_status'], 'close');
?>
>关闭</option>
</select></td>
</tr>
<tr>
<td class="tb_title">水印文件:</td>
</tr>
<tr >
<td ><input type="text" class="txt" name="Setting[upload_water_pic]" value="<?php
echo $setting['upload_water_pic'];
?>
"/>
<br />
默认位置:public/watermark.png</td>
</tr>
示例5: foreach
<td class="tb_title"><?php
echo $form->labelEx($model, 'type');
?>
:</td>
</tr>
<tr >
<td >
<select name="RecommendPosition[type]" id="RecommendPosition_type">
<?php
foreach ((array) $this->_recom_type as $type) {
?>
<option value="<?php
echo $type['id'];
?>
" <?php
Helper::selected($type['id'], $model->type);
?>
><?php
echo $type->type_name;
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr class="submit">
<td><input type="submit" name="editsubmit" value="<?php
echo Yii::t('common', 'Submit');
示例6:
<td class="tb_title"><?php
echo Yii::t('admin', 'User Encrypt Method');
?>
:</td>
</tr>
<tr >
<td ><select name="Setting[encrypt]">
<option value="md5" <?php
echo Helper::selected($setting['encrypt'], 'md5');
?>
>MD5(<?php
echo Yii::t('admin', 'Default');
?>
)</option>
<option value="crypt" <?php
echo Helper::selected($setting['encrypt'], 'crypt');
?>
>CRYPT(<?php
echo Yii::t('admin', 'Recommend');
?>
)</option>
</select>
<span class="red"><?php
if ($crypt) {
echo Yii::t('admin', 'Support The Crypt Encryption');
?>
<?php
} else {
echo Yii::t('admin', 'Don`t Support The Crypt Encryption');
}
?>
示例7:
<option value="filecache"<?php
echo Helper::selected($data['cache_type'], 'filecache');
?>
><?php
echo Yii::t('admin', 'FileCache');
?>
</option>
<option value="memcache"<?php
echo Helper::selected($data['cache_type'], 'memcache');
?>
><?php
echo Yii::t('admin', 'MemCache');
?>
</option>
<option value="rediscache"<?php
echo Helper::selected($data['cache_type'], 'rediscache');
?>
><?php
echo Yii::t('admin', 'RedisCache');
?>
</option>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="custom_title"><?php
echo Yii::t('admin', 'IF Enable');
?>
:</div>
示例8: array
<?php
$form = $this->beginWidget('CActiveForm', array('id' => 'searchForm', 'method' => 'get', 'action' => $this->createUrl('user/index'), 'htmlOptions' => array('name' => 'xform')));
?>
<?php
if (!$adminPage) {
?>
<select name="groupid" id="groupid">
<option value="">=组=</option>
<?php
foreach ((array) $this->group_list as $group) {
?>
<option value="<?php
echo $group['id'];
?>
" <?php
Helper::selected($group['id'], $this->_request->getParam('groupid'));
?>
><?php
echo $group['group_name'];
?>
</option>
<?php
}
?>
</select>
<?php
}
?>
用户名
<input id="username" type="text" name="username" value="" class="txt" size="15"/>
<input name="searchsubmit" type="submit" class="button" value="<?php
示例9: foreach
">
<td style="width:8%; border:1px solid #CCCCCC;"><input type="checkbox" name="acls[]" value="all" onclick="selectAll('<?php
echo $ak . '_id';
?>
', this.checked)"/><strong style="color:#000000;"><?php
echo Yii::t('acl', $ak);
?>
</strong></td>
<?php
foreach ((array) $acl as $value) {
?>
<td style="width:8%; border:1px solid #CCCCCC;"><input type="checkbox" name="acls[]" value="<?php
echo $ak . '|' . $value;
?>
" <?php
Helper::selected($ak . '|' . $value, $has_acls, 'checked');
?>
/><?php
echo Yii::t('acl', $ak . '|' . $value);
?>
</td>
<?php
}
?>
</tr>
<?php
}
?>
</table>
示例10: array
<tr>
<td>
<?php
$scope = array("get_user_info", "add_t", "del_t", "get_info");
$scopeArr = $scope;
$i = 1;
foreach ($scopeArr as $val) {
?>
<input type="checkbox" name="scope[]" value="<?php
echo $val;
?>
" id="<?php
echo $val;
?>
" <?php
Helper::selected($val, explode(',', $apiconfig['scope']), 'checked');
?>
/>
<label class="qq_oauth_list" for="<?php
echo $val;
?>
"><?php
echo Yii::t('admin', 'qq_scope_' . $val);
?>
</label>
<?php
if ($i % 5 == 0 && $i > 4) {
echo "</br>";
}
$i++;
}
示例11: foreach
echo Yii::t('admin', 'User Group');
?>
:
<?php
if (!isset($adminPage)) {
?>
<select name="groupid" id="groupid">
<option value="">=组=</option>
<?php
foreach ((array) $this->group_list as $group) {
?>
<option value="<?php
echo $group['id'];
?>
" <?php
Helper::selected($group['id'], Yii::app()->request->getParam('groupid'));
?>
><?php
echo $group['group_name'];
?>
</option>
<?php
}
?>
</select>
<?php
}
?>
用户名
<input id="username" type="text" name="username" value="<?php
echo Yii::app()->request->getParam('username');