Exemplo n.º 1
0
            }
        }
        /**
         * 当接收的是关注名(不支持多用户名)
         */
        if ($this->input['screen_name']) {
            $sql = "SELECT id FROM " . DB_PREFIX . "member WHERE username = '" . $this->input['screen_name'] . "'";
            $data = $this->db->query_first($sql);
            /**
             * 删除审核关系数据
             */
            $sql = "DELETE FROM " . DB_PREFIX . "member_relation_verify WHERE member_id = " . $data['id'] . " AND fmember_id = " . $id;
            $this->db->query($sql);
            /**
             * 更新关注数据
             */
            $time = time();
            $sql = "INSERT INTO " . DB_PREFIX . "member_relation VALUES({$data['id']} , {$id} , {$time})";
            $this->db->query($sql);
            /**
             * 更新后的关注关系进入队列
             */
            $this->ConnectQueue();
            $add_relation = '1 ,' . $data['id'] . ',' . $id;
            $this->queue->set(FOLLOW_QUEUE, $add_relation);
        }
    }
}
$out = new verifyApi();
$out->verify();