📄 addcard.php
字号:
<?
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=$_COOKIE['enewsloginuserid'];
$loginin=$_COOKIE['enewsloginusername'];
$loginrnd=$_COOKIE['enewsloginrnd'];
$loginlevel=$_COOKIE['enewsloginlevel'];
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"card");
$enews=$_GET['enews'];
$time=$_GET['time'];
$r[endtime]="0000-00-00";
$r[card_no]=time();
$r[password]=strtolower(make_password(6));
$url="<a href=ListCard.php>管理点卡</a> -> 增加点卡";
if($enews=="EditCard")
{
$cardid=$_GET['cardid'];
$r=$empire->fetch1("select card_no,password,money,cardfen,endtime,carddate from phome_enewscard where cardid='$cardid' limit 1");
$url="<a href=ListCard.php>管理点卡</a> -> 修改点卡";
}
$href="AddCard.php?enews=$enews&cardid=$cardid";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加点卡</title>
<link href="../../data/images/css.css" rel="stylesheet" type="text/css">
<script src=../editor/setday.js></script>
</head>
<body>
<table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td>位置:<?=$url?></td>
</tr>
</table>
<form name="form1" method="post" action="../enews.php">
<table width="60%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr class="header">
<td height="25" colspan="2"><div align="center"><strong><font color="#FFFFFF">增加点卡</font></strong>
<input name="enews" type="hidden" id="enews" value="<?=$enews?>">
<input name="add[cardid]" type="hidden" id="add[cardid]" value="<?=$cardid?>">
<input name="time" type="hidden" id="time" value="<?=$time?>">
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="36%" height="25">点卡帐号:</td>
<td width="64%" height="25"><input name="add[card_no]" type="text" id="add[card_no]" value="<?=$r[card_no]?>">
(<30位)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">点卡密码:</td>
<td height="25"><input name="add[password]" type="text" id="add[password]" value="<?=$r[password]?>">
(<20位)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">点卡金额:</td>
<td height="25"><input name="add[money]" type="text" id="add[money]" value="<?=$r[money]?>" size="6">
元</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">点数:</td>
<td height="25"><input name="add[cardfen]" type="text" id="add[cardfen]" value="<?=$r[cardfen]?>" size="6">
点</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">卡天数:</td>
<td height="25"><input name="add[carddate]" type="text" id="add[carddate]" value="<?=$r[carddate]?>" size="6">
天(填写此项,点数无效)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">到期时间:</td>
<td height="25"><input name="add[endtime]" type="text" id="add[endtime]" value="<?=$r[endtime]?>" size="20" onclick="setday(this)">
(0000-00-00为不限制)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
<input type="button" name="Submit3" value="密码随机" onclick="javascript:self.location.href='<?=$href?>'">
</div></td>
</tr>
</table>
</form>
</body>
</html>
<?
db_close();
$empire=null;
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -