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

📄 index.php

📁 通达OA2007SE源代码 非常好的
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
  function getalldate ($CODE)
  {
    global $connection;
    $query = (((''.'SELECT * from SYS_CODE where PARENT_NO=\'').$CODE).'\'');
    $cursor = exequery ($connection, $query);
    echo '<option value= ></option>';
    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';
  include_once 'inc/utility_all.php';
  $PAGE_SIZE = 10;
  $query = 'select * from SALE_MANAGER where MANAGER_ID=1';
  $cursor = exequery ($connection, $query);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $MANAGER_ID = $ROW['MANAGER_ID'];
    $MANAGERS = $ROW['MANAGERS'];
  }
  echo '<html>
<head>
<title>客户高级查询 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
  echo '<s';
  echo 'cript Language="JavaScript">
	function td_calendar(fieldname)
{
  myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
  mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
  window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+mylef';
  echo 't+"px");
}
	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");
}
function chk(input,KC,KT';
  echo ',count)
  {
     var lstr="";
  	 if(count==1)
  	 {
  	 	if(document.all(KC).checked)
  	 	{
  	 		document.all(KT).value=document.all(KC).value;
  	 	}
  	  else
  	  {
  	  	document.all(KT).value="";
  	  }
  	 }
  	else
  	{
  	  for(i=0;i<document.all(KC).length;i++)
     {
        el=document.all(KC).item(i);
        if(el.checked)
        {
        	 val=el.value;
  ';
  echo '         lstr+=val+",";
        }
     }
  	document.all(KT).value=lstr;
    }
  }
function clear_user2()
{
  document.form1.COPY_TO_NAME.value="";
  document.form1.COPY_TO_ID.value="";
}
function clear_dept()
{
  document.form1.TO_NAME.value="";
  document.form1.TO_ID.value="";
}
function LoadWindow2()
{
  URL="/module/user_select?ID=2";
  loc_x=document.body.scrollLeft+eve';
  echo 'nt.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  //window.open(URL,"read_notify","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=150,resizable=yes");
  window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:';
  echo '"+loc_x+"px");
}
function LoadWindow3()
{
  URL="manager_select";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  //window.open(URL,"read_notify","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=150,resizable=yes");
  window.showModalDialog(URL,self,"edge:raised;';
  echo 'scroll:0;status:0;help:0;resizable:1;dialogWidth:350px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function clear_user3()
{
  document.form1.SELL_MANAGE.value="";
  document.form1.SELL_MANAGEID.value="";
}
</script>
</head>
<div align="left">
<fieldset style="width:95%;padding-bottom:5px;">
	 <legend class="small" align=left>
      <b>客户信息</b>
  </legend>
<table c';
  echo 'ellspacing="1" class="small" align="left" cellpadding="3">
  <form action="list.php"  method="post" name="form1">
  <tr>
    <td nowrap class="TableData">&nbsp;&nbsp;客户名称: </td>
    <td nowrap class="TableData">
        <input type="text" name="CUSTOMER_NAME" class="SmallInput" size="15" maxlength="100">
    </td>
   <td nowrap class="TableData">客户编码: </td>
    <td nowrap class="TableData"';
  echo '>
        <input type="text" name="CUSTOMER_CODE" class="SmallInput" size="15" maxlength="100">
    </td>
     <td nowrap class="TableData">客户简称: </td>
    <td nowrap class="TableData">
        <input type="text" name="CUSTOMER_SHORT" class="SmallInput" size="15" maxlength="100">
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">&nbsp;&nbsp;地区: </td>
    <td nowrap class="Table';
  echo 'Data">
        ';
  echo '<s';
  echo 'elect name="CUSTOMER_AREA" class="SmallSelect">
';
  getalldate ('AREA');
  echo '        </select>
    </td>
   <td nowrap class="TableData">地址: </td>
    <td nowrap class="TableData">
        <input type="text" name="CUSTOMER_ADD" class="SmallInput" size="15" maxlength="100">
    </td>
     <td nowrap class="TableData">电话: </td>
    <td nowrap class="TableData">
        <input type="text" name="TEL_NO" class="SmallInput" size="15" maxlength="100" value="';
  echo $TEL_NO;
  echo '">
    </td>
   </tr>
  <tr>
    <td nowrap class="TableData">&nbsp;&nbsp;客户来源: </td>
    <td nowrap class="TableData" >
        ';
  echo '<s';
  echo 'elect name="SOURCE" class="SmallSelect">
';
  getalldate ('CRM_SOURCE');
  echo '        </select>
    </td>
    <td nowrap class="TableData">客户类别: </td>
    <td nowrap class="TableData" >
        ';
  echo '<s';
  echo 'elect name="KIND" class="SmallSelect">
';
  getalldate ('CRM_KIND');
  echo '        </select>
    </td>
    <td nowrap class="TableData">销售方式: </td>
    <td nowrap class="TableData">
        ';
  echo '<s';
  echo 'elect name="SELLMODE" class="SmallSelect">
';
  getalldate ('SELL_MODE');
  echo '        </select>
    </td>
  </tr>
 <tr>
 	<td nowrap class="TableData">&nbsp;&nbsp;行业属性: </td>
    <td nowrap class="TableData">
        ';
  echo '<s';
  echo 'elect name="ATTRIBUTE" class="SmallSelect">
';
  getalldate ('CRM_ATTRIBUTE');
  echo '        </select>
    </td>
   <td nowrap class="TableData">企业性质: </td>
    <td nowrap class="TableData" >
        ';
  echo '<s';
  echo 'elect name="ENTERTYPE" class="SmallSelect">
';
  getalldate ('CRM_TYPE');
  echo '        </select>
    </td>
  <td nowrap class="TableData">企业描述: </td>
    <td nowrap class="TableData"  colspan="2">
        <input type="text" name="ENTERMEMO" class="SmallInput" size="15" maxlength="100">
    </td>
 </tr>
  <tr>
    <td nowrap class="TableData">&nbsp;&nbsp;客户范围: </td>
    <td nowrap class="TableData" colspan="5">';
  echo '<s';
  echo 'elect name="SCOPE" class="SmallSelect">
        	<option value="1" ';
  if (($SCOPE == '1'))
  {
    echo 'selected';
  }
  echo '>我的客户</option>
        	<option value="2" ';
  if (($SCOPE == '2'))
  {
    echo 'selected';
  }
  echo '>共享客户</option>
';
  if (find_id ($MANAGERS, $LOGIN_USER_ID))
  {
    echo '        	<option value="3" ';
    if (($SCOPE == '3'))
    {
      echo 'selected';
    }
    echo '>权限范围内的客户</option>
';
  }
  echo '        </select></td>
  </tr>
';
  $count = 0;
  $query = 'select count(*) from FIELDSETTING where TABLENAME=\'CUSTOMER\' and ISQUERY=\'1\'';
  $cursor = exequery ($connection, $query);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $count = $ROW[0];
  }
  if ((0 < $count))
  {
    echo '   <tr>
    <td nowrap  class="TableHeader" colspan="6" align="left">
      &nbsp;&nbsp;用户自定义字段:
    </td>
   </tr>
';
    $query = 'select * from FIELDSETTING where TABLENAME=\'CUSTOMER\' AND ISQUERY=\'1\' ORDER BY ORDERNO ASC  ';
    $cursor = exequery ($connection, $query);
    while ($ROW = mysql_fetch_array ($cursor))
    {
      $FIELDNAME = $ROW['FIELDNAME'];
      $ORDERNO = $ROW['ORDERNO'];
      $STYPE = $ROW['STYPE'];
      $TYPENAME = $ROW['TYPENAME'];
      $TYPEVALUE = $ROW['TYPEVALUE'];
      $TYPECODE = $ROW['TYPECODE'];
      $ISQUERY = $ROW['ISQUERY'];
      $ISGROUY = $ROW['ISGROUY'];
      $FIELDNAME = $ROW['FIELDNAME'];
      $FIELDNO = $ROW['FIELDNO'];
      echo '   <tr>
    <td nowrap class="TableData">&nbsp;&nbsp;';
      echo $FIELDNAME;
      echo ':</td>
    <td nowrap class="TableData" colspan="5">
';
      if (($STYPE == 'T'))
      {
        echo '     <input type="text" name=\'CUSTOMER';
        echo $FIELDNO;
        echo '\' class="SmallInput" size="33" maxlength="25" value="">
';
      }
      if (($STYPE == 'MT'))
      {
        echo '     <textarea cols=37 rows=1 name=\'CUSTOMER';
        echo $FIELDNO;
        echo '\' class="SmallInput" wrap="yes"></textarea>
';
      }
      if (($STYPE == 'D'))
      {
        if (($TYPECODE != ''))
        {
          $query2 = (((''.'select * from SYS_CODE where PARENT_NO=\'').$TYPECODE).'\' order by CODE_ORDER');
          $cursor2 = exequery ($connection, $query2);
          while ($ROW = mysql_fetch_array ($cursor2))
          {
            $CODE_NO = $ROW['CODE_NO'];
            $CODE_NAME = $ROW['CODE_NAME'];
            $TYPEVALUE = (($TYPEVALUE.$CODE_NO).',');
            $TYPENAME = (($TYPENAME.$CODE_NAME).',');
          }
        }
        $TYPEVALUE = str_replace (',', ',', $TYPEVALUE);
        $TYPEVALUE_ARRAY = explode (',', $TYPEVALUE);
        $TYPENAME = str_replace (',', ',', $TYPENAME);
        $TYPENAME_ARRAY = explode (',', $TYPENAME);
        $TYPENAME_COUNT = sizeof ($TYPENAME_ARRAY);
        if (($TYPENAME_ARRAY[($TYPENAME_COUNT - 1)] == ''))
        {
          --$TYPENAME_COUNT;
        }
        echo '       ';
        echo '<s';
        echo 'elect name=\'CUSTOMER';
        echo $FIELDNO;
        echo '\' class="SmallSelect">
       <option value=""></option>
';
        for ($I = 0; ($I < $TYPENAME_COUNT); ++$I)
        {
          echo '
       <option value="';
          echo $TYPEVALUE_ARRAY[$I];
          echo '">';
          echo $TYPENAME_ARRAY[$I];
          echo '</option>
';
        }
      }
      if (($STYPE == 'C'))
      {
        if (($TYPECODE != ''))
        {
          $query2 = (((''.'select * from SYS_CODE where PARENT_NO=\'').$TYPECODE).'\' order by CODE_ORDER');
          $cursor2 = exequery ($connection, $query2);
          while ($ROW = mysql_fetch_array ($cursor2))
          {
            $CODE_NO = $ROW['CODE_NO'];
            $CODE_NAME = $ROW['CODE_NAME'];
            $TYPEVALUE = (($TYPEVALUE.$CODE_NO).',');
            $TYPENAME = (($TYPENAME.$CODE_NAME).',');
          }
        }
        $TYPEVALUE = str_replace (',', ',', $TYPEVALUE);
        $TYPEVALUE_ARRAY = explode (',', $TYPEVALUE);
        $TYPENAME = str_replace (',', ',', $TYPENAME);
        $TYPENAME_ARRAY = explode (',', $TYPENAME);
        $TYPENAME_COUNT = sizeof ($TYPENAME_ARRAY);
        if (($TYPENAME_ARRAY[($TYPENAME_COUNT - 1)] == ''))
        {
          --$TYPENAME_COUNT;
        }
        echo '       <input type="hidden" name=\'CUSTOMER';
        echo $FIELDNO;
        echo '\'>
';
        for ($I = 0; ($I < $TYPENAME_COUNT); ++$I)
        {
          echo '       <input type="checkbox" name=\'CCUSTOMER';
          echo $FIELDNO;
          echo '\' id=\'CCUSTOMER';
          echo $FIELDNO;
          echo $I;
          echo '\' value="';
          echo $TYPEVALUE_ARRAY[$I];
          echo '" onclick="return chk(this,\'CCUSTOMER';
          echo $FIELDNO;
          echo '\',\'CUSTOMER';
          echo $FIELDNO;
          echo '\',\'';
          echo $TYPENAME_COUNT;
          echo '\');"><label for="CCUSTOMER';
          echo $FIELDNO;
          echo $I;
          echo '">';
          echo $TYPENAME_ARRAY[$I];
          echo '</label>
';
        }
      }
      if (($STYPE == 'R'))
      {
        if (($TYPECODE != ''))
        {
          $query2 = (((''.'select * from SYS_CODE where PARENT_NO=\'').$TYPECODE).'\' order by CODE_ORDER');
          $cursor2 = exequery ($connection, $query2);
          while ($ROW = mysql_fetch_array ($cursor2))
          {
            $CODE_NO = $ROW['CODE_NO'];
            $CODE_NAME = $ROW['CODE_NAME'];
            $TYPEVALUE = (($TYPEVALUE.$CODE_NO).',');
            $TYPENAME = (($TYPENAME.$CODE_NAME).',');
          }
        }
        $TYPEVALUE = str_replace (',', ',', $TYPEVALUE);
        $TYPEVALUE_ARRAY = explode (',', $TYPEVALUE);
        $TYPENAME = str_replace (',', ',', $TYPENAME);
        $TYPENAME_ARRAY = explode (',', $TYPENAME);
        $TYPENAME_COUNT = sizeof ($TYPENAME_ARRAY);
        if (($TYPENAME_ARRAY[($TYPENAME_COUNT - 1)] == ''))
        {
          --$TYPENAME_COUNT;
        }
        for ($I = 0; ($I < $TYPENAME_COUNT); ++$I)
        {
          echo '      <input type="radio" name=\'CUSTOMER';
          echo $FIELDNO;
          echo '\' id=\'CUSTOMER';
          echo $FIELDNO;
          echo $I;
          echo '\' value="';
          echo $TYPEVALUE_ARRAY[$I];
          echo '"><label for="CUSTOMER';
          echo $FIELDNO;
          echo $I;
          echo '">';
          echo $TYPENAME_ARRAY[$I];
          echo '</label>
';
        }
      }
      echo '
    </td>
 </tr>
';
    }
  }
  echo ' <tr>
 		<td nowrap class="TableData"  colspan="6" align="right" width="650">
      <input value="查询" type="submit" class="SmallButton" title="查询" name="button">
      &nbsp;&nbsp;<input value="返回" type="button" class="SmallButton" title="返回" name="button" onclick="location=\'../\'">
    </td>
 </tr>
</table>
</fieldset>
</div>
<br>
<div align="left">
<fieldset style="width:95%;padding-bottom';
  echo ':5px;">
	 <legend class="small" align=left>
      <b>联系人信息</b>
  </legend>
<table cellspacing="1" class="small" align="left" cellpadding="3">
  <tr>
    <td nowrap class="TableData">&nbsp;&nbsp;联系人姓名: </td>
    <td nowrap class="TableData">
        <input type="text" name="LINKMAN_NAME" class="SmallInput" size="15" maxlength="100">
    </td>
   <td nowrap class="TableData">性别:</td>
   ';
  echo ' <td nowrap class="TableData">
        ';
  echo '<s';
  echo 'elect name="SEX" class="SmallSelect">
        	<option value=""></option>
          <option value="0">男</option>
          <option value="1" >女</option>

⌨️ 快捷键说明

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