session_start();
include ("Backend/config/dbconf.php");
global $host,$user,$pass,$database;
$now = date("Y-m-d H:i:s");
$Msg = "";
$db = new mysqli($host,$user,$pass,$database);
if (mysqli_connect_errno()) {echo "
Sorry,無法連線
"; }
if ($_GET['redir'] == "") $re = "./index.php";
else $re = $_GET['redir'];
if ($_SESSION['agribizMember'] == "") {
if ($_POST['confirm'] != "") {
$account = $_POST['account'];
$password = $_POST['password'];
if ($account == "") $Msg = "請輸入帳號!";
elseif ($password == "") $Msg = "請輸入密碼!";
else {
$sql = "SET NAMES big5";
if ($stmt = $db->prepare($sql)) {
$stmt->execute();
}
$sql = "select pid,active from agribiz_member where account = ? and password = ?";
if ($stmt = $db->prepare($sql)) {
$stmt->bind_param("ss", $account,$password);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows > 0) {
$stmt->bind_result($pid,$active);
$stmt->fetch();
if ($active == "Y") {
$_SESSION['agribizMember'] = $account;
$Msg = "歡迎您回來!";
$redir = "window.location = '$re'";
}
else {
$Msg = "您目前停權中,請洽網站管理員!";
}
}
else {
$msg = "請確認您的帳號密碼是否正確!";
}
$stmt->close();
}
else {
$msg = "請確認您的帳號密碼是否正確!";
}
}
}
}
else {
$Msg = "您已登入!";
$redir = "window.location = '$re'";
}
?>
強化科技農企體系運作及多元創新科技計畫 Scientific and Technological Agribusiness
include ("header.php"); ?>
include ("personal.php"); ?>
歡迎使用線上評量幫助您為自已打分數,讓您更了解自已企業的體質,會員請先登入,若您還不是會員請先加入會員。
include ("right.php"); ?>
include ("bottom.php"); ?>
$db->close();
if ($Msg != "") {
echo "";
}
?>