📄 set_user.php
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/utility_all.php';
echo '
<html>
<head>
<title>指定可访问人员</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript>
function clear_dept()
{
document.form1.TO_NAME.value="";
document.form1.TO_ID.value="";
}
function LoadWindow()
{
URL="/module/dept_select";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;';
echo 'dialogHeight:330px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function clear_user2()
{
document.form1.COPY_TO_NAME.value="";
document.form1.COPY_TO_ID.value="";
}
function LoadWindow2()
{
URL="/module/user_select?ID=2";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
//window.open(URL,"r';
echo 'ead_notify","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=150,resizable=yes");
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:300px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function clear_priv()
{
document.form1.PRIV_ID.value="";
document.form1.PRIV_NAME.value="";
';
echo '}
function LoadPrivWindow()
{
URL="/module/priv_select";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+200;
window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:330px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
</script>
</head>
<body class="b';
echo 'odycolor" topmargin="5">
';
$query = ((((''.'select ').$FIELD_NAME).',OWNER from FILE_SORT where SORT_ID=').$SORT_ID);
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$$FIELD_NAME = $ROW[$FIELD_NAME];
$OWNER = $ROW['OWNER'];
$OWNER_ARRAY = explode ('|', $OWNER);
if (!(((($OWNER_ARRAY[0] == 'ALL_DEPT') OR find_id ($OWNER_ARRAY[0], $LOGIN_DEPT_ID)) OR find_id ($OWNER_ARRAY[1], $LOGIN_USER_PRIV)) OR find_id ($OWNER_ARRAY[2], $LOGIN_USER_ID)))
{
exit ();
}
$PRIV_ARRAY = explode ('|', $$FIELD_NAME);
$PRIV_DEPT = $PRIV_ARRAY[0];
$PRIV_ROLE = $PRIV_ARRAY[1];
$PRIV_USER = $PRIV_ARRAY[2];
if (($PRIV_DEPT == 'ALL_DEPT'))
{
$PRIV_DEPT_NAME = '全体部门';
}
else
{
$query1 = (('SELECT DEPT_NAME from DEPARTMENT where find_in_set(DEPT_ID,\''.$PRIV_DEPT).'\')');
$cursor1 = exequery ($connection, $query1);
while ($ROW = mysql_fetch_array ($cursor1))
{
($PRIV_DEPT_NAME .= ($ROW['DEPT_NAME'].','));
}
}
$query1 = (('SELECT PRIV_NAME from USER_PRIV where find_in_set(USER_PRIV,\''.$PRIV_ROLE).'\')');
$cursor1 = exequery ($connection, $query1);
while ($ROW = mysql_fetch_array ($cursor1))
{
($PRIV_ROLE_NAME .= ($ROW['PRIV_NAME'].','));
}
$query1 = (('SELECT USER_NAME from USER where find_in_set(USER_ID,\''.$PRIV_USER).'\')');
$cursor1 = exequery ($connection, $query1);
while ($ROW = mysql_fetch_array ($cursor1))
{
($PRIV_USER_NAME .= ($ROW['USER_NAME'].','));
}
}
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/edit.gif" WIDTH="22" HEIGHT="20" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 指定权限</span>
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="user_submit.php" method="post" name="form1">
<tr>
<td nowrap class="TableContent"" align="center">授权范围:<br>(部门)</td>
<td class="TableData">
<input type="hidden" name="TO_ID" value';
echo '="';
echo $PRIV_DEPT;
echo '">
<textarea cols=40 name=TO_NAME rows=6 class="BigStatic" wrap="yes" readonly>';
echo $PRIV_DEPT_NAME;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow()" title="添加部门" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_dept()" title="清空部门" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableContent"" align="center">授权范围:<br>(角色)</td>
<td class="TableData">
';
echo ' <input type="hidden" name="PRIV_ID" value="';
echo $PRIV_ROLE;
echo '">
<textarea cols=40 name="PRIV_NAME" rows=6 class="BigStatic" wrap="yes" readonly>';
echo $PRIV_ROLE_NAME;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadPrivWindow()" title="选择角色" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_priv()" title="清空角色" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableContent"" align="center">授权范围:<br>(人员)</td>
<td class="TableData">';
echo '
<input type="hidden" name="COPY_TO_ID" value="';
echo $PRIV_USER;
echo '">
<textarea cols=40 name="COPY_TO_NAME" rows=6 class="BigStatic" wrap="yes" readonly>';
echo $PRIV_USER_NAME;
echo '</textarea>
<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow2()" title="选择人员" name="button">
<input type="button" value="清 空" class="SmallButton" onClick="clear_user2()" title="清空人员" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableContent"" align="center">选项:</td>
<td class="TableData">
<input t';
echo 'ype="checkbox" name="OVERRIDE" id="OVERRIDE"><label for="OVERRIDE">重置所有下级子文件夹的权限</label><br>
</td>
</tr>
<tr>
<td nowrap class="TableControl" colspan="2" align="center">
<input type="hidden" name="SORT_ID" value="';
echo $SORT_ID;
echo '">
<input type="hidden" name="FIELD_NAME" value="';
echo $FIELD_NAME;
echo '">
<input type="hidden" name="FILE_SORT" value="';
echo $FILE_SORT;
echo '">
<input type="hidden" name="TOP_SORT" value="';
echo $TOP_SORT;
echo '">
<input type="submit" value="确定" class="BigButton">
<input type="button" value="返回" class="BigButton" onclick="parent.parent.location=\'../folder.php?FILE_SORT=';
echo $FILE_SORT;
echo '&SORT_ID=';
echo $TOP_SORT;
echo '\'">
</td>
</form>
</table>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -