diff --git a/src/admin/member_do.php b/src/admin/member_do.php index 758d8dea..2b829b43 100644 --- a/src/admin/member_do.php +++ b/src/admin/member_do.php @@ -155,7 +155,7 @@ else if ($dopost == 'edituser') { ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作", "-1"); exit(); } - $query = "UPDATE `#@__member` SET email='$email',uname='$uname',sex='$sex',matt='$matt',money='$money',scores='$scores',`rank`='$rank',spacesta='$spacesta',uptime='$uptime',exptime='$exptime'$pwdsql WHERE mid='$id' AND matt<>10 "; + $query = "UPDATE `#@__member` SET send_max='$send_max',email='$email',uname='$uname',sex='$sex',matt='$matt',money='$money',scores='$scores',`rank`='$rank',spacesta='$spacesta',uptime='$uptime',exptime='$exptime'$pwdsql WHERE mid='$id' AND matt<>10 "; $rs = $dsql->ExecuteNoneQuery2($query); if ($rs == 0) { $query = "UPDATE `#@__member` SET email='$email',uname='$uname',sex='$sex',money='$money',scores='$scores',`rank`='$rank',spacesta='$spacesta',uptime='$uptime',exptime='$exptime'$pwdsql WHERE mid='$id' "; diff --git a/src/admin/templets/member_main.htm b/src/admin/templets/member_main.htm index 97ceb9ea..41230d52 100644 --- a/src/admin/templets/member_main.htm +++ b/src/admin/templets/member_main.htm @@ -58,21 +58,22 @@
- + - + - - + + + - {dede:datalist empty=''} + {dede:datalist empty=''} @@ -91,6 +92,7 @@ + {/dede:datalist} - - +
注册会员列表注册会员列表
选择 mid用户用户 名称 邮箱 性别 会员等级会员属性地址时间会员属性地址时间发布限制 操作
暂无文档
暂无文档
{dede:field.mid/}{dede:field.rank function="GetMemberName(@me,'限制会员')"/} {dede:field.mtype/}用户丨金币{dede:field.money/}丨积分{dede:field.scores/} {dede:field.loginip/}丨{dede:field.logintime function="MyDate('y-m-d H:i',@me)"/}{dede:field.send_max/} 修改 删除 @@ -100,14 +102,14 @@
+ 全选 取消 删除
{dede:pagelist listsize='6'/}{dede:pagelist listsize='6'/}
diff --git a/src/admin/templets/member_view.htm b/src/admin/templets/member_view.htm index 3ed429d7..eabd1e0b 100644 --- a/src/admin/templets/member_view.htm +++ b/src/admin/templets/member_view.htm @@ -134,6 +134,12 @@ (0为普通,1为推荐,10为管理员不能在前台登录非管理员id是严格使用10属性的,要新建管理在系统帐号地方增加) + + 投稿限制: + + (0为不能投稿) + + 资料状况: @@ -168,7 +174,7 @@ - + diff --git a/src/install/sql-dftables.txt b/src/install/sql-dftables.txt index 5d041142..66011534 100755 --- a/src/install/sql-dftables.txt +++ b/src/install/sql-dftables.txt @@ -490,6 +490,7 @@ CREATE TABLE `#@__member` ( `loginip` char(46) NOT NULL default '', `checkmail` smallint(6) NOT NULL default '-1', `loginerr` tinyint NULL DEFAULT 0, + `send_max` int DEFAULT '0', PRIMARY KEY (`mid`), KEY `userid` (`userid`,`sex`), KEY `logintime` (`logintime`) diff --git a/src/install/update.txt b/src/install/update.txt index fdaf8757..0b44b003 100644 --- a/src/install/update.txt +++ b/src/install/update.txt @@ -105,4 +105,5 @@ DELETE FROM `#@__sysconfig` WHERE `#@__sysconfig`.`varname` = 'cfg_vdcode_member -- 6.2.0 ALTER TABLE `#@__arctype` CHANGE COLUMN `iscross` `cross` tinyint(1) NOT NULL DEFAULT 0 AFTER `ishidden`; ALTER TABLE `#@__admin` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `loginip`; -ALTER TABLE `#@__member` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `checkmail`; \ No newline at end of file +ALTER TABLE `#@__member` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `checkmail`; +ALTER TABLE `#@__member` ADD COLUMN `send_max` int NULL DEFAULT 0 AFTER `loginerr`; diff --git a/src/system/memberlogin.class.php b/src/system/memberlogin.class.php index fb859fe3..9317f748 100755 --- a/src/system/memberlogin.class.php +++ b/src/system/memberlogin.class.php @@ -113,6 +113,7 @@ class MemberLogin var $M_HasDay; var $M_JoinTime; var $M_Honor = ''; + var $M_SendMax = 0; var $memberCache = 'memberlogin'; //php5构造函数 function __construct($kptime = -1, $cache = FALSE) @@ -164,6 +165,7 @@ class MemberLogin if ($this->fields['matt'] == 10) $this->isAdmin = TRUE; $this->M_UpTime = $this->fields['uptime']; $this->M_ExpTime = $this->fields['exptime']; + $this->M_SendMax = $this->fields['send_max']; $this->M_JoinTime = MyDate('Y-m-d', $this->fields['jointime']); if ($this->M_Rank > 10 && $this->M_UpTime > 0) { $this->M_HasDay = $this->Judgemember(); @@ -340,6 +342,29 @@ class MemberLogin default: return md5($pwd); } + } + /** + * 投稿是否被限制 + * + * @return bool + */ + function IsSendLimited() + { + global $dsql; + $arr = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__arctiny` WHERE mid='{$this->M_ID}'"); + if ($this->isAdmin === true ) { + return false; + } + if (is_array($arr)) { + if ($arr['dd'] >= $this->M_SendMax) { + return true; + } else { + return false; + } + } else { + return true; + } + } /** * 把数据库密码转为特定长度 diff --git a/src/user/album_add.php b/src/user/album_add.php index e7df2383..cd2688cb 100755 --- a/src/user/album_add.php +++ b/src/user/album_add.php @@ -28,6 +28,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 2; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $menutype = 'content'; if (empty($formhtml)) $formhtml = 0; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/album_edit.php b/src/user/album_edit.php index ffc8b19a..0e2bb3ed 100755 --- a/src/user/album_edit.php +++ b/src/user/album_edit.php @@ -26,6 +26,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 2; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $menutype = 'content'; if (empty($formhtml)) $formhtml = 0; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/archives_add.php b/src/user/archives_add.php index e93576ad..df34fafe 100755 --- a/src/user/archives_add.php +++ b/src/user/archives_add.php @@ -18,6 +18,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; $menutype = 'content'; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/archives_edit.php b/src/user/archives_edit.php index bf85bf53..8f8e541b 100755 --- a/src/user/archives_edit.php +++ b/src/user/archives_edit.php @@ -18,6 +18,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; $menutype = 'content'; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/archives_sg_add.php b/src/user/archives_sg_add.php index 6f4bb1d6..dec02f23 100755 --- a/src/user/archives_sg_add.php +++ b/src/user/archives_sg_add.php @@ -18,6 +18,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; $menutype = 'content'; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/archives_sg_edit.php b/src/user/archives_sg_edit.php index fc1c517b..35f2660e 100755 --- a/src/user/archives_sg_edit.php +++ b/src/user/archives_sg_edit.php @@ -18,6 +18,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; $menutype = 'content'; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/article_add.php b/src/user/article_add.php index a8f19a0a..f6d5eedb 100755 --- a/src/user/article_add.php +++ b/src/user/article_add.php @@ -18,6 +18,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; $menutype = 'content'; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/ diff --git a/src/user/article_edit.php b/src/user/article_edit.php index 73af2a70..06593645 100755 --- a/src/user/article_edit.php +++ b/src/user/article_edit.php @@ -18,6 +18,10 @@ $channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 1; $aid = isset($aid) && is_numeric($aid) ? $aid : 0; $mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; $menutype = 'content'; +if ($cfg_ml->IsSendLimited()) { + ShowMsg("对不起,当前用户已经超出投稿限制,投稿限制次数:{$cfg_ml->M_SendMax}次", "-1", "0", 5000); + exit(); +} /*------------- function _ShowForm(){ } --------------*/