$headers[] = 'X-Parse-Revocable-Session: 1';
            $headers[] = 'Content-Type: application/json';
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
            $server_output = curl_exec($ch);
            curl_close($ch);
            $server_output = json_decode($server_output);
            if ($server_output->code == "203") {
                echo "<center><p id='response_error'>This E-mail(" . htmlentities($email) . ") has been already taken</p></center>";
            }
            if (isset($server_output->sessionToken)) {
                echo "<center><p id='response'>Your account has been created please check your E-mail for verification link</p></center>";
                if ($this->db_connection()) {
                    $insert_user = $this->db_connection->prepare("INSERT INTO users(username,objectid,email) values(:username,:objectid,:email)");
                    $insert_user->bindValue(":username", $username, PDO::PARAM_STR);
                    $insert_user->bindValue(":objectid", $server_output->objectId, PDO::PARAM_STR);
                    $insert_user->bindValue(":email", $email, PDO::PARAM_STR);
                    $insert_user->execute();
                    $result_row = $insert_user->fetchAll();
                }
            }
            if ($server_output->code == "202") {
                echo "<center><p id='response_error'>This username (" . htmlentities($username) . ") is already taken</p></center>";
            }
        }
    }
}
$signup = new signup();
$signup->_construct();
?>

Exemple #2
0
         				$mailer = new e107Email();
         				
         				// FIX - sendEmail returns TRUE or error message...
         				$check = $mailer->sendEmail($allData['data']['user_email'], $allData['data']['user_name'], $eml,FALSE);*/
         if (true !== $check) {
             $error_message = LAN_SIGNUP_42;
             // There was a problem, the registration mail was not sent, please contact the website administrator.
         }
         unset($allData['data']['user_password']);
     }
     e107::getEvent()->trigger('usersup', $_POST);
     // Old trigger - send everything in the template, including extended fields.
     e107::getEvent()->trigger('userpartial', array_merge($allData['data'], $eufVals['data']));
     // New trigger - send everything in the template, including extended fields.
     require_once HEADERF;
     $after_signup = signup::render_after_signup($error_message);
     $ns->tablerender($after_signup['caption'], $after_signup['text']);
     require_once FOOTERF;
     exit;
 } else {
     require_once HEADERF;
     if (!$sql->select("user", "user_id", "user_loginname='" . $allData['data']['user_loginname'] . "' AND user_password='******'data']['user_password'] . "'")) {
         // Error looking up newly created user
         $ns->tablerender("", LAN_SIGNUP_36);
         require_once FOOTERF;
         exit;
     }
     // Set initial classes, and any which the user can opt to join
     if ($init_class = $userMethods->userClassUpdate($row, 'userpartial')) {
         $allData['data']['user_class'] = $init_class;
         $user_class_update = $sql->update("user", "user_class = '{$allData['data']['user_class']}' WHERE user_name='{$allData['data']['user_name']}'");
Exemple #3
0
    }
    if (isset($_POST['blood'])) {
        $blood = $_POST['blood'];
    }
    if (isset($_POST['mobile'])) {
        $mobile = $_POST['mobile'];
    }
    if (isset($_POST['email'])) {
        $email = $_POST['email'];
    }
    if (isset($_POST['password'])) {
        $pass = $_POST['password'];
    }
    if (isset($_POST['year'])) {
        $year = $_POST['year'];
    }
    if (isset($_POST['graduation'])) {
        $uni = $_POST['graduation'];
    }
    if (isset($_POST['job'])) {
        $job = $_POST['job'];
    }
    $signup = new signup($fname, $lname, $bdate, $sex, $blood, $mobile, $email, $pass, $year, $uni, $job);
    $signup->insert_into_students();
}
?>

</body>

</html>