123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- CREATE TABLE `$basic_table` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `cat_id` int(10) unsigned NOT NULL default '0',
- `parent_cat_id` int(10) unsigned NOT NULL default '0',
- `root_cat_id` int(10) unsigned NOT NULL default '0',
- `type_id` int(10) unsigned NOT NULL default '0',
- `title` char(255) NOT NULL default '',
- `thumb` varchar(500) NOT NULL default '',
- `keywords` varchar(500) NOT NULL default '',
- `description` varchar(500) NOT NULL default '',
- `is_link` tinyint(1) unsigned NOT NULL default '0',
- `url` varchar(500) NOT NULL default '',
- `status` tinyint(1) unsigned NOT NULL default '1',
- `is_new` tinyint(1) unsigned NOT NULL default '1',
- `is_hot` tinyint(1) unsigned NOT NULL default '1',
- `is_recommend` tinyint(1) unsigned NOT NULL default '1',
- `sys_add` tinyint(1) unsigned NOT NULL default '0',
- `is_position` tinyint(1) unsigned NOT NULL default '0',
- `md5` char(32) NOT NULL default '',
- `theme` char(50) NOT NULL default '',
- `cat_ids` char(255) NOT NULL default '',
- `user_name` char(50) NOT NULL,
- `user_id` int(10) NOT NULL default '0',
- `views` int(10) unsigned NOT NULL default '0',
- `favors` int(10) unsigned NOT NULL default '0',
- `digs` int(10) unsigned NOT NULL default '0',
- `list_order` int(10) unsigned NOT NULL default '0',
- `create_time` bigint(20) NOT NULL default '0',
- `update_time` bigint(20) NOT NULL default '0',
- PRIMARY KEY (`id`),
- KEY `status` (`status`),
- KEY `list_order` (`list_order`),
- KEY `md5` (`md5`),
- KEY `cat_id` (`cat_id`),
- KEY `cat_ids` (`cat_ids`)
- ) ENGINE=MyISAM;
- CREATE TABLE `$table_data` (
- `id` int(10) unsigned NOT NULL,
- `content` text NOT NULL,
- `read_price` decimal(12,2) unsigned NOT NULL default '0',
- `pay_type` tinyint(1) unsigned NOT NULL default '0',
- `group_ids_view` varchar(500) NOT NULL default '',
- `pagination_type` tinyint(1) DEFAULT NULL,
- `maxchar_perpage` mediumint(6) DEFAULT NULL,
- `template` varchar(100) NOT NULL default '',
- `allow_comment` tinyint(1) unsigned NOT NULL default '1',
- `relation` varchar(1000) NOT NULL default '',
- PRIMARY KEY (`id`),
- KEY `id` (`id`)
- ) ENGINE=MyISAM;
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'cat_id', '栏目', '', '', 1, 10, '/^[0-9]{1,10}$/', '请选择栏目', 'cat_id', 'array (\n ''default_value'' => '''',\n)', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'type_id', '类别', '', '', 1, 10, '', '', 'type_id', '', '', '', '', 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'title', '标题', '', 'input_title', 1, 255, '', '请输入标题', 'title', '', '', '', '', 0, 1, 0, 1, 1, 1, 1, 1, 0, 3, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position` , `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'keywords', '关键词', '多个关键词“,”隔开', '', 0, 500, '', '', 'keywords', '', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 1, 0, 0, 4, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'description', '摘要', '', '', 0, 500, '', '', 'textarea', 'array (\r\n ''width'' => ''100'',\r\n ''height'' => ''46'',\r\n ''default_value'' => '''',\r\n ''enable_html'' => ''0'',\r\n)', '', '', '', 0, 1, 0, 1, 0, 1, 1, 1, 0, 5, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'content', '内容', '', '', 0, 999999, '', '内容不能为空', 'editor', 'array (\n ''tool_bar'' => ''basic'',\n ''height'' => ''300'',\n)', '', '', '', 0, 0, 0, 1, 0, 1, 1, 0, 0, 6, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'thumb', '封面图', '', '', 0, 500, '', '', 'image', 'array (\n ''front_form_type'' => ''5'',\n ''back_form_type'' => ''5'',\n)', '', '', '', 0, 1, 0, 0, 0, 1, 0, 1, 0, 7, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'relation', '相关文章', '', '', 0, 1000, '', '', 'omnipotent', 'array (\n "form_text" => "<input type=''hidden'' name=''info[relation]'' id=''relation'' value=''{FIELD_VALUE}'' style=''50'' >\r\n<ul class=''list-dot'' id=''relation_text''></ul>\r\n<div>\r\n<input type=''button'' value=''添加相关'' onclick=omnipotent(''select_id'',''?r=ajax/publicrelationlist&model_id={MODEL_ID}'',''添加相关文章'',1) class=''btn'' style=''''>\r\n<span class=''edit_content''>\r\n<input class=''btn'' value=''显示已有'' onclick=''show_relation({MODEL_ID},{ID})'' type=''button'' style=''''>\r\n</span>\r\n</div>",\n ''field_type'' => ''varchar'',\n ''min_number'' => ''1'',\n)', '', '', '', 0, 0, 0, 0, 0, 0, 1, 0, 0, 8, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'pages', '分页方式', '', '', 0, 1, '', '', 'pages', '', '', '-99', '-99', 0, 0, 0, 1, 0, 0, 0, 0, 0, 9, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'is_position', '推荐位', '', '', 0, 1, '', '', 'pos_id', '', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 10, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id,'group_ids_view', '阅读权限', '', '', 0, 500, '', '', 'group_id', '', '', '', '', 0, 0, 0, 1, 0, 0, 0, 0, 0, 11, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'template', '内容页模板', '', '', 0, 100, '', '', 'template','', '', '-99', '-99', 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id,'read_price', '阅读收费', '', '', 0, 15, '', '', 'read_price','', '', '-99', '-99', 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id,'pay_type', '购买方式', '', '', 0, 1, '', '', 'box', 'array (\n "options" => "现金|1\r\n金币|2\r\n积分|3" ,\n "box_type" => "radio",\n "field_type" => "tinyint",\n "min_number" => "1",\n "width" => "88",\n "size" => "1",\n "default_value" => "1" ,\n "output_type" => "0" ,\n)', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id,'allow_comment', '允许评论', '', '', 0, 1, '', '', 'box', 'array (\n "options" => "允许评论|1\r\n不允许评论|0" ,\n "box_type" => "radio",\n "field_type" => "tinyint",\n "min_number" => "1",\n "width" => "88",\n "size" => "1",\n "default_value" => "1" ,\n "output_type" => "0" ,\n)', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'is_link', '转向链接', '', '', 0, 1, '', '', 'is_link', '', '', '', '', 0, 1, 0, 0, 0, 1, 0, 0, 0, 17, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'url', 'URL', '', '', 0, 500, '', '', 'text', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 0, 12, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id,'user_name', '发布人', '', '', 0, 50, '', '', 'text', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 0, 91, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'create_time', '发布时间', '', '', 0, 20, '', '', 'datetime', 'array (\n ''save_format'' => ''int'',\n ''show_format'' => ''Y-m-d H:i:s'',\r\n ''read_only'' => ''0'',\n)', '', '', '', 0, 1, 0, 0, 0, 0, 0, 1, 0, 92, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'update_time', '更新时间', '', '', 0, 20, '', '', 'datetime', 'array (\n ''save_format'' => ''int'',\n ''show_format'' => ''Y-m-d H:i:s'',\r\n ''read_only'' => ''0'',\n)', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 0, 93, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'status', '状态', '', '', 0, 2, '', '', 'box', 'array (\n "options" =>"发布|1\r\n草稿|0",\n "box_type" =>"radio",\n "field_type" => "int",\n "output_type" =>"1",\n)', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 94, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'is_new', '最新', '', '', 0, 1, '', '', 'box', 'array (\n "options" =>"是|1\r\n否|0",\n "box_type" =>"radio",\n "field_type" => "int",\n "output_type" =>"1",\n)', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 95, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'is_hot', '热门', '', '', 0, 1, '', '', 'box', 'array (\n "options" =>"是|1\r\n否|0",\n "box_type" =>"radio",\n "field_type" => "int",\n "output_type" =>"1",\n)', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 96, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'is_recommend', '推荐', '', '', 0, 1, '', '', 'box', 'array (\n "options" =>"是|1\r\n否|0",\n "box_type" =>"radio",\n "field_type" => "int",\n "output_type" =>"1",\n)', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 97, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'views', '浏览次数', '', '', 0, 10, '', '', 'number', '', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 98, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'favors', '收藏次数', '', '', 0, 10, '', '', 'number', '', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 99, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'digs', '点赞次数', '', '', 0, 10, '', '', 'number', '', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 100, 0);
- INSERT INTO `$table_model_field` (`model_id`, `field`, `name`, `tips`, `css`, `min_length`, `max_length`, `pattern`, `error_tips`, `form_type`, `setting`, `form_attribute`, `unset_group_ids`, `unset_role_ids`, `is_core`, `is_system`, `is_unique`, `is_base`, `is_search`, `is_add`, `is_fullsearch`, `is_position`, `is_omnipotent`, `list_order`, `disabled`) VALUES($model_id, 'list_order', '排序', '', '', 0, 10, '', '', 'number', '', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 0, 200, 0);
|