Esempio n. 1
0
 function create_table()
 {
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "magazine", 'struct_ast_id' => "", 'content_type' => "杂志", 'expand_id' => "", 'content_fromid' => "", 'array_field' => "indexpic", 'array_child_field' => "indexpic", 'field' => "id,title,issue_id,sort_id,brief,state,user_name,create_time,update_time,contract_way,release_cycle,volume,current_nper,mana_nper,\n\t\t\t\t\t\tcssn,issn,price,page_num,sponsor,editor,language,appid,appname,order_id,column_id,expand_id,is_publish_child,indexpic,content_fromid,user_id", 'field_sql' => " `id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t  `title` char(20) NOT NULL COMMENT '杂志名称',\n\t\t\t\t\t\t\t  `issue_id` int(10) NOT NULL COMMENT '当期刊的id',\n\t\t\t\t\t\t\t  `sort_id` int(4) NOT NULL COMMENT '杂志分类',\n\t\t\t\t\t\t\t  `brief` varchar(200) NOT NULL COMMENT '杂志简介',\n\t\t\t\t\t\t\t  `state` tinyint(4) NOT NULL COMMENT '0未审核1审核2打回',\n\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '用户id',\n\t\t\t\t\t\t\t  `user_name` varchar(20) NOT NULL COMMENT '添加者',\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '创建时间',\n\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '更新时间',\n\t\t\t\t\t\t\t  `contract_way` text NOT NULL COMMENT '联系方式',\n\t\t\t\t\t\t\t  `release_cycle` int(4) NOT NULL COMMENT '发行周期',\n\t\t\t\t\t\t\t  `volume` int(4) NOT NULL COMMENT '累计期数',\n\t\t\t\t\t\t\t  `current_nper` int(4) NOT NULL COMMENT '当前其数',\n\t\t\t\t\t\t\t  `mana_nper` int(4) NOT NULL COMMENT '管理期数',\n\t\t\t\t\t\t\t  `cssn` varchar(20) NOT NULL COMMENT '国内统一刊号',\n\t\t\t\t\t\t\t  `issn` varchar(20) NOT NULL COMMENT '国际统一刊号',\n\t\t\t\t\t\t\t  `price` float(5,2) unsigned NOT NULL COMMENT '定价',\n\t\t\t\t\t\t\t  `page_num` int(4) NOT NULL COMMENT '页数',\n\t\t\t\t\t\t\t  `sponsor` varchar(50) NOT NULL COMMENT '主办单位',\n\t\t\t\t\t\t\t  `editor` varchar(60) NOT NULL COMMENT '责任主编',\n\t\t\t\t\t\t\t  `language` varchar(20) NOT NULL COMMENT '语言',\n\t\t\t\t\t\t\t  `appid` int(10) NOT NULL,\n\t\t\t\t\t\t\t  `appname` varchar(50) NOT NULL,\n\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL COMMENT '排序',\n\t\t\t\t\t\t\t  `column_id` varchar(100) NOT NULL COMMENT '发布的栏目id',\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '在发布系统中的id',\n\t\t\t\t\t\t\t  `is_publish_child` tinyint(1) NOT NULL COMMENT '是否发布子内容',\n\t\t\t\t\t\t\t  `indexpic` varchar(500) NOT NULL COMMENT '图片串行化', \n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT 'content_fromid',\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'table_title' => "杂志", 'child_table' => "issue", 'show_field' => array(array('field' => 'title', 'title' => '杂志名称', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'cssn', 'title' => '国内统一刊号', 'type' => 'text'), array('field' => 'price', 'title' => '价格', 'type' => 'text'), array('field' => 'indexpic', 'title' => '图片', 'type' => 'img')));
     $ret = $obj->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 2
0
 function create_table()
 {
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "magazine", 'struct_ast_id' => "issue", 'content_type' => "期刊", 'expand_id' => "", 'content_fromid' => "", 'array_field' => "indexpic", 'array_child_field' => "indexpic", 'field' => "id,title,magazine_id,pub_date,state,top,recommend,ip,user_id,user_name,create_time,update_time,host,dir,file_name,file_path,file_type,\n\t\t\tfile_size,original_id,issue_size,appid,appname,outlink,weight,cover_article,column_id,expand_id,indexpic,content_fromid,brief", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t  `title` varchar(100) NOT NULL COMMENT '刊号',\n\t\t\t\t\t\t\t  `magazine_id` int(10) NOT NULL COMMENT '关联杂志表',\n\t\t\t\t\t\t\t  `pub_date` int(10) NOT NULL COMMENT '发行时间',\n\t\t\t\t\t\t\t  `state` tinyint(4) NOT NULL COMMENT '状态',\n\t\t\t\t\t\t\t  `top` tinyint(2) NOT NULL COMMENT '置顶',\n\t\t\t\t\t\t\t  `recommend` tinyint(2) NOT NULL COMMENT '推荐',\n\t\t\t\t\t\t\t  `ip` varchar(25) NOT NULL,\n\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '添加人id',\n\t\t\t\t\t\t\t  `user_name` varchar(20) NOT NULL COMMENT '添加人姓名',\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '创建时间',\n\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL,\n\t\t\t\t\t\t\t  `host` varchar(100) NOT NULL,\n\t\t\t\t\t\t\t  `dir` varchar(100) NOT NULL,\n\t\t\t\t\t\t\t  `file_name` varchar(120) NOT NULL,\n\t\t\t\t\t\t\t  `file_path` varchar(200) NOT NULL,\n\t\t\t\t\t\t\t  `file_type` varchar(10) NOT NULL,\n\t\t\t\t\t\t\t  `file_size` int(10) NOT NULL,\n\t\t\t\t\t\t\t  `original_id` int(10) NOT NULL COMMENT '原始素材ID',\n\t\t\t\t\t\t\t  `issue_size` int(10) NOT NULL COMMENT '杂志大小',\n\t\t\t\t\t\t\t  `appid` int(10) NOT NULL,\n\t\t\t\t\t\t\t  `appname` varchar(50) NOT NULL,\n\t\t\t\t\t\t\t  `outlink` varchar(50) NOT NULL COMMENT '外链',\n\t\t\t\t\t\t\t  `weight` int(4) NOT NULL COMMENT '权重',\n\t\t\t\t\t\t\t  `cover_article` text NOT NULL COMMENT '封面文章信息',\n\t\t\t\t\t\t\t  `column_id` varchar(100) NOT NULL COMMENT '发布的栏目',\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '发布系统',\n\t\t\t\t\t\t\t  `indexpic` varchar(500) NOT NULL COMMENT '图片串行话', \n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT 'content_fromid',\n\t\t\t\t\t\t\t  `brief` varchar(200) NOT NULL COMMENT '期刊简介',\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t  UNIQUE KEY `id` (`id`)", 'table_title' => "期刊", 'child_table' => "article", 'show_field' => array(array('field' => 'title', 'title' => '刊号', 'type' => 'text'), array('field' => 'issue_size', 'title' => '杂志大小', 'type' => 'text'), array('field' => 'pub_date', 'title' => '发行时间', 'type' => 'text'), array('field' => 'indexpic', 'title' => '图片', 'type' => 'img')));
     $ret = $obj->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 3
0
 function create_table()
 {
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "magazine", 'struct_ast_id' => "material", 'content_type' => "素材", 'expand_id' => "", 'content_fromid' => "", 'array_field' => "pic", 'array_child_field' => "", 'field' => "id,cid,expand_id,content_fromid,material_id,name,pic_host,pic_dir,pic_filepath,pic_filename,type,imgwidth,imgheight,filesize,isdel,create_time,ip,remote_url,title,brief,pic", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t  `cid` int(10) NOT NULL COMMENT '//对应内容id',\n\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '//发布系统',\n\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT '//原内容id',\n\t\t\t\t\t\t  `material_id` int(10) NOT NULL COMMENT '图片服务器的素材ID',\n\t\t\t\t\t\t  `name` varchar(40) NOT NULL COMMENT '图片名称',\n\t\t\t\t\t\t  `pic_host` varchar(200) NOT NULL COMMENT 'host',\n\t\t\t\t\t\t  `pic_dir` varchar(100) NOT NULL COMMENT 'dir',\n\t\t\t\t\t\t  `pic_filepath` varchar(100) NOT NULL COMMENT '原图的存储路径',\n\t\t\t\t\t\t  `pic_filename` varchar(40) NOT NULL COMMENT '文件名称',\n\t\t\t\t\t\t  `type` varchar(10) NOT NULL COMMENT '图片类型',\n\t\t\t\t\t\t  `imgwidth` smallint(4) NOT NULL COMMENT '图片宽度',\n\t\t\t\t\t\t  `imgheight` smallint(4) NOT NULL COMMENT '图片高度',\n\t\t\t\t\t\t  `filesize` int(10) NOT NULL COMMENT '图片大小',\n\t\t\t\t\t\t  `isdel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否删除0-是 1- 否',\n\t\t\t\t\t\t  `create_time` int(10) NOT NULL,\n\t\t\t\t\t\t  `ip` varchar(60) NOT NULL,\n\t\t\t\t\t\t  `remote_url` varchar(200) NOT NULL COMMENT '图片原始远程地址',\n\t\t\t\t\t\t  `title` varchar(200) NOT NULL COMMENT '标题',\n\t\t\t\t\t\t  `brief` varchar(400) NOT NULL COMMENT '标题',\n\t\t\t\t\t\t  `pic` varchar(500) NOT NULL COMMENT '图片穿行话',\n\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'table_title' => "素材", 'child_table' => "", 'show_field' => array(array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'name', 'title' => '图片名称', 'type' => 'text'), array('field' => 'pic', 'title' => '图片', 'type' => 'img'), array('field' => 'remote_url', 'title' => '图片原始远程地址', 'type' => 'text')));
     $ret = $obj->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 4
0
 function create_table()
 {
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "magazine", 'struct_ast_id' => "article", 'content_type' => "文章", 'expand_id' => "", 'content_fromid' => "", 'array_field' => "indexpic", 'array_child_field' => "pic", 'field' => "id,title,subhead,brief,tcolor,isbold,isitalic,article_author,redactor,issue_id,group_id,\n\t\t\t\t\t\tkeywords,state,order_id,create_time,update_time,ip,user_id,user_name,indexpic,water_id,\n\t\t\t\t\t\twater_name,article_size,outlink,weight,column_id,expand_id,content_fromid", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t  `title` varchar(100) NOT NULL,\n\t\t\t\t\t\t  `subhead` varchar(200) NOT NULL COMMENT '副标题',\n\t\t\t\t\t\t  `brief` varchar(200) NOT NULL COMMENT '描述',\n\t\t\t\t\t\t  `tcolor` varchar(20) NOT NULL COMMENT '标题颜色',\n\t\t\t\t\t\t  `isbold` tinyint(1) NOT NULL COMMENT '加粗',\n\t\t\t\t\t\t  `isitalic` tinyint(1) NOT NULL COMMENT '斜体',\n\t\t\t\t\t\t  `article_author` varchar(20) NOT NULL COMMENT '作者',\n\t\t\t\t\t\t  `redactor` varchar(50) NOT NULL COMMENT '责任编辑',\n\t\t\t\t\t\t  `issue_id` int(10) NOT NULL COMMENT '期刊id',\n\t\t\t\t\t\t  `group_id` int(10) NOT NULL COMMENT '分类id',\n\t\t\t\t\t\t  `keywords` varchar(200) NOT NULL COMMENT '关键字',\n\t\t\t\t\t\t  `state` tinyint(1) NOT NULL COMMENT '0未审核1审核2打回',\n\t\t\t\t\t\t  `order_id` int(10) NOT NULL COMMENT '文章排序id',\n\t\t\t\t\t\t  `create_time` int(10) NOT NULL,\n\t\t\t\t\t\t  `update_time` int(10) NOT NULL,\n\t\t\t\t\t\t  `ip` varchar(30) NOT NULL,\n\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '用户id',\n\t\t\t\t\t\t  `user_name` varchar(20) NOT NULL COMMENT '添加人姓名',\n\t\t\t\t\t\t  `indexpic` int(10) NOT NULL COMMENT '索引图id',\n\t\t\t\t\t\t  `water_id` int(10) NOT NULL COMMENT '水印id',\n\t\t\t\t\t\t  `water_name` varchar(50) NOT NULL COMMENT '水印名称',\n\t\t\t\t\t\t  `article_size` int(10) NOT NULL COMMENT '文章大小',\n\t\t\t\t\t\t  `outlink` varchar(50) NOT NULL COMMENT '外链',\n\t\t\t\t\t\t  `weight` int(4) NOT NULL COMMENT '权重',\n\t\t\t\t\t\t  `column_id` varchar(100) NOT NULL COMMENT '发布的栏目id',\n\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '在发布系统中的id',\n\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT 'content_fromid',\n\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'table_title' => "文章", 'child_table' => "material", 'show_field' => array(array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'keywords', 'title' => '关键词', 'type' => 'text'), array('field' => 'article_author', 'title' => '作者', 'type' => 'text'), array('field' => 'indexpic', 'title' => '图片', 'type' => 'img')));
     $ret = $obj->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 5
0
 function create_table()
 {
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "content", 'struct_ast_id' => "", 'content_type' => "爆料", 'expand_id' => "", 'content_fromid' => "", 'field' => "id,expand_id,content_fromid, title,brief,sort_id,keywords,material_id,appid,client,longitude,\n\t\t\t\t\t\tlatitude,create_time,update_time,user_id,user_name,audit,is_pub,order_id,expand_id,column_id,\n\t\t\t\t\t\tcolumn_url,publish_time,content,indexpic", 'array_field' => "indexpic", 'array_child_field' => "pic,video", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',\n\t\t\t\t\t\t\t  `sort_id` int(10) NOT NULL COMMENT '分类',\n\t\t\t\t\t\t\t  `title` varchar(100) NOT NULL COMMENT '标题',\n\t\t\t\t\t\t\t  `keywords` varchar(30) DEFAULT NULL COMMENT '关键字',\n\t\t\t\t\t\t\t  `brief` varchar(1000) NOT NULL COMMENT '简要',\n\t\t\t\t\t\t\t  `material_id` int(10) NOT NULL COMMENT '素材库的ID',\n\t\t\t\t\t\t\t  `appid` int(10) NOT NULL COMMENT 'appid',\n\t\t\t\t\t\t\t  `client` char(20) NOT NULL COMMENT '客户端',\n\t\t\t\t\t\t\t  `longitude` float(17,14) NOT NULL COMMENT '所在经度',\n\t\t\t\t\t\t\t  `latitude` float(17,14) NOT NULL COMMENT '所在的纬度',\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '发布时间',\n\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '更新时间',\n\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '用户id',\n\t\t\t\t\t\t\t  `user_name` char(30) NOT NULL COMMENT '用户名',\n\t\t\t\t\t\t\t  `audit` tinyint(1) NOT NULL COMMENT '审核',\n\t\t\t\t\t\t\t  `is_pub` tinyint(1) NOT NULL COMMENT '发布状态位',\n\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL COMMENT '排序ID',\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '在发布系统里面的id',\n\t\t\t\t\t\t\t  `column_id` varchar(500) NOT NULL COMMENT '发布到的栏目id',\n\t\t\t\t\t\t\t  `column_url` varchar(1000) NOT NULL COMMENT '栏目url',\n\t\t\t\t\t\t\t  `publish_time` int(10) NOT NULL COMMENT '发布时间',\n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT 'content_fromid',\n\t\t\t\t\t\t\t  `content` text NOT NULL COMMENT '爆料内容',\n\t\t\t\t\t\t\t  `indexpic` varchar(500) NOT NULL COMMENT '图片串行话', \n\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'table_title' => "爆料", 'child_table' => "materials", 'show_field' => array(array('field' => 'title', 'title' => '爆料标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'content', 'title' => '爆料内容', 'type' => 'text')));
     $ret = $obj->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 6
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'content_type' => "cutv视频", 'field' => "id,expand_id,content_fromid,orderid,array_child_field,keywords,indexpic,title,brief,category_id,cpid,cpname,maid,video_source,video_id,program_form,media_type,program_type,duration,status,bitrate,create_date,create_time,ip", 'array_field' => "indexpic", 'array_child_field' => "", 'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL ,\r\n\t\t\t\t\t\t\t  `title` varchar(200) NOT NULL COMMENT '标题',\r\n\t\t\t\t\t\t\t  `brief` varchar(500) NOT NULL COMMENT '描述',\r\n\t\t\t\t\t\t\t  `category_id` varchar(50) NOT NULL,\r\n\t\t\t\t\t\t\t  `orderid` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t  `keywords` varchar(50) NOT NULL,\r\n\t\t\t\t\t\t\t  `cpid` varchar(50) NOT NULL,\r\n\t\t\t\t\t\t\t  `cpname` varchar(10) NOT NULL,\r\n\t\t\t\t\t\t\t  `maid` varchar(50) NOT NULL,\r\n\t\t\t\t\t\t\t  `video_source` varchar(120) NOT NULL,\r\n\t\t\t\t\t\t\t  `video_id` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t  `indexpic` varchar(500) NOT NULL,\r\n\t\t\t\t\t\t\t  `program_form` tinyint(1) NOT NULL,\r\n\t\t\t\t\t\t\t  `media_type` tinyint(1) NOT NULL,\r\n\t\t\t\t\t\t\t  `program_type` tinyint(1) NOT NULL,\r\n\t\t\t\t\t\t\t  `duration` int(5) NOT NULL,\r\n\t\t\t\t\t\t\t  `status` tinyint(1) NOT NULL,\r\n\t\t\t\t\t\t\t  `bitrate` int(6) NOT NULL,\r\n\t\t\t\t\t\t\t  `create_date` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t  `ip` varchar(60) NOT NULL,\r\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '发布系统',\r\n\t\t\t\t\t\t\t   PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t  ", 'table_title' => "WEB视频", 'child_table' => "", 'show_field' => array(array('field' => 'cpname', 'title' => '电视台', 'type' => 'text'), array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text')));
     $ret = $obj->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'name' => "CUTV", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => APP_UNIQUEID . '_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 7
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => 'vod', 'struct_id' => "vod", 'struct_ast_id' => "", 'field' => "id,expand_id,content_fromid,title,brief,video_order_id,channel_id,bitrate,vod_sort_id,status,author,user_id,addperson,source,starttime,delay_time,height,start,duration,width,keywords,catalog,type,transize,totalsize,audit,create_time,update_time,ip,vod_leixing,aspect,vtype,from_appid,from_appname,server,hostwork,video_path,video_filename,weight,outlink,ori_url,is_praise,praise_count", 'array_field' => "img_info,collects", 'array_child_field' => "", 'table_title' => "视频", 'content_type' => "视频", 'field_sql' => "id int(11) NOT NULL AUTO_INCREMENT,\r\n\t  \t\t\t\t\t\t  expand_id int(10) DEFAULT NULL,\r\n\t  \t\t\t\t\t\t  content_fromid int(10) DEFAULT NULL,\r\n\t  \t\t\t\t\t\t  title varchar(150) DEFAULT NULL COMMENT '内容标题',\r\n\t  \t\t\t\t\t\t  brief varchar(500) DEFAULT NULL COMMENT '内容简要',\r\n\t\t\t\t\t\t\t  video_order_id int(10) DEFAULT '0' COMMENT '视频排序',\r\n\t\t\t\t\t\t\t  channel_id int(10) NOT NULL COMMENT '频道ID',\r\n\t\t\t\t\t\t\t  bitrate int(10) DEFAULT '0' COMMENT '码流',\r\n\t\t\t\t\t\t\t  vod_sort_id int(10) DEFAULT '0' COMMENT '视频类别',\r\n\t\t\t\t\t\t\t  status tinyint(1) DEFAULT '0' COMMENT '转码状态',\r\n\t\t\t\t\t\t\t  author varchar(20) DEFAULT NULL COMMENT '作者',\r\n\t\t\t\t\t\t\t  user_id int(10) DEFAULT NULL COMMENT '添加人user_id',\r\n\t\t\t\t\t\t\t  addperson varchar(20) DEFAULT NULL COMMENT '添加人',\r\n\t\t\t\t\t\t\t  source varchar(60) DEFAULT NULL' COMMENT '频道来源',\r\n\t\t\t\t\t\t\t  starttime int(10) NOT NULL COMMENT '录播节目开始时间',\r\n\t\t\t\t\t\t\t  delay_time int(10) NOT NULL COMMENT '录播频道回看时间',\r\n\t\t\t\t\t\t\t  height smallint(10) DEFAULT '0' COMMENT '视频的高度',\r\n\t\t\t\t\t\t\t  start int(11) DEFAULT '0' COMMENT '视频开始时间',\r\n\t\t\t\t\t\t\t  duration int(10) DEFAULT '0' COMMENT '视频总的时长',\r\n\t\t\t\t\t\t\t  width smallint(10) DEFAULT '0' COMMENT '视频的宽度',\r\n\t\t\t\t\t\t\t  keywords varchar(250) DEFAULT NULL COMMENT '视频id',\r\n\t\t\t\t\t\t\t  catalog  varchar(1000) DEFAULT NULL COMMENT '编目',\r\n\t\t\t\t\t\t\t  type varchar(10) DEFAULT NULL COMMENT '视频类型(avi,还是3gp等等)',\r\n\t\t\t\t\t\t\t  transize int(10) DEFAULT NULL COMMENT '转码中的视频已转码大小',\r\n\t\t\t\t\t\t\t  totalsize int(10) DEFAULT NULL,\r\n\t\t\t\t\t\t\t  audit tinyint(4) DEFAULT '0',\r\n\t\t\t\t\t\t\t  create_time int(10) DEFAULT NULL COMMENT '创建时间',\r\n\t\t\t\t\t\t\t  update_time int(10) DEFAULT NULL COMMENT '更新时间',\r\n\t\t\t\t\t\t\t  ip char(20) DEFAULT NULL COMMENT 'ip',\r\n\t\t\t\t\t\t\t  vod_leixing int(10) DEFAULT '0' COMMENT '所属类型',\r\n\t\t\t\t\t\t\t  aspect char(6) NOT NULL COMMENT '比率',\r\n\t\t\t\t\t\t\t  vtype tinyint(1) NOT NULL DEFAULT '1' COMMENT '视频类型1-音视频,2-音频',\r\n\t\t\t\t\t\t\t  from_appid int(10) NOT NULL COMMENT '来自客户端id',\r\n\t\t\t\t\t\t\t  from_appname varchar(30) NOT NULL COMMENT '来自客户端名称',\r\n\t\t\t\t\t\t\t  server varchar(20) NOT NULL COMMENT '来自服务器',\r\n\t\t\t\t\t\t\t  hostwork varchar(50) NOT NULL COMMENT '域名',\r\n\t\t\t\t\t\t\t  video_path varchar(255) NOT NULL COMMENT '视频路径',\r\n\t\t\t\t\t\t\t  video_filename varchar(50) NOT NULL COMMENT '视频文件名',\r\n\t\t\t\t\t\t\t  weight int(10) NOT NULL COMMENT '权重',\r\n\t\t\t\t\t\t\t  outlink varchar(100) NOT NULL COMMENT '外联',\r\n\t\t\t\t\t\t\t  ori_url varchar(300) NOT NULL COMMENT '视频原始url',\r\n\t\t\t\t\t\t\t  `is_praise` tinyint(1) NOT NULL COMMENT '是否开启赞',\r\n \t\t\t \t\t\t\t  `praise_count` int(11) NOT NULL COMMENT '赞的次数',\t\r\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t  ", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '内容简要', 'type' => 'text'), 2 => array('field' => 'video', 'title' => '视频路径', 'type' => 'video'), 3 => array('field' => 'addperson', 'title' => '添加人', 'type' => 'text'), 4 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 5 => array('field' => 'ip', 'title' => '标题', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => 'vod', 'struct_id' => 'vod', 'struct_ast_id' => "", 'name' => "视频库", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'vod_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 8
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => 'feedback', 'struct_id' => "feedback", 'struct_ast_id' => "", 'field' => "id,content_fromid,title,brief,node_id,column_id,status,counts,is_login,order_id,org_id,user_id,user_name,create_time,update_user_id,update_user_name,update_time,audit_user_id,audit_user_name,audit_time,ip,appid,appname,expand_id,column_url,pub_time", 'array_field' => "column_id", 'array_child_field' => "", 'table_title' => "表单反馈", 'field_sql' => "  `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t                      `content_fromid` int(11) NOT NULl,\n\t\t\t                      `title` varchar(255) NOT NULL COMMENT '表单标题',\n\t\t\t                      `brief` text NOT NULL COMMENT '反馈表单描述',\n\t\t\t                      `node_id` int(11) NOT NULL COMMENT '分类',\n\t\t\t                      `column_id` varchar(1000) NOT NULL COMMENT '栏目',\n\t\t\t                      `status` tinyint(1) NOT NULL COMMENT '审核状态(0-未审核,1-已审核,2-已打回)',\n\t\t\t                      `counts` int(11) NOT NULL COMMENT '提交表单数量',\n\t\t\t                      `is_login` tinyint(1) NOT NULL COMMENT '是否需要登录',\n\t\t\t                      `order_id` int(11) NOT NULL,\n\t\t\t                      `org_id` int(11) NOT NULL,\n\t\t\t                      `user_id` int(11) NOT NULL,\n\t\t\t                      `user_name` varchar(32) NOT NULL,\n\t\t\t                      `create_time` int(10) NOT NULL,\n\t\t\t                      `update_user_id` int(11) NOT NULL,\n\t\t\t                      `update_user_name` varchar(32) NOT NULL,\n\t\t\t                      `update_time` int(10) NOT NULL,\n\t\t\t                      `audit_user_id` int(11) NOT NULL,\n\t\t\t                      `audit_user_name` varchar(32) NOT NULL,\n\t\t\t                      `audit_time` int(10) NOT NULL,\n\t\t\t                      `ip` int(15) NOT NULL,\n\t\t\t                      `appid` int(11) NOT NULL,\n\t\t\t                      `appname` varchar(60) NOT NULL,\n\t\t\t                      `expand_id` int(11) NOT NULL,\n\t\t\t                      `column_url` varchar(1000) NOT NULL,\n\t\t\t                      `pub_time` int(10) NOT NULL,\n\t\t\t                    PRIMARY KEY (`id`),\n\t\t\t                    KEY `content_fromid` (`content_fromid`),\n\t\t\t\t\t\t\t    KEY expand_id (expand_id)\n\t\t\t\t\t\t\t  ", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '描述', 'type' => 'text'), 2 => array('field' => 'indexpic', 'title' => '图片路径', 'type' => 'img'), 3 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 4 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 5 => array('field' => 'ip', 'title' => '创建者ip', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => 'feedback', 'struct_id' => 'feedback', 'struct_ast_id' => "", 'name' => "反馈表单", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'feedback_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 9
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => 'survey', 'struct_id' => "survey", 'struct_ast_id' => "", 'field' => "id,content_fromid,title,brief,problem_num,submit_num,column_id,indexpic,status,node_id,used_survey_id,start_time,end_time,question_time,picture_ids,video_ids,publicontent_ids,is_ip,ip_limit_time,is_login,is_auto_submit,is_result_public,is_verifycode,order_id,user_id,update_user_id,audit_user_id,user_name,update_user_name,audit_user_name,org_id,appid,appname,create_time,update_time,audit_time,ip,expand_id,column_url,pub_time", 'array_field' => "indexpic,column_id", 'array_child_field' => "", 'table_title' => "调查问卷", 'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t                    `content_fromid` int(11) NOT NULl,\n\t\t\t                    `title` varchar(45) DEFAULT NULL COMMENT '问卷标题\t',\n\t\t\t                    `brief` text COMMENT ' 调查问卷的描述',\n\t\t\t                    `problem_num` int(10) NOT NULL COMMENT '题目数量',\n\t\t\t                    `submit_num` int(10) NOT NULL COMMENT '提交的问卷数量',\n\t\t\t                    `column_id` varchar(255) DEFAULT NULL COMMENT '栏目id',\n\t\t\t                    `indexpic` text COMMENT '索引图',\n\t\t\t                    `status` tinyint(1) NOT NULL COMMENT '审核 (0-未审核 1-已审核 2-已打回 )',\n\t\t\t                    `node_id` int(10) DEFAULT NULL COMMENT '分类ID',\n\t\t\t                    `used_survey_id` int(10) NOT NULL COMMENT '引用的问卷id',\n\t\t\t                    `start_time` int(10) NOT NULL COMMENT '开始时间',\n\t\t\t                    `end_time` int(10) NOT NULL COMMENT '结束时间',\n\t\t\t                    `question_time` int(11) NOT NULL COMMENT '答题时间',\n\t\t\t                    `picture_ids` varchar(100) NOT NULL COMMENT '图片id',\n\t\t\t                    `video_ids` varchar(100) NOT NULL COMMENT '视频,音频id',\n\t\t\t                    `publicontent_ids` varchar(100) NOT NULL COMMENT '引用id',\n\t\t\t                    `is_ip` tinyint(4) NOT NULL COMMENT '是否限制ip(1是0否)',\n\t\t\t                    `ip_limit_time` int(10) NOT NULL COMMENT 'ip限制时长(单位:小时)',\n\t\t\t                    `is_login` tinyint(4) NOT NULL COMMENT '是否登录(1是,0否)',\n\t\t\t                    `is_auto_submit` tinyint(4) NOT NULL COMMENT '是否自动提交(1是,0否)',\n\t\t\t                    `is_result_public` tinyint(4) NOT NULL COMMENT '结果是否公开(1是0否)',\n\t\t\t                    `is_verifycode` tinyint(4) NOT NULL COMMENT '是否开启验证码(1是0否)',\n\t\t\t                    `order_id` int(10) DEFAULT NULL,\n\t\t\t                    `user_id` int(10) DEFAULT NULL,\n\t\t\t                    `update_user_id` int(10) NOT NULL,\n\t\t\t                    `audit_user_id` int(11) NOT NULL,\n\t\t\t                    `user_name` varchar(60) DEFAULT NULL,\n\t\t\t                    `update_user_name` varchar(30) NOT NULL,\n\t\t\t                    `audit_user_name` varchar(32) NOT NULL,\n\t\t\t                    `org_id` int(10) DEFAULT NULL,\n\t\t\t                    `appid` int(10) DEFAULT NULL,\n\t\t\t                    `appname` varchar(60) DEFAULT NULL,\n\t\t\t                    `create_time` int(10) DEFAULT NULL,\n\t\t\t                    `update_time` int(10) DEFAULT NULL,\n\t\t\t                    `audit_time` int(10) NOT NULL,\n\t\t\t                    `ip` char(64) DEFAULT NULL,\n\t\t\t                    `expand_id` int(10) NOT NULL,\n\t\t\t                    `column_url` varchar(1000) NOT NULL,\n\t\t\t                    `pub_time` int(10) NOT NULL,\n\t\t\t                    PRIMARY KEY (`id`),\n\t\t\t                    KEY `content_fromid` (`content_fromid`),\n\t\t\t\t\t\t\t    KEY expand_id (expand_id)\n\t\t\t\t\t\t\t  ", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '描述', 'type' => 'text'), 2 => array('field' => 'indexpic', 'title' => '图片路径', 'type' => 'img'), 3 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 4 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 5 => array('field' => 'ip', 'title' => '创建者ip', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => 'survey', 'struct_id' => 'survey', 'struct_ast_id' => "", 'name' => "调查问卷", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'survey_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 10
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => 'vote', 'struct_id' => "vote", 'struct_ast_id' => "", 'field' => "id,content_fromid,pictures,vote_id,title,describes,keywords,start_time,end_time,ip_limit_time,userid_limit_time,is_ip,is_userid,is_user_login,is_verify_code,option_num,option_type,min_option,max_option,is_other,total,order_id,create_time,update_time,ip,status,is_open,pictures_info,more_info,source_type,node_id,org_id,user_id,user_name,update_user_id,update_user_name,update_appid,update_appname,update_ip,column_id,column_url,expand_id,vod_id,ini_total,audit_user_id,audit_user_name,audit_time,publishcontent_id,is_praise,praise_count", 'array_field' => "pictures_info,more_info", 'array_child_field' => "", 'table_title' => "投票", 'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,\r\n\t\t\t                    `content_fromid` int(11) NOT NULl,\r\n\t\t\t                    `pictures` varchar(60) NOT NULL COMMENT '图片',\r\n\t\t\t                    `vote_id` int(10) NOT NULL COMMENT '在liv_vote里面对应的id',\r\n\t\t\t                    `title` varchar(255) NOT NULL COMMENT '标题',\r\n\t\t\t                    `describes` varchar(1024) NOT NULL COMMENT '描述',\r\n\t\t\t                    `keywords` varchar(1024) NOT NULL COMMENT '关键词',\r\n\t\t\t                    `start_time` int(10) NOT NULL COMMENT '开始时间',\r\n\t\t\t                    `end_time` int(10) NOT NULL COMMENT '结束时间',\r\n\t\t\t                    `ip_limit_time` tinyint(2) NOT NULL COMMENT 'ip时间限制',\r\n\t\t\t                    `userid_limit_time` tinyint(2) NOT NULL COMMENT '用户id时间限制',\r\n\t\t\t                    `is_ip` tinyint(1) NOT NULL COMMENT 'ip限制',\r\n\t\t\t                    `is_userid` tinyint(1) NOT NULL COMMENT '用户id',\r\n\t\t\t                    `is_user_login` tinyint(1) NOT NULL COMMENT '是否需要用户登陆 (1-需要 0-不需要)',\r\n\t\t\t                    `is_verify_code` tinyint(1) NOT NULL COMMENT '验证码开启',\r\n\t\t\t                    `verify_type` int(11) NOT NULl,\r\n\t\t\t                    `option_num` int(10) NOT NULL COMMENT '选项数',\r\n\t\t\t                    `option_type` tinyint(1) NOT NULL COMMENT '选项类型(1-单选 2-多选)',\r\n\t\t\t                    `min_option` tinyint(2) NOT NULL COMMENT '最小选项数',\r\n\t\t\t                    `max_option` tinyint(2) NOT NULL COMMENT '此投票最多可选,0则为无限制',\r\n\t\t\t                    `is_other` tinyint(1) NOT NULL COMMENT '是否有其他',\r\n\t\t\t                    `total` int(20) NOT NULL COMMENT '投票总数',\r\n\t\t\t                    `order_id` int(10) NOT NULL COMMENT '排序id',\r\n\t\t\t                    `create_time` int(10) NOT NULL COMMENT '创建时间',\r\n\t\t\t                    `update_time` int(10) NOT NULL COMMENT '更新时间',\r\n\t\t\t                    `ip` varchar(64) NOT NULL COMMENT '创建者IP',\r\n\t\t\t                    `status` tinyint(1) NOT NULL COMMENT '审核 (0-未审核 1-已审核 2-已打回 )',\r\n\t\t\t                    `is_open` tinyint(4) NOT NULL COMMENT '是否开启 (0-关闭 1-开启)',\r\n\t\t\t                    `pictures_info` varchar(512) NOT NULL COMMENT '图片信息',\r\n\t\t\t                    `more_info` text NOT NULL COMMENT '更多信息',\r\n\t\t\t                    `source_type` tinyint(1) NOT NULL COMMENT '来源类型 (1-网友 0-管理员)',\r\n\t\t\t                    `node_id` int(10) NOT NULL COMMENT '分类id',\r\n\t\t\t                    `org_id` int(10) NOT NULL COMMENT '组织id',\r\n\t\t\t                    `user_id` int(10) NOT NULL,\r\n\t\t\t                    `user_name` char(64) NOT NULL,\r\n\t\t\t                    `appid` int(10) NOT NULL,\r\n\t\t\t                    `appname` char(64) NOT NULL,\r\n\t\t\t                    `weight` int(10) NOT NULL,\r\n\t\t\t                    `update_org_id` int(10) NOT NULL COMMENT '更新者组织id',\r\n\t\t\t                    `update_user_id` int(10) NOT NULL COMMENT '更新者用户id',\r\n\t\t\t                    `update_user_name` char(32) NOT NULL COMMENT '更新者用户名',\r\n\t\t\t                    `update_appid` int(10) NOT NULL COMMENT '更新者应用id',\r\n\t\t\t                    `update_appname` char(32) NOT NULL COMMENT '更新者应用名',\r\n\t\t\t                    `update_ip` char(32) NOT NULL COMMENT '更新者ip',\r\n\t\t\t                    `column_id` varchar(500) NOT NULL COMMENT '发布到栏目',\r\n\t\t\t                    `column_url` varchar(1000) NOT NULL COMMENT '发布到栏目url',\r\n\t\t\t                    `expand_id` int(10) NOT NULL COMMENT '发布系统id',\r\n\t\t\t                    `vod_id` varchar(1000) NOT NULL COMMENT '视频id',\r\n\t\t\t                    `ini_total` int(10) NOT NULL COMMENT '初始化总数',\r\n\t\t\t                    `audit_user_id` int(11) NOT NULL COMMENT '审核id',\r\n\t\t\t                    `audit_user_name` varchar(60) NOT NULL COMMENT '审核人姓名',\r\n\t\t\t                    `audit_time` int(10) NOT NULL COMMENT '审核时间',\r\n\t\t\t                    `publishcontent_id` varchar(255) NOT NULL,\r\n\t\t\t\t\t\t\t\t`is_praise` tinyint(1) NOT NULL COMMENT '是否开启赞',\r\n \t\t\t \t\t\t\t    `praise_count` int(11) NOT NULL COMMENT '赞的次数',\t\r\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t  ", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'describes', 'title' => '描述', 'type' => 'text'), 2 => array('field' => 'pictures', 'title' => '图片路径', 'type' => 'img'), 3 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 4 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 5 => array('field' => 'ip', 'title' => '创建者ip', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     /******
     		$data = array(
     			'bundle_id' => APP_UNIQUEID,
     			'module_id' => APP_UNIQUEID,
     			'struct_id' => APP_UNIQUEID,
     			'struct_ast_id' => "special_material",
     			'content_type' => "",
     			'field' => "id,name,pic,host,dir,filepath,filename,type,imgwidth,imgheight,filesize,mid,expand_id",
     			'array_field' => "",
     			'array_child_field' => "",
     			'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,
     			                  `name` varchar(40) NOT NULL COMMENT '图片名称',
     			                  `pic` varchar(500) NOT NULL COMMENT '图片信息',
     			                  `host` varchar(200) NOT NULL COMMENT '主机地址',
     			                  `dir` varchar(100) NOT NULL COMMENT '路径地址',
     			                  `filepath` varchar(100) NOT NULL COMMENT '原图的存储路径',
     			                  `filename` varchar(40) NOT NULL COMMENT '文件名称',
     			                  `type` varchar(10) NOT NULL COMMENT '附件扩展名',
     			                  `imgwidth` smallint(4) NOT NULL COMMENT '图片宽度',
     			                  `imgheight` smallint(4) NOT NULL COMMENT '图片高度',
     			                  `filesize` int(10) NOT NULL COMMENT '图片大小',
     			                  `mid` int(11) NOT NULL,
     			                  `expand_id` int(10) NOT NULL COMMENT '发布系统id',
     			                   PRIMARY KEY (`id`)
     							  KEY `expand_id` (`expand_id`)",
     		
     			'table_title' => "投票素材",
     			'child_table' => "material",
     			'show_field' => array(
     					array('field'=>'name','title'=>'素材名','type'=>'text'),
     				),			
     		);
     		
     		$ret = $obj->create_table($data);
     		*******/
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => 'vote', 'struct_id' => 'vote', 'struct_ast_id' => "", 'name' => "投票", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'vote_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 11
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => "content", 'struct_ast_id' => "", 'content_type' => "爆料", 'expand_id' => "", 'content_fromid' => "", 'field' => "id,expand_id,content_fromid,title,brief,sort_id,keywords,material_id,appid,client,longitude,\r\n\t\t\t\t\t\tlatitude,create_time,update_time,user_id,user_name,audit,is_pub,order_id,expand_id,column_id,\r\n\t\t\t\t\t\tcolumn_url,publish_time,content,indexpic,opinion,event_time,event_address,event_suggest,event_user_name,event_user_tel", 'array_field' => "indexpic", 'array_child_field' => "pic,video", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',\r\n\t\t\t\t\t\t\t  `sort_id` int(10) NOT NULL COMMENT '分类',\r\n\t\t\t\t\t\t\t  `title` varchar(100) NOT NULL COMMENT '标题',\r\n\t\t\t\t\t\t\t  `keywords` varchar(30) DEFAULT NULL COMMENT '关键字',\r\n\t\t\t\t\t\t\t  `brief` varchar(1000) NOT NULL COMMENT '简要',\r\n\t\t\t\t\t\t\t  `event_time` int(10) NOT NULL COMMENT '发生时间',\r\n\t\t\t\t\t\t\t  `event_address` varchar(255) NOT NULL COMMENT '事件发生地',\r\n\t\t\t\t\t\t\t  `event_suggest` text NOT NULL COMMENT '报料人诉求',\r\n\t\t\t\t\t\t\t  `event_user_name` varchar(255) NOT NULL COMMENT '报料人',\r\n\t\t\t\t\t\t\t  `event_user_tel` varchar(255) NOT NULL COMMENT '报料人电话',\r\n\t\t\t\t\t\t\t  `material_id` int(10) NOT NULL COMMENT '素材库的ID',\r\n\t\t\t\t\t\t\t  `appid` int(10) NOT NULL COMMENT 'appid',\r\n\t\t\t\t\t\t\t  `client` char(20) NOT NULL COMMENT '客户端',\r\n\t\t\t\t\t\t\t  `longitude` float(17,14) NOT NULL COMMENT '所在经度',\r\n\t\t\t\t\t\t\t  `latitude` float(17,14) NOT NULL COMMENT '所在的纬度',\r\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '发布时间',\r\n\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '更新时间',\r\n\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '用户id',\r\n\t\t\t\t\t\t\t  `user_name` char(30) NOT NULL COMMENT '用户名',\r\n\t\t\t\t\t\t\t  `audit` tinyint(1) NOT NULL COMMENT '审核',\r\n\t\t\t\t\t\t\t  `is_pub` tinyint(1) NOT NULL COMMENT '发布状态位',\r\n\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL COMMENT '排序ID',\r\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '在发布系统里面的id',\r\n\t\t\t\t\t\t\t  `column_id` varchar(500) NOT NULL COMMENT '发布到的栏目id',\r\n\t\t\t\t\t\t\t  `column_url` varchar(1000) NOT NULL COMMENT '栏目url',\r\n\t\t\t\t\t\t\t  `publish_time` int(10) NOT NULL COMMENT '发布时间',\r\n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT 'content_fromid',\r\n\t\t\t\t\t\t\t  `content` text NOT NULL COMMENT '爆料内容',\r\n\t\t\t\t\t\t\t  `indexpic` varchar(500) NOT NULL COMMENT '图片串行话',\r\n\t\t\t\t\t\t\t  `opinion` text NOT NULL COMMENT '审核意见', \r\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t  ", 'table_title' => "爆料", 'child_table' => "materials", 'show_field' => array(array('field' => 'title', 'title' => '爆料标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'content', 'title' => '爆料内容', 'type' => 'text')));
     $ret = $table->create_table($data);
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => "content", 'struct_ast_id' => "materials", 'content_type' => "素材", 'expand_id' => "", 'content_fromid' => "", 'field' => "id,expand_id,content_fromid, title,brief,content_id,mtype,original_id,host,dir,material_path,vodid,pic_name,pic,video", 'array_field' => "pic,video", 'array_child_field' => "", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '素材关联ID',\r\n\t\t\t\t\t\t\t\t`title` varchar(100) NOT NULL COMMENT '标题',\r\n\t\t\t\t\t\t\t\t`brief` varchar(1000) NOT NULL COMMENT '简要',\r\n\t\t\t\t\t\t\t\t  `content_id` int(10) NOT NULL COMMENT '内容id',\r\n\t\t\t\t\t\t\t\t  `mtype` char(20) NOT NULL COMMENT '素材类型',\r\n\t\t\t\t\t\t\t\t  `original_id` char(32) NOT NULL COMMENT '素材原始文件ID',\r\n\t\t\t\t\t\t\t\t  `host` varchar(100) NOT NULL COMMENT 'host',\r\n\t\t\t\t\t\t\t\t  `dir` varchar(100) NOT NULL COMMENT 'dir',\r\n\t\t\t\t\t\t\t\t  `material_path` varchar(1024) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `vodid` varchar(50) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `pic_name` varchar(50) NOT NULL COMMENT '图片名',\r\n\t\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '在发布系统里面的id',\r\n\t\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL COMMENT 'content_fromid',\r\n\t\t\t\t\t\t\t\t  `pic` varchar(500) NOT NULL COMMENT '图片串行话',\r\n\t\t\t\t\t\t\t\t  `video` varchar(500) NOT NULL COMMENT '视频串行话',\r\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'table_title' => "爆料", 'child_table' => "", 'show_field' => array(array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'pic_name', 'title' => '图片名称', 'type' => 'text'), array('field' => 'pic', 'title' => '图片', 'type' => 'img'), array('field' => 'video', 'title' => '视频', type => "video")));
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => 'content', 'struct_ast_id' => "", 'name' => '爆料', 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => APP_UNIQUEID . '_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0), 2 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => 'content', 'struct_ast_id' => "materials", 'name' => '素材', 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'material_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 1));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 12
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'field' => "id,expand_id,content_fromid,title,brief,tuji_sort_id,default_comment,user_name,create_time,ip,update_time,status,total_pic,keywords,catalog,total_visit,total_comment,cover_url,path,order_id,auto_cover,is_namecomment,is_orderby_name,is_add_water,water_id,tuji_source,url,weight,is_praise,praise_count", 'array_field' => "cover_url,latest", 'array_child_field' => "pic,img_info", 'table_title' => "图集", 'content_type' => "图集", 'field_sql' => "  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t  \t\t\t\t\t\t  `expand_id` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `title` varchar(150) DEFAULT NULL COMMENT '内容标题',\r\n\t\t  \t\t\t\t\t\t  `brief` varchar(500) DEFAULT NULL COMMENT '内容简要',\r\n\t\t\t\t\t\t\t\t  `tuji_sort_id` int(10) NOT NULL COMMENT '关联图集分类ID',\r\n\t\t\t\t\t\t\t\t  `default_comment` varchar(1000) DEFAULT NULL COMMENT '图集默认描述(用于其底下的图片继承用的)',\r\n\t\t\t\t\t\t\t\t  `user_name` char(64) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '创建时间',\r\n\t\t\t\t\t\t\t\t  `ip` char(20) NOT NULL COMMENT '创建IP',\r\n\t\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '修改时间',\r\n\t\t\t\t\t\t\t\t  `status` tinyint(2) NOT NULL COMMENT '状态 -1=>未审核 1=>已审核 2=>打回 ',\r\n\t\t\t\t\t\t\t\t  `total_pic` int(10) NOT NULL COMMENT '图片总数',\r\n\t\t\t\t\t\t\t\t  `keywords` varchar(250) DEFAULT NULL COMMENT '关键字',\r\n\t\t\t\t\t\t\t\t  `catalog` varchar(1000) DEFAULT NULL COMMENT '编目',\r\n\t\t\t\t\t\t\t\t  `total_visit` int(10) NOT NULL COMMENT '图集访问量',\r\n\t\t\t\t\t\t\t\t  `total_comment` int(10) NOT NULL COMMENT '图集评论数',\r\n\t\t\t\t\t\t\t\t  `cover_url` varchar(250) NOT NULL COMMENT '图集封面',\r\n\t\t\t\t\t\t\t\t  `path` varchar(250) NOT NULL COMMENT '图集目录',\r\n\t\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL DEFAULT '0' COMMENT '排序id',\r\n\t\t\t\t\t\t\t\t  `auto_cover` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否自动设置封面',\r\n\t\t\t\t\t\t\t\t  `is_namecomment` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否以图片名作为描述',\r\n\t\t\t\t\t\t\t\t  `is_orderby_name` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否以图片名排序',\r\n\t\t\t\t\t\t\t\t  `is_add_water` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否增加水印',\r\n\t\t\t\t\t\t\t\t  `water_id` int(10) NOT NULL DEFAULT '0' COMMENT '所用水印id',\r\n\t\t\t\t\t\t\t\t  `tuji_source` int(10) NOT NULL DEFAULT '0' COMMENT '图集来源',\r\n\t\t\t\t\t\t\t\t  `url` varchar(200) NOT NULL COMMENT '外联',\t\r\n\t\t\t\t\t\t\t\t  `weight` int(10) NOT NULL COMMENT '权重',\t\r\n\t\t\t\t\t\t\t\t  `is_praise` tinyint(1) NOT NULL COMMENT '是否开启赞',\r\n \t\t\t \t\t\t\t  \t  `praise_count` int(11) NOT NULL COMMENT '赞的次数',\r\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t\t  ", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '内容简要', 'type' => 'text'), 2 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 3 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 4 => array('field' => 'ip', 'title' => 'ip', 'type' => 'text')), 'child_table' => 'tuji_pics');
     $ret = $table->create_table($data);
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "tuji_pics", 'field' => "id,expand_id,content_fromid,title,brief,tuji_id,material_id,old_name,new_name,thumb_name,path,total_visit,status,is_cover,create_time,update_time,ip,order_id,pic", 'array_field' => "pic,img_info", 'array_child_field' => "", 'table_title' => "图片", 'field_sql' => "  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t  \t\t\t\t\t\t  `expand_id` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `title` varchar(150) DEFAULT NULL COMMENT '内容标题',\r\n\t\t  \t\t\t\t\t\t  `brief` varchar(500) DEFAULT NULL COMMENT '内容简要',\r\n\t\t  \t\t\t\t\t\t  `tuji_id` int(10) NOT NULL COMMENT '关联图集ID',\r\n\t\t\t\t\t\t\t\t  `material_id` int(10) NOT NULL DEFAULT '0' COMMENT '素材id',\r\n\t\t\t\t\t\t\t\t  `old_name` varchar(250) NOT NULL COMMENT '原始文件名称',\r\n\t\t\t\t\t\t\t\t  `new_name` varchar(250) NOT NULL COMMENT '上传之后的文件名',\r\n\t\t\t\t\t\t\t\t  `thumb_name` varchar(250) NOT NULL COMMENT '缩略图名称',\r\n\t\t\t\t\t\t\t\t  `path` varchar(250) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `total_visit` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `status` tinyint(2) NOT NULL COMMENT '0=>新增 1=>审核通过 2=>软删除 3=>彻底删除',\r\n\t\t\t\t\t\t\t\t  `is_cover` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是封面',\r\n\t\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '上传时间',\r\n\t\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '修改时间',\r\n\t\t\t\t\t\t\t\t  `ip` char(20) NOT NULL COMMENT '上传IP',\r\n\t\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL DEFAULT '0' COMMENT '排序id',\r\n\t\t\t\t\t\t\t\t  `pic` varchar(500) NOT NULL COMMENT '图片串行话',\r\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '内容简要', 'type' => 'text'), 2 => array('field' => 'pic', 'title' => '图片路径', 'type' => 'img'), 3 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 3 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 5 => array('field' => 'ip', 'title' => 'ip', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'name' => "图集库", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => APP_UNIQUEID . '_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0), 2 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "tuji_pics", 'name' => "图片", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'pic_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 1));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 13
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => "article", 'struct_ast_id' => "", 'content_type' => "文稿", 'expand_id' => "", 'content_fromid' => "", 'field' => "id,content_fromid,title,page_title,tcolor,isbold,isitalic,subtitle,keywords,catalog,brief,author,source,indexpic,outlink,weight,state,sort_id,is_img,is_affix,is_video,video_id,column_id,user_id,user_name,order_id,istop,istpl,tpl_file,pub_time,create_time,update_time,ip,iscomm,comm_num,click_num,is_del,water_id,water_name,content,expand_id,appid,appname,other_settings,ori_url,is_praise,praise_count", 'array_field' => "other_settings", 'array_child_field' => "pic", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL ,\r\n\t\t\t\t\t\t\t  `title` varchar(200) NOT NULL COMMENT '标题',\r\n\t\t\t\t\t\t\t  `page_title` varchar(150) NOT NULL COMMENT '分页标题',\r\n\t\t\t\t\t\t\t  `tcolor` varchar(20) NOT NULL COMMENT '标题颜色',\r\n\t\t\t\t\t\t\t  `isbold` tinyint(1) NOT NULL DEFAULT '0' COMMENT '标题是否为粗体。1为加粗,0为不加粗',\r\n\t\t\t\t\t\t\t  `isitalic` tinyint(1) NOT NULL DEFAULT '0' COMMENT '标题是否为斜体。1为斜体,0不是斜体',\r\n\t\t\t\t\t\t\t  `subtitle` varchar(200) NOT NULL COMMENT '副标题',\r\n\t\t\t\t\t\t\t  `keywords` varchar(200) NOT NULL COMMENT '关键词用,隔开',\r\n\t\t\t\t\t\t\t  `catalog` varchar(1000) DEFAULT NULL COMMENT '编目',\r\n\t\t\t\t\t\t\t  `brief` varchar(900) NOT NULL COMMENT '简介',\r\n\t\t\t\t\t\t\t  `author` varchar(30) NOT NULL COMMENT '作者',\r\n\t\t\t\t\t\t\t  `source` varchar(30) NOT NULL COMMENT '文章来源',\r\n\t\t\t\t\t\t\t  `indexpic` int(10) NOT NULL COMMENT '索引图片id',\r\n\t\t\t\t\t\t\t  `outlink` varchar(255) NOT NULL COMMENT '外链',\r\n\t\t\t\t\t\t\t  `weight` smallint(150) NOT NULL COMMENT '权重',\r\n\t\t\t\t\t\t\t  `state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态0-待发布1--发布成功',\r\n\t\t\t\t\t\t\t  `sort_id` int(10) NOT NULL COMMENT '所属分类',\r\n\t\t\t\t\t\t\t  `is_img` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否图片',\r\n\t\t\t\t\t\t\t  `is_affix` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否附件',\r\n\t\t\t\t\t\t\t  `is_video` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否视频',\r\n\t\t\t\t\t\t\t  `video_id` int(10) NOT NULL COMMENT '视频ID,用,',\r\n\t\t\t\t\t\t\t  `column_id` varchar(100) NOT NULL COMMENT '发布的栏目',\r\n\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '发布者id',\r\n\t\t\t\t\t\t\t  `user_name` varchar(30) NOT NULL COMMENT '发布者',\r\n\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL DEFAULT '0' COMMENT '排序ID',\r\n\t\t\t\t\t\t\t  `istop` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否置顶',\r\n\t\t\t\t\t\t\t  `istpl` tinyint(1) NOT NULL COMMENT '是否是独立模板',\r\n\t\t\t\t\t\t\t  `tpl_file` varchar(100) NOT NULL COMMENT '//指定模板文件名',\r\n\t\t\t\t\t\t\t  `pub_time` int(10) NOT NULL COMMENT '发布时间',\r\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '创建时间',\r\n\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '更新时间',\r\n\t\t\t\t\t\t\t  `ip` varchar(60) NOT NULL,\r\n\t\t\t\t\t\t\t  `iscomm` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否准许评论,1准许,0不准许',\r\n\t\t\t\t\t\t\t  `comm_num` int(10) NOT NULL COMMENT '//评论数',\r\n\t\t\t\t\t\t\t  `click_num` int(10) NOT NULL COMMENT '//点击数',\r\n\t\t\t\t\t\t\t  `is_del` tinyint(1) NOT NULL COMMENT '0--删除 1--不删除',\r\n\t\t\t\t\t\t\t  `water_id` int(10) NOT NULL COMMENT '水印ID',\r\n\t\t\t\t\t\t\t  `water_name` varchar(50) NOT NULL COMMENT '水印标识',\r\n\t\t\t\t\t\t\t  `content` longtext NOT NULL COMMENT '内容',\r\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '发布系统',\r\n\t\t\t\t\t\t\t  `appid` int(10) NOT NULL COMMENT '客户端id',\r\n\t\t\t\t\t\t\t  `appname` varchar(50) NOT NULL COMMENT '客户端名称',\r\n\t\t\t\t\t\t\t  `other_settings` varchar(500) NOT NULL COMMENT '其他设置',\r\n\t\t\t\t\t\t\t  `ori_url` varchar(300) NOT NULL COMMENT '原始链接',\r\n\t\t\t\t\t\t\t  `is_praise` tinyint(1) NOT NULL COMMENT '是否开启赞',\r\n \t\t\t \t\t\t\t  `praise_count` int(11) NOT NULL COMMENT '赞的次数',\t\r\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t  ", 'table_title' => "文稿", 'child_table' => "material", 'show_field' => array(array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'keywords', 'title' => '关键词', 'type' => 'text'), array('field' => 'author', 'title' => '作者', 'type' => 'text')));
     $ret = $table->create_table($data);
     //子表
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => "article", 'struct_ast_id' => "material", 'content_type' => "素材", 'expand_id' => "", 'content_fromid' => "", 'field' => "id,cid,expand_id,content_fromid,material_id,name,pic_host,pic_dir,pic_filepath,pic_filename,type,imgwidth,imgheight,filesize,isdel,create_time,ip,remote_url,title,brief,pic", 'array_field' => "pic", 'array_child_field' => "", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t\t  \r\n\t\t\t`cid` int(10) NOT NULL COMMENT '//对应内容id',\r\n\t\t\t\t\t\t  \r\n\t\t\t`expand_id` int(10) NOT NULL COMMENT '//发布系统',\r\n\t\t\t\t\t\t  \r\n\t\t\t`content_fromid` int(10) NOT NULL COMMENT '//原内容id',\r\n\t\t\t\t\t\t  \r\n\t\t\t`material_id` int(10) NOT NULL COMMENT '图片服务器的素材ID',\r\n\t\t\t\t\t\t  \r\n\t\t\t`name` varchar(40) NOT NULL COMMENT '图片名称',\r\n\t\t\t\t\t\t  \r\n\t\t\t`pic_host` varchar(200) NOT NULL COMMENT 'host',\r\n\t\t\t\t\t\t  \r\n\t\t\t`pic_dir` varchar(100) NOT NULL COMMENT 'dir',\r\n\t\t\t\t\t\t  \r\n\t\t\t`pic_filepath` varchar(100) NOT NULL COMMENT '原图的存储路径',\r\n\t\t\t\t\t\t  \r\n\t\t\t`pic_filename` varchar(40) NOT NULL COMMENT '文件名称',\r\n\t\t\t\t\t\t  \r\n\t\t\t`type` varchar(10) NOT NULL COMMENT '图片类型',\r\n\t\t\t\t\t\t  \r\n\t\t\t`imgwidth` smallint(4) NOT NULL COMMENT '图片宽度',\r\n\t\t\t\t\t\t  \r\n\t\t\t`imgheight` smallint(4) NOT NULL COMMENT '图片高度',\r\n\t\t\t\t\t\t  \r\n\t\t\t`filesize` int(10) NOT NULL COMMENT '图片大小',\r\n\t\t\t\t\t\t \r\n\t\t\t`isdel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否删除0-是 1- 否',\r\n\t\t\t\t\t\t  \r\n\t\t\t`create_time` int(10) NOT NULL,\r\n\t\t\t\t\t\t  \r\n\t\t\t`ip` varchar(60) NOT NULL,\r\n\t\t\t\t\t\t  \r\n\t\t\t`remote_url` varchar(200) NOT NULL COMMENT '图片原始远程地址',\r\n\t\t\t\t\t\t  \r\n\t\t\t`title` varchar(200) NOT NULL COMMENT '标题',\r\n\t\t\t\t\t\t  \r\n\t\t\t`brief` varchar(400) NOT NULL COMMENT '标题',\r\n\t\t\t\t\t\t  \r\n\t\t\t`pic` varchar(500) NOT NULL COMMENT '图片穿行话',\r\n\t\t\t\t\t\t  \r\n\t\t\tPRIMARY KEY (`id`)", 'table_title' => "素材", 'child_table' => "", 'show_field' => array(array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'name', 'title' => '图片名称', 'type' => 'text'), array('field' => 'pic', 'title' => '图片', 'type' => 'img'), array('field' => 'remote_url', 'title' => '图片原始远程地址', 'type' => 'text')));
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => "article", 'struct_ast_id' => "", 'name' => '文稿', 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'news_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0), 2 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => "article", 'struct_ast_id' => "material", 'name' => "素材", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'material_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 1));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 14
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $table = new publishcontent();
     //主表
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'field' => "id,expand_id,content_fromid,title,brief,img,update_status,update_speed,playcount,duration,status,type,play_sort_id,district,year,lang,director,main_performer,awards,publisher,copyright_limit,user_id,user_name,org_id,create_time,update_time,ip,order_id,url,weight", 'array_field' => "img", 'array_child_field' => "img", 'table_title' => "电视剧", 'content_type' => "电视剧", 'field_sql' => "  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t  \t\t\t\t\t\t  `expand_id` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\r\n\t\t\t\t\t\t\t\t  `title` varchar(60) NOT NULL COMMENT '电视剧名称',\r\n\t\t\t\t\t\t\t\t  `brief` text NOT NULL COMMENT '简介',\r\n\t\t\t\t\t\t\t\t  `img` varchar(256) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `update_status` int(10) NOT NULL COMMENT '更新状态',\r\n\t\t\t\t\t\t\t\t  `update_speed` int(10) NOT NULL COMMENT '更新速度',\r\n\t\t\t\t\t\t\t\t  `playcount` int(11) NOT NULL COMMENT '剧集总数',\r\n\t\t\t\t\t\t\t\t  `duration` int(10) NOT NULL COMMENT '每集时长',\r\n\t\t\t\t\t\t\t\t  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',\r\n\t\t\t\t\t\t\t\t  `type` varchar(60) NOT NULL COMMENT '电视剧类型相当于关键字',\r\n\t\t\t\t\t\t\t\t  `play_sort_id` int(10) NOT NULL COMMENT '电视剧分类',\r\n\t\t\t\t\t\t\t\t  `district` int(10) NOT NULL COMMENT '所属地区',\r\n\t\t\t\t\t\t\t\t  `year` varchar(20) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `lang` int(10) NOT NULL COMMENT '语言',\r\n\t\t\t\t\t\t\t\t  `director` varchar(60) NOT NULL COMMENT '导演',\r\n\t\t\t\t\t\t\t\t  `main_performer` varchar(60) NOT NULL COMMENT '主演',\r\n\t\t\t\t\t\t\t\t  `awards` text NOT NULL COMMENT '所获奖项',\r\n\t\t\t\t\t\t\t\t  `publisher` varchar(60) NOT NULL COMMENT '版权商',\r\n\t\t\t\t\t\t\t\t  `copyright_limit` int(10) NOT NULL COMMENT '版权期限',\r\n\t\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `user_name` varchar(60) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `org_id` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `ip` varchar(20) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `url` varchar(200) NOT NULL COMMENT '外链',\r\n\t\t\t\t\t\t\t\t  `weight` int(10) NOT NULL COMMENT '权重',\r\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\r\n\t\t\t\t\t\t\t\t  KEY `content_fromid` (`content_fromid`),\r\n\t\t\t\t\t\t\t\t  KEY expand_id (expand_id)\r\n\t\t\t\t\t\t\t\t  ", 'show_field' => array(0 => array('field' => 'title', 'title' => '标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '内容简要', 'type' => 'text'), 2 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 3 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 4 => array('field' => 'ip', 'title' => 'ip', 'type' => 'text'), 5 => array('field' => 'img', 'title' => '电视剧封面', 'type' => 'img')), 'child_table' => 'tv_episode');
     $ret = $table->create_table($data);
     //子表
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => 'tv_episode', 'field' => "id,expand_id,content_fromid,title,brief,tv_play_id,video_id,img,index_num,user_name,user_id,org_id,create_time,update_time,ip,url", 'array_field' => "img", 'array_child_field' => "", 'table_title' => "剧集", 'field_sql' => "  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n\t\t  \t\t\t\t\t\t  `expand_id` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\r\n\t\t  \t\t\t\t\t\t  `title` varchar(150) DEFAULT NULL COMMENT '内容标题',\r\n\t\t  \t\t\t\t\t\t  `brief` varchar(500) DEFAULT NULL COMMENT '内容简要',\r\n\t\t\t\t\t\t\t\t  `tv_play_id` int(10) NOT NULL COMMENT '所属的电视剧id',\r\n\t\t\t\t\t\t\t\t  `video_id` int(10) NOT NULL COMMENT '对应视频库里面的视频的id',\r\n\t\t\t\t\t\t\t\t  `img` varchar(255) NOT NULL COMMENT '剧集的索引图',\r\n\t\t\t\t\t\t\t\t  `index_num` int(10) NOT NULL COMMENT '剧集索引',\r\n\t\t\t\t\t\t\t\t  `user_name` varchar(20) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `user_id` int(11) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `org_id` int(11) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `ip` varchar(20) NOT NULL,\r\n\t\t\t\t\t\t\t\t  `url` varchar(200) NOT NULL COMMENT '外链',\r\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'show_field' => array(0 => array('field' => 'title', 'title' => '剧集标题', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '内容简要', 'type' => 'text'), 2 => array('field' => 'img', 'title' => '剧集图片', 'type' => 'img'), 3 => array('field' => 'user_name', 'title' => '添加人', 'type' => 'text'), 3 => array('field' => 'create_time', 'title' => '创建时间', 'type' => 'text'), 5 => array('field' => 'ip', 'title' => 'ip', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'name' => "电视剧", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => APP_UNIQUEID . '_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0), 2 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "tv_episode", 'name' => "剧集", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => 'tv_episode_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 1));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 15
0
 protected function media2url($media = array())
 {
     $content = '';
     if (!$media['media_id']) {
         return $content;
     }
     $media_id = $media['media_id'];
     switch ($media['type']) {
         case 'vod':
             require_once ROOT_PATH . 'lib/class/publishcontent.class.php';
             $publish_content = new publishcontent();
             $content = $publish_content->get_content(array('content_id' => $media_id));
             $content = $content[0]['content_url'];
             break;
         case 'live':
             $content = $this->get_channel_url($media_id);
             break;
     }
     return $content;
 }
Esempio n. 16
0
 public function columnUrl()
 {
     $intColumnId = intval($this->input['column_id']);
     if (!$intColumnId) {
         $this->errorOutput('NO COLUMN_ID');
     }
     $sql = "SELECT col.id,col.special_id,col.column_name,col.outlink,spe.column_url\n                FROM " . DB_PREFIX . "special_columns col \n                LEFT JOIN " . DB_PREFIX . "special spe\n                    ON col.special_id = spe.id \n                WHERE 1 AND col.id = " . $intColumnId;
     $arColumnInfo = $this->db->query_first($sql);
     if (!empty($arColumnInfo)) {
         if (!$arColumnInfo['outlink']) {
             $arColumnInfo['column_url'] = $arColumnInfo['column_url'] ? unserialize($arColumnInfo['column_url']) : array();
             $intContentId = array_pop($arColumnInfo['column_url']);
             if (!class_exists('publishcontent')) {
                 include ROOT_PATH . 'lib/class/publishcontent.class.php';
             }
             $objPublishContent = new publishcontent();
             $arSpecialInfo = $objPublishContent->get_content_by_rid($intContentId);
             $arColumnInfo['column_url'] = $arSpecialInfo['content_url'];
             $arColumnInfo['column_url'] = explode('/', $arColumnInfo['column_url']);
             array_pop($arColumnInfo['column_url']);
             $arColumnInfo['column_url'] = implode('/', $arColumnInfo['column_url']);
             $arColumnInfo['column_url'] = $arColumnInfo['column_url'] ? rtrim($arColumnInfo['column_url'], '/') . '/' . $arColumnInfo['id'] . '_list.html' : '';
             if (!$arColumnInfo['column_url']) {
                 $arColumnInfo['column_url'] = COLURL . $arColumnInfo['id'];
             }
         } else {
             $arColumnInfo['column_url'] = $arColumnInfo['outlink'];
         }
     }
     $this->addItem($arColumnInfo['column_url']);
     $this->output();
 }
Esempio n. 17
0
     $ret = $table->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
 //在发布系统里面创建表
 public function create_tuji_pics_publish_table()
 {
     $table = new publishcontent();
Esempio n. 18
0
 /**
  * 在发布系统里面创建表
  */
 public function create_table()
 {
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "channel", 'struct_ast_id' => "", 'field' => "id,expand_id,content_fromid,title,brief,outlink,code,logo_rectangle,is_mobile_phone,is_audio,stream_name", 'array_field' => "", 'array_child_field' => "", 'table_title' => "直播频道", 'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL,\n\t\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL,\n\t\t\t\t\t\t\t\t  `title` varchar(128) NOT NULL,\n\t\t\t\t\t\t\t\t  `brief` varchar(512) NOT NULL,\n\t\t\t\t\t\t\t\t  `outlink` varchar(256) NOT NULL,\n\t\t\t\t\t\t\t\t  `code` char(20) NOT NULL,\n\t\t\t\t\t\t\t\t  `logo_rectangle` varchar(512) NOT NULL,\n\t\t\t\t\t\t\t\t  `is_mobile_phone` tinyint(1) NOT NULL,\n\t\t\t\t\t\t\t\t  `is_audio` tinyint(1) NOT NULL,\n\t\t\t\t\t\t\t\t  `stream_name` varchar(512) NOT NULL,\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`) ", 'show_field' => array(0 => array('field' => 'title', 'title' => '频道名称', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 19
0
 public function create_group_publish_table()
 {
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "group", 'struct_ast_id' => "", 'field' => "id,cuser_id,cuser_name,content_fromid,title,brief,outlink,lat,lng,b_lat,g_lng,create_time,update_time", 'array_field' => "", 'table_title' => "圈子", 'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,\n  \t\t\t\t\t\t\t\t  `cuser_id` int(10) NOT NULL DEFAULT '0' COMMENT '空间创建人id',\n  \t\t\t\t\t\t\t\t  `cuser_name` varchar(60) NOT NULL DEFAULT '' COMMENT '创建人昵称',\n\t\t  \t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\n\t\t  \t\t\t\t\t\t  `title` varchar(150) DEFAULT NULL COMMENT '圈子名',\n\t\t  \t\t\t\t\t\t  `brief` varchar(500) DEFAULT NULL COMMENT '圈子简介',\t\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t\t  `outlink` varchar(200) DEFAULT NULL COMMENT '外链',\n  \t\t\t\t\t\t\t\t  `lat` float(17,14) NOT NULL COMMENT '圈子所在的纬度',\n  \t\t\t\t\t\t\t\t  `lng` float(17,14) NOT NULL COMMENT '圈子所在的精度',\n  \t\t\t\t\t\t\t\t  `b_lat` float(17,14) NOT NULL COMMENT '百度地图的纬度',\n  \t\t\t\t\t\t\t\t  `g_lng` float(17,14) NOT NULL COMMENT '百度地图的精度',\n   \t\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',\n  \t\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'show_field' => array(0 => array('field' => 'title', 'title' => '用户名', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '表述', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 20
0
 /**
  *
  * 获取引用素材的索引图 标题 引用 栏目
  * @param int $option_id
  */
 public function get_quote($rids)
 {
     if (!$rids) {
         return false;
     }
     require_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $pub = new publishcontent();
     $pubs = new publishcontent();
     $ret = $pub->get_content_by_rids($rids);
     $return = $pubs->get_pub_content_type();
     if (!$ret) {
         return false;
     }
     if (is_array($return)) {
         foreach ($return as $k => $v) {
             $bundles[$v['bundle']] = $v['name'];
         }
     }
     if (is_array($ret)) {
         foreach ($ret as $k => $v) {
             $quote[$v['rid']] = array('id' => $v['rid'], 'title' => $v['title'], 'brief' => $v['brief'], 'bundle_id' => $v['bundle_id'], 'module_id' => $v['module_id'], 'content_url' => $v['content_url'], 'content_fromid' => $v['content_fromid'], 'img_info' => hg_material_link($v['indexpic']['host'], $v['indexpic']['dir'], $v['indexpic']['filepath'], $v['indexpic']['filename']), 'pic_arr' => $v['indexpic'], 'upload_type' => '引用', 'module_name' => $bundles[$v['bundle_id']]);
         }
     }
     return $quote;
 }
Esempio n. 21
0
 public function dingdoneSetClickNum()
 {
     $click_num = intval($this->input['click_num']);
     $module_bundle = trim($this->input['module_bundle']);
     $app_bundle = trim($this->input['app_bundle']);
     $source_id = intval($this->input['source_id']);
     $publish_id = intval($this->input['publish_id']);
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $publishcontent_class = new publishcontent();
     $ret = $publishcontent_class->get_content_by_other($source_id, $app_bundle, $module_bundle);
     $content_fromid = $ret[0]['content_fromid'];
     $cid = $ret[0]['content_id'];
     //对叮当旧数据需要做兼容 content_fromid 为0
     $jianrong_sql = "select * from " . DB_PREFIX . "nums where module_bundle = '" . $module_bundle . "' and cid = " . $cid . " and content_fromid = 0";
     $temp_info = $this->db->query_first($jianrong_sql);
     if ($temp_info) {
         $update_temp_sql = "update " . DB_PREFIX . "nums set content_fromid = " . $source_id . " where cid = " . $cid;
         $this->db->query($update_temp_sql);
     }
     //验证消息是否正确
     //source source_id publish_id
     $select_sql = "select * from " . DB_PREFIX . "nums where module_bundle = '" . $module_bundle . "' and content_fromid = " . $source_id;
     $now_nums = $this->db->query_first($select_sql);
     $content_info = $publishcontent_class->get_content_by_cid($cid);
     $title = $content_info[$cid]['title'];
     if (!$ret) {
         $this->errorOutput(FAILED);
     }
     if ($now_nums) {
         //更新nums表
         $update_sql = "update " . DB_PREFIX . "nums set access_nums = " . $click_num . " where module_bundle = '" . $module_bundle . "' and content_fromid = " . $source_id;
         $this->db->query($update_sql);
     } else {
         $insert_sql = 'INSERT INTO ' . DB_PREFIX . "nums (app_bundle, module_bundle, content_fromid,cid, title, access_nums, last_sync_time, is_sync, url, create_time, update_time) VALUES\r\n\t\t\t('{$app_bundle}', '{$module_bundle}', '{$content_fromid}', '{$cid}' ,'{$title}', " . $click_num . ", " . TIMENOW . ", '0', '', " . TIMENOW . ", " . TIMENOW . ")";
         $this->db->query($insert_sql);
     }
     //更新发布库和对应的source库
     include_once ROOT_PATH . 'lib/class/curl.class.php';
     $settings = $this->settings['App_' . $app_bundle];
     if ($settings) {
         if (empty($this->pub_content_bundle)) {
             $this->publishcontent = new publishcontent();
             $content_type = $this->publishcontent->get_all_content_type();
             $this->pub_content_bundle = array();
             foreach ((array) $content_type as $k => $v) {
                 $this->pub_content_bundle[] = $v['bundle_id'];
             }
         }
         //取原始内容id
         if ($app_bundle && in_array($app_bundle, (array) $this->pub_content_bundle)) {
             //去文稿、图集等应用同步访问数时 随便把统计库标题更新调  防止发布库统计库不一致(依然有时间差)
             $title = $ret[0]['title'];
             $curl = new curl($settings['host'], $settings['dir'] . 'admin/');
             $curl->setSubmitType('post');
             $curl->setReturnFormat('json');
             $curl->initPostData();
             $curl->addRequestData('a', 'access_sync');
             $curl->addRequestData('id', $content_fromid);
             switch ($app_bundle) {
                 case 'livmedia':
                     $filename = 'vod';
                     break;
                 default:
                     $filename = $app_bundle;
                     break;
             }
             $curl->addRequestData('click_num', $click_num);
             $q = $curl->request($filename . '_update.php');
             //同步到发布库
             $this->publishcontent = new publishcontent();
             //get_content_by_cid把$this->curl更改  需要重新实例化
             $data = array('click_num' => $click_num);
             $this->publishcontent->update_content_by_cid($ret[0]['content_id'], $data);
         }
     }
     $this->addItem(array('return' => 1));
     $this->output();
 }
Esempio n. 22
0
 public function create_status_publish_table()
 {
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "mblog_status", 'struct_ast_id' => "", 'field' => "id,expand_id,content_fromid,title,brief,outlink", 'array_field' => "", 'table_title' => "帖子", 'field_sql' => "  `id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t  \t\t\t\t\t\t  `expand_id` int(10) DEFAULT NULL,\n\t\t  \t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\n\t\t  \t\t\t\t\t\t  `title` varchar(150) DEFAULT NULL COMMENT '帖子名',\n\t\t  \t\t\t\t\t\t  `brief` varchar(500) DEFAULT NULL COMMENT '帖子简介',\t\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t\t  `outlink` varchar(200) DEFAULT NULL COMMENT '外链',\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'show_field' => array(0 => array('field' => 'title', 'title' => '帖子名', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $this->addItem($ret);
     $this->output();
 }
Esempio n. 23
0
<?php

header('Content-Type: text/xml; charset=UTF-8');
define('M2O_ROOT_PATH', '../');
@(include_once M2O_ROOT_PATH . 'global.php');
//include(M2O_ROOT_PATH . 'lib/class/curl.class.php');
include M2O_ROOT_PATH . 'lib/class/publishcontent.class.php';
$id = intval($_INPUT['extend']);
if ($id) {
    $limits = 10;
    $con = array('liv_cel_id' => $liv_cel_id, 'sort_field' => $sort_field, 'sort_type' => $sort_type ? $sort_type : 'ASC', 'bundle_id' => 'livmedia', 'module_id' => 'vod', 'need_video' => 'vod');
    $con['is_have_indexpic'] = 1;
    $obj = new publishcontent();
    $content = $obj->get_content($id);
    $con['exclude_id'] = $content['cid'];
    if ($content['column_id']) {
        $con['column_id'] = $content['column_id'];
    }
    if ($content['keywords']) {
        $con['keywords'] = $content['keywords'];
        $liv_data = $obj->get_content_condition($columnid, $weight, $offset, $limits, $con);
        if ($liv_data && is_array($liv_data)) {
            echo '<recommend imgBaseUrl="">';
            foreach ($liv_data as $v) {
                $img = web_get_pic_url($v['indexpic'], '80', '60');
                $link = $v['content_url'];
                $rep = array('"', '<', '>');
                $exp = array("'", '《', '》');
                $v['title'] = str_replace($rep, $exp, $v['title']);
                echo '<item id="' . $link . '" title="' . $v['title'] . '" img="' . $img . '" count="' . $v['click_num'] . '" duration="' . $v['video']['duration'] . '"/>';
            }
Esempio n. 24
0
 public function get_published_content_byid($id)
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $publish_server = new publishcontent();
     return $publish_server->get_content_by_rid($id);
 }
Esempio n. 25
0
 public function create_publish_table()
 {
     include_once ROOT_PATH . 'lib/class/publishcontent.class.php';
     $obj = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'content_type' => "专题", 'field' => "id,content_fromid,name,tcolor,sort_id,isbold,isbold,link,order_id,keywords,pic,brief,weight,status,other_settings,use_id,user_name,create_time,update_time,ip,pub_time,expand_id,column_id,colunmn_url", 'array_field' => "pic", 'array_child_field' => "pic", 'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t  `content_fromid` int(10) NOT NULL ,\n\t\t\t\t\t\t\t  `name` varchar(200) NOT NULL COMMENT '标题',\n\t\t\t\t\t\t\t  `tcolor` varchar(20) NOT NULL COMMENT '标题颜色',\n\t\t\t\t\t\t\t  `isbold` tinyint(1) NOT NULL DEFAULT '0' COMMENT '标题是否为粗体。1为加粗,0为不加粗',\n\t\t\t\t\t\t\t  `isitalic` tinyint(1) NOT NULL DEFAULT '0' COMMENT '标题是否为斜体。1为斜体,0不是斜体',\n\t\t\t\t\t\t\t  `sort_id` int(10) NOT NULL COMMENT '所属分类',\n\t\t\t\t\t\t\t  `link` varchar(100) NOT NULL COMMENT '专题链接',\n\t\t\t\t\t\t\t  `order_id` int(10) NOT NULL DEFAULT '0' COMMENT '排序ID',\n\t\t\t\t\t\t\t  `keywords` varchar(200) NOT NULL COMMENT '关键词用,隔开',\n\t\t\t\t\t\t\t  `pic` text NOT NULL COMMENT '专题索引图',\n\t\t\t\t\t\t\t  `brief` varchar(300) NOT NULL COMMENT '简介',\n\t\t\t\t\t\t\t  `weight` smallint(150) NOT NULL COMMENT '权重',\n\t\t\t\t\t\t\t  `state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态0-待发布1--发布成功',\n\t\t\t\t\t\t\t  `other_settings` varchar(500) NOT NULL COMMENT '其他设置',\n\t\t\t\t\t\t\t  `user_id` int(10) NOT NULL COMMENT '发布者id',\n\t\t\t\t\t\t\t  `user_name` varchar(30) NOT NULL COMMENT '发布者',\n\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '创建时间',\n\t\t\t\t\t\t\t  `update_time` int(10) NOT NULL COMMENT '更新时间',\n\t\t\t\t\t\t\t  `ip` varchar(60) NOT NULL,\n\t\t\t\t\t\t\t  `pub_time` int(10) NOT NULL COMMENT '发布时间',\n\t\t\t\t\t\t\t  `expand_id` int(10) NOT NULL COMMENT '发布系统',\n\t\t\t\t\t\t\t  `column_id` varchar(100) NOT NULL COMMENT '发布的栏目',\n\t\t\t\t\t\t\t  `column_url` varchar(1000) NOT NULL,\n\t\t\t\t\t\t\t  PRIMARY KEY (`id`),\n\t\t\t\t\t\t\t  KEY `sort_id` (`sort_id`),\n\t\t\t\t\t\t\t  KEY `state` (`state`),\n\t\t\t\t\t\t\t  KEY `order_id` (`order_id`),\n\t\t\t\t\t\t\t  KEY `create_time` (`create_time`)", 'table_title' => "专题", 'child_table' => "", 'show_field' => array(array('field' => 'title', 'title' => '标题', 'type' => 'text'), array('field' => 'brief', 'title' => '简介', 'type' => 'text'), array('field' => 'keywords', 'title' => '关键词', 'type' => 'text')));
     $ret = $obj->create_table($data);
     /**
     $data = array(
     	'bundle_id' => APP_UNIQUEID,
     	'module_id' => APP_UNIQUEID,
     	'struct_id' => APP_UNIQUEID,
     	'struct_ast_id' => "special_material",
     	'content_type' => "",
     	'field' => "id,content_fromid,name,material_id,special_id,filename,host,dir,filepath,type,mark,filesize,del,create_time,ip,expand_id,column_id",
     	'array_field' => "",
     	'array_child_field' => "",
     	'field_sql' => "`id` int(10) NOT NULL AUTO_INCREMENT,
     					 `material_id` int(10) NOT NULL COMMENT '素材id',
     					  `special_id` int(10) NOT NULL COMMENT '专题id',
     					  `name` varchar(40) NOT NULL COMMENT '图片名称',
     					  `material` text NOT NULL,
     					  `type` varchar(10) NOT NULL COMMENT '附件扩展名',
     					  `mark` varchar(30) NOT NULL COMMENT '附件类型',
     					  `filesize` int(10) NOT NULL COMMENT '图片大小',
     					  `del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1已删除0未删除',
     					  `create_time` int(10) NOT NULL,
     					  `ip` varchar(60) NOT NULL,
     					  `column_id` varchar(100) NOT NULL COMMENT '发布的栏目id',
     					  `expand_id` int(10) NOT NULL COMMENT '在发布系统中的id',
     					  PRIMARY KEY (`id`),
     					  KEY `special_id` (`special_id`)",
     
     	'table_title' => "专题",
     	'child_table' => "special_material",
     	'show_field' => array(
     			array('field'=>'name','title'=>'素材名','type'=>'text'),
     			array('field'=>'brief','title'=>'简介','type'=>'text'),
     		),			
     );
     
     //$ret = $obj->create_table($data);
     
     $data = array(
     	'bundle_id' => APP_UNIQUEID,
     	'module_id' => APP_UNIQUEID,
     	'struct_id' => APP_UNIQUEID,
     	'struct_ast_id' => "special_summary",
     	'content_type' => "",
     	'field' => "id,content_fromid,title,content,special_id,del,create_time,ip,expand_id,column_id",
     	'array_field' => "",
     	'array_child_field' => "",
     	'field_sql' => "`id` int(11) NOT NULL AUTO_INCREMENT,
     					  `special_id` int(10) NOT NULL COMMENT '专题id',
     					  `title` varchar(100) NOT NULL COMMENT '标题',
     					  `content` text NOT NULL COMMENT '概要内容',
     					  `del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1已删除0未删除',
     					   PRIMARY KEY (`id`)",
     
     	'table_title' => "专题",
     	'child_table' => "special_summary",
     	'show_field' => array(
     			array('field'=>'title','title'=>'概要名','type'=>'text'),
     			array('field'=>'content','title'=>'概要内容','type'=>'text'),
     		),			
     );
     
     //$ret = $obj->create_table($data);
     */
     $data = array(1 => array('bundle_id' => APP_UNIQUEID, 'module_id' => APP_UNIQUEID, 'struct_id' => APP_UNIQUEID, 'struct_ast_id' => "", 'name' => "专题", 'host' => $this->input['apihost'], 'path' => $this->input['apidir'] . 'admin/', 'filename' => APP_UNIQUEID . '_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     include_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     $this->addItem_withkey('message', 'success');
     $this->addItem_withkey('ret', $ret);
     $this->output();
 }
Esempio n. 26
0
 public function create_activity_publish_table()
 {
     $table = new publishcontent();
     $data = array('bundle_id' => APP_UNIQUEID, 'module_id' => MOD_UNIQUEID, 'struct_id' => "activity", 'struct_ast_id' => "", 'field' => "id,content_fromid,cuser_id,cuser_name,action_sort,type_id,start_time,end_time,place,need_pay,need_num,introduce,slogan,yet_join,apply_num,collect_num,concern,contact,rights,link,swfurl,media_id,edit_count,create_time,is_open,bus,connection_user,connection_group,state,lat,lng", 'array_field' => "", 'table_title' => "活动", 'field_sql' => "  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '发起活动的主键',\n\t\t\t\t\t\t\t\t  `content_fromid` int(10) DEFAULT NULL,\n\t\t\t\t\t\t\t\t  `cuser_id` int(10) NOT NULL COMMENT '用户关联标识',\n\t\t\t\t\t\t\t\t  `cuser_name` varchar(100) NOT NULL COMMENT '发起活动的名字',\n\t\t\t\t\t\t\t\t  `action_name` varchar(100) NOT NULL COMMENT '活动的主题',\n\t\t\t\t\t\t\t\t  `action_sort` tinyint(1) DEFAULT '0' COMMENT '活动种类(0:线上,1:线下)',\n\t\t\t\t\t\t\t\t  `type_id` int(10) DEFAULT NULL COMMENT '活动类型',\n\t\t\t\t\t\t\t\t  `start_time` int(10) NOT NULL COMMENT '活动的开始时间',\n\t\t\t\t\t\t\t\t  `end_time` int(10) NOT NULL COMMENT '活动的截止时间',\n\t\t\t\t\t\t\t\t  `place` varchar(200) NOT NULL COMMENT '活动的具体地点',\n\t\t\t\t\t\t\t\t  `need_pay` int(5) NOT NULL COMMENT '判断是否需要花销0:不要 有内容:要',\n\t\t\t\t\t\t\t\t  `need_num` int(5) NOT NULL COMMENT '活动人数的上限',\n\t\t\t\t\t\t\t\t  `introduce` mediumtext NOT NULL COMMENT '对活动的描述',\n\t\t\t\t\t\t\t\t  `slogan` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '宣言',\n\t\t\t\t\t\t\t\t  `yet_join` int(5) NOT NULL DEFAULT '0' COMMENT '已经通过审核的人数',\n\t\t\t\t\t\t\t\t  `apply_num` int(5) NOT NULL DEFAULT '0' COMMENT '已经申请的人数',\n\t\t\t\t\t\t\t\t  `collect_num` int(11) DEFAULT '0' COMMENT '收藏次数',\n\t\t\t\t\t\t\t\t  `concern` tinyint(1) DEFAULT '0' COMMENT '对于是否关注该地盘(活动发起者) 0:不要,1:要',\n\t\t\t\t\t\t\t\t  `contact` tinyint(1) DEFAULT '0' COMMENT '对联系方式的要求 0:不要,1:要',\n\t\t\t\t\t\t\t\t  `rights` tinyint(1) DEFAULT '0' COMMENT '对权限审核的要求 0:不要,1:要',\n\t\t\t\t\t\t\t\t  `link` varchar(250) NOT NULL COMMENT '活动视频链接',\n\t\t\t\t\t\t\t\t  `swfurl` varchar(255) NOT NULL COMMENT '视频地址',\n\t\t\t\t\t\t\t\t  `media_id` int(11) NOT NULL COMMENT '关联微博的媒体ID,用于发布微博时封面为分享图片',\n\t\t\t\t\t\t\t\t  `edit_count` tinyint(1) DEFAULT '0' COMMENT '编辑次数',\n\t\t\t\t\t\t\t\t  `create_time` int(10) NOT NULL COMMENT '活动的创建时间',\n\t\t\t\t\t\t\t\t  `is_open` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启圈子',\n\t\t\t\t\t\t\t\t  `bus` text NOT NULL COMMENT '路线',\n\t\t\t\t\t\t\t\t  `connection_user` char(100) NOT NULL DEFAULT '' COMMENT '相关管理人员id用'',''隔开',\n\t\t\t\t\t\t\t\t  `connection_group` char(100) NOT NULL COMMENT '相关管理圈子id用'',''隔开',\n\t\t\t\t\t\t\t\t  `state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0未审核1已审核2关闭',\n\t\t\t\t\t\t\t\t  `lat` float(17,14) NOT NULL DEFAULT '32.03966522216797',\n\t\t\t\t\t\t\t\t  `lng` float(17,14) NOT NULL DEFAULT '118.80860137939453',\n\t\t\t\t\t\t\t\t  PRIMARY KEY (`id`)", 'show_field' => array(0 => array('field' => 'title', 'title' => '用户名', 'type' => 'text'), 1 => array('field' => 'brief', 'title' => '表述', 'type' => 'text')), 'child_table' => '');
     $ret = $table->create_table($data);
     $this->addItem($ret);
     $this->output();
 }