edit.php

来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 267 行

PHP
267
字号
<?
  function getalldate ($CODE, $GETVALUE)
  {
    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'];
      if (($CODE_NO == $GETVALUE))
      {
        echo (((('<option value='.$CODE_NO).'  selected>').$CODE_NAME).'</option>');
        continue;
      }
      else
      {
        echo (((('<option value='.$CODE_NO).' >').$CODE_NAME).'</option>');
        continue;
      }
    }
  }
  include_once 'inc/auth.php';
  include_once 'inc/check_type.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 clear_dept()
{
  document.form1.TO_NAME.value="";
  doc';
  echo 'ument.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;dialogLeft:"+loc_x+"px");
}
func';
  echo 'tion 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");
}
function LoadWindow3(kname,co';
  echo 'deid)
{
  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>
';
  $query = ((''.'SELECT * from OFFICE_PRODUCTS where PRO_ID=').$PRO_ID);
  $cursor = exequery ($connection, $query);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $PRO_ID = $ROW['PRO_ID'];
    $PRO_NAME1 = $ROW['PRO_NAME'];
    $PRO_DESC1 = $ROW['PRO_DESC'];
    $PRO_UNIT1 = $ROW['PRO_UNIT'];
    $PRO_SUPPLIER1 = $ROW['PRO_SUPPLIER'];
    $PRO_LOWSTOCK1 = $ROW['PRO_LOWSTOCK'];
    $PRO_STOCK1 = $ROW['PRO_STOCK'];
    $TO_ID = $ROW['PRO_DEPT'];
    $PRO_MANAGER1 = $ROW['PRO_MANAGER'];
    $PRO_CREATOR1 = $ROW['PRO_CREATOR'];
    $OFFICE_PROTYPE1 = $ROW['OFFICE_PROTYPE'];
  }
  $TO_NAME = '';
  if (($TO_ID == 'ALL_DEPT'))
  {
    $TO_NAME = '全体部门';
  }
  else
  {
    $query1 = (((''.'select DEPT_NAME from DEPARTMENT where find_in_set(DEPT_ID,\'').$TO_ID).'\')');
    $cursor1 = exequery ($connection, $query1);
    while ($ROW = mysql_fetch_array ($cursor1))
    {
      ($TO_NAME .= ($ROW['DEPT_NAME'].','));
    }
  }
  if (($PRO_CREATOR1 == ''))
  {
    $PRO_CREATOR1 = (''.$LOGIN_USER_ID);
  }
  $query1 = (((''.'select USER_NAME from USER where USER_ID=\'').$PRO_MANAGER1).'\'');
  $cursor = exequery ($connection, $query1);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $PRO_MANAGERNAME = $ROW['USER_NAME'];
  }
  $query1 = (((''.'select USER_NAME from USER where USER_ID=\'').$PRO_CREATOR1).'\'');
  $cursor = exequery ($connection, $query1);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $PRO_CREATORNAME = $ROW['USER_NAME'];
  }
  echo '<body class="bodycolor" topmargin="5" >
<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">&nbsp;&nbsp;办公用品信息编辑 </span>
    </td>
  </tr>
</table>
<br>
<table border="0" cellspacing="1" width="500" class="small" bgcolor="#000000" cellpadding="3" align="center" >
  <form action="update.php"  method="post" name="form1" onsubmit="return CheckForm();">
    <tr>
    <td nowrap class="TableContent">办公用品名称: </td>
    <td nowrap class="TableData">
        <input ty';
  echo 'pe="text" name="PRO_NAME" class="BigInput" size="33" maxlength="100" value="';
  echo $PRO_NAME1;
  echo '">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap class="TableContent">办公用品描述: </td>
    <td nowrap class="TableData">
    	   <textarea cols=37 name="PPRO_DESC" rows="2" class="BigInput"  wrap="yes">';
  echo $PRO_DESC1;
  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', $OFFICE_PROTYPE1);
  echo '        </select>
    &nbsp;<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_UNIT1;
  echo '">&nbsp;
    </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_SUPPLIER1;
  echo '">&nbsp;
    </td>
   </tr>
   <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_LOWSTOCK1;
  echo '">&nbsp;
    </td>
   </tr>
   <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_STOCK1;
  echo '">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap class="TableContent">创建人:</td>
    <td nowrap class="TableData">
      <input type="hidden" name="PRO_CREATOR" value="';
  echo $PRO_CREATOR1;
  echo '" >
      <input type="text" name="PRO_CREATORNAME" class="BigStatic" readonly size="33" maxlength="100" value="';
  echo $PRO_CREATORNAME;
  echo '">
    </td>
   </tr>
   <tr>
    <td nowrap class="TableContent">管理人:</td>
    <td nowrap class="TableData">
       <input type="hidden" name="COPY_TO_ID" value="';
  echo $PRO_MANAGER1;
  echo '">
       <input type="text" name="COPY_TO_NAME" class="BigStatic" readonly size="33" maxlength="100"  value="';
  echo $PRO_MANAGERNAME;
  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>
       &nbsp;<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow()" title="添加部门" name="button">
       &nbsp;<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="hidden" value="';
  echo $PRO_ID;
  echo '" name="PRO_ID">
        <input type="hidden" value="PRO_NAME=';
  echo $PRO_NAME;
  echo '&OFFICE_PROTYPE=';
  echo $OFFICE_PROTYPE;
  echo '&PRO_DESC=';
  echo $PRO_DESC;
  echo '&PAGE_START=';
  echo $PAGE_START;
  echo '&LOW_Stock=';
  echo $LOW_Stock;
  echo '" name="QUERY_LIST">
        <input type="submit" value="确定" class="BigButton">&nbsp;&nbsp;
        <input type="button" value="返回" class="BigButton" onclick="location=\'list.php?PRO_NAME=';
  echo $PRO_NAME;
  echo '&OFFICE_PROTYPE=';
  echo $OFFICE_PROTYPE;
  echo '&PRO_DESC=';
  echo $PRO_DESC;
  echo '&PAGE_START=';
  echo $PAGE_START;
  echo '&LOW_Stock=';
  echo $LOW_Stock;
  echo '\'">
    </td>
  </form>
</table>
</body>
</html>
';
?>

⌨️ 快捷键说明

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