jQueryMobile是一个转为移动终端打造的web开发框架,兼容js语法,灵活的配置,不须要写不少代码,就能够知足移动终端的操做。php
登陆界面脚本以下:css
if(isset($_POST['submit'])){jquery
$uname = strtolower(getMagic($_POST['username']));web
$storeid = strtolower(getMagic($_POST['storeid']));ajax
$upass = getMagic($_POST['userpwd']);sql
session_inset("ob_gb","1");session
$sqlsel="select sym.userpass,rem.storeid,rem.userid,sym.username,str.storename,ch.chanlid,ch.shortname as chanlname "框架
. " from remstoruser rem inner join symusers sym on sym.userid=rem.userid"ide
. " inner join foustore str on str.storeid=rem.storeid"
. " inner join fousalchanl ch on ch.chanlid=str.chanlid"
. " where rem.userid='".$uname."' and rem.storeid='".$storeid."'";
$result = $mycon->mQuery($sqlsel);
$row = $mycon->mQueryFetch($result);
if (count($row)>0){
session_inset("ob_storeid",$storeid);
session_inset("ob_storename",strout($row["storename"]));
session_inset("ob_chanlid",$row["chanlid"]);
session_inset("ob_chanlname",strout($row["chanlname"]));
session_inset("ob_userid",$row["userid"]);
session_inset("ob_username",strout($row["username"]));
header("Location:index.php");
} else {
die();
};
};
?>
门店移动WEBwindow.οnlοad=function(){
if(document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
bodyTag = document.getElementsByTagName('body')[0];
bodyTag.style.height = document.documentElement.clientWidth / screen.width * screen.height + 'px';
}
setTimeout(function() {
window.scrollTo(0, 1)
}, 0);
};
$(document).ready(function(){
//storeid
$("#uname").blur(function(){
if ('' != this.value)
{
check_login(this.id);
}
});
$("#userpwd").blur(function(){
if ('' != this.value)
{
check_login(this.id);
}
});
$("#storeid").blur(function(){
//alert(this.value);
if ('' !=this.value)
{
check_login(this.id);
};
});
check_login = function (id){
var chk_storeid=$("#storeid").val();
var chk_username=$("#username").val();
var chk_userpwd=$("#userpwd").val();
$.ajax({
type:"post",
url:"ajax.php?action=login_check",
dataType:"text",
data:"id="+id+"&username="+chk_username+"&userpwd="+chk_userpwd+"&storeid="+chk_storeid,
success:function(msg)
{
if(msg == 0){
$("#"+id+"_check").css("color","red");
} else if(msg == 1) {
$("#"+id+"_check").css("color","green");
}else
{
alert(msg);
}
},
complete:function(XMLHttpRequest,textStatus){},
error:function(){}
});
};
});
门店查询系统
用户名:
密码:
店铺号: