public function register() { require 'camfoxconfig.php'; $username = $_REQUEST['uname']; $firstname = $_REQUEST['fname']; $surname = $_REQUEST['sname']; $email = $_REQUEST['email']; $mobileNo = $_REQUEST['mobno']; $password = $_REQUEST['password']; //$birth_date = $_REQUEST['b_date']; $gender = $_REQUEST['gender']; $year = $_REQUEST['year']; $month = $_REQUEST['month']; $day = $_REQUEST['day']; $birth_date = $year . '-' . $month . '-' . $day; $user_voice = ""; if (isset($_SESSION['audio_file']) && !empty($_SESSION['audio_file'])) { $user_voice = $_SESSION['audio_file']; } $result = signup($username, $firstname, $surname, $email, $mobileNo, $password, $birth_date, $gender, $user_voice); if ($result) { $this->http_response(1, 200); } else { $this->http_response(0, 200); } }
function sessionStatus() { if (!empty($_SESSION['signedIn']) && !empty($_SESSION['user'])) { echo "<meta http-equiv='refresh' content='2; search.php' />"; //If already signed in, Redirect to profile page. return true; } elseif (!empty($_POST['email']) && !empty($_POST['password']) && isset($_POST['login'])) { authenticateSession(); return true; } elseif (!empty($_POST['email']) && !empty($_POST['password']) && isset($_POST['signup'])) { signup(); return true; } }
<script> <?php if (isset($_GET['id']) and isset($_GET['name'])) { ?> $(function(){ $('#myModal').modal(); }); <?php } ?> </script> </head> <body> <?php if (isset($_GET['id']) and isset($_GET['name'])) { $rta = signup($_GET['aid'], $_GET['id'], $_GET['name']); ?> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel"><?php echo $rta[0]; ?> </h4> </div> <div class="modal-body"> <p> <?php echo $rta[1];
break; case 'signupform': include 'signup.php'; break; case 'signup': $first_name = filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_STRING); $last_name = filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_STRING); $user_name = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING); $email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL); $password1 = filter_input(INPUT_POST, 'password1', FILTER_SANITIZE_STRING); $password2 = filter_input(INPUT_POST, 'password2', FILTER_SANITIZE_STRING); if ($first_name == NULL || $last_name == NULL || $email == NULL || $password1 == NULL || $password2 == NULL || $user_name == NULL || $first_name == FALSE || $last_name == FALSE || $email == FALSE || $password1 == FALSE || $password2 == FALSE || $user_name == FALSE) { $message = 'No Fields can be blank'; include 'signup.php'; } else { $message = signup($first_name, $last_name, $email, $password1, $password2, $user_name); if ($message == 'password') { $message = 'Your passwords did not match'; include 'signup.php'; } elseif ($message == 'email') { $message = 'That email already exists in the system'; include 'signup.php'; } elseif ($message == 'username') { $message = 'That username already exists in the system'; include 'signup.php'; } elseif ($message == 'error') { $message = 'An error occurred with the database'; include 'signup.php'; } elseif ($message == 'success') { $message = 'Signup successful'; include 'home.php';
FUNCTION LIST: No functions, just a giant if statement. ------------------------------------------------------------------------------*/ //===== //===== POST ------------------------------------------------------------------- //===== if ($_SERVER['REQUEST_METHOD'] == "POST") { $function = $_POST['function']; if ($function === 'login') { login($_POST['email'], $_POST['password']); } else { if ($function === 'logout') { logout(); } else { if ($function === 'signup') { signup($_POST['email']); } else { if ($function === 'verify-account') { verify_account($_POST['username'], $_POST['password'], $_POST['verify_code']); } else { if ($function === 'create-project') { create_project(); } else { if ($function == 'delete-project') { delete_project($_POST['project_url_name']); } else { if ($function == 'save-project-name') { save_project_name($_POST['project_id'], $_POST['new_value']); } else { if ($function == 'save-project-image') { save_project_image($_POST['project_id'], $_POST['new_value']);
include_once "API/question.php"; include_once "API/answer.php"; include_once "API/post.php"; echo "Welcome to the Stack over flow.\n"; $db = new Dbhandler(); $stdin = fopen('php://stdin', 'r'); do { echo "\n****************\n"; echo "\npress 1 to signup\n"; echo "\npress 2 to login \n"; echo "\npress 0 to quit\n"; echo "\n*****************\n"; fscanf(STDIN, "%d\n", $val); switch ($val) { case 1: signup($db); break; case 2: signin($db); break; case 0: break; default: echo "\nPlease enter the above number\n"; break; } } while ($val != 0); function signup($db) { echo "\n*****signup form****\n"; echo "\nEnter username:\n";
<?php include_once 'functions.php'; if (isset($_REQUEST['metodo'])) { $metodo = $_REQUEST['metodo']; switch ($metodo) { case 'signup': signup($_REQUEST['username'], $_REQUEST['username'], $_REQUEST['email'], $_REQUEST['password']); break; case 'login': login($_REQUEST['username'], $_REQUEST['password']); break; case 'get_user_by_username': get_user_by_username($_REQUEST['username']); break; case 'get_user_by_email': get_user_by_email($_REQUEST['email']); break; case 'get_user_by_id': get_user_by_id($_REQUEST['id_user']); break; case 'change_password': change_password($_REQUEST['username'], $_REQUEST['password']); break; case 'get_markers': get_markers(); break; case 'get_markers_by_category': get_markers_by_category($_REQUEST['id_categoria']); break; case 'add_post':
} if (empty($error)) { $replacement = $data[0] . '|' . $data[1] . '|' . $data[2] . '|' . $data[3] . '|' . $data[4] . '|' . $data[5] . '|' . $data[6] . '|1|' . $data[8] . '|'; replaceLine($SignupFile, $id, $replacement); $success = '<strong>' . $lang['signup_activate_success_title'] . '</strong><br>' . $lang['signup_activate_success']; } else { $_SESSION["abuselogin"]++; $error = $lang['signup_activate_invalid']; } } if (!isset($_GET['registration'])) { $url = $_POST['login']; if (isset($_POST['login']) && !empty($_POST['username']) && !empty($_POST['password'])) { @($username = $_POST['username']); @($password = $_POST['password']); $data = signup($SignupFile, $username); $pass = password_decode($key, @$data[6]); if ($username == @$data[4] && $password == $pass) { if ($data[7] == 0) { $error = $lang['signup_activate_not_still']; } else { $_SESSION["login"] = $data[1]; $success = '<strong>' . $lang['signup_activate_hi'] . ' ' . $username . '</strong><br>' . $lang['signup_activate_you_are_logged']; Header("Refresh: 4; URL=\"index.php\""); } } else { $error = $lang['signup_activate_incorrect_username']; Header("Refresh: 5; URL=\"index.php\""); } } else { header("location: {$url}");
function &edit() { return signup(true); }
$action = $_POST['action']; switch ($action) { case 'login': $username = $_POST['username']; $password = $_POST['password']; login($db, $username, $password); break; case 'logout': logout(); break; case 'signup': $username = $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; $firstname = $_POST['firstname']; signup($db, $username, $password, $email, $firstname); } } /* * Log in an existing user */ function login($db, $username, $password) { //error_log('inside the user.php login function'); // query the db for this username & password $stmt = $db->prepare('SELECT * FROM user WHERE username="******" AND password="******"'); //$stmt = $db->prepare('SELECT * FROM user WHERE username="******"'); $stmt->execute(); $results = $stmt->fetchAll(); //if not found, return false if (count($results) == 0) {
<?php require_once "include.php"; if (!is_connected()) { $request = signup($_POST, $connect); } else { $request = 0; } echo $request;
function signupOpenID($id, $email) { return signup($id, null, $email, true, -1, true); }
<?php session_start(); error_reporting(0); $servername = "localhost"; $username = "******"; $password = ""; $pdo = new PDO("mysql:host={$servername};dbname=assassins", $username, $password); $data = json_decode(file_get_contents('php://input'), true); $action = $data['action']; if ($action == NULL) { $action = $_POST['action']; } switch ($action) { case 'signup': signup($pdo); break; case 'signin': signin($data, $pdo); break; case 'signout': signout(); break; case 'getTargetData': getTargetData($pdo); break; case 'saveMessage': saveMessage($data, $pdo); break; } function signup($pdo)
<?php require_once 'include.php'; $act = $_REQUEST['act']; if ($act === 'signup') { $msg = signup(); } elseif ($act === 'login') { $msg = login(); } elseif ($act === 'logout') { $msg = logout(); } elseif ($act === 'post') { $msg = post(); } elseif ($act === 'deletePost') { $msg = deletePost(); } elseif ($act === 'likePost') { $msg = likePost(); } elseif ($act === 'commentPost') { $msg = commentPost(); } elseif ($act === 'deleteComment') { $msg = deleteComment(); } elseif ($act === 'changeInfo') { $msg = changeInfo(); } elseif ($act === 'readNotify') { $msg = readNotify(); } elseif ($act === 'markAllRead') { $msg = markAllRead(); } ?> <!DOCTYPE HTML> <html> <head>
<?php require_once './include/include.php'; if (!is_connected()) { if (signup($_POST, $connect)) { header('Location: ' . $_SESSION['current']); } } else { header('Location: ' . $_SESSION['current']); } require_once "./header.php"; ?> <div id="body"> <div id="title">Inscription</div> <div class="error"> <center><?php echo $_SESSION['error']; ?> </center> </div> <form action="signup.php" method="post"> <div class="text">Adresse email :</div> <input type="email" name="mail" /> <div class="text">Mot de passe :</div> <input type="password" name="password1" /> <div class="text">Confirmer :</div> <input type="password" name="password2" /> <br /><br /> <input id="button" type="submit" name="submit" value="Inscription"> </form> </div>
if ($base_handler) { $result = doInDatabase("SELECT IDu FROM USERS WHERE NICKNAME = \"{$user}\""); if (mysql_fetch_assoc($result)) { return 1; } } else { echo "Nie mozna polaczyc sie z baza </br>"; return 0; } } function signup() { $user = $_GET['username']; $password = $_GET['password']; $mail = $_GET['mail']; if (check($user)) { return "JEST JUŻ TAKI"; } $password = hash("sha256", $password); $random = generateRandomString(64); doInDatabase("INSERT INTO USERS (NICKNAME, PASSWORD, MAIL, CLASS, TEMP_RAND) VALUES (\"{$user}\", \"{$password}\", \"{$mail}\", \"user\", \"{$random}\")"); mail($mail, "Nowe konto", "Musisz aktywować nowe konto, aby to zrobić wejdź w link:</br>\n <a href=\"localhost/my/index.php?action=activate&code={$random}&user={$user}\"> Link </a></br>\n Dziękujemy za rejestrację :P"); return "wysłano wiadomość. sprawdź pocztę"; } if (isset($_GET['username']) && isset($_GET['password']) && isset($_GET['mail'])) { echo signup(); } else { if (!isset($_GET['done'])) { showPage("registration_form"); } }
<?php include 'base.php'; require 'inc/commons.php'; startblock('content'); $reg_success = false; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $username = $_POST["username"]; $password = $_POST["password"]; $email = $_POST["email"]; $message = ''; if (is_blank($username) || is_blank($password) || is_blank($email)) { $message = "Username/Password/Email can not be empty !"; } else { if (signup($username, $password, $email)) { $reg_success = true; } else { $message = "Username/Email already used"; } } } if ($reg_success) { ?> <p class="text-center" style="margin-top:30px">Account Created! <a href="/login.php">Login</a></p> <?php } else { ?> <div class="row"> <div class="span4 offset4"> <div class="well"> <legend>New to Packing Check? Sign up!</legend>
$page_content .= $pg->getHTML(); } else { die('Could not generate HTML'); } break; } case 'signup': if (!isAuthenticated()) { $form = ""; $signin_error_msg = false; $rememberme = false; if (isset($_POST['email']) && isset($_POST['password']) && isset($_POST['join'])) { if (@$_POST['rememberme'] == 1) { $rememberme = true; } $res = signup('', $_POST['password'], $_POST['email'], true, -1, false, $rememberme); $res_success = $res[0]; $res_failure_reason = $res[1]; if ($res_success) { // no conditional anymore // what's the logic of signing up otherwise! header("location:{$service_host}{$group_name}/join"); exit; if ($_POST['join'] == 1) { header("location:{$service_host}{$group_name}/join"); exit; } else { $temp_translation_string_1 = $treng->_("<big><strong>You have successfully joined this group! <a href=\"%TRENGVAR_1%%TRENGVAR_2%/\">Continue...</a></strong></big><br /><br />To edit the content, go to the related page (to change your blog address, go to Blogs section) and click one of the control buttons as shown:<br /><br /><img src=\"images/controlshow.jpg\" alt=\"Example Control\" border=\"0\" width=\"600\" height=\"389\" />", "groupjoin", array($service_host, $group_name)); $pg->setLayout($pg->FullColumn); $xhtml = "<div align=\"center\">{$temp_translation_string_1}</div>"; $pg->addBlock($pg->Column, "", $xhtml, "");
<?php require 'functions.php'; require 'db_config.php'; $link = new mysqli(HOST, USER, PASSWORD, DATABASE); $message = ""; $action = isset($_REQUEST["action"]) ? $_REQUEST['action'] : 'none'; if ($action == "signup") { $fname = isset($_POST["fname"]) ? $_POST["fname"] : ''; $lname = isset($_POST["lname"]) ? $_POST["lname"] : ''; $email = isset($_POST["email"]) ? $_POST["email"] : ''; $password = isset($_POST["password"]) ? $_POST["password"] : ''; signup($fname, $lname, $email, $password, $link); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Alexandria Bookstore Signup</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
function do_signup() { if (isset($_POST["login"]) && isset($_POST["pass"])) { signup($_POST["login"], $_POST["pass"]); } }
<?php header("Content-type: text/html; charset=utf-8"); session_start(); require_once '..' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'Config.php'; require_once '..' . DIRECTORY_SEPARATOR . 'includes' . PATH . 'service' . PATH . 'UserService.php'; require_once '..' . DIRECTORY_SEPARATOR . 'includes' . PATH . 'helper' . PATH . 'SequenceHelper.php'; require_once '..' . DIRECTORY_SEPARATOR . 'includes' . PATH . 'helper' . PATH . 'UserHelper.php'; $ac = $_GET['ac']; switch ($ac) { case 'signup': signup($_POST); break; case 'login': login($_POST); break; case 'logout': logout(); break; case 'checkemail': checkEmail($_POST); break; case 'checkusername': checkUserName($_POST); break; case 'checktel': checkTel($_POST); break; } function logout() {
<?php include 'db.php'; $db = "test"; $username = "******"; $password = "******"; function signup() { initDB($db, $username, $password); //$sql = "SELECT * FROM `users` WHERE `account`= 'ryan';"; $pwd = md5($_POST['pwd']); $sql = "INSERT INTO users (account,pwd,status) VALUES ('" . $_POST['account'] . "','" . $pwd . "','0')"; // $sql = "SELECT * FROM `users` ;"; $result = mysql_query($sql) or die('MySQL query error'); // $arr = array('status' => true, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5); echo true; //print_r($arr); //mysql_close($database_link); } if ($_POST['act'] == "signup") { signup(); }
$age = $user['age']; } $user_cookie = '{"user_id":' . $user_id . ', "first_name":"' . $first_name . '", "last_name": "' . $last_name . '", "age": "' . $age . '"}'; setcookie("ud", $user_cookie); header('Location: index.php'); } else { $login_failed = 1; } } else { if ($isSignup) { $first_name = isset($first_name) ? $first_name : $_POST['first_name']; $last_name = isset($last_name) ? $last_name : $_POST['last_name']; $age = isset($age) ? $age : $_POST['age']; $email = isset($email) ? $email : $_POST['email']; $password = isset($password) ? $password : $_POST['password']; $signup_result = signup($first_name, $last_name, $age, $email, $password); } } ?> <!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>SettleIn</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <!-- Place favicon.ico in the root directory -->