asp微信扫码签到源码

用微信公众号实现的asp扫码签到功能

<% if request("action")="" then %>
<div class="content">
	<div class="hy_100">
	<!--start-->
		<div id="p_LatLng"></div>
		<div id="p_Address"></div>
<%
'查查在库中有没有
sqlfg="select * from yuyue where openid='"&newopenid&"'"
set rsfg=conn.execute (sqlfg)
if not rsfg.eof then'已经有了
%>
<div class="hytx">
	<img src="<%=rsfg("hypic")%>" style="border-radius:50%" width="60" height="60" border="0">
	<p><%=rsfg("hyname")%></p>
	<p><b>签到时间</b></p>
	<p><span><%=rsfg("qd_date")%></span></p>
</div>
<% else %>
<div class="qiandao">
<form name="form1" action="?action=save" method="post">
<input name="userID" type="hidden" value="<%=newuserID%>">
<input name="wx_name" type="hidden" value="<%=newname%>">
<input name="hyname" type="hidden" value="<%=newwxname%>">
<input name="hypic" type="hidden" value="<%=newwxpic%>">
<input name="openid" type="hidden" value="<%=newopenid%>">
<input name="map" type="hidden" id="map">
<input name="mapid" type="hidden" id="mapid">
<input type="submit" name="Submit" value="签到" class="bnt_save"></dl>
</form>
</div>
<%
end if
rsfg.close
set rsfg=nothing
'查有没有结束
%>
	<!--end-->
	</div>
</div>
<%
conn.close
set conn=nothing
%>
<% elseif request("action")="save" then%>
<%
userID=request.Form("userID")
wx_name=request.Form("wx_name")
hyname=request.Form("hyname")
hypic=request.Form("hypic")
qd_date=now()
openid=request.Form("openid")
map=request.Form("map")
mapid=request.Form("mapid")

Values = Array(userID,wx_name,hyname,hypic,qd_date,openid,map,mapid)
Sql = "Insert Into [yuyue](userID,wx_name,hyname,hypic,qd_date,openid,map,mapid) values(?,?,?,?,?,?,?,?)"
call SqlHelper(Sql,Values)

conn.close
set conn=nothing
call infoopen("签到成功","index.asp")
%>
<% end if %>

猜你喜欢

转载自blog.csdn.net/tocnc/article/details/87400355