예제 #1
0
    if (!$dbc) {
        die('Could not connect: ' . mysql_error());
    }
    $salt = NULL;
    $email = $email;
    $sex = intval($sex);
    $reg_time = time();
    $reg_ip = ip2long('127.0.0.1');
    $email_settings = null;
    $query = "SELECT * FROM userss WHERE user_name = '{$user_name}'";
    $data = mysqli_query($dbc, $query) or die('error!!' . mysql_error());
    mysqli_close($dbc);
    $row = mysqli_fetch_array($data);
    return $row['user_name'] . $row['uid'];
}
fack_insert($_POST['user_name'], $_POST['password']);
$url4 = "http://" . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . "/baji/?/account/ajax/login_process/";
$post_data4 = array('_post_type' => 'ajax', 'agreement_chk' => "agree", 'code_typ' => "0", 'password' => $_POST['password'], 'user_name' => $_POST['user_name'], 'return_url' => "http://" . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . "/baji/?/");
$info = request_by_curl($url4, $post_data4);
print_r($info);
$decode_info = json_decode($info, true);
$url5 = "http://" . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . "/baji/?/account/login/";
if ($decode_info['errno'] == 1) {
    ?>
<body>
<script type="text/javascript">
		document.getElementById("login_submit").submit();
</script>
	<body youdao="bind">
		<div class="aw-error-box">
			
예제 #2
0
function fack_insert($user_name, $pass_word, $email = null, $sex = 0, $mobile = null)
{
    $host = 'localhost';
    $username = '******';
    $password = '******';
    $database = 'baji';
    $dbc = mysqli_connect($host, $username, $password, $database);
    if (!$dbc) {
        die('Could not connect: ' . mysql_error());
    }
    $salt = NULL;
    $email = $email;
    $sex = intval($sex);
    $reg_time = time();
    $reg_ip = ip2long('127.0.0.1');
    $email_settings = null;
    $query = "INSERT INTO userss(user_name,password,salt,email,sex,mobile,reg_time,reg_ip,email_settings) VALUES (\"{$user_name}\",'{$pass_word}','{$salt}','{$email}','{$sex}','{$mobile}','{$reg_time}','{$reg_ip}','{$email_settings}')";
    mysqli_query($dbc, $query);
    print mysql_error();
    echo mysql_error();
    $query = "SELECT * FROM userss WHERE user_name = '{$user_name}'";
    $data = mysqli_query($dbc, $query);
    if (mysqli_num_rows($data) == 0) {
        echo "error" . mysql_errno();
    } else {
        echo "safe";
    }
}
fack_insert($_GET['user_name'], $_GET['password'], $_GET['email']);
예제 #3
0
<?php

function fack_insert($user_name, $pass_word = null, $email = null, $sex = 0, $mobile = null)
{
    $host = 'localhost';
    $username = '******';
    $password = '******';
    $database = 'baji';
    $dbc = mysqli_connect($host, $username, $password, $database);
    if (!$dbc) {
        die('Could not connect: ' . mysql_error());
    }
    $query = "SELECT * FROM users WHERE user_name = '{$user_name}'";
    $data = mysqli_query($dbc, $query) or die('error!!' . mysql_error());
    mysqli_close($dbc);
    $row = mysqli_fetch_array($data);
    return $row['user_name'];
}
if (empty($_GET['name'])) {
    header('location:http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . '/baji/?/people/?c=no');
}
$name = fack_insert($_GET['name']);
echo $name;
if (empty($name)) {
    header('location:http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . '/baji/?/people/?c=no');
} else {
    header('location:http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . '/baji/?/people/' . $name);
}
예제 #4
0
function fack_insert($uid, $email)
{
    $host = 'localhost';
    $username = '******';
    $password = '******';
    $database = 'baji';
    $dbc = mysqli_connect($host, $username, $password, $database);
    if (!$dbc) {
        die('Could not connect: ' . mysql_error());
    }
    $query = "update users set email = '{$email}' where uid = '{$uid}'";
    $data = mysqli_query($dbc, $query) or die('error!!' . mysql_error());
    $query = "SELECT * FROM users WHERE email= '{$email}'";
    $data = mysqli_query($dbc, $query) or die('error!!' . mysql_error());
    mysqli_close($dbc);
    $row = mysqli_fetch_array($data);
    return $row['user_name'] . $row['uid'];
}
if (!isset($_COOKIE['wid_uid']) && !isset($_POST['common_email'])) {
    header('location:http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . '/baji/?/account/setting/openid/?a=0');
} else {
    $uid = $_COOKIE['wid_uid'];
    $email = $_POST['common_email'];
    if (empty($email)) {
        header('location:http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . '/baji/?/account/setting/openid/?a=0');
    } else {
        fack_insert($uid, $email);
        header('location:http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . '/baji/?/account/setting/openid/?a=1');
    }
}