123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <?php
- $link = function()
- {
- $array = array
- (
- -1 => array('id' => -1, 'name' => '通用'),
- );
- $info = Dever::db('source/link')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $cate = function()
- {
- $array = array();
- $info = Dever::db('journal/cate')->state();
- if($info)
- {
- $array += $info;
- }
- return $array;
- };
- $type = array
- (
- //1 => '购买小刊',
- 2 => '购买小刊兑换码',
- 3 => '购买VIP会员',
- );
- return array
- (
- # 表名
- 'name' => 'info',
- # 显示给用户看的名称
- 'lang' => '渠道管理',
- 'order' => 10,
- 'end' => array
- (
- 'insert' => 'source/lib/manage.updateCode',
- 'update' => 'source/lib/manage.updateCode',
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'list' => true,
- ),
-
- 'name' => array
- (
- 'type' => 'varchar-80',
- 'name' => '名称',
- 'default' => '',
- 'desc' => '请输入名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'cate_id' => array
- (
- 'type' => 'int-11',
- 'name' => '小刊分类',
- 'default' => '1',
- 'desc' => '小刊分类',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $cate,
- 'search' => 'select',
- 'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'int-11',
- 'name' => '类型',
- 'default' => '1',
- 'desc' => '类型',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $type,
- 'search' => 'select',
- 'list' => true,
- ),
- 'link_id' => array
- (
- 'type' => 'int-11',
- 'name' => '推广链接',
- 'default' => '-1',
- 'desc' => '推广链接',
- 'match' => 'is_numeric',
- 'update' => 'select',
- 'option' => $link,
- 'search' => 'select',
- 'list' => true,
- ),
- 'code' => array
- (
- 'type' => 'varchar-500',
- 'name' => '渠道链接',
- 'default' => '',
- 'desc' => '渠道链接',
- 'match' => 'option',
- //'update' => 'textarea',
- //'list' => 'Dever::load("source/lib/manage.show", "{id}")',
- 'list' => 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,
- ),
- ),
- # 默认值
- 'default' => array
- (
- 'col' => 'name,link_id,state,cdate',
- 'value' => array
- (
- '"官方",-1,1,' . time(),
- ),
- ),
- 'manage' => array
- (
- //'delete' => false,
- //'edit' => false,
- # 列表
- 'list_buttons' => array
- (
- //'list' => array('渠道统计', '"stat&search_option_info_id={id}&oper_parent=info"'),
- ),
- ),
- );
|