public function action_create() { if ($this->user) { //cannot create new accounts when a user is logged in $this->action_index(); } $post = $_POST; // Create a new user $user = ORM::factory('user')->values($post); if ($user->check()) { $user->save(); // user created, show login form $this->action_login(); } else { //show form echo form::open(); echo 'username:'******'username') . '<br>'; echo 'password:'******'password') . '<br>'; echo 'password confirm:' . form::password('password_confirm') . '<br>'; echo 'role:' . form::select('role', array('user' => 'user', 'admin' => 'admin')) . '<br>'; echo form::submit('create', 'create'); echo form::close(); echo Kohana::debug($user->validate()->errors()); } }
function meta_acpt_slide_options() { $form = new form('slide', null); $form->image('image', array('label' => 'Image URL', 'help' => 'Upload an Image that is 940px by 350px for best results', 'button' => 'Add Your Slide')); $form->text('headline', array('label' => 'Headline')); $form->textarea('description', array('label' => 'Description')); $form->select('showText', array('Yes', 'No'), array('label' => 'Show Headline and Description')); }
function meta_custom() { $form = new form('details', null); $form->text('name', array('label' => 'Text Field')); $form->image('image', array('label' => 'Image Field', 'button' => 'Add Your Image')); $form->file('file', array('label' => 'File Field', 'button' => 'Select a File')); $form->textarea('address', array('label' => 'Textarea', 'validate' => 'html')); $form->select('rooms', array('one', 'two', 'three'), array('label' => 'Select List')); $form->radio('baths', array('blue', 'green', 'red'), array('label' => 'Radio Buttons')); $form->editor('baths', 'WYSIWYG Editor'); }
private function buildForm() { $options = array('method' => "POST", 'enctype' => "multipart/form-data", 'action' => '/blog/formular/add', 'width' => '400px'); $form = new \form('testing', $options); $form->label('checkbox'); $form->checkbox('checkbox test', 'testcheckbox', 'check', ''); $form->checkbox('checkbox test2', 'testcheckbox', 'check2', true); $form->label('radio'); $form->radio('radio test', 'testradio', 'radio', ''); $form->radio('radio test 2', 'testradio', 'radio2', true); $form->label('textarea'); $form->text('textarea', ' ', ['error' => $this->error['textarea']]); $form->select('autos', ['a' => 'audi', 'b' => 'vw', 'c' => 'toyota'], 'b', ['label' => 'auto select']); $form->text('username', '', ['placeholder' => 'username', 'label' => 'Username', 'error' => $this->error['username']]); $form->password('password', '', ['label' => 'Password', 'error' => $this->error['password']]); $form->button('senden', ['type' => 'submit']); return $form; }
public function getHtmlField($aPostedData) { $return = ''; switch ($this->type) { # Champ texte default: case 1: $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::text($this->html_id, 60, 255, $aPostedData[$this->id]) . '</p>'; break; # Zone de texte # Zone de texte case 2: $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::textarea($this->html_id, 58, 10, $aPostedData[$this->id]) . '</p>'; break; # Menu déroulant # Menu déroulant case 3: $values = array_filter((array) unserialize($this->value)); $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<label for="' . $this->html_id . '"' . ($this->status == 2 ? ' class="required" title="' . __('c_c_required_field') . '"' : '') . '>' . html::escapeHTML($this->title) . '</label>' . form::select($this->html_id, array_flip($values), $aPostedData[$this->id]) . '</p>'; break; # Boutons radio # Boutons radio case 4: $values = array_filter((array) unserialize($this->value)); $str = ''; foreach ($values as $k => $v) { $str .= '<li><label>' . form::radio(array($this->html_id, $this->html_id . '_' . $k), $k, $k == $aPostedData[$this->id]) . html::escapeHTML($v) . '</label></li>'; } $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>'; break; # Cases à cocher # Cases à cocher case 5: $values = array_filter((array) unserialize($this->value)); $str = ''; foreach ($values as $k => $v) { $str .= '<li><label>' . form::checkbox(array($this->html_id . '[' . $k . ']', $this->html_id . '_' . $k), $k, in_array($k, $aPostedData[$this->id])) . html::escapeHTML($v) . '</label></li>'; } $return = '<p class="field" id="' . $this->html_id . '-wrapper">' . '<span class="fake-label">' . html::escapeHTML($this->title) . '</span></p>' . '<ul class="checklist">' . $str . '</ul>'; break; } return $return; }
protected function setFilterOrderBy() { if (isset($_GET['order_direction'])) { $this->params->show_filters = true; if (strtolower($_GET['order_direction']) == 'desc') { $this->params->order_direction = 'desc'; } else { $this->params->order_direction = 'asc'; } $_SESSION[$this->sess_prefix . 'order_direction'] = $this->params->order_direction; } elseif (isset($_SESSION[$this->sess_prefix . 'order_direction'])) { $this->params->show_filters = true; $this->params->order_direction = $_SESSION[$this->sess_prefix . 'order_direction']; } if (isset($_GET['order_by'])) { $this->params->order_by = $_GET['order_by']; $_SESSION[$this->sess_prefix . 'order_by'] = $this->params->order_by; $this->params->show_filters = true; } elseif (isset($_SESSION[$this->sess_prefix . 'order_by'])) { $this->params->order_by = $_SESSION[$this->sess_prefix . 'order_by']; $this->params->show_filters = true; } $this->fields['order_by'] = array($this->form_id . '_order_by', 'Triés par', form::select(array('order_by', $this->form_id . '_order_by'), $this->order_by_array, $this->params->order_by)); $this->fields['order_direction'] = array($this->form_id . '_order_direction', 'Ordre', form::select(array('order_direction', $this->form_id . '_order_direction'), array('décroissant' => 'desc', 'croissant' => 'asc'), $this->params->order_direction)); switch ($this->params->order_by) { default: case 'id': $this->get_estimates_params['order'] = 'e.id'; break; case 'created_at': $this->get_estimates_params['order'] = 'e.created_at'; break; case 'updated_at': $this->get_estimates_params['order'] = 'e.updated_at'; break; } $this->get_estimates_params['order'] .= ' ' . strtoupper($this->params->order_direction); }
echo '<p>' . __('No detail') . '</p>'; } else { echo '<ul>'; foreach ($file->media_meta as $k => $v) { if ((string) $v) { echo '<li><strong>' . $k . ':</strong> ' . html::escapeHTML($v) . '</li>'; } } echo '</ul>'; } } if ($file->editable && $core_media_writable) { if ($file->media_type == 'image') { echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Update thumbnails') . '</legend>' . '<p>' . __('This will create or update thumbnails for this image.') . '</p>' . '<p><input type="submit" name="thumbs" value="' . __('update thumbnails') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>'; } if ($file->type == 'application/zip') { $inflate_combo = array(__('Extract in a new directory') => 'new', __('Extract in current directory') => 'current'); echo '<form class="clear" id="file-unzip" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Extract archive') . '</legend>' . '<ul>' . '<li><strong>' . __('Extract in a new directory') . '</strong> : ' . __('This will extract archive in a new directory that should not exists yet.') . '</li>' . '<li><strong>' . __('Extract in current directory') . '</strong> : ' . __('This will extract archive in current directory and will overwrite existing files or directory.') . '</li>' . '</ul>' . '<p><label class="classic">' . __('Extract mode:') . ' ' . form::select('inflate_mode', $inflate_combo, 'new') . '</label> ' . '<input type="submit" name="unzip" value="' . __('c_c_action_extract') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>'; } echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post">' . '<fieldset><legend>' . __('Change media properties') . '</legend>' . '<p class="field"><label>' . __('File name:') . '</label>' . form::text('media_file', 30, 255, html::escapeHTML($file->basename)) . '</p>' . '<p class="field"><label>' . __('File title:') . '</label>' . form::text('media_title', 30, 255, html::escapeHTML($file->media_title)) . '</p>' . '<p class="field"><label>' . __('File date:') . '</label>' . form::text('media_dt', 16, 16, html::escapeHTML($file->media_dtstr)) . '</p>' . '<p class="field"><label class="classic">' . form::checkbox('media_private', 1, $file->media_priv) . ' ' . __('Private') . '</label></p>' . '<p class="field"><label>' . __('New directory:') . '</label>' . form::select('media_path', $dirs_combo, dirname($file->relname)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_save') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>'; echo '<form class="clear" action="' . html::escapeURL($page_url) . '" method="post" enctype="multipart/form-data">' . '<fieldset><legend>' . __('Change file') . '</legend>' . '<div>' . form::hidden(array('MAX_FILE_SIZE'), OKT_MAX_UPLOAD_SIZE) . '</div>' . '<p class="field"><label for="upfile">' . __('Choose a file:') . '</label>' . '<input type="file" id="upfile" name="upfile" size="35" /></p>' . '<p class="note">' . sprintf(__('c_c_maximum_file_size_%s'), util::l10nFileSize(OKT_MAX_UPLOAD_SIZE)) . '</p>' . '<p><input type="submit" value="' . __('c_c_action_send') . '" />' . form::hidden(array('id'), $id) . adminPage::formtoken() . '</p>' . '</fieldset></form>'; } echo '</div>'; echo '</div>'; echo '</div>'; # Pied-de-page if ($popup) { require OKT_ADMIN_FOOTER_SIMPLE_FILE; } else { require OKT_ADMIN_FOOTER_FILE; }
</td> </tr> <?php } } ?> </tbody> </table> <div class="btn"><label for="check_box"><?php echo L('selected_all'); ?> /<?php echo L('cancel'); ?> </label> <?php echo form::select($types, '', 'name="typeid" id="typeid"', L('please_choose_type')); ?> <span id="msg_id"></span> <input type="submit" name="dosubmit" id="dosubmit" class="button" value="<?php echo L('import'); ?> " /> </div> <div id="pages"><?php echo $pages; ?> </div> </form> </div> </div> </body> </html> <script type="text/javascript">
<?php /** * Edit */ if ($edit) { $options = $column->get_options(); $selected = $row[$column->get_name()]; $attributes = array('id' => $form_field_name); echo form::select($form_field_name, $options, $selected, $attributes); if ($column->get_comment()) { echo '<ul class="notes">' . '<li><strong>' . $column->get_comment() . '</strong></li>' . '</ul>'; } /** * Don't edit */ } else { echo $row[$column->get_name()]; }
<th width="80"><strong><?php echo L('boardtype'); ?> :</strong></th> <td><input name="space[name]" class="input-text" id="name" type="text" value="<?php echo htmlspecialchars($info['name']); ?> " size="25"></td> </tr> <tr> <th><strong><?php echo L('ads_type'); ?> :</strong></th> <td><?php echo form::select($TYPES, $info['type'], 'name="space[type]" id="type" onchange="AdsType(this.value)"'); ?> <span id="ScrollSpan" style="padding-left:30px;display:none;"><label><input type="checkbox" id="ScrollBox" name="setting[scroll]"<?php if ($setting['scroll']) { ?> checked<?php } ?> value='1'/> <?php echo L('rolling'); ?> </label></span> <span id="AlignSpan" style="padding-left:30px;display:none;"><label><input type="checkbox" <?php if ($setting['align']) { ?> checked<?php
<td><?php echo L('point'); ?> </td> <td> <input type="text" name="info[point]" value="" class="input-text" id="point" size="10"></input> </td> </tr> <tr> <td><?php echo L('member_model'); ?> </td> <td> <?php echo form::select($modellist, '44', 'name="info[modelid]"', ''); ?> </td> </tr> <tr> <td><?php echo L('vip'); ?> </td> <td> <?php echo L('isvip'); ?> <input type="checkbox" name="info[vip]" value=1 /> <?php echo L('overduedate');
echo L('drop_down_style'); ?> <input name="info[style]" value="1" type="radio"> <?php echo L('pop_style'); ?> </td> </tr> <tr> <td><?php echo L('sites'); ?> </td> <td> <?php echo form::select($sitelist, '', 'name="info[siteid]"', L('all_sites')); ?> </td> </tr> </table> <div class="bk15"></div> <input name="dosubmit" type="submit" value="<?php echo L('submit'); ?> " class="dialog" id="dosubmit"> </form> </div> </div> </body> </html>
/** * * 传入的站点ID,读取站点下的邮件链接分类 ... * @param $siteid 选择的站点ID */ public function get_typelist($siteid = '1', $value = '', $id = '') { $data = $arr = array(); $data = $this->type_db->select(array('module' => 'ysqgk', 'siteid' => $siteid)); pc_base::load_sys_class('form', '', 0); foreach ($data as $r) { $arr[$r['typeid']] = $r['name']; } $html = $id ? ' id="typeid" onchange="$(\'#' . $id . '\').val(this.value);"' : 'name="typeid", id="typeid"'; return form::select($arr, $value, $html, L('please_select')); }
<?php defined('IN_ADMIN') or exit('No permission resources.'); include $this->admin_tpl('header'); ?> <div class="pad_10"> <table width="100%" cellspacing="0" class="search-form"> <tbody> <tr> <td> <div class="explain-col"> <?php echo L('select_pdo_op'); ?> <?php echo form::select($pdos, $pdoname, 'name="pdo_select" onchange="show_tbl(this)"', L('select_pdo')); ?> <input type="submit" value="<?php echo L('pdo_look'); ?> " class="button" name="dosubmit"> </div> </td> </tr> </tbody> </table> <div class="table-list"> <form method="post" id="myform" name="myform" > <table width="100%" cellspacing="0"> <thead> <tr>
<li><?php echo is_int($link) ? $title : HTML::anchor($link, $title); ?> </li> <?php } ?> </ul> </div> <div class="translations span-6 last"> <?php echo form::open(NULL, array('method' => 'get')); ?> <?php echo form::select('lang', $translations, I18n::$lang); ?> <?php echo form::close(); ?> </div> </div> </div> <div id="docs" class="container clear"> <div id="content" class="span-17 suffix-1 colborder"> <?php echo $content; ?> <?php
echo L('basic_configuration'); ?> </legend> <table width="100%" class="table_form contentWrap"> <tr> <th><strong><?php echo L('filedtype'); ?> </strong><br /></th> <td> <input type="hidden" name="info[formtype]" value="<?php echo $formtype; ?> "> <?php echo form::select($fields, $formtype, 'name="info[formtype]" id="formtype" onchange="javascript:field_setting(this.value);" disabled', L('filedtype_need')); ?> </td> </tr> <tr> <th><strong><?php echo L('main_table_filed'); ?> </strong></th> <td> <input type="hidden" name="issystem" id="issystem" value="<?php echo $issystem ? 1 : 0; ?> "> <input type="radio" name="info[issystem]" id="field_basic_table1" value="1" <?php if ($issystem) {
£º</th> <td><b style="color:#F60;"><?php echo $sinfo['name']; ?> </b> [<?php echo $TYPES[$sinfo['type']]; ?> ]</td> </tr> <tr> <th align="right" valign="top"><?php echo L('poster_type'); ?> £º</th> <td valign="top" colspan="2"><?php echo form::select($setting['type'], trim($info['type']), 'name="poster[type]" id="type" onchange="AdsType(this.value)"', $default); ?> </td> </tr> <tr> <th><?php echo L('line_time'); ?> £º</th> <td><?php echo form::date('poster[startdate]', date('Y-m-d H:i:s', $info['startdate']), 1); ?> </td> </tr> <tr> <th><?php
echo $siteid; ?> ' name="siteid"> <fieldset> <legend><?php echo L('basic_config'); ?> </legend> <table width="100%" class="table_form"> <tr> <th width="120"><?php echo L('wap_sel_site'); ?> </th> <td class="y-bg"><?php echo form::select($sitelist, self::get_siteid(), 'name="siteid"'); ?> </td> </tr> <tr> <th width="120"><?php echo L('wap_sitename'); ?> </th> <td class="y-bg"><input type="text" class="input-text" name="sitename" id="sitename" size="30" value=""/></td> </tr> <tr> <th width="120"><?php echo L('wap_logo'); ?> </th>
<div id="tagscontent" class="right_box"> <form name="typeform" method="post" action="<?php echo front::$uri;?>"> <table border="0" cellspacing="0" cellpadding="0" name="table1" id="table1" width="100%"> <tbody> <tr> <td width="19%" align="right">栏目</span></td> <td width="1%"> </td> <td width="70%"><?php $archive=archive::getInstance(); echo form::select('catid',get('catid'),category::option()); ?> <?php echo form::submit('更新'); ?> </td></tr></tbody> </table> </form> </div>
/** * function get_pos 获取推荐位 * 根据栏目获取推荐位id,并生成form的select形式 */ public function public_get_pos() { $catid = intval($_GET['catid']); if (!$catid) { exit(0); } $position = getcache('position', 'commons'); if (empty($position)) { exit; } $category = pc_base::load_model('category_model'); $info = $category->get_one(array('catid' => $catid), 'modelid, arrchildid'); if (!$info) { exit(0); } $modelid = $info['modelid']; $array = array(); foreach ($position as $_key => $_value) { if ($_value['modelid'] && $_value['modelid'] != $modelid || $_value['catid'] && strpos(',' . $info['arrchildid'] . ',', ',' . $catid . ',') === false) { continue; } $array[$_key] = $_value['name']; } $data = form::select($array, '', 'name="sub[posid]"', L('please_select')); exit($data); }
<fieldset> <legend><?php echo L('move').L('model_member')?></legend> <div class="bk10"></div> <div class="explain-col"> <?php echo L('move_member_model_alert')?> </div> <div class="bk10"></div> <table width="100%" class="table_form"> <tr> <td width="120"><?php echo L('from_model_name')?></td> <td> <?php echo $modellist[$_GET['modelid']];?> </td> </tr> <tr> <td width="120"><?php echo L('to_model_name')?></td> <td> <?php echo form::select($modellist, 0, 'id="to_modelid" name="to_modelid"', L('please_select'))?> </td> </tr> </table> </fieldset> <div class="bk15"></div> <input name="dosubmit" id="dosubmit" type="submit" value="<?php echo L('submit')?>" class="dialog"> </form> </div> </div> </body> </html>
} ?> <tr> <td align="left"><?php echo $v['field']; ?> </td> <td align="left"><?php echo $v['name']; ?> </td> <td align="left"><input type="hidden" name="model_field[]" value="<?php echo $v['field']; ?> "><?php echo form::select($node_field, in_array($v['field'], array('inputtime', 'updatetime')) ? 'time' : $v['field'], 'name="node_field[]"'); ?> </td> <td align="left"><div class="funcs_div"><input type="text" name="funcs[]" class="funcs"><a href="javascript:void(0)" onclick="clearh();show_funcs(this);" onmouseout="hidden_funcs_div_1()"><img src="<?php echo IMG_PATH; ?> admin_img/toggle-collapse-dark.png"></a></div></td> </tr> <?php } ?> </tbody> </table> </fieldset> <div class="btn"> <input type="submit" class="button" name="dosubmit" value="<?php
</span> </div> </div> </div> <div class="col-auto"> <div class="col-1"> <div class="content pad-6"> <table width="100%" cellspacing="0" class="table_form"> <tbody> <tr> <th width="80"> <font color="red">*</font> <?php echo L('for_type'); ?> </th> <td><?php echo form::select($types, $info['typeid'], 'name="info[typeid]" id="typeid"', L('please_choose_type')); ?> </td> </tr> <tr> <th width="80"> <font color="red">*</font> <?php echo L('content_title'); ?> </th> <td><input type="text" style="width:350px;" name="info[title]" id="title" value="<?php echo htmlspecialchars($info['title']); ?> " class="measure-input " onBlur="$.post('api.php?op=get_keywords&number=3&sid='+Math.random()*5, {data:$('#title').val()}, function(data){if(data && $('#keywords').val()=='') $('#keywords').val(data); })" /> <input type="hidden" name="style_color" id="style_color" value=""> <input type="hidden" name="style_font_weight" id="style_font_weight" value=""> <input type="button" class="button" id="check_title_alt" value="<?php
/** * 获取专题分类方法 * @param intval $specialid 专题ID * @param string $value 默认选中值 * @param intval $id onchange影响HTML的ID * */ public function get_type($specialid = 0, $value = '', $id = '') { $type_db = pc_base::load_model('type_model'); $data = $arr = array(); $data = $type_db->select(array('module' => 'special', 'parentid' => $specialid)); pc_base::load_sys_class('form', '', 0); foreach ($data as $r) { $arr[$r['typeid']] = $r['name']; } $html = $id ? ' id="typeid" onchange="$(\'#' . $id . '\').val(this.value);"' : 'name="typeid", id="typeid"'; return form::select($arr, $value, $html, L('please_select')); }
/** * 后台信息列表模板 * @param string $id 被选中的模板名称 * @param string $str form表单中的属性名 */ public final function admin_list_template($id = '', $str = '') { $templatedir = PC_PATH . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'content' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR; $pre = 'content_list'; $templates = glob($templatedir . $pre . '*.tpl.php'); if (empty($templates)) { return false; } $files = @array_map('basename', $templates); $templates = array(); if (is_array($files)) { foreach ($files as $file) { $key = substr($file, 0, -8); $templates[$key] = $file; } } ksort($templates); return form::select($templates, $id, $str, L('please_select')); }
:</th> <td class="y-bg"><?php echo form::radio(array('0' => L('model_configuration'), '1' => L('custom_sql')), $type ? $type : 0, 'name="type" onclick="location.href=\'' . get_url() . '&type=\'+this.value"'); ?> </td> </tr> <?php if ($type == 0) { ?> <tr> <th><?php echo L('select_model'); ?> :</th> <td class="y-bg"><?php echo form::select($modules, $module, 'name="module" id="module" onchange="location.href=\'' . get_url() . '&module=\'+this.value"'); ?> <script type="text/javascript">$(function(){$("#module").formValidator({onshow:"<?php echo L('please_select_model'); ?> ",onfocus:"<?php echo L('please_select_model'); ?> "}).inputValidator({min:1, onerror:'<?php echo L('please_select_model'); ?> '});});</script></td> </tr> <?php if ($module) { ?>
<table width="100%" cellpadding="2" cellspacing="1" class="table_form"> <form action="?m=admin&c=urlrule&a=add" method="post" name="myform" id="myform"> <tr> <th width="20%"><?php echo L('urlrule_file'); ?> :</th> <td><input type="text" name="info[file]" id="file" size="20"></td> </tr> <tr> <th width="20%"><?php echo L('urlrule_module'); ?> :</th> <td><?php echo form::select($modules, 'content', "name='info[module]' id='module'"); ?> </td> </tr> <tr> <th width="20%"><?php echo L('urlrule_ishtml'); ?> :</th> <td> <input type="radio" value="1" name="info[ishtml]" /><?php echo L('yes'); ?> <input type="radio" value="0" name="info[ishtml]" checked="checked" /><?php echo L('no'); ?>
protected function setFilterOrderBy() { # ordre du tri $this->setFilter('order_by'); $this->fields['order_by'] = array($this->form_id . '_order_by', __('c_c_sorting_Sorted_by_f'), form::select(array('order_by', $this->form_id . '_order_by'), $this->order_by_array, $this->params->order_by, $this->getActiveClass('order_by'))); switch ($this->params->order_by) { default: case 'created_at': $this->get_posts_params['order'] = 'p.created_at'; break; case 'updated_at': $this->get_posts_params['order'] = 'p.updated_at'; break; case 'title': $this->get_posts_params['order'] = 'pl.title'; break; case 'rubrique': $this->get_posts_params['order'] = 'p.category_id'; break; } # sens du tri $this->setFilter('order_direction'); $this->get_posts_params['order_direction'] = $this->params->order_direction; $this->fields['order_direction'] = array($this->form_id . '_order_direction', __('c_c_sorting_Sort_direction'), form::select(array('order_direction', $this->form_id . '_order_direction'), array(__('c_c_sorting_Descending') => 'DESC', __('c_c_sorting_Ascending') => 'ASC'), $this->params->order_direction, $this->getActiveClass('order_direction'))); }
?> </td> </tr> <!-- 4.1 增加跳转到其他栏目功能 --> </table> </div> <div id="div_setting_3" class="contentList pad-10 hidden"> <table width="100%" class="table_form "> <tr> <th width="200"><?php echo L('available_styles'); ?> :</th> <td> <?php echo form::select($template_list, $setting['template_list'], 'name="setting[template_list]" id="template_list" onchange="load_file_list(this.value)"', L('please_select')); ?> </td> </tr> <tr> <th width="200"><?php echo L('category_index_tpl'); ?> :</th> <td id="category_template"> </td> </tr> <tr> <th width="200"><?php echo L('category_list_tpl'); ?>
/** * url 规则调用 * * @param $module 模块 * @param $file 文件名 * @param $ishtml 是否为静态规则 * @param $id 选中值 * @param $str 表单属性 * @param $default_option 默认选项 */ public static function urlrule($module, $file, $ishtml, $id, $str = '', $default_option = '') { if (!$module) { $module = 'content'; } $urlrules = getcache('urlrules_detail', 'commons'); $array = array(); foreach ($urlrules as $roleid => $rules) { if ($rules['module'] == $module && $rules['file'] == $file && $rules['ishtml'] == $ishtml) { $array[$roleid] = $rules['example']; } } return form::select($array, $id, $str, $default_option); }