Example #1
0
 public function verifyToken()
 {
 }
 private function publish_video($id, $op, $column_id = array())
 {
     $id = intval($id);
     if (empty($id)) {
         return false;
     }
     if (empty($op)) {
         return false;
     }
     $sql = "select * from " . DB_PREFIX . "vodinfo where id = " . $id;
     $info = $this->db->query_first($sql);
     if (empty($column_id)) {
         $info['column_id'] = unserialize($info['column_id']);
         if (is_array($info['column_id'])) {
             $column_id = array_keys($info['column_id']);
             $column_id = implode(',', $column_id);
         }
     } else {
         $column_id = implode(',', $column_id);
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => PUBLISH_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $column_id, 'title' => $info['title'], 'action_type' => $op, 'publish_time' => $info['pub_time'], 'publish_people' => $this->user['user_name'], 'ip' => hg_getip());
Example #2
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();
 }
Example #3
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();
 }
Example #4
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();
 }
Example #5
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();
 }
Example #6
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();
 }
Example #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' => 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();
 }
Example #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' => 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();
 }
Example #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' => 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();
 }
Example #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' => 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();
 }
Example #11
0
 /**
  *  发布系统,将文章内容插入发布队列
  *  
  *  @name 		publist_insert_article()
  *  @access 		public
  *  @author 		hanwenbin
  *  @category	hogesoft
  *  @copyright	hogesoft
  *  @param		int $id   文章id
  *  @param		int $op 		  操作类型  insert update delete
  */
 public function publish_insert_article()
 {
     $id = intval($this->input['id']);
     //文章id
     $op = urldecode($this->input['op']);
     //操作
     if (empty($id)) {
         return false;
     }
     if (empty($op)) {
         return false;
     }
     $sql = "select * from " . DB_PREFIX . "article where id = " . $id;
     $info = $this->db->query_first($sql);
     $issue_id = $info['issue_id'];
     $sql = "select expand_id from " . DB_PREFIX . "issue where id = " . $issue_id;
     $res = $this->db->query_first($sql);
     //期刊所属杂志如果没有发布,期刊不能发布
     if (!$res['expand_id']) {
         return false;
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => ARTICLE_PLAN_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $info['column_id'], 'title' => $info['title'], 'action_type' => $op, 'publish_time' => $info['pub_date'], 'publish_people' => urldecode($this->user['user_name']), 'ip' => hg_getip(), 'is_publish_child' => 1);
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #12
0
 /**
  *  发布系统,将内容传入发布队列
  *  
  */
 public function publish_insert_query($id, $op, $column_id = array(), $child_queue = 0, $user_name = "")
 {
     $id = intval($id);
     if (empty($id)) {
         return false;
     }
     if (empty($op)) {
         return false;
     }
     $sql = "SELECT * FROM " . DB_PREFIX . "member WHERE id = " . $id;
     $info = $this->db->query_first($sql);
     if (empty($column_id)) {
         $info['column_id'] = unserialize($info['column_id']);
         if (is_array($info['column_id'])) {
             $column_id = array_keys($info['column_id']);
             $column_id = implode(',', $column_id);
         }
     } else {
         $column_id = implode(',', $column_id);
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => MEMBER_PLAN_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $column_id, 'title' => $info['member_name'], 'action_type' => $op, 'publish_time' => $info['pub_time'], 'publish_people' => $user_name, 'ip' => hg_getip());
     if ($child_queue) {
         $data['set_id'] = MEMBER_PLAN_SET_ID;
     }
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #13
0
 public function publish_insert_contribute()
 {
     $id = intval($this->input['id']);
     //爆料id
     $op = urldecode($this->input['op']);
     //操作
     if (empty($id)) {
         return false;
     }
     if (empty($op)) {
         return false;
     }
     $sql = "select * from " . DB_PREFIX . "content where id = " . $id;
     $info = $this->db->query_first($sql);
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => CONTRIBUTE_PLAN_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $info['column_id'], 'title' => $info['title'], 'action_type' => $op, 'publish_time' => TIMENOW, 'publish_people' => urldecode($this->user['user_name']), 'ip' => hg_getip());
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #14
0
 /**
  * 
  * 插入发布计划配置
  * 
  * @name		insert_plan_set
  * @access		public 
  * @author		gaoyuan
  * @category	hogesoft
  * @copyright	hogesoft
  * 
  */
 public function insert_plan_set()
 {
     $data = array(1 => array('bundel_id' => 'webvod', 'module_id' => 'webvod', 'struct_id' => 'webvod', 'name' => 'WEB视频', 'host' => 'localhost', 'path' => 'livsns/api/webvod/admin/', 'filename' => 'webvod_publish.php', 'action_get_content' => 'get_content', 'action_insert_contentid' => 'update_content', 'fid' => 0));
     require_once ROOT_PATH . 'livsns/lib/class/publishplan.class.php';
     $plan = new publishplan();
     $ret = $plan->insert_plan_set($data);
     //返回配置ID,某种方式更改
     $sql = "insert into " . DB_PREFIX . "settings (type,var_name,value,description,is_edit,is_open) values(2,'PUBLISH_SET_ID',{$ret['1']},'',1,1)";
     $this->db->query($sql);
     $this->addItem($ret);
     $this->output();
 }
Example #15
0
 /**
  *  发布系统,将内容传入发布队列
  *  
  */
 public function publish_insert_query($id, $op, $user_name, $column_id = array(), $child_queue = 0)
 {
     $info = $this->mChannel->get_channel_by_id($id);
     if (empty($column_id)) {
         if (is_array($info['column_id'])) {
             $column_id = array_keys($info['column_id']);
             $column_id = implode(',', $column_id);
         }
     } else {
         $column_id = implode(',', $column_id);
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => MEMBER_PLAN_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $column_id, 'title' => $info['name'], 'action_type' => $op, 'publish_time' => TIMENOW, 'publish_people' => $user_name, 'ip' => hg_getip());
     if ($child_queue) {
         $data['set_id'] = MEMBER_PLAN_SET_ID;
     }
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #16
0
 /**
  *  发布系统,将内容传入发布队列
  *  
  */
 public function publish_insert_query($id, $op, $column_id = array(), $child_queue = 0)
 {
     $id = intval($id);
     if (empty($id)) {
         return false;
     }
     if (empty($op)) {
         return false;
     }
     $sql = "select * from " . DB_PREFIX . "group where group_id = " . $id;
     $info = $this->db->query_first($sql);
     if (empty($column_id)) {
         $info['column_id'] = unserialize($info['column_id']);
         if (is_array($info['column_id'])) {
             $column_id = array_keys($info['column_id']);
             $column_id = implode(',', $column_id);
         }
     } else {
         $column_id = implode(',', $column_id);
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => GROUP_PLAN_SET_ID, 'from_id' => $info['group_id'], 'class_id' => 0, 'column_id' => $column_id, 'title' => $info['name'], 'action_type' => $op, 'publish_time' => $info['pub_time'], 'publish_people' => urldecode($this->user['user_name']), 'ip' => hg_getip());
     if ($child_queue) {
         $data['set_id'] = GROUP_PLAN_SET_ID;
     }
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #17
0
 /**
  *  发布系统,将内容传入发布队列
  *  
  */
 public function publish_insert_query($contributeId, $op, $column_id = array())
 {
     $id = intval($contributeId);
     if (empty($id) || empty($op)) {
         return false;
     }
     $sql = "SELECT  *  FROM " . DB_PREFIX . "content WHERE id = " . $id;
     $info = $this->db->query_first($sql);
     if (empty($column_id)) {
         $info['column_id'] = unserialize($info['column_id']);
         if (is_array($info['column_id'])) {
             $column_id = array_keys($info['column_id']);
             $column_id = implode(',', $column_id);
         }
     } else {
         $column_id = implode(',', $column_id);
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => CONTRIBUTE_PLAN_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $column_id, 'title' => $info['title'], 'action_type' => $op, 'publish_time' => TIMENOW, 'publish_people' => urldecode($this->user['user_name']), 'ip' => hg_getip());
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #18
0
 /**
  * 放入发布队列
  */
 public function publish_insert_query($article_id, $op, $column_id = array(), $child_queue = 0, $is_childId = 0)
 {
     $id = intval($article_id);
     if (empty($id)) {
         return false;
     }
     if (empty($op)) {
         return false;
     }
     if ($is_childId) {
         $sql = "SELECT * FROM " . DB_PREFIX . "material WHERE id = " . $id;
     } else {
         $sql = "SELECT * FROM " . DB_PREFIX . "article WHERE id = " . $id;
     }
     $info = $this->db->query_first($sql);
     if (empty($column_id)) {
         $info['column_id'] = unserialize($info['column_id']);
         if (is_array($info['column_id'])) {
             $column_id = array_keys($info['column_id']);
             $column_id = implode(',', $column_id);
         }
     } else {
         $column_id = implode(',', $column_id);
     }
     require_once ROOT_PATH . 'lib/class/publishplan.class.php';
     $plan = new publishplan();
     $data = array('set_id' => PUBLISH_SET_ID, 'from_id' => $info['id'], 'class_id' => 0, 'column_id' => $column_id, 'title' => $info['title'], 'action_type' => $op, 'publish_time' => $info['pub_time'], 'publish_people' => urldecode($this->user['user_name']), 'ip' => hg_getip());
     if ($child_queue) {
         $data['set_id'] = PUBLISH_SET_SECOND_ID;
     }
     if ($is_childId) {
         $data['title'] = $info['name'];
     }
     $ret = $plan->insert_queue($data);
     return $ret;
 }
Example #19
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();
 }
Example #20
0
 public function audit()
 {
     if (!$this->settings['is_need_audit']) {
         $this->errorOutput('NO_SUPPORT');
     }
     $status = intval($this->input['audit']);
     $rid = intval($this->input['rid']);
     if (!$rid) {
         $this->errorOutput('NO_RID');
     }
     include_once CUR_CONF_PATH . 'lib/column.class.php';
     $column_obj = new column();
     if ($status == 1) {
         //审核
         $data = $this->obj->get_all_content_by_relationid($rid, true);
         $crd_id = $rid;
         $check_result = $data['cid'];
         $sql = "select * from " . DB_PREFIX . "content_relation where content_id=" . $data['cid'] . " and status=1 and id!=" . $rid;
         $info = $this->db->query($sql);
         while ($row = $this->db->fetch_array($info)) {
             $other_relate[] = $row;
             $column_ids[] = $row['column_id'];
         }
         $column_ids[] = $data['column_id'];
         //整理内容栏目的信息,插入到xunsearch中;先查出现有的content_columns
         $column_detail_datas = $column_obj->get_column_by_id(' id,site_id,name,support_client,column_url,folderformat,fileformat ', implode(',', $column_ids), 'id');
         $firstcolumn = $column_detail_datas[$data['column_id']];
         if ($other_relate) {
             $content_columns = $this->obj->get_content_columns(' * ', array('content_id' => $data['cid']));
             $column_datas = @unserialize($content_columns['column_datas']);
             if (!$column_datas[$data['column_id']]) {
                 $column_datas[$firstcolumn['id']] = array('id' => $firstcolumn['id'], 'column_url' => $firstcolumn['column_url'], 'name' => $firstcolumn['name'], 'relation_id' => $data['id']);
                 $new_content_columns = array('column_ids' => $content_columns['column_ids'] . ',' . $data['column_id'], 'column_datas' => serialize($column_datas));
                 $this->obj->update_content_columns($data['cid'], $new_content_columns);
             }
         } else {
             $column_datas = array($data['column_id'] => array('id' => $data['column_id'], 'column_url' => $firstcolumn['column_url'], 'name' => $firstcolumn['name'], 'relation_id' => $data['id']));
             $content_columns = array('content_id' => $data['cid'], 'column_ids' => $data['column_id'], 'column_datas' => serialize($column_datas));
             $content_column_exist = $this->obj->get_content_columns(' * ', array('content_id' => $data['cid']));
             if (!$content_column_exist) {
                 $this->obj->insert('content_columns', $content_columns);
             }
         }
         if (!empty($data['video'])) {
             //更新百度视频收录
             $this->obj->update_video_record($data + array('rid' => $rid));
         }
         //插入到xunsearch中
         if ($other_relate) {
             $this->opration_xunsearch($data, $new_content_columns, 'update', $column_detail_datas);
         } else {
             //插入到xunsearch中
             $this->opration_xunsearch($data, $content_columns, 'add', $column_detail_datas);
         }
         //插入到content_publish_time表中
         if (!$data['use_maincolumn']) {
             $this->obj->insert('content_publish_time', array('content_id' => $crd_id, 'publish_time' => empty($data['publish_time']) ? TIMENOW : $data['publish_time']));
         }
         //判断有无推送,有则插入到content_push表中,到各自系统里取出对应推送的栏目
         if (!$other_relate) {
             include_once ROOT_PATH . 'lib/class/publishplan.class.php';
             $pub_plan = new publishplan();
             $search_data_con = array('from_id' => $data['content_fromid'], 'bundle_id' => $data['bundle_id'], 'module_id' => $data['module_id'], 'struct_id' => $data['struct_id']);
             $content_fromdata = $pub_plan->get_content_by_fromid($search_data_con);
             if (is_array($content_fromdata[0]) && $content_fromdata[0]) {
                 $data['special'] = $content_fromdata[0]['special'];
                 $data['block'] = $content_fromdata[0]['block'];
             }
             $this->obj->content_push($data, $check_result, $crd_id, true);
         }
         $this->obj->update('content_relation', ' id=' . $rid, array('status' => 1));
     } else {
         //打回
         $this->obj->update('content_relation', ' id=' . $rid, array('status' => 2));
         $data = $this->obj->get_all_content_by_relationid($rid, true);
         $column_id = $data['column_id'];
         $rids[] = $rid;
         $rids_str = @implode(',', $rids);
         $cid = $data['cid'];
         //删除百度视频收录
         $this->obj->update_video_record(array('rid' => $rids_str), 'del');
         //content_columns处理
         $content_column_detail = $this->obj->get_content_columns(' * ', array('content_id' => $cid));
         $content_column_data = @unserialize($content_column_detail['column_datas']);
         $content_column_ids_arr = explode(',', $content_column_detail['column_ids']);
         $column_idarr[] = $data['column_id'];
         foreach ($column_idarr as $col_id) {
             $flkey = array_search($col_id, $content_column_ids_arr);
             if ($flkey !== false) {
                 unset($content_column_ids_arr[array_search($col_id, $content_column_ids_arr)]);
                 unset($content_column_data[$column_id]);
             }
         }
         $new_content_columns = array('column_ids' => empty($content_column_ids_arr) ? '' : implode(',', $content_column_ids_arr), 'column_datas' => empty($content_column_data) ? '' : serialize($content_column_data));
         if (!$new_content_columns['column_datas']) {
             $this->obj->delete_content_columns($cid);
         } else {
             $this->obj->update_content_columns($cid, $new_content_columns);
         }
         $del_columnarr = explode(',', $column_id);
         foreach ($rids as $v) {
             //插入到content_publish_time表中
             $this->obj->insert('content_publish_time', array('content_id' => $v, 'publish_time' => TIMENOW));
         }
         //查询映射表中还有没有关于此内容的关联,如果没有,则删除这个内容
         $lastconrel = $this->obj->get_content_relation($cid, ' AND status=1');
         if (!empty($lastconrel)) {
             //判断删除的栏目是不是主内容的主栏目id
             if (!in_array($content_detail['column_id'], $content_column_ids_arr)) {
                 $this->obj->update_content_by_id($cid, array('column_id' => intval($new_content_columns['column_ids'])));
                 if ($content_detail['use_maincolumn']) {
                     $sql = "select id,column_id,file_custom_filename,file_name from " . DB_PREFIX . "content_relation where content_id=" . $data['cid'];
                     $relate_info = $this->db->query($sql);
                     while ($relate_row = $this->db->fetch_array($relate_info)) {
                         if ($relate_row['id'] == intval($new_content_columns['column_ids'])) {
                             $main_column = $relate_row;
                         } else {
                             $update_relate_column[] = $main_column;
                         }
                     }
                     if ($update_relate_column) {
                         foreach ($update_relate_column as $k => $v) {
                             $this->obj->update('content_relation', ' id=' . $v['id'], array('file_name' => $main_column['file_name']));
                         }
                     }
                 }
             }
         } else {
             //删除推送的内容
             $this->obj->content_push(array('special' => array(), 'block' => array(), 'content_fromid' => $data['content_fromid'], 'bundle_id' => $data['bundle_id'], 'module_id' => $data['module_id']), $cid, '', true, true);
         }
         //更改xunsearch上的数据
         if (empty($new_content_columns['column_datas'])) {
             $this->opration_xunsearch($data, array('id' => $cid) + $data, 'del');
         } else {
             $this->update_xunsearch($data, array('id' => $cid) + $data, $new_content_columns);
         }
     }
     $r = array('status' => $status == 1 ? 1 : 2, 'id' => array($rid));
     $this->addItem($r);
     $this->output();
 }