|
@@ -1,397 +0,0 @@
|
|
|
-<?php
|
|
|
-
|
|
|
-$code = array
|
|
|
-(
|
|
|
- 1 => '用户ID',
|
|
|
- 2 => '随机数字',
|
|
|
- 3 => '随机数字+字母',
|
|
|
-);
|
|
|
-
|
|
|
-
|
|
|
-$page = 15;
|
|
|
-
|
|
|
-$cate = function()
|
|
|
-{
|
|
|
- $array = array();
|
|
|
- $info = Dever::db('content/cate')->state();
|
|
|
- if($info)
|
|
|
- {
|
|
|
- $array += $info;
|
|
|
- }
|
|
|
- return $array;
|
|
|
-};
|
|
|
-
|
|
|
-$author = function()
|
|
|
-{
|
|
|
- $array = array();
|
|
|
- $info = Dever::db('content/author')->state();
|
|
|
- if($info)
|
|
|
- {
|
|
|
- $array += $info;
|
|
|
- }
|
|
|
- return $array;
|
|
|
-};
|
|
|
-
|
|
|
-$share = function()
|
|
|
-{
|
|
|
- $array = array();
|
|
|
- $info = Dever::db('poster/template')->state();
|
|
|
- if($info)
|
|
|
- {
|
|
|
- $array += $info;
|
|
|
- }
|
|
|
- return $array;
|
|
|
-};
|
|
|
-
|
|
|
-return array
|
|
|
-(
|
|
|
-
|
|
|
- 'name' => 'article',
|
|
|
-
|
|
|
- 'lang' => '图文管理',
|
|
|
- 'order' => 100,
|
|
|
-
|
|
|
- 'struct' => array
|
|
|
- (
|
|
|
- 'id' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => 'ID',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- ),
|
|
|
-
|
|
|
- 'name' => array
|
|
|
- (
|
|
|
- 'type' => 'varchar-80',
|
|
|
- 'name' => '标题',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '标题',
|
|
|
- 'match' => 'is_string',
|
|
|
- 'update' => 'text',
|
|
|
- 'list' => true,
|
|
|
- ),
|
|
|
-
|
|
|
- 'cate_id' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '所属栏目',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '所属栏目',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- 'update' => 'select',
|
|
|
- 'option' => $cate,
|
|
|
- 'search' => 'select',
|
|
|
- ),
|
|
|
-
|
|
|
- 'author_id' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '作者',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '作者',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- 'update' => 'select',
|
|
|
- 'option' => $author,
|
|
|
- 'search' => 'select',
|
|
|
- ),
|
|
|
-
|
|
|
- 'pic_cover' => array
|
|
|
- (
|
|
|
- 'type' => 'varchar-150',
|
|
|
- 'name' => '封面图-4:3比例的图片',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '封面图',
|
|
|
- 'match' => 'option',
|
|
|
- 'update' => 'image',
|
|
|
- 'key' => '1',
|
|
|
- 'place' => '150',
|
|
|
- ),
|
|
|
-
|
|
|
- 'num_add_view' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '手动增加浏览量pv数',
|
|
|
- 'default' => '0',
|
|
|
- 'desc' => '请填写手动增加浏览量pv',
|
|
|
- 'match' => 'option',
|
|
|
- 'update' => 'text',
|
|
|
- ),
|
|
|
-
|
|
|
- 'num_view' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '浏览量pv',
|
|
|
- 'default' => '0',
|
|
|
- 'desc' => '请填写浏览量pv',
|
|
|
- 'match' => 'option',
|
|
|
- 'search' => 'order',
|
|
|
-
|
|
|
- ),
|
|
|
-
|
|
|
- 'num_up' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '喜欢数',
|
|
|
- 'default' => '0',
|
|
|
- 'desc' => '请填写喜欢数',
|
|
|
- 'match' => 'option',
|
|
|
-
|
|
|
- 'list' => '"喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
|
|
|
- 'list_name' => '统计数字',
|
|
|
- ),
|
|
|
-
|
|
|
- 'num_comment' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '评论数',
|
|
|
- 'default' => '0',
|
|
|
- 'desc' => '请填写评论数',
|
|
|
- 'search' => 'order',
|
|
|
- 'match' => 'option',
|
|
|
-
|
|
|
- ),
|
|
|
-
|
|
|
- 'content' => array
|
|
|
- (
|
|
|
- 'type' => 'text-255',
|
|
|
- 'name' => '内容',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '请输入内容',
|
|
|
- 'match' => 'is_string',
|
|
|
- 'update' => 'editor',
|
|
|
- 'key' => 1,
|
|
|
- 'media' => 5,
|
|
|
- ),
|
|
|
-
|
|
|
- 'state' => array
|
|
|
- (
|
|
|
- 'type' => 'tinyint-1',
|
|
|
- 'name' => '状态',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '请选择状态',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- ),
|
|
|
-
|
|
|
- 'admin_founder' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '创建人',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '创建人',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- ),
|
|
|
-
|
|
|
- 'admin_editor' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '操作人',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '操作人',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- ),
|
|
|
-
|
|
|
- 'pdate' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '发布时间',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- 'desc' => '',
|
|
|
- 'update' => 'date',
|
|
|
- 'callback' => 'maketime',
|
|
|
- 'list' => 'date("Y-m-d H:i:s", {pdate})',
|
|
|
- ),
|
|
|
-
|
|
|
- 'share' => array
|
|
|
- (
|
|
|
- 'type' => 'text-255',
|
|
|
- 'name' => '分享海报-选择海报库中的海报',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '分享海报',
|
|
|
- 'match' => 'option',
|
|
|
- 'update' => 'checkbox',
|
|
|
- 'option' => $share,
|
|
|
- ),
|
|
|
-
|
|
|
- 'udate' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '更新时间',
|
|
|
- 'match' => array('is_numeric', time()),
|
|
|
- 'desc' => '',
|
|
|
- ),
|
|
|
-
|
|
|
- 'cdate' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '录入时间',
|
|
|
- 'match' => array('is_numeric', time()),
|
|
|
- 'desc' => '',
|
|
|
-
|
|
|
- 'insert' => true,
|
|
|
- ),
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'index' => array
|
|
|
- (
|
|
|
- 'version' => 1,
|
|
|
-
|
|
|
- 1 => array
|
|
|
- (
|
|
|
- 'i1' => 'uid,cate_id',
|
|
|
- )
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'manage' => array
|
|
|
- (
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- 'list_button' => array
|
|
|
- (
|
|
|
- 'list' => array('评论列表', '"comment&search_option_data_id={id}&oper_parent=article"'),
|
|
|
- ),
|
|
|
- */
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'request' => array
|
|
|
- (
|
|
|
- 'getAll' => array
|
|
|
- (
|
|
|
-
|
|
|
- 'option' => array
|
|
|
- (
|
|
|
- 'cate_id' => 'yes',
|
|
|
- 'cate_ids' => array('yes-cate_id', 'in'),
|
|
|
- 'id' => 'yes',
|
|
|
- ),
|
|
|
- 'type' => 'all',
|
|
|
- 'order' => array('id' => 'desc'),
|
|
|
- 'page' => array($page, 'list'),
|
|
|
- 'col' => '*',
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'default' => array
|
|
|
- (
|
|
|
-
|
|
|
- 'option' => array
|
|
|
- (
|
|
|
- 'cate_id' => 'yes',
|
|
|
- 'uid' => 'yes',
|
|
|
- ),
|
|
|
- 'type' => 'all',
|
|
|
- 'order' => array('id' => 'desc'),
|
|
|
- 'page' => array($page, 'list'),
|
|
|
- 'col' => '*',
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'new' => array
|
|
|
- (
|
|
|
-
|
|
|
- 'option' => array
|
|
|
- (
|
|
|
- 'name' => array('yes', 'like'),
|
|
|
- 'cate_id' => 'yes',
|
|
|
- 'uid' => 'yes',
|
|
|
- ),
|
|
|
- 'type' => 'all',
|
|
|
- 'order' => array('id', 'desc'),
|
|
|
- 'page' => array($page, 'list'),
|
|
|
- 'col' => '*',
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'hot' => array
|
|
|
- (
|
|
|
-
|
|
|
- 'option' => array
|
|
|
- (
|
|
|
- 'cate_id' => 'yes',
|
|
|
- 'uid' => 'yes',
|
|
|
- ),
|
|
|
- 'type' => 'all',
|
|
|
- 'order' => array('num_view`+`num_add_view' => 'desc', 'id' => 'desc'),
|
|
|
- 'page' => array($page, 'list'),
|
|
|
- 'col' => '*',
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'cold' => array
|
|
|
- (
|
|
|
-
|
|
|
- 'option' => array
|
|
|
- (
|
|
|
- 'cate_id' => 'yes',
|
|
|
- 'uid' => 'yes',
|
|
|
- ),
|
|
|
- 'type' => 'all',
|
|
|
- 'order' => array('num_view`+`num_add_view' => 'asc', 'id' => 'desc'),
|
|
|
- 'page' => array($page, 'list'),
|
|
|
- 'col' => '*',
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- 'addView' => array
|
|
|
- (
|
|
|
- 'type' => 'update',
|
|
|
- 'where' => array
|
|
|
- (
|
|
|
- 'id' => 'yes',
|
|
|
- ),
|
|
|
- 'set' => array
|
|
|
- (
|
|
|
- 'num_view' => array('1', '+='),
|
|
|
- ),
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'addComment' => array
|
|
|
- (
|
|
|
- 'type' => 'update',
|
|
|
- 'where' => array
|
|
|
- (
|
|
|
- 'id' => 'yes',
|
|
|
- ),
|
|
|
- 'set' => array
|
|
|
- (
|
|
|
- 'num_comment' => array('1', '+='),
|
|
|
- ),
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'addUp' => array
|
|
|
- (
|
|
|
- 'type' => 'update',
|
|
|
- 'where' => array
|
|
|
- (
|
|
|
- 'id' => 'yes',
|
|
|
- ),
|
|
|
- 'set' => array
|
|
|
- (
|
|
|
- 'num_up' => array('1', '+='),
|
|
|
- ),
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- 'desUp' => array
|
|
|
- (
|
|
|
- 'type' => 'update',
|
|
|
- 'where' => array
|
|
|
- (
|
|
|
- 'id' => 'yes',
|
|
|
- ),
|
|
|
- 'set' => array
|
|
|
- (
|
|
|
- 'num_up' => array('1', '-='),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
-);
|