GetOne($sqlt); if($rowt['card']>0){ $card = $rowt['card']; }else{ $card = 0; } $sqlyes="SELECT SUM( climit ) AS ok FROM duomi_card where status=1"; $rowyes = $dsql->GetOne($sqlyes); if($rowyes['ok']>0){ $ok = $rowyes['ok']; }else{ $ok = 0; } $sqlno="SELECT SUM( climit ) AS no FROM duomi_card where status=0"; $rowno = $dsql->GetOne($sqlno); if($rowno['no']>0){ $no = $rowno['no']; }else{ $no = 0; } $w=" where ckey <> '' "; $numPerPage=10; $page = isset($page) ? intval($page) : 1; if($page==0) $page=1; if ($cstatus=="1") {$w.=" and status=1";} elseif($cstatus=="0") {$w.=" and status=0";} else {$w.='';} if (!empty($climit) AND $climit != "all") {$w.=" and climit=$climit";} else {$w.='';} if($action=="search") { $ckey=$_POST['ckey']; if (!empty($ckey)) $w =" where ckey='$ckey'"; } //计算有多少条数据 $csqlStr="select count(*) as dd from duomi_card ".$w; $rowTotal = $dsql->GetOne($csqlStr); if(is_array($rowTotal)){ $TotalResult = $rowTotal['dd']; }else{ $TotalResult = 0; } $TotalPage = ceil($TotalResult/$numPerPage); if ($page>$TotalPage) $page=$TotalPage; $limitstart = ($page-1) * $numPerPage; if($limitstart<0) $limitstart=0; $sqlStr="select * from duomi_card ".$w." ORDER BY `id` DESC limit $limitstart,$numPerPage"; ?>
充值卡管理
当前总额:
元 | 已使用:
元 | 未使用:
元
无充值卡信息
";} ?>
ID
卡号
卡密码
卡面值(元)
生成时间
状态
充值用户
充值时间
操作
SetQuery($sqlStr); $dsql->Execute('key_list'); while($row=$dsql->GetObject('key_list')) { $id=$row->id; $copy.="卡号:".$row->ckey." 卡密码:".$row->cpwd." 卡面值:".$row->climit."元"."
" ?>
ckey;?>
cpwd;?>
climit;?>
maketime;?>
status=="0") echo "未使用"; else echo "已使用";?>
uname;?>
usetime;?>
删除
全选
条件选择:
选择金额
全部金额
1元
5元
10元
20元
30元
40元
50元
100元
500元
1000元
选择状态
全部状态
已使用
未使用
卡号搜索: