📄 index.php
字号:
<?
include_once("inc/auth.php");
include_once("inc/conn.php");
?>
<html>
<head>
<title>新建子文件夹</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function CheckForm()
{
if(document.form1.SORT_NAME.value=="")
{ alert("文件夹名称不能为空!");
return (false);
}
return (true);
}
</script>
</head>
<body class="bodycolor" topmargin="0" onload="document.form1.SORT_NAME.focus();">
<?
//--- 安全性 ---
function tree_parent($SORT_ID)
{
$connection=OpenConnection();
$query = "SELECT * from FILE_SORT where SORT_ID=$SORT_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$SORT_PARENT=$ROW["SORT_PARENT"];
if($SORT_PARENT==0)
return $SORT_ID;
else
return tree_parent($SORT_PARENT);
}
}
$TREE_PARENT=tree_parent($SORT_ID);
$query = "SELECT * from FILE_SORT where SORT_ID='$TREE_PARENT'";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$SORT_TYPE=$ROW["SORT_TYPE"];
$DEPT_ID=$ROW["DEPT_ID"];
$USER_ID=$ROW["USER_ID"];
switch($SORT_TYPE)
{
case "2":
if($DEPT_ID!=$LOGIN_DEPT_ID)
exit;
break;
case "3":
if(!find_id($USER_ID,$LOGIN_USER_ID))
exit;
break;
case "4":
if($USER_ID!=$LOGIN_USER_ID)
exit;
break;
}
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/folder_new.gif" align="absmiddle"><b><span class="Big1"> 新建子文件夹</span></b>
</td>
</tr>
</table>
<br>
<table border="0" width="450" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="submit.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData"> 排序号:</td>
<td class="TableData">
<input type="text" name="SORT_NO" size="20" maxlength="20" class="BigInput">
</td>
</tr>
<tr>
<td nowrap class="TableData"> 文件夹名称:</td>
<td class="TableData">
<input type="text" name="SORT_NAME" size="25" maxlength="100" class="BigInput">
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="hidden" name="FILE_SORT" value="<?=$FILE_SORT?>">
<input type="hidden" name="SORT_ID" value="<?=$SORT_ID?>">
<input type="submit" value="确定" class="BigButton">
<input type="button" value="返回" class="BigButton" onClick="history.back();">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -