<?php
error_reporting(0); 
include("../../config/ht.php");
session_start();
if(ubo($_POST)){
$name=ubo(iconv("UTF-8","GB2312",$_POST["name"]));
$pass=ubo(iconv("UTF-8","GB2312",$_POST["pass"]));
$type="WHERE name='$name'";
$row=queryall(fapian,$type);  
if($row){
if($row[pass]==$pass and $row[name]==$name){
$_SESSION['username']=$name;
$errstr = array ('status'=>"true",'url'=>"/fmain".$dshz);   
echo json_encode($errstr);
}else{
$err=iconv("GB2312","UTF-8","ΥΛΊΕ»ςΥίΓάΒλ΄νΞσ");
$errtip = array ('status'=>"false",'msg'=>$err);   
echo json_encode($errtip);
}
}else{
$err=iconv("GB2312","UTF-8","ΥΛΊΕ²»΄ζΤΪ");
$errtip = array ('status'=>"false",'msg'=>$err);   
echo json_encode($errtip);
}
}else{
$code=$_SERVER["REQUEST_URI"];
$html ='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">';
$html.='<html><head>';
$html.='<meta charset="gb2312">';
$html.='<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />';
$html.='<title>404 Not Found</title>';
$html.='</head><body>';
$html.='<h1>Not Found</h1>';
$html.='<p>The requested URL '.$code.' was not found on this server.</p>';
$html.='</body>';
$html.='</html>';
echo $html;
exit;
}
?>
