新版周易测算系统源码 可以在
2024-06-21 上传数据恢复全套课程带课件
2024-06-11 上传2024年剪影剪辑特效速成班含特
2024-05-29 上传新版起名源码、起名网站、起名
2024-05-11 上传最新商业视频打赏系统源码拥有
2024-05-07 上传精品UI知识付费系统源码 响应
2024-05-07 上传运营大宝典:从0带你,做个赚钱的
2024-04-28 上传游泳教学视频全集,目前比较全的
2024-04-28 上传引流源码短剧搜索前端源码+内
2024-04-22 上传多功能知识付费源码下载实现流
2024-04-10 上传新版的小剧场短剧影视小程序源
2024-04-10 上传 1CREATE TABLE `dede_xiazai` (2 `mid` int(11) NOT NULL,3 `aid` int(11) NOT NULL,4 `mtime` int(11) NOT NULL5) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
1ALTER TABLE `dede_arcrank` ADD `daydowns` INT(6) NOT NULL DEFAULT '10' AFTER `purviews`, ADD `hourdowns` INT(6) NOT NULL DEFAULT '10' AFTER `daydowns`; |
01//获取用户级别//02 $rank = $dsql->GetOne("SELECT rank FROM `dede_member` WHERE mid='" . $cfg_ml->M_ID . "'");03 $level = $dsql->GetOne("SELECT membername,daydowns,hourdowns FROM `dede_arcrank` WHERE rank='" . $rank['rank'] . "'");04 //查询下载次数,限制下载次数//05 $row = $dsql->GetOne("SELECT COUNT(mid) FROM `dede_xiazai` WHERE mid='" . $cfg_ml->M_ID . "' AND to_days(curdate())=to_days(from_unixtime(mtime))");06 $daycishu = $row['COUNT(mid)'];07 $date = date("Y-m-d H:00", time());08 $hour = strtotime($date);09 $row2 = $dsql->GetOne("SELECT COUNT(mid) FROM `dede_xiazai` WHERE mid='" . $cfg_ml->M_ID . "' AND mtime >= '" . $hour . "'");10 $hourcishu = $row2['COUNT(mid)'];11 if ($level['daydowns'] != 0) {12 if ($daycishu >= $level['daydowns']) {13 $errtype = 3;14 $moremsg = $level['membername'] . "24小时内最多能下载" . $level['daydowns'] . "个资源,您的下载次数已到达" . $daycishu . "次";15 include_once (DEDETEMPLATE . '/plus/view_msg.htm');16 exit(0);17 }18 }19 if ($level['hourdowns'] != 0) {20 if ($hourcishu >= $level['hourdowns']) {21 $errtype = 3;22 $moremsg = $level['membername'] . "1小时内最多能下载" . $level['hourdowns'] . "个资源,您的下载次数已到达" . $hourcishu . "次";23 include_once (DEDETEMPLATE . '/plus/view_msg.htm');24 exit(0);25 }26 }27//用户为注册会员以上级别,做下载次数记录////28if ($cfg_ml->M_Rank >= 10) {29//下载次数记录30$inquery = "INSERT INTO `dede_xiazai`(mid,mtime,aid) VALUES ('" . $cfg_ml->M_ID . "','" . time() . "','.$id.'); ";31//记录定单32if (!$dsql->ExecuteNoneQuery($inquery)) {33ShowMsg('记录定单失败, 请返回', '-1');34exit(0);35} |