jquery mobile php,php+jquerymobile开发移动web

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();

};

};

?>

门店移动WEB

window.ο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(){}

});

};

});

门店查询系统

用户名:

密码:

店铺号:

copyright 2004-2014 by ifuns ltd.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值