:</th> <td> <?php echo Form::select($template_list, C('template', 'name'), 'name="vote_subject[style]" id="style" onchange="load_file_list(this.value)"', L('please_select')); ?> </td> </tr> <tr> <th><?php echo L('template'); ?> :</th> <td id="show_template"> <?php echo Form::select_template(C('template', 'name'), 'vote', $vote_tp_template, 'name="vote_subject[vote_tp_template]"', 'vote_tp'); ?> </td> </tr> <tr> <th><?php echo L('enabled'); ?> :</th> <td><input name="subject[enabled]" type="radio" value="1" <?php if ($enabled == 1) { ?> checked <?php } ?>
function template($field, $value, $fieldinfo) { return Form::select_template("", 'content', $value, 'name="info[' . $field . ']" id="' . $field . '"', 'show'); }
/** * json方式读取风格列表,推送部分调用 */ public function public_change_tpl() { $models = S('common/model'); $modelid = intval($_GET['modelid']); if ($_GET['modelid']) { $style = $models[$modelid]['default_style']; $category_template = $models[$modelid]['category_template']; $list_template = $models[$modelid]['list_template']; $show_template = $models[$modelid]['show_template']; $html = array('template_list' => $style, 'category_template' => Form::select_template($style, 'content', $category_template, 'name="setting[category_template]"', 'category'), 'list_template' => Form::select_template($style, 'content', $list_template, 'name="setting[list_template]"', 'list'), 'show_template' => Form::select_template($style, 'content', $show_template, 'name="setting[show_template]"', 'show')); if (CHARSET == 'gbk') { $html = array_iconv($html, 'gbk', 'utf-8'); } echo json_encode($html); } }
public function template($field, $value, $fieldinfo) { $default_style = C('template', 'name'); return Form::select_template($default_style, 'content', $value, 'name="info[' . $field . ']" id="' . $field . '"', 'show'); }
<th ><?php echo L('category_list_tpl'); ?> </th> <td id="list_template"><?php echo Form::select_template($default_style, 'content', $list_template, 'name="setting[list_template]" id="template_list"', 'list'); ?> </td> </tr> <tr> <th><?php echo L('content_tpl'); ?> </th> <td id="show_template"><?php echo Form::select_template($default_style, 'content', $show_template, 'name="setting[show_template]" id="template_show"', 'show'); ?> </td> </tr> </table> </fieldset> <div class="bk15"></div> <input type="hidden" name="modelid" value="<?php echo $modelid; ?> " /> <input type="submit" class="dialog" id="dosubmit" name="dosubmit" value="<?php echo L('submit'); ?> " /> </form>
<th align="right" valign="top"><?php echo L('special_type_template'); ?> :</th> <td valign="top" id="list_template"><?php echo Form::select_template('default', 'special', '', 'name="special[list_template]"', 'list'); ?> </td> </tr> <tr> <th align="right" valign="top"><?php echo L('special_content_template'); ?> :</th> <td valign="top" id="show_template"><?php echo Form::select_template('default', 'special', '', 'name="special[show_template]"', 'show'); ?> </td> </tr> </table> </div> <div class="bk15"></div> <input name="dosubmit" type="submit" value="<?php echo L('submit'); ?> " class="btn btn-primary btn-sm"> </div> </div> </form> </body>
<th><?php echo L('interval')?>:</th> <td><input type="text" name="subject[interval]" value="<?php echo $interval;?>" size='5' /> <?php echo L('more_ip')?>,<font color=red>0</font> <?php echo L('one_ip')?></td> </tr> <tr> <th><?php echo L('vote_style')?>:</th> <td> <?php echo Form::select($template_list, C('template','name'), 'name="vote_subject[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'))?> <script type="text/javascript">$.getJSON('?app=admin&controller=category&action=public_tpl_file_list&style=<?php echo C('template','name')?>&application=vote&templates=vote_tp&id=<?php echo $template?>&name=vote_subject', function(data){$('#show_template').html(data.vote_tp_template);});</script> </td> </tr> <tr> <th><?php echo L('template')?>:</th> <td id="show_template"> <?php echo Form::select_template('default', 'vote', $show_template, 'name="vote_subject[show_template]"', 'vote_tp');?> </td> </tr> <tr> <th><?php echo L('enabled')?>:</th> <td><input name="subject[enabled]" type="radio" value="1" <?php echo $enabled?'checked':''?>> <?php echo L('yes')?> <input name="subject[enabled]" type="radio" value="0" <?php echo $enabled?'':'checked'?>> <?php echo L('no')?></td> </tr> <tr> <th></th> <td> <input type="submit" name="dosubmit" id="dosubmit" class="dialog" value=" <?php echo L('submit')?> "> </td> </tr> </table>
?> </tr> <tr> <?php foreach ($batch_array as $catid => $cat) { ?> <td class="tpl_style"><b><?php echo L('page_templates'); ?> :</b><br> <div id="category_template<?php echo $catid; ?> "> <?php echo Form::select_template($cat['setting']['template_list'], 'content', $cat['setting']['page_template'], 'name="setting[' . $catid . '][page_template]" style="width:250px"', 'page'); ?> </div></td> <?php } ?> </tr> <tr> <?php foreach ($batch_array as $catid => $cat) { ?> <td><b><?php echo L('ismenu'); ?>
:</th> <td> <?php echo Form::select($template_list, $default_style, 'name="setting[default_style]" id="style" onchange="load_file_list(this.value)"', L('please_select')); ?> </td> </tr> <tr> <th><?php echo L('template'); ?> :</th> <td id="show_template"> <?php echo Form::select_template($default_style, 'vote', $vote_tp_template, 'name="setting[vote_tp_template]"', 'vote_tp'); ?> </td> </tr> <tr> <th><?php echo L('default_guest'); ?> :</th> <td><input type='radio' name='setting[allowguest]' value='1' <?php if ($allowguest == 1) { ?> checked<?php } ?>