Exemple #1
0
    {
        $flag = false;
        if (!empty($email)) {
            $sql = "SELECT email FROM " . DB_PREFIX . "member WHERE email='" . urldecode($email) . "'";
            $result = $this->db->query_first($sql);
            if ($result) {
                $flag = true;
            } else {
                $flag = false;
            }
        } else {
            $this->errorOutput(FAILED);
        }
        $this->addItem($flag);
        return $this->output();
    }
    /**
     * 入口
     */
    public function show()
    {
        if ($this->input['username']) {
            $this->verifyUsername(urldecode(trim($this->input['username'])));
        }
        if ($this->input['email']) {
            $this->verifyEmail(urldecode(trim($this->input['email'])));
        }
    }
}
$out = new verifyApi();
$out->show();
Exemple #2
0
                }
            }
        }
        /**
         * 当接收的是关注名(不支持多用户名)
         */
        if ($this->input['screen_name']) {
            $sql = "SELECT id FROM " . DB_PREFIX . "member WHERE username = '******'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();