query.php

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

PHP
174
字号
<?
  function getalldate ($CODE, $GETVALUE)
  {
    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'];
      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/utility_all.php';
  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:"+myleft+"';
  echo 'px");
}
function func_find(select_obj,option_text)
{
 pos=option_text.indexOf("] ")+1;
 option_text=option_text.substr(0,pos);
 for (j=0; j';
  echo '<s';
  echo 'elect_obj.options.length; j++)
 {
   str=select_obj.options(j).text;
   if(str.indexOf(option_text)>=0)
      return j;
 }//for
 return j;
}
function func_insert()
{
 for (i=document.form1.select2.options.length-1; i>=0; i--)
 {
   if(document.form1.select2.options(i).selected)
   {
     option_text=document.form1.select2.options(i).text;
     option_value=document.form1.select2.o';
  echo 'ptions(i).value;
     option_style_color=document.form1.select2.options(i).style.color;
     var my_option = document.createElement("OPTION");
     my_option.text=option_text;
     my_option.value=option_value;
     my_option.style.color=option_style_color;
     //pos=func_find(select1,option_text);
     document.form1.select1.add(my_option);
     document.form1.select2.remove(i);
  }';
  echo '
 }//for
}
function func_delete()
{
 for (i=document.form1.select1.options.length-1; i>=0; i--)
 {
   if(document.form1.select1.options(i).selected)
   {
     option_text=document.form1.select1.options(i).text;
     option_value=document.form1.select1.options(i).value;
     var my_option = document.createElement("OPTION");
     my_option.text=option_text;
     my_option.value=option';
  echo '_value;
     //pos=func_find(select2,option_text);
     document.form1.select2.add(my_option);
     document.form1.select1.remove(i);
  }
 }//for
}
function func_select_all1()
{
 for (i=document.form1.select1.options.length-1; i>=0; i--)
   document.form1.select1.options(i).selected=true;
}
function func_select_all2()
{
 for (i=document.form1.select2.options.length-1; i>=0; i--)
';
  echo '
   document.form1.select2.options(i).selected=true;
}
function exreport()
{
	 fld_str="";
	 fld_str1="";
	 if(document.form1.select1.options.length!=0)
   {
   	for (i=0; i< document.form1.select1.options.length; i++)
   {
     options_value=document.form1.select1.options(i).value;
     options_text=document.form1.select1.options(i).text;
     fld_str+=options_value+",";
     fld_str1';
  echo '+=options_text+",";
   }
   }
  else
  	{
  	  for (i=0; i< document.form1.select2.options.length; i++)
      {
       options_value=document.form1.select2.options(i).value;
       options_text=document.form1.select2.options(i).text;
       fld_str+=options_value+",";
       fld_str1+=options_text+",";
      }
  	}
  document.form1.FIELDMSG.value=fld_str;
  document.form1.FIELDMSGNAME';
  echo '.value=fld_str1;
  document.form1.submit();
}
function chk(input,KC,KT,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)';
  echo '.item(i);
        if(el.checked)
        {
        	 val=el.value;
           lstr+=val+",";
        }
     }
  	document.all(KT).value=lstr;
    }
  }
function func_up()
{
  sel_count=0;
  for (i=document.form1.select1.options.length-1; i>=0; i--)
  {
    if(document.form1.select1.options(i).selected)
       sel_count++;
  }
  if(sel_count==0)
  {
     alert("调整顺序时

⌨️ 快捷键说明

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