📄 edit.php
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>编辑图片目录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript Language="JavaScript">
function CheckForm()
{
if(document.form1.TO_ID.value==""&&document.form1.PRIV_ID.value==""&&document.form1.COPY_TO_ID.value=="")
{
alert("请至少指定一种发布范围!");
return (false);
}
if(document.form1.PIC_NAME.value=="")
{
alert("图片目录名称不能为空!");
return (false);
}
if(document.form1.PIC_PATH.value=="")
';
echo '
{
alert("图片目录路径不能为空!");
return (false);
}
return (true);
}
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.s';
echo 'howModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:330px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function clear_priv()
{
document.form1.PRIV_ID.value="";
document.form1.PRIV_NAME.value="";
}
function LoadPrivWindow()
{
URL="/module/priv_select";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX;
loc_y';
echo '=document.body.scrollTop+event.clientY-event.offsetY+200;
window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:250px;dialogHeight:300px;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?';
echo 'ID=2";
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:0;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="document.form1.PIC_NA';
echo 'ME.focus();">
';
$query = ((''.'SELECT * from PICTURE where PIC_ID=').$PIC_ID);
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PIC_ID = $ROW['PIC_ID'];
$PIC_NAME = $ROW['PIC_NAME'];
$PIC_PATH = $ROW['PIC_PATH'];
$TO_DEPT_ID = $ROW['TO_DEPT_ID'];
$TO_PRIV_ID = $ROW['TO_PRIV_ID'];
$TO_USER_ID = $ROW['TO_USER_ID'];
$query = 'select * from DEPARTMENT';
$cursor = exequery ($connection, $query);
while ($ROW = mysql_fetch_array ($cursor))
{
$DEPT_ID = $ROW['DEPT_ID'];
$DEPT_NAME = $ROW['DEPT_NAME'];
if (find_id ($TO_DEPT_ID, $DEPT_ID))
{
($TO_DEPT_NAME .= ($DEPT_NAME.','));
continue;
}
}
if (($TO_DEPT_ID == 'ALL_DEPT'))
{
$TO_DEPT_NAME = '全体部门';
}
$TOK = strtok ($TO_PRIV_ID, ',');
while (($TOK != ''))
{
$query1 = (((''.'SELECT * from USER_PRIV where USER_PRIV=\'').$TOK).'\'');
$cursor1 = exequery ($connection, $query1);
if ($ROW = mysql_fetch_array ($cursor1))
{
($PRIV_NAME .= ($ROW['PRIV_NAME'].','));
}
$TOK = strtok (',');
}
$TOK = strtok ($TO_USER_ID, ',');
while (($TOK != ''))
{
$query1 = (((''.'SELECT * from USER where USER_ID=\'').$TOK).'\'');
$cursor1 = exequery ($connection, $query1);
if ($ROW = mysql_fetch_array ($cursor1))
{
($USER_NAME .= ($ROW['USER_NAME'].','));
}
$TOK = strtok (',');
}
}
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>
<br>
<table border="0" width="85%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="update.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData">发布范围(部门):</td>
<td class="TableData">
<input type="hidden" name=';
echo '"TO_ID" value="';
echo $TO_DEPT_ID;
echo '">
<textarea cols=40 name=TO_NAME rows=3 class="BigStatic" wrap="yes" readonly>';
echo $TO_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="TableData">发布范围(角色):</td>
<td class="TableData">
<input type="hi';
echo 'dden" name="PRIV_ID" value="';
echo $TO_PRIV_ID;
echo '">
<textarea cols=40 name="PRIV_NAME" rows=3 class="BigStatic" wrap="yes" readonly>';
echo $PRIV_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="TableData">发布范围(人员)</td>
<td class="TableData">
<input type="hid';
echo 'den" name="COPY_TO_ID" value="';
echo $TO_USER_ID;
echo '">
<textarea cols=40 name="COPY_TO_NAME" rows=3 class="BigStatic" wrap="yes" readonly>';
echo $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="TableData"> 图片目录名称:</td>
<td class="TableData">
<input type="text';
echo '" name="PIC_NAME" size="36" class="BigInput" value="';
echo $PIC_NAME;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableData"> 图片目录路径:</td>
<td class="TableData">
<input type="text" name="PIC_PATH" size="36" class="BigInput" value="';
echo $PIC_PATH;
echo '"> 说明:OA服务器的本地路径(如:D:\\MYOA)
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="hidden" value="';
echo $PIC_ID;
echo '" name="PIC_ID">
<input type="submit" value="确定" class="BigButton">
<input type="button" value="返回" class="BigButton" onClick="location=\'index.php\'">
</td>
</tr>
</table>
</form>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -