new.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 284 行
PHP
284 行
<?
function getalldate ($CODE)
{
global $connection;
$query = (((''.'SELECT * from SYS_CODE where PARENT_NO=\'').$CODE).'\'');
$cursor = exequery ($connection, $query);
while ($ROW = mysql_fetch_array ($cursor))
{
$CODE_NO = $ROW['CODE_NO'];
$CODE_NAME = $ROW['CODE_NAME'];
echo (((('<option value='.$CODE_NO).'>').$CODE_NAME).'</option>');
}
}
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.PRO_NAME.value=="")
{ alert("办公用名称不能为空!");
form1.PRO_NAME.focus()
return (false);
}
if(document.form1.PRO_UNIT.value=="")
{ alert("计量单位不能为空!");
form1.PRO_UNIT.focus()
return (false);
}
}
function CheckForm2()
{
if(document.form2.CSV_FILE.value=="")
';
echo ' { alert("请选择要导入的文件!");
return (false);
}
if (document.form2.CSV_FILE.value!="")
{
var file_temp=document.form2.CSV_FILE.value,file_name;
var Pos;
Pos=file_temp.lastIndexOf("\\\\");
file_name=file_temp.substring(Pos+1,file_temp.length);
document.form2.FILE_NAME.value=file_name;
}
return (true);
}
function clear_dept()
{
docum';
echo 'ent.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;dialogHeight:330px;dialogTop:"+loc_y+"px;di';
echo 'alogLeft:"+loc_x+"px");
}
function LoadWindow1()
{
URL="/module/user_select_single?ID=2";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
loc_y=document.body.scrollTop+event.clientY-event.offsetY+200;
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:350px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
';
echo '}
function LoadWindow3(kname,codeid)
{
URL="codedefine.php?kname="+kname+"&codeid="+codeid;
myleft=(screen.availWidth-650)/2;
window.open(URL,"formul_edit","height=300,width=550,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");
}
</script>
</head>
<body class="bodycolor" topmargin="5">
';
$query = 'select count(*) from OFFICE_PRODUCTS';
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PRODUCT_COUNT = $ROW[0];
}
echo '<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new.gif" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 新建办公用品</span>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="1" width="70%" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="add.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableContent">办公用品名称: </td>
<td nowrap class="TableData">
<input type="text" name="PRO_';
echo 'NAME" class="BigInput" size="33" maxlength="100" value="';
echo $PRO_NAME;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableContent">办公用品描述: </td>
<td nowrap class="TableData">
<textarea cols=37 name="PRO_DESC" rows="2" class="BigInput" wrap="yes">';
echo $PRO_DESC;
echo '</textarea>
</td>
</tr>
<tr>
<td nowrap class="TableContent">办公用品类别: </td>
<td nowrap class="TableData">
';
echo '<s';
echo 'elect name="OFFICE_PROTYPE" class="BigSelect">
';
getalldate ('OFFICE_PROTYPE');
echo ' </select>
<a href="javascript:LoadWindow3(\'OFFICE_PROTYPE\',\'OFFICE_PROTYPE\');"><img src="/images/edit1.gif" align="absmiddle" border=0 title="办公用品类别定义"></a>
</td>
</tr>
<tr>
<td nowrap class="TableContent">计量单位: </td>
<td nowrap class="TableData">
<input type="text" name="PRO_UNIT" class="BigInput" size="33" maxlength="100" value="';
echo $PRO_UNIT;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableContent">供应商: </td>
<td nowrap class="TableData">
<input type="text" name="PRO_SUPPLIER" class="BigInput" size="33" maxlength="25" value="';
echo $PRO_SUPPLIER;
echo '">
</td>
</tr>
';
if (($PRO_LOWSTOCK != ''))
{
echo ' <tr>
<td nowrap class="TableContent">警戒库存: </td>
<td nowrap class="TableData">
<input type="text" name="PRO_LOWSTOCK" class="BigInput" size="33" maxlength="25" value="';
echo $PRO_LOWSTOCK;
echo '">
</td>
</tr>
';
}
else
{
echo ' <tr>
<td nowrap class="TableContent">警戒库存: </td>
<td nowrap class="TableData">
<input type="text" name="PRO_LOWSTOCK" class="BigInput" size="33" maxlength="25" value="0">
</td>
</tr>
';
}
if (($PRO_STOCK != ''))
{
echo '
<tr>
<td nowrap class="TableContent">当前库存: </td>
<td nowrap class="TableData">
<input type="text" name="PRO_STOCK" class="BigInput" size="33" maxlength="100" value="';
echo $PRO_STOCK;
echo '">
</td>
</tr>
';
}
else
{
echo ' <tr>
<td nowrap class="TableContent">当前库存:</td>
<td nowrap class="TableData">
<input type="text" name="PRO_STOCK" class="BigInput" size="33" maxlength="100" value="0">
</td>
</tr>
';
}
echo ' <tr>
<td nowrap class="TableContent">创建人:</td>
<td nowrap class="TableData">
<input type="hidden" name="PRO_CREATOR" value="';
echo $LOGIN_USER_ID;
echo '" >
';
$query2 = (((''.'select USER_NAME from USER where USER_ID=\'').$LOGIN_USER_ID).'\'');
$cursor2 = exequery ($connection, $query2);
if ($ROW = mysql_fetch_array ($cursor2))
{
$SELLER1_NAME = $ROW['USER_NAME'];
}
echo ' <input type="text" name="PRO_CREATORNAME" class="BigStatic" readonly size="33" maxlength="100" value="';
echo $SELLER1_NAME;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableContent">管理人:</td>
<td nowrap class="TableData">
<input type="hidden" name="COPY_TO_ID" value="';
echo $CONTRACT_LINKMAN2;
echo '">
';
$query2 = (((''.'select USER_NAME from USER where USER_ID=\'').$CONTRACT_LINKMAN2).'\'');
$cursor2 = exequery ($connection, $query2);
if ($ROW = mysql_fetch_array ($cursor2))
{
$LINKMAN2_NAME = $ROW['USER_NAME'];
}
echo ' <input type="text" name="COPY_TO_NAME" class="BigStatic" readonly size="33" maxlength="100" value="';
echo $LINKMAN2_NAME;
echo '">
<input type="button" value="选择" class="SmallButton" onClick="LoadWindow1()" title="指定管理人" name="button">
</td>
</tr>
<tr>
<td nowrap class="TableContent">归属部门:</td>
<td class="TableData" >
<input type="hidden" name="TO_ID" value="';
echo $TO_ID;
echo '">
<textarea cols=37 name=TO_NAME rows=2 class="BigStatic" wrap="yes" readonly>';
echo $TO_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="TableControl" colspan="2" align="center">
<input type="submit" value="添加" class="B';
echo 'igButton" title="添加办公用品" name="button">
<input type="button" value="返回" class="BigButton" onclick="location=\'index.php\'">
</td>
</tr>
</form>
</table>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpaddin';
echo 'g="3" class="small">
<tr>
<td class="Big"><img src="/images/sys_config.gif" WIDTH="18" HEIGHT="18" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 办公用品信息导入</span>
</td>
</tr>
</table>
<br>
<div align="center" class="Big1">
<b>请指定用于导入的CSV文件:</b>
<form name="form2" method="post" action="import.php" enctype="multipart/form-data" onsubmit="return CheckForm2();">
<input type="file" name="CSV_FILE" class="BigInput" size="30">
<input type="hidden" name="FILE_NAME">
<input type="hidde';
echo 'n" name="GROUP_ID" value="';
echo $GROUP_ID;
echo '">
<input type="submit" value="导入" class="BigButton">
</form>
</div>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?