Beispiel #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());
Beispiel #2
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;
 }
Beispiel #3
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;
 }
Beispiel #4
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;
 }
Beispiel #5
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;
 }
Beispiel #6
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;
 }
Beispiel #7
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;
 }
Beispiel #8
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;
 }