示例#1
0
function channel_authenticate()
{
    if (empty($_POST['unikey']) || empty($_POST['u_ID']) || empty($_POST['c_ID'])) {
        forbidden_page("Authentication failed, wrong parameters.");
    } else {
        $auth = new AuthModel();
        $unikey = $_POST['unikey'];
        $ID = $_POST['u_ID'];
        $c_ID = $_POST['c_ID'];
        if (!$auth->channel_authentication($unikey, $ID, $c_ID)) {
            forbidden_page("Authentication failed");
        } else {
            return true;
        }
    }
}