open.php

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

PHP
253
字号
<?
  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 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="";
    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+=options_text+",";
    }
  document.form1.FIE';
  echo 'LDMSG.value=fld_str;
  document.form1.FIELDMSGNAME.value=fld_str1;
  document.form1.submit();
}
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("调整顺序时,请选择其中一项!");
     return;
  }
  else if(sel_count>1)
 ';
  echo ' {
     alert("调整顺序时,只能选择其中一项!");
     return;
  }
  i=document.form1.select1.selectedIndex;
  if(i!=0)
  {
    var my_option = document.createElement("OPTION");
    my_option.text=document.form1.select1.options(i).text;
    my_option.value=document.form1.select1.options(i).value;
    document.form1.select1.add(my_option,i-1);
    document.form1.select1.remove(i+1);';
  echo '
    document.form1.select1.options(i-1).selected=true;
  }
}
function func_down()
{
  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("调整顺序时,请选择其中一项!");
     return;
  }
  else if(sel_count>1)
  {
     alert("调整顺序时,只能';
  echo '选择其中一项!");
     return;
  }
  i=document.form1.select1.selectedIndex;
  if(i!=document.form1.select1.options.length-1)
  {
    var my_option = document.createElement("OPTION");
    my_option.text=document.form1.select1.options(i).text;
    my_option.value=document.form1.select1.options(i).value;
    document.form1.select1.add(my_option,i+2);
    document.form1.select1.remove';
  echo '(i);
    document.form1.select1.options(i+1).selected=true;
  }
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/send.gif" width="18" HEIGHT="18">';
  echo '<s';
  echo 'pan class="big3"> 设置公开信息</span>
    </td>
  </tr>
</table>
';
  $ALL_FIELD = array (array ('USER_NAME', '姓名'), array ('DEPT_NAME', '部门'), array ('SEX', '性别'), array ('NO', '编号'), array ('CARD_NO', '身份证号码'), array ('MARRY', '婚姻状况'), array ('NATION', '民族'), array ('NATIVE_PLACE', '籍贯'), array ('HR_BIRTHDAY', '出生日期'), array ('HUKOU_PLACE', '户口所在地'), array ('WORK_DATE', '参加工作时间'), array ('JOIN_DATE', '加入本单位时间'), array ('EDUCATION', '学历'), array ('SPECIALITY', '专业'), array ('SCHOOL', '毕业院校'), array ('POLITICS', '政治面貌'), array ('POST', '职务'), array ('TECH_POST', '职称'), array ('CONTRACTTYPE', '用工类型'), array ('HOME_ADDR', '家庭住址'), array ('HOME_TEL', '家庭电话'), array ('EMAIL', '电子邮件'), array ('CERTIFICATE', '职务情况'), array ('REWARD', '奖惩记录'), array ('TRAIN', '培训记录'), array ('EDU', '教育背景'), array ('WORK', '工作简历'), array ('SOCIATY', '社会关系'), array ('POST_CHANGE', '岗位变动情况'), array ('SURETY', '担保记录'), array ('CONTRACT', '劳动合同签订情况'), array ('INSURE', '社保缴纳情况'), array ('BODY_EXAMIM', '体检记录'), array ('RESUME', '备 注'));
  $query = 'SELECT * from SYS_PARA where PARA_NAME=\'HRMS_OPEN_FIELDS\'';
  $cursor = exequery ($connection, $query);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $HRMS_OPEN_FIELDS = $ROW['PARA_VALUE'];
  }
  $OPEN_ARRAY = explode ('|', $HRMS_OPEN_FIELDS);
  $FIELD_ARRAY = explode (',', $OPEN_ARRAY[0]);
  $NAME_ARRAY = explode (',', $OPEN_ARRAY[1]);
  echo '<form action="open_submit.php" method="post" name="form1">
  	<table width="200" align="center" border="1" cellspacing="0" cellpadding="3"  bordercolorlight="#000000" bordercolordark="#FFFFFF" class="small">
      <tr bgcolor="#CCCCCC">
     <td align="center">排序</td>
    <td align="center"><b>公开字段</b></td>
    <td align="center">&nbsp;</td>
    <td align="center" valign="top"><b>可选字段</b></td>
 ';
  echo ' </tr>
  <tr>
  	<td align="center" bgcolor="#999999">
      <input type="button" class="SmallInput" value=" ↑ " onclick="func_up();">
      <br><br>
      <input type="button" class="SmallInput" value=" ↓ " onclick="func_down();">
    </td>
    <td valign="top" align="center" bgcolor="#CCCCCC">
    ';
  echo '<s';
  echo 'elect  name="select1" ondblclick="func_delete();" MULTIPLE style="width:200;height:320">
';
  for ($I = 0; ($I < count ($FIELD_ARRAY)); ++$I)
  {
    if ((($FIELD_ARRAY[$I] == '') OR ($NAME_ARRAY[$I] == '')))
    {
      continue;
    }
    else
    {
      echo (((('<option value="'.$FIELD_ARRAY[$I]).'">').$NAME_ARRAY[$I]).'</option>');
      continue;
    }
  }
  echo '    </select>
    <input type="button" value=" 全 选 " onclick="func_select_all1();" class="SmallInput">
    </td>
    <td align="center" bgcolor="#999999">
      <input type="button" class="SmallInput" value=" ← " onclick="func_insert();">
      <br><br>
      <input type="button" class="SmallInput" value=" → " onclick="func_delete();">
    </td>
    <td align="center" valign="top" bgcolor="#CCCC';
  echo 'CC">
    ';
  echo '<s';
  echo 'elect  name="select2" ondblclick="func_insert();" MULTIPLE style="width:200;height:320">
';
  for ($I = 0; ($I < count ($ALL_FIELD)); ++$I)
  {
    if (((($ALL_FIELD[$I][0] == '') OR ($ALL_FIELD[$I][1] == '')) OR in_array ($ALL_FIELD[$I][0], $FIELD_ARRAY)))
    {
      continue;
    }
    else
    {
      echo (((('<option value="'.$ALL_FIELD[$I][0]).'">').$ALL_FIELD[$I][1]).'</option>');
      continue;
    }
  }
  echo '    </select>
    <input type="button" value=" 全 选 " onclick="func_select_all2();" class="SmallInput">
    </td>
  </tr>
    <tr class="TableControl">
      <td nowrap colspan="4" align="center">
        <input type="button" value="确定" class="BigButton" onClick="exreport()">&nbsp;&nbsp;
        <input type="reset" value="清空" class="BigButton" onClick="location.reload();">
        <input type=';
  echo '"hidden" name="FIELDMSG">
        <input type="hidden" name="FIELDMSGNAME">
      </td>
    </tr>
    </table>
</form>
</body>
</html>
';
?>

⌨️ 快捷键说明

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