Browse Source

权限

tags/6.3.2
叙述、别离 5 months ago
parent
commit
862a5259ed
4 changed files with 13 additions and 24 deletions
  1. +2
    -0
      src/admin/templets/sys_admin_user_edit.htm
  2. +5
    -9
      src/admin/templets/sys_group_add.htm
  3. +3
    -7
      src/admin/templets/sys_group_edit.htm
  4. +3
    -8
      src/system/userlogin.class.php

+ 2
- 0
src/admin/templets/sys_admin_user_edit.htm View File

@@ -38,6 +38,7 @@
<td>密码</td> <td>密码</td>
<td><input type="text" name="pwd" id="pwd" class="admin-input-sm" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');">(留空则不修改,请使用数字0-9小写a-z大写A-Z符号_@!.-)</td> <td><input type="text" name="pwd" id="pwd" class="admin-input-sm" onkeyup="this.value=this.value.replace(/[^0-9a-zA-Z_@!\.-]/g,'');">(留空则不修改,请使用数字0-9小写a-z大写A-Z符号_@!.-)</td>
</tr> </tr>
<?php if ($cuserLogin->getUserType() >= 10) {?>
<tr> <tr>
<td>类型</td> <td>类型</td>
<td> <td>
@@ -64,6 +65,7 @@
<span>(支持多选)</span> <span>(支持多选)</span>
</td> </td>
</tr> </tr>
<?php }?>
<tr> <tr>
<td>姓名</td> <td>姓名</td>
<td><input type="text" name="tname" id="tname" value="<?php echo $row['tname']?>" class="admin-input-sm"></td> <td><input type="text" name="tname" id="tname" value="<?php echo $row['tname']?>" class="admin-input-sm"></td>


+ 5
- 9
src/admin/templets/sys_group_add.htm View File

@@ -29,29 +29,25 @@
</tr> </tr>
<tr> <tr>
<td>级别值</td> <td>级别值</td>
<td><input type="text" name="rankid" id="rankid" class="admin-input-sm" required>(系统已占用的级别值:<?php $dsql->SetQuery("SELECT `rank` FROM `#@__admintype`");$dsql->Execute();while($row = $dsql->GetObject()) echo $row->rank;?>,级别值必须小于10,超过或等于10所有权限设置无效)</td>
<td><input type="text" name="rankid" id="rankid" class="admin-input-sm" required>(已占用级别值:1、5、10,级别值必须小于10,大于或等于10所有权限设置无效)</td>
</tr> </tr>
<?php <?php
$start = 0; $start = 0;
$k = 0; $k = 0;
$gouplists = file(dirname(__FILE__).'/../inc/grouplist.txt'); $gouplists = file(dirname(__FILE__).'/../inc/grouplist.txt');
foreach($gouplists as $line)
{
foreach($gouplists as $line) {
$line = trim($line); $line = trim($line);
if ($line=="") continue; if ($line=="") continue;
if (preg_match("#^>>#", $line))
{
if (preg_match("#^>>#", $line)) {
if ($start>0) echo "</td></tr>"; if ($start>0) echo "</td></tr>";
$start++; $start++;
$lhead = "<tr><td colspan='2'>{$start}、".str_replace('>>','',$line)."</td></tr><tr><td colspan='2'>"; $lhead = "<tr><td colspan='2'>{$start}、".str_replace('>>','',$line)."</td></tr><tr><td colspan='2'>";
echo $lhead; echo $lhead;
}
else if (preg_match("#^>#", $line))
{
} else if (preg_match("#^>#", $line)) {
$ls = explode('>',$line); $ls = explode('>',$line);
$tag = $ls[1]; $tag = $ls[1];
$tagname = str_replace('[br]', '<br>', $ls[2]); $tagname = str_replace('[br]', '<br>', $ls[2]);
if (!preg_match("#<br \/>#", $tagname) ) $tagname .= "<span>($tag)</span>";
if (!preg_match("#<br>#", $tagname) ) $tagname .= "<span>($tag)</span>";
else $tagname = str_replace('<br>', "<span>($tag)</span><br>", $tagname); else $tagname = str_replace('<br>', "<span>($tag)</span><br>", $tagname);
echo " <label><input name='purviews[]' type='checkbox' id='purviews$k' value='$tag'> $tagname</label> "; echo " <label><input name='purviews[]' type='checkbox' id='purviews$k' value='$tag'> $tagname</label> ";
$k++; $k++;


+ 3
- 7
src/admin/templets/sys_group_edit.htm View File

@@ -35,12 +35,10 @@
$start = 0; $start = 0;
$k = 0; $k = 0;
$gouplists = file(DEDEADMIN.'/inc/grouplist.txt'); $gouplists = file(DEDEADMIN.'/inc/grouplist.txt');
foreach($gouplists as $line)
{
foreach($gouplists as $line) {
$line = trim($line); $line = trim($line);
if ($line=="") continue; if ($line=="") continue;
if (preg_match("#^>>#", $line))
{
if (preg_match("#^>>#", $line)) {
if ($start>0) echo "</td></tr>"; if ($start>0) echo "</td></tr>";
$line = str_replace('>>','',$line); $line = str_replace('>>','',$line);
$ls = explode('>',$line); $ls = explode('>',$line);
@@ -50,9 +48,7 @@
$start++; $start++;
$lhead = "<tr> <td colspan='2'>{$start}、".$ls[0]."</td></tr><tr><td colspan='2'>"; $lhead = "<tr> <td colspan='2'>{$start}、".$ls[0]."</td></tr><tr><td colspan='2'>";
echo $lhead; echo $lhead;
}
else if (preg_match("#^>#", $line))
{
} else if (preg_match("#^>#", $line)) {
$ls = explode('>',$line); $ls = explode('>',$line);
if (DEDEBIZ_SAFE_MODE && $ls[3]==="unsafe") { if (DEDEBIZ_SAFE_MODE && $ls[3]==="unsafe") {
continue; continue;


+ 3
- 8
src/system/userlogin.class.php View File

@@ -58,7 +58,7 @@ function CheckPurview($n)
} }
} }
/** /**
* 是否没权限限制(超级管理员)
* 是否没权限限制,超级管理员
* *
* @access public * @access public
* @param string * @param string
@@ -95,11 +95,10 @@ function CheckCatalog($cid, $msg)
return TRUE; return TRUE;
} }
/** /**
* 发布文档临时附件信息缓存、发文档前先清空附件信息
* 发布文档时涉及的附件保存到缓存里,完成后把它与文档关连
* 发布文档临时附件信息缓存,前先清空附件信息,完成后把它与文档关连
* *
* @access public * @access public
* @param string $fid 文件ID
* @param string $fid 文件id
* @param string $filename 文件名称 * @param string $filename 文件名称
* @return void * @return void
*/ */
@@ -246,8 +245,6 @@ class userLogin
return 1; return 1;
} }
} }
/** /**
* 是否需要验证码 * 是否需要验证码
* *
@@ -259,7 +256,6 @@ class userLogin
$num = $this->getLoginError($username); $num = $this->getLoginError($username);
return $num >= 3 ? true : false; return $num >= 3 ? true : false;
} }
/** /**
* 1分钟以内登录错误的次数 * 1分钟以内登录错误的次数
* *
@@ -281,7 +277,6 @@ class userLogin
return -1; return -1;
} }
} }
/** /**
* 记录登录错误 * 记录登录错误
* *


Loading…
Cancel
Save