⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>角色编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function CheckForm()
{
 if(document.form1.USER_PRIV.value=="1")
 { if(!window.confirm("本角色为内置的‘超级系统管理员’角色,确定要改其名称吗?"))
	 return (false);
 }
 if(document.form1.PRIV_NO.value=="")
 { alert("角色序号不能为空!");
	 return (false);
 }
 if(document.form1.PRIV_NAME.value=="")
 { alert("角色称谓不能为空!");
	 return (false);
 }
}
</script>
</head>
';
if ($USER_PRIV != '')
{
	$TITLE = '编辑角色';
}
else
{
	$TITLE = '新建角色';
}
if ($USER_PRIV != '')
{
	$connection = openconnection ();
	$query = 'SELECT * from USER_PRIV where USER_PRIV=\'' . $USER_PRIV . '\'';
	$cursor = exequery ($connection, $query);
	if ($ROW = mysql_fetch_array ($cursor))
	{
		$PRIV_NO = $ROW['PRIV_NO'];
		$PRIV_NAME = $ROW['PRIV_NAME'];
	}
}
echo '
<body class="bodycolor" topmargin="5" onload="document.form1.PRIV_NO.focus();">
<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"><span class="big3"> ';
echo $TITLE;
echo '</span>
	</td>
</tr>
</table>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="';
if ($USER_PRIV != '')
{
	echo 'update';
}
else
{
	echo 'insert';
}
echo '.php"  method="post" name="form1" onsubmit="return CheckForm();">
 <tr>
	<td nowrap class="TableData">角色排序号:</td>
	<td nowrap class="TableData">
			<input type="text" name="PRIV_NO" class="BigInput" size="3" maxlength="3" value="';
echo $PRIV_NO;
echo '">&nbsp;
	</td>
 </tr>
 <tr>
	<td nowrap class="TableData">角色名称:</td>
	<td nowrap class="TableData">
			<input type="text" name="PRIV_NAME" class="BigInput" size="25" maxlength="100" value="';
echo $PRIV_NAME;
echo '">&nbsp;
	</td>
 </tr>
	<td nowrap  class="TableControl" colspan="2" align="center">
			<input type="hidden" value="';
echo $USER_PRIV;
echo '" name="USER_PRIV">
			<input type="submit" value="确定" class="BigButton">&nbsp;&nbsp;
			<input type="button" value="返回" class="BigButton" onclick="location=\'index.php\'">
	</td>
</form>
</table>
';
if ($USER_PRIV == 1)
{
	message ('提示', '本角色为内置的‘超级系统管理员’角色,具有特殊的职能,为admin用户的默认角色,可以编辑其名称,但应保留其‘超级系统管理员’内涵');
}
echo '
</body>
</html>';
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -