dever 6 年之前
父節點
當前提交
8caeeec530
共有 5 個文件被更改,包括 290 次插入4 次删除
  1. 10 0
      config/base.php
  2. 77 1
      content/database/article.php
  3. 11 1
      journal/database/info.php
  4. 96 1
      video/database/live.php
  5. 96 1
      video/database/vod.php

+ 10 - 0
config/base.php

@@ -4,6 +4,16 @@ $config['base'] = array
 	'name' => '美小刊',
 	'version' => '1.0.0 Beta',
 
+
+	# 功能选择
+	'function' => array
+	(
+		1 => '浏览量',
+		2 => '评论',
+		3 => '喜欢',
+		4 => '邀请阅读',
+	),
+
 	# 功能类型
 	'type' => array
 	(

+ 77 - 1
content/database/article.php

@@ -2,6 +2,8 @@
 
 $audit = Dever::config('base')->audit;
 
+$function = Dever::config('base')->function;
+
 # 每页的数据量
 $page = 15;
 
@@ -38,6 +40,12 @@ $share = function()
 	return $array;
 };
 
+$share = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
 return array
 (
 	# 表名
@@ -157,6 +165,16 @@ return array
 			'search'	=> 'order',
 			//'list'		=> '{num_view}+{num_add_view}',
 		),
+
+		'num_add_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢基数',
+			'default' 	=> '0',
+			'desc' 		=> '喜欢基数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
 		
 		'num_up'		=> array
 		(
@@ -166,7 +184,7 @@ return array
 			'desc' 		=> '请填写喜欢数',
 			'match' 	=> 'option',
 			//'search'	=> 'order',
-			'list'		=> '"喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list'		=> '"喜欢数:{num_up}+{num_add_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
 			'list_name'	=> '统计数字',
 		),
 
@@ -255,6 +273,64 @@ return array
 			'desc' 		=> '',
 		),
 
+		'function'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '功能选择',
+			'default' 	=> '1',
+			'desc' 		=> '功能选择',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $function,
+		),
+
+		'share_yes'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '是否显示分享按钮',
+			'default' 	=> '1',
+			'desc' 		=> '是否显示分享按钮',
+			'match' 	=> 'option',
+			'update'	=> 'radio',
+			'option'	=> $share,
+			'control'	=> 'share_yes',
+		),
+
+		'share_title'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '分享标题',
+			'default' 	=> '',
+			'desc' 		=> '分享标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'show'		=> 'share_yes=1',
+		),
+
+		'share_pic'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '分享图片',
+			'default' 	=> '',
+			'desc' 		=> '分享图片',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+			'show'		=> 'share_yes=1',
+		),
+
+		'share_content'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '分享内容',
+			'default' 	=> '',
+			'desc' 		=> '分享内容',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			'show'		=> 'share_yes=1',
+		),
+
 		'content'		=> array
 		(
 			'type' 		=> 'text-255',

+ 11 - 1
journal/database/info.php

@@ -154,6 +154,16 @@ return array
 			'search'	=> 'order',
 			//'list'		=> '{num_view}+{num_add_view}',
 		),
+
+		'num_add_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢基数',
+			'default' 	=> '0',
+			'desc' 		=> '喜欢基数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
 		
 		'num_up'		=> array
 		(
@@ -163,7 +173,7 @@ return array
 			'desc' 		=> '请填写喜欢数',
 			'match' 	=> 'option',
 			//'search'	=> 'order',
-			'list'		=> '"订阅数:{num_add_ding}+{num_ding}<br />喜欢数:{num_up}<br />阅读数:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list'		=> '"订阅数:{num_add_ding}+{num_ding}<br />喜欢数:{num_up}+{num_add_up}<br />阅读数:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
 			'list_name'	=> '统计数字',
 		),
 

+ 96 - 1
video/database/live.php

@@ -1,6 +1,8 @@
 <?php
 
 $page = 15;
+$audit = Dever::config('base')->audit;
+$function = Dever::config('base')->function;
 $share = function()
 {
 	$array = array();
@@ -46,6 +48,17 @@ return array
 		'insert' => 'tag/lib/core.data?source_table=video/live',
 		'update' => 'tag/lib/core.data?source_table=video/live',
 	),
+	# 同步更新另外一个或多个表的数据
+	'syncone' => array
+	(
+		'audit/data' => array
+		(
+			# 更新另外一个表的字段 => 本表的字段
+			'where' => array('data_id' => 'id', 'type' => 3),
+			# 要更新的数据
+			'update' => array('data_id' => 'id', 'type' => 3, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit'),
+		)
+	),
 	# 数据结构
 	'struct' => array
 	(
@@ -170,6 +183,16 @@ return array
 			'search'	=> 'order',
 			//'list'		=> '{num_view}+{num_add_view}',
 		),
+
+		'num_add_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢基数',
+			'default' 	=> '0',
+			'desc' 		=> '喜欢基数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
 		
 		'num_up'		=> array
 		(
@@ -179,7 +202,7 @@ return array
 			'desc' 		=> '请填写喜欢数',
 			'match' 	=> 'option',
 			//'search'	=> 'order',
-			'list'		=> '"在线人数:{num_user}+{num_add_user}<br />喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list'		=> '"在线人数:{num_user}+{num_add_user}<br />喜欢数:{num_up}+{num_add_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
 			'list_name'	=> '统计数字',
 		),
 
@@ -268,6 +291,64 @@ return array
 			'desc' 		=> '',
 		),
 
+		'function'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '功能选择',
+			'default' 	=> '1',
+			'desc' 		=> '功能选择',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $function,
+		),
+
+		'share_yes'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '是否显示分享按钮',
+			'default' 	=> '1',
+			'desc' 		=> '是否显示分享按钮',
+			'match' 	=> 'option',
+			'update'	=> 'radio',
+			'option'	=> $share,
+			'control'	=> 'share_yes',
+		),
+
+		'share_title'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '分享标题',
+			'default' 	=> '',
+			'desc' 		=> '分享标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'show'		=> 'share_yes=1',
+		),
+
+		'share_pic'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '分享图片',
+			'default' 	=> '',
+			'desc' 		=> '分享图片',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+			'show'		=> 'share_yes=1',
+		),
+
+		'share_content'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '分享内容',
+			'default' 	=> '',
+			'desc' 		=> '分享内容',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			'show'		=> 'share_yes=1',
+		),
+
 		'content'		=> array
 		(
 			'type' 		=> 'text-255',
@@ -279,6 +360,20 @@ return array
 			'key' 		=> 1,
 		),
 
+		'audit'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '审核',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $audit,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
 		'cdate'		=> array
 		(
 			'type' 		=> 'int-11',

+ 96 - 1
video/database/vod.php

@@ -1,5 +1,7 @@
 <?php
 $page = 15;
+$audit = Dever::config('base')->audit;
+$function = Dever::config('base')->function;
 $cate = function()
 {
 	$array = array();
@@ -45,6 +47,17 @@ return array
 		'insert' => 'tag/lib/core.data?source_table=video/vod',
 		'update' => 'tag/lib/core.data?source_table=video/vod',
 	),
+	# 同步更新另外一个或多个表的数据
+	'syncone' => array
+	(
+		'audit/data' => array
+		(
+			# 更新另外一个表的字段 => 本表的字段
+			'where' => array('data_id' => 'id', 'type' => 2),
+			# 要更新的数据
+			'update' => array('data_id' => 'id', 'type' => 2, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit'),
+		)
+	),
 	# 数据结构
 	'struct' => array
 	(
@@ -160,6 +173,16 @@ return array
 			'search'	=> 'order',
 			//'list'		=> '{num_view}+{num_add_view}',
 		),
+
+		'num_add_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢基数',
+			'default' 	=> '0',
+			'desc' 		=> '喜欢基数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
 		
 		'num_up'		=> array
 		(
@@ -169,7 +192,7 @@ return array
 			'desc' 		=> '请填写喜欢数',
 			'match' 	=> 'option',
 			//'search'	=> 'order',
-			'list'		=> '"喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list'		=> '"喜欢数:{num_up}+{num_add_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
 			'list_name'	=> '统计数字',
 		),
 
@@ -258,6 +281,64 @@ return array
 			'desc' 		=> '',
 		),
 
+		'function'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '功能选择',
+			'default' 	=> '1',
+			'desc' 		=> '功能选择',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $function,
+		),
+
+		'share_yes'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '是否显示分享按钮',
+			'default' 	=> '1',
+			'desc' 		=> '是否显示分享按钮',
+			'match' 	=> 'option',
+			'update'	=> 'radio',
+			'option'	=> $share,
+			'control'	=> 'share_yes',
+		),
+
+		'share_title'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '分享标题',
+			'default' 	=> '',
+			'desc' 		=> '分享标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'show'		=> 'share_yes=1',
+		),
+
+		'share_pic'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '分享图片',
+			'default' 	=> '',
+			'desc' 		=> '分享图片',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+			'show'		=> 'share_yes=1',
+		),
+
+		'share_content'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '分享内容',
+			'default' 	=> '',
+			'desc' 		=> '分享内容',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			'show'		=> 'share_yes=1',
+		),
+
 		'content'		=> array
 		(
 			'type' 		=> 'text-255',
@@ -269,6 +350,20 @@ return array
 			'key' 		=> 1,
 		),
 
+		'audit'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '审核',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $audit,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
 		'cdate'		=> array
 		(
 			'type' 		=> 'int-11',