'门票榜单', 2 => '购物榜单', 3 => '邀请榜单', 4 => '积分榜单', //5 => '赞赏榜单', //6 => '贡献榜单', //7 => '成员榜单', 10 => '投票榜单', ); $periods = array ( //1 => '天', 2 => '周', 3 => '月', 4 => '年', 5 => '永久', ); $status = array ( 1 => '开启', 2 => '关闭', ); return array ( # 表名 'name' => 'ranking', # 显示给用户看的名称 'lang' => '榜单设置', 'menu' => false, 'check' => 'info_id,type', 'ends' => array ( 'insert' => 'collection/lib/manage.setRankingCache', 'update' => 'collection/lib/manage.setRankingCache', ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'search' => 'order', 'update' => 'hidden', //'list' => true, ), 'info_id' => array ( 'type' => 'int-11', 'name' => '合集', 'default' => '', 'desc' => '合集', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => Dever::input('search_option_info_id') ), 'name' => array ( 'type' => 'varchar-80', 'name' => '榜单标题', 'default' => '', 'desc' => '榜单标题', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'status' => array ( 'type' => 'int-11', 'name' => '榜单状态', 'default' => '2', 'desc' => '榜单状态', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $status, 'list' => true, 'edit' => true, ), 'type' => array ( 'type' => 'int-11', 'name' => '榜单类型', 'default' => '1', 'desc' => '榜单类型', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $type, 'list' => true, ), 'start' => array ( 'type' => 'int-11', 'default' => '', 'name' => '总榜开始时间', 'match' => 'option', 'desc' => '总榜开始时间', 'update' => 'date', //'list' => 'date("Y-m-d H:i:s", {start})', 'callback' => 'maketime', ), 'end' => array ( 'type' => 'int-11', 'default' => '', 'name' => '总榜结束时间', 'match' => 'option', 'desc' => '总榜结束时间', 'update' => 'date', //'list' => 'date("Y-m-d H:i:s", {end})', 'callback' => 'maketime', ), 'periods' => array ( 'type' => 'int-11', 'name' => '榜单周期-到周期之后自动生成的一期榜单', 'default' => '1', 'desc' => '榜单周期', 'match' => 'is_numeric', 'update' => 'radio', 'option' => $periods, 'list' => true, ), 'desc' => array ( 'type' => 'text-255', 'name' => '榜单描述', 'default' => '', 'desc' => '榜单描述', 'match' => 'option', 'update' => 'editor', 'key' => 1, //'search' => 'fulltext', //'list' => true, ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序(数值越大越靠前)', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', //'update' => 'text', 'search' => 'order', 'list' => true, 'order' => 'desc', 'edit' => true, ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => 'is_numeric', ), 'cdate' => array ( 'type' => 'int-11', 'name' => '创建时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, 'search' => 'date', //'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( //'delete' => false, # 列表 'list_button' => array ( 'list1' => array('榜单期数', '"ranking_periods&search_option_info_id={info_id}&search_option_ranking_id={id}&top_table=ranking_data&oper_table=ranking&top_table=info"'), 'list' => array('榜单数据', '"ranking_data&search_option_info_id={info_id}&search_option_ranking_id={id}&top_table=ranking_data&oper_table=ranking&top_table=info"', '{type} < 10'), 'list2' => array('投票设置', '"ranking_vote&search_option_info_id={info_id}&search_option_ranking_id={id}&top_table=ranking_vote&oper_table=ranking&top_table=info"', '{type} == 10'), ), ), 'request' => array ( 'getAll' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'info_id' => 'yes', 'type' => 'yes', 'state' => 1, 'status' => 1, ), 'type' => 'all', 'order' => array('reorder' => 'desc', 'id' => 'desc'), 'col' => '*', ), 'getOne' => array ( # 匹配的正则或函数 选填项 'option' => array ( 'info_id' => 'yes', 'type' => 'yes', 'state' => 1, 'status' => 1, ), 'type' => 'one', 'col' => '*', ), ), );