コード例 #1
0
ファイル: index.php プロジェクト: rizof/pictureclick
<?php

session_start();
require 'auth.php';
if (islog()) {
} else {
    header('Location: ../index.php');
}
?>
<!-- Begin Head -->
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<title>Le ManWare</title>
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/css.php?p=<?php 
echo $_GET['p'];
?>
">
<link rel="icon" href="favicon.ico" />
    <!--Begin Font-->
    <link href='http://fonts.googleapis.com/css?family=Slabo+27px' rel='stylesheet' type='text/css'>
    <!--End Font-->
</head>
<!-- End Head -->
    
<body>
<div id="main">
コード例 #2
0
ファイル: login.php プロジェクト: baiduXM/chanpin
            $cus_id = $_POST['cus_id'];
            $sql = "SELECT * FROM up_user WHERE username = '******' and password = '******' and cus_id = {$cus_id}";
            $result = mysql_query($sql);
            while ($row = mysql_fetch_array($result)) {
                $_SESSION['userDid'] = $row['id'];
                break;
            }
            return json_encode(array('err' => '0', 'username' => $username, 'msg' => '登录成功!'));
        } else {
            return json_encode(array('err' => '2', 'msg' => '验证码错误'));
        }
    }
}
if (count($_GET) > 0) {
    if (isset($_GET['cus_id']) && isset($_GET['do']) && $_GET['do'] == 'islog') {
        islog($_GET['cus_id']);
    }
    if (isset($_GET['verification'])) {
        if (verif($_GET['verification'])) {
            echo 1;
            exit;
        } else {
            echo 0;
            exit;
        }
    }
} else {
    echo login();
    exit;
}
mysql_close($conn);