Example #1
0
    function get_form() {
        return array(
                'catid'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(category::option(0,'tolast')),
                        'default'=>intval(get('catid')),
                        'regex'=>'/\d+/',
                        'filter'=>'is_numeric',
                ),
                'typeid'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(type::option(0,'tolast')),
                        'default'=>intval(get('typeid')),
                        'regex'=>'/\d+/',
                        'filter'=>'is_numeric',
                ),
				'toppost'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(array(0=>'不置顶',2=>'栏目置顶',3=>'全站置顶')),
                        'default'=>0,
                        'regex'=>'/\d+/',
                        'filter'=>'is_numeric',
                ),
                'ishtml'=>array(
                        'selecttype'=>'radio',
                        'select'=>form::arraytoselect(array(0=>'继承',1=>'生成',2=>'不生成')),
                ),
                'checked'=>array(
                        'selecttype'=>'radio',
                        'select'=>form::arraytoselect(form::yesornotoarray('审核')),
                ),
                'image'=>array(
                        'filetype'=>'image',
                ),
                'thumb'=>array(
                        'filetype'=>'thumb',
                ),
                'displaypos'=>array(
                        'selecttype'=>'checkbox',
                        //'select'=>form::arraytoselect(array(1=>'首页推荐',2=>'首页焦点',3=>'首页头条',4=>'列表页推荐',5=>'内容页推荐')),
                ),
                'htmlrule'=>array(
                        //'tips'=>" 默认:{?category::gethtmlrule(get('id'),'showhtmlrule')}",
                ),
                'template'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/show')),
                        //'tips'=>" 默认:{?category::gettemplate(get('id'),'showtemplate')}",
                ),
                'showform'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(get_my_tables_list()),
                        'default'=>"0",
                ),
                'introduce_len'=>array(
                        'default'=>config::get('archive_introducelen')
                ),
                'attr1'=>array(
                        'selecttype'=>'checkbox',
                        'select'=>form::arraytoselect($this->getattrs(1)),
                ),
                'grade'=>array(
                        'selecttype'=>'radio',
                        'select'=>form::arraytoselect(array(0,1,2,3,4,5)),
                ),
                'pics'=>array(
                        'filetype'=>'image2',
                ),
                'author'=>array(
                        'tips'=>' ',
                ),
                'attr3'=>array(
                        'tips'=>' ',
                ),
                'htmlrule'=>array(
                        'selecttype'=>'select',
                        'select'=>form::arraytoselect(getHtmlRule('archive')),
                        'default'=>'',
                ),
        		'tag_option'=>array(
        				'selecttype'=>'select',
        				'select'=>form::arraytoselect(tag::getTags()),
        		),
        );
    }
Example #2
0
 function get_form() {
     return array(
             'parentid'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(category::option(0,'isnotlast')),
                     'default'=>get('parentid'),
             ),
             'ishtml'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(0=>'继承',1=>'生成',2=>'不生成')),
                     'default'=>0,
             ),
             'isshow'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'正常显示',0=>'禁用')),
             ),
             'ispages'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'分页',0=>'单页')),
                     'default'=>1,
             ),
             'includecatarchives'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'包含',0=>'不包含')),
                     'default'=>1,
             ),
             'scategory'=>array(
                     'tips'=>" 被调用的格式 categories(\$catid,'标记')",
             ),
             'image'=>array(
                     'filetype'=>'image_mui',
             ),
             'template'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/list')),
                     'default'=>"{?category::gettemplate(get('id'),'listtemplate',false)}",
                     //'tips'=>" 默认:{?category::gettemplate(get('id'))}",
             ),
             'listtemplate'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/list')),
                     'default'=>"{?category::gettemplate(get('id'),'listtemplate',false)}",
                     //'tips'=>" 默认:{?category::gettemplate(get('id'),'listtemplate')}",
             ),
             'showtemplate'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(front::$view->archive_tpl_list('archive/show')),
                     'default'=>"{?category::gettemplate(get('id'),'showtemplate',false)}",
                     //'tips'=>" 默认:{?category::gettemplate(get('id'),'showtemplate')}",
             ),
     		'templatewap'=>array(
     				'selecttype'=>'select',
     				'select'=>form::arraytoselect(front::$view->archive_tpl_list('wap/list')),
     				'default'=>"{?category::gettemplate(get('id'),'listtemplatewap',false)}",
     				//'tips'=>" 默认:{?category::gettemplate(get('id'))}",
     		),
     		'listtemplatewap'=>array(
     				'selecttype'=>'select',
     				'select'=>form::arraytoselect(front::$view->archive_tpl_list('wap/list')),
     				'default'=>"{?category::gettemplate(get('id'),'listtemplatewap',false)}",
     				//'tips'=>" 默认:{?category::gettemplate(get('id'),'listtemplate')}",
     		),
     		'showtemplatewap'=>array(
     				'selecttype'=>'select',
     				'select'=>form::arraytoselect(front::$view->archive_tpl_list('wap/show')),
     				'default'=>"{?category::gettemplate(get('id'),'showtemplatewap',false)}",
     				//'tips'=>" 默认:{?category::gettemplate(get('id'),'showtemplate')}",
     		),
             'showform'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(get_my_tables_list()),
                     'default'=>"0",
             ),
             'isnav'=>array(
                     'selecttype'=>'radio',
                     'select'=>form::arraytoselect(array(1=>'显示',0=>'不显示')),
             ),
     		'ismobilenav'=>array(
     				'selecttype'=>'radio',
     				'select'=>form::arraytoselect(array(1=>'显示',0=>'不显示')),
     		),
             'htmlrule'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(getHtmlRule('category')),
                     'default'=>'',
             ),
             'listhtmlrule'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(getHtmlRule('category')),
                     'default'=>'',
             ),
             'showhtmlrule'=>array(
                     'selecttype'=>'select',
                     'select'=>form::arraytoselect(getHtmlRule('archive')),
                     'default'=>'',
             ),
     );
 }