- 精华
- 阅读权限
- 90
- 好友
- 相册
- 分享
- 听众
- 收听
- 注册时间
- 2011-1-17
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
发表于 2012-10-9 18:35:16
|
显示全部楼层
本帖最后由 瑜伽熊 于 2012-10-9 18:37 编辑
<?php
session_start();
include("./Config/Config.php");
if(!$isCZ) die("查询账号钻石功能已关闭!");
if($_POST){
//提交
include_once("./Class/function_common.php");
$illegal=illegalsubmit();
if(!$illegal) die("禁止非法提交");
$POST=Addslashess($_POST);
//验证码
if($isPin){
if($POST['Pin']!=$_SESSION['Pin']) die("<script>alert('验证码错误,请重新输入');history.back();</script>");
}
include_once("./Class/mysql_new_class.php");
$connobj=new mysql_class($SQLhost,$SQLuser,$SQLPWD,$DATABASE);
//账号是否存在
$sql="select id,name,password from account where name='$POST[_user_name]'";
$arr=$connobj->queryrow($sql);
if(!$arr)
{
die("<script>alert('账号不存在,请重新输入');history.back();</script>");
}
if($POST['passwd']!=$arr['password']){
die("<script>alert('密码错误,请重新输入');history.back();</script>");
}else{
$sql="update sk_vas_table set VAS_Point=`VAS_Point`+'$POST[yuanbao]' where Account_id='$arr[id]'";
$connobj->querysql($sql);
die("<script>alert('充值成功,为账号 ".$POST['_user_name']." 冲入了 ".$POST[yuanbao]." 个元宝');window.close();</script>");
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD id=Head1><TITLE>账号充值-元宝充值</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="images/user_basic2.0.css"
type=text/css rel=stylesheet><LINK
href="images/user_zhgl2.0.css"
type=text/css rel=stylesheet>
<STYLE>.tl {
COLOR: #000; TEXT-DECORATION: none
}
.tlon {
COLOR: red; TEXT-DECORATION: underline
}
</STYLE>
<META content="MSHTML 6.00.6000.21228" name=GENERATOR></HEAD>
<BODY>
<FORM id="form1" name="form1" onSubmit="return frmCheck()" action="" method="post">
<DIV class=ctn>
<DIV class=top_1>
<DIV id=mian>
<DIV class=ctn_right>
<DIV class=wel><IMG height=17
src="images/welcome3.jpg"
width=178></DIV>
<DIV class=fm-item><LABEL class=fm-label><SPAN
class=required>*</SPAN>游戏账号:</LABEL> <INPUT class="i-text f_l" id="_user_name" maxLength=16 name="_user_name">
<DIV class=fm-explain id=_user_name_info>请填要充值的游戏账号.</DIV>
</DIV>
<DIV class=fm-item><LABEL class=fm-label><SPAN
class=required>*</SPAN>游戏密码:</LABEL> <INPUT class="i-text f_l" id="passwd"
type="password" maxLength=16 name="passwd">
<DIV class=fm-explain id=_user_passwd_info>请填写游戏账号密码.</DIV></DIV>
<?php if($isPin){ ?>
<DIV class=fm-item>
<LABEL class=fm-label><SPAN
class=required>*</SPAN>元宝:</LABEL>
<INPUT class="i-text f_l" id="yuanbao"
type="sk_vas_table" maxLength=5 name="yuanbao">
<DIV class=fm-explain id=div>请输入元宝数量.</DIV>
</DIV>
<DIV class="fm-item "><LABEL class="fm-label f_l" for=check_code><SPAN
class=required>*</SPAN>验证码:</LABEL> <INPUT class="i-text i-text-authcode f_l"
id=Pin alt=请输入图中的4位数字。 maxLength=4 name=Pin><img src="Pin.php" style="cursor:pointer" onClick="this.src='Pin.php?'+Math.random()" /><span>看不清?点击验证码刷新</SPAN>
<DIV class=fm-explain id=_rand_code_info>请输入图片内验证符,不区分大小写!</DIV></DIV>
<DIV class=kg></DIV>
<?php } ?>
<DIV class=fm-item>
<INPUT id="submitbutton" style="CURSOR: hand" type="image"
src="images/sm_btn_xyb3.gif"
name="_doreg">
</DIV><BR><BR></DIV></DIV>
</DIV>
</FORM></DIV></DIV></BODY></HTML>
<script language="JavaScript" type="text/javascript">
function $(obj)
{
if(typeof obj == 'string') return document.getElementById(obj);
else if(typeof obj == 'object') return obj;
else return false;
}
function frmCheck()
{
var un=$("_user_name").value;
var re=/^[0-9a-zA-Z]{6,16}$/; //只输入数字和字母的正则
if(un.search(re)==-1)
{
alert("账号请输入数字和字母,字符介于六到十六个");
$("_user_name").focus();
return false;
}
var u=$("passwd").value;
if(u.length<8 || u.length>16)
{
alert("旧密码必须在8-16位之间");
$("passwd").focus();
return false;
}
if(u.indexOf(".")>=0)
{
alert("旧密码不能含 . ");
$("passwd").focus();
return false;
}
}
</script>
上面是原文,把其中的 “ include("./Config/Config.php");
if(!$isCZ) die("查询账号钻石功能已关闭!");
if($_POST){ ” 引引号里的这部分删除就差不多了
|
|