【html】
<link rel="stylesheet" rev="stylesheet" href="/gonggong/2011/kft/login19.css" type="text/css" />
<script type='text/javascript' src='/gonggong/2011/kft/jquery-1.7.2.min.js'></script>
<div id="J_loginGuide" class="login-wrap" style=""><div class="login-box"><div class="login-user clearallx"><div class="login-title flflfl clearallx"><h3 class="flflfl">春节看房团火热报名中...</h3><span class="login-arrow flflfl"><img src="view_bg.png" class="vm" /></span></div>
<div class="login-cont flflfl"><ul>
<li><input name="kfname" id="kfname" class="txt" tabindex="1" value="请输入姓名" onclick="this.value = ''" placeholder="姓名"></li><li><input name="kftel" id="kftel" class="txt" tabindex="2" onclick="this.value = ''" placeholder="请输入手机号码"></li><li class="login-qt"><button id="tijiao" type="submit" class="login-button" tabindex="904"><em>报名</em></button>
</li><li class="login-shortcut color6"><a href="http://loupan.xnfw.com/kanfangtuan/index/ydindex" target="_blank"><span style="color:#F00">免费专车接送、独家优惠、奖品大放送....</span></a>
</li>
</ul><div id="J_loginGuidePopo" class="popo-id" style="display:none"><div class="popo-bd popo-mod"><p id="J_loginGuideTip"></p><a href="javascript:void(0);" class="close" title="关闭">关闭</a><p class="popo-aw"></p></div></div></div></div><a href="javascript:void(0);" id="J_loginGuideClose" class="close" title="关闭" onclick="close19login()"></a></div></div>
<script language="javascript" type="text/javascript">
function isCHName(astr){
var lst = /[^u4e00-u9fa5]/g;
return lst.test(astr);
}
function isPhone(tophone){
var pr = /^1[3|5|8]([0-9]{1})([0-9]{8})$/;
return pr.test(tophone);
}
$("#tijiao").click(function(){
var name=$("#kfname").val();
var phone=$("#kftel").val();
if(lenofstr(name)>20 || lenofstr(name)<3 || !isCHName(name)){
alert("请认真填写真实姓名!");
$("#name").focus();
return false;
} else if(isNaN(phone) || lenofstr(phone)>11 || !isPhone(phone)){
alert("手机号码填写有误!");
$("#phone").focus();
return false;
} else {
hrefValue="http://loupan.xnfw.com";
$.getJSON(
hrefValue+"/kanfangtuan/index/jsondata?callback=?",
{ name: encodeURIComponent(name), phone:phone, area:encodeURIComponent('咸宁'), sjname:encodeURIComponent('2012元旦看房团')},
function(data){
alert(data);
if(data.status==1)
{
$("#kfname").val("");
$("#kftel").val("");
alert('提交成功!');
}
}
);
}
})
function lenofstr(str)
{
var len;
var i;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=2; else len++;
}
return len;
}
function close19login(){
$('#J_loginGuide').css('display','none');
}
</script>
【php】
function jsondata(){
$tel = iconv('UTF-8', 'GB2312', urldecode($_GET['phone']));
$sjname = iconv('UTF-8', 'GB2312', urldecode($_GET['sjname']));
$name = iconv('UTF-8', 'GB2312', urldecode($_GET['name']));
$area = iconv('UTF-8', 'GB2312', urldecode($_GET['area']));
$row = $this->mfun->get_select_fun('fw_member','tel',array('tel'=>$tel,'sjname'=>$sjname,'area'=>$area))->row_array();
if(!empty($row['tel'])){
$this->mfun->update_table_fun('fw_member',array('addtime'=>time()),array('tel'=>$tel,'sjname'=>$sjname,'area'=>$area));
}else{
$dataArr['name'] = $name;
$dataArr['tel'] = $tel;
$dataArr['sjname'] = $sjname ;
$dataArr['area'] = $area;
$dataArr['addtime']=time();
$dataArr['edittime']=time();
$this->mfun->get_insert_fun('fw_member',$dataArr);
}
$arr = array("message"=>"ok","status"=>"1");
echo $_GET['callback'].'('.json_encode($arr).')';
}

<!--看房团报名-->
<style>
#kanfang{z-index:998; position:fixed;bottom:0;left:50%;width:0px;height:0px;_position:absolute;_top: expression(documentElement.scrollTop + (documentElement.clientHeight-this.offsetHeight));}
#kanfang .padface{position:absolute;left:-475px;width:950px;height:92px;top:-92px;*+left:-475px;_left:-475px;z-index:999;}
.kanfang{width:950px; height:92px; background:url(http://loupan.xtfw.cn/images/kft101/xiantao/kanfang.gif) no-repeat;overflow: hidden;position:relative;}
.kanfang .iclose{position: absolute;display:block;right:2px;right:2px; width:20px; height:20px;}
.kanfang .kflink1,.kanfang .kflink2{position: absolute;display:block;}
.kanfang .kflink1{left:0px;top:0px;width:320px;height:92px;}
.kanfang .kflink2{right:0px;bottom:0px;width:279px;height:69px;}
.kanfang .kfname,.kanfang .kftel{font-size:12px;height:27px;line-height:27px; color:#000;position: absolute;left:374px;background:none; text-indent:3px; border:0px;}
.kanfang .kfname{top:23px;width:158px;}
.kanfang .kftel{top:57px;width:158px;}
.kanfang .kfbtn{background: none;border: medium none;top:35px;left:544px;cursor: pointer;width:98px;height:49px;position: absolute;text-indent: -9999px;margin:0px;padding:0px;}
</style>
<div id="kanfang" style="display:block;">
<div class="padface">
<div class="kanfang">
<a onclick="$('#kanfang').hide();" class="iclose" target="_self" href="javascript:void(0)"></a>
<a href="http://loupan.xtfw.cn/kft101/index/" target="_blank" title="仙桃10.1看房团" class="kflink1"></a>
<input name="kfname" id="kfname" class="kfname" tabindex="1" onclick="this.value = ''" placeholder="请输入姓名">
<input name="kftel" id="kftel" class="kftel" tabindex="2" onclick="this.value = ''" placeholder="请输入手机号码">
<input class="kfbtn" id="tijiao" type="submit" name="tijiao" />
<a href="http://loupan.xtfw.cn/kft101/index/" target="_blank" title="仙桃10.1看房团" class="kflink2"></a>
</div>
</div>
</div>
<script language="javascript" type="text/javascript">
function isCHName(astr){
var lst = /[^u4e00-u9fa5]/g;
return lst.test(astr);
}
function isPhone(tophone){
var pr = /^1[3|5|8]([0-9]{1})([0-9]{8})$/;
return pr.test(tophone);
}
$("#tijiao").click(function(){
var name=$("#kfname").val();
var phone=$("#kftel").val();
if(lenofstr(name)>20 || lenofstr(name)<3 || !isCHName(name)){
alert("请认真填写真实姓名!");
$("#name").focus();
return false;
} else if(isNaN(phone) || lenofstr(phone)>11 || !isPhone(phone)){
alert("手机号码填写有误!");
$("#phone").focus();
return false;
} else {
hrefValue="http://loupan.xtfw.cn";
$.getJSON(
hrefValue+"/kanfangtuan/index/jsondata?callback=?",
{ name: encodeURIComponent(name), phone:phone, area:encodeURIComponent('仙桃'), sjname:encodeURIComponent('2013-10-1看房团')},
function(data){
if(data.status==1)
{
$("#kfname").val("");
$("#kftel").val("");
alert('提交成功!');
}
}
);
}
})
function lenofstr(str)
{
var len;
var i;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=2; else len++;
}
return len;
}
</script>
<!--看房团报名-->
<style>
.kftuan{width:950px;margin-left:auto;margin-right:auto;text-align:center;overflow:hidden}
#kanfang{z-index:998; position:fixed;bottom:0;left:50%;width:0px;height:0px;_position:absolute;_top: expression(documentElement.scrollTop + (documentElement.clientHeight-this.offsetHeight));}
#kanfang .padface{position:absolute;left:-475px;width:950px;height:92px;top:-92px;*+left:-475px;_left:-475px;z-index:999;}
.kanfang{width:950px; height:92px; background:url(http://loupan.xtfw.cn/images/kft101/xiantao/kanfang.gif) no-repeat;overflow: hidden;position:relative;}
.kanfang .iclose{position: absolute;display:block;right:2px;right:2px; width:20px; height:20px;}
.kanfang .kflink1,.kanfang .kflink2{position: absolute;display:block;}
.kanfang .kflink1{left:0px;top:0px;width:320px;height:92px;}
.kanfang .kflink2{right:0px;bottom:0px;width:279px;height:69px;}
.kanfang .kfname,.kanfang .kftel{font-size:12px;height:27px;line-height:27px; color:#000;position: absolute;left:374px;background:none; text-indent:3px; border:0px;}
.kanfang .kfname{top:23px;width:158px;}
.kanfang .kftel{top:57px;width:158px;}
.kanfang .kfbtn{background: none;border: medium none;top:35px;left:544px;cursor: pointer;width:98px;height:49px;position: absolute;text-indent: -9999px;margin:0px;padding:0px;}
</style>
<div class="kftuan">
<div id="kanfang" style="display:block;">
<div class="padface">
<div class="kanfang">
<a onclick="$('#kanfang').hide();" class="iclose" target="_self" href="javascript:void(0)"></a>
<a href="http://loupan.xtfw.cn/kft101/index/" target="_blank" title="仙桃10.1看房团" class="kflink1"></a>
<input name="kfname" id="kfname" class="kfname" tabindex="1" onclick="this.value = ''" placeholder="请输入姓名">
<input name="kftel" id="kftel" class="kftel" tabindex="2" onclick="this.value = ''" placeholder="请输入手机号码">
<input class="kfbtn" id="tijiao" type="submit" name="tijiao" />
<a href="http://loupan.xtfw.cn/kft101/index/" target="_blank" title="仙桃10.1看房团" class="kflink2"></a>
</div>
</div>
</div>
</div>
<script language="javascript" type="text/javascript">
function isCHName(astr){
var lst = /[^u4e00-u9fa5]/g;
return lst.test(astr);
}
function isPhone(tophone){
var pr = /^1[3|5|8]([0-9]{1})([0-9]{8})$/;
return pr.test(tophone);
}
$("#tijiao").click(function(){
var name=$("#kfname").val();
var phone=$("#kftel").val();
if(lenofstr(name)>20 || lenofstr(name)<3 || !isCHName(name)){
alert("请认真填写真实姓名!");
$("#name").focus();
return false;
} else if(isNaN(phone) || lenofstr(phone)>11 || !isPhone(phone)){
alert("手机号码填写有误!");
$("#phone").focus();
return false;
} else {
hrefValue="http://loupan.xtfw.cn";
$.getJSON(
hrefValue+"/kanfangtuan/index/jsondata?callback=?",
{ name: encodeURIComponent(name), phone:phone, area:encodeURIComponent('仙桃'), sjname:encodeURIComponent('2013-10-1看房团')},
function(data){
if(data.status==1)
{
$("#kfname").val("");
$("#kftel").val("");
alert('提交成功!');
}
}
);
}
})
function lenofstr(str)
{
var len;
var i;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=2; else len++;
}
return len;
}
</script>
<!--看房团报名end-->
声明:此文系舞林cuzn(www.wulinlw.org)原创稿件,转载请保留版权