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

📄 open.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
echo "<html>\r\n<head>\r\n<title>设置公开信息</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<script Language=\"JavaScript\">\r\n\r\nfunction func_find(select_obj,option_text)\r\n{\r\n pos=option_text.indexOf(\"] \")+1;\r\n option_text=option_text.substr(0,pos);\r\n\r\n for (j=0; j<select_obj.options.length; j++)\r\n {\r\n   str=select_obj.options(j).text;\r\n   if(str.indexOf(option_text)>=0)\r\n      return j;\r\n }//for\r\n\r\n return j;\r\n}\r\nfunction func_insert()\r\n{\r\n for (i=document.form1.select2.options.length-1; i>=0; i--)\r\n {\r\n   if(document.form1.select2.options(i).selected)\r\n   {\r\n     option_text=document.form1.select2.options(i).text;\r\n     option_value=document.form1.select2.options(i).value;\r\n     option_style_color=document.form1.select2.options(i).style.color;\r\n\r\n     var my_option = document.createElement(\"OPTION\");\r\n     my_option.text=option_text;\r\n     my_option.value=option_value;\r\n     my_option.style.color=option_style_color;\r\n\r\n     //pos=func_find(select1,option_text);\r\n     document.form1.select1.add(my_option);\r\n     document.form1.select2.remove(i);\r\n  }\r\n }//for\r\n}\r\nfunction func_delete()\r\n{\r\n for (i=document.form1.select1.options.length-1; i>=0; i--)\r\n {\r\n   if(document.form1.select1.options(i).selected)\r\n   {\r\n     option_text=document.form1.select1.options(i).text;\r\n     option_value=document.form1.select1.options(i).value;\r\n\r\n     var my_option = document.createElement(\"OPTION\");\r\n     my_option.text=option_text;\r\n     my_option.value=option_value;\r\n\r\n     //pos=func_find(select2,option_text);\r\n     document.form1.select2.add(my_option);\r\n     document.form1.select1.remove(i);\r\n  }\r\n }//for\r\n}\r\n\r\nfunction func_select_all1()\r\n{\r\n for (i=document.form1.select1.options.length-1; i>=0; i--)\r\n   document.form1.select1.options(i).selected=true;\r\n}\r\nfunction func_select_all2()\r\n{\r\n for (i=document.form1.select2.options.length-1; i>=0; i--)\r\n   document.form1.select2.options(i).selected=true;\r\n}\r\nfunction exreport()\r\n{\r\n\t fld_str=\"\";\r\n\t fld_str1=\"\";\r\n    for (i=0; i< document.form1.select1.options.length; i++)\r\n    {\r\n     options_value=document.form1.select1.options(i).value;\r\n     options_text=document.form1.select1.options(i).text;\r\n     fld_str+=options_value+\",\";\r\n     fld_str1+=options_text+\",\";\r\n    }\r\n\r\n  document.form1.FIELDMSG.value=fld_str;\r\n  document.form1.FIELDMSGNAME.value=fld_str1;\r\n  document.form1.submit();\r\n}\r\nfunction func_up()\r\n{\r\n  sel_count=0;\r\n  for (i=document.form1.select1.options.length-1; i>=0; i--)\r\n  {\r\n    if(document.form1.select1.options(i).selected)\r\n       sel_count++;\r\n  }\r\n\r\n  if(sel_count==0)\r\n  {\r\n     alert(\"调整顺序时,请选择其中一项!\");\r\n     return;\r\n  }\r\n  else if(sel_count>1)\r\n  {\r\n     alert(\"调整顺序时,只能选择其中一项!\");\r\n     return;\r\n  }\r\n\r\n  i=document.form1.select1.selectedIndex;\r\n\r\n  if(i!=0)\r\n  {\r\n    var my_option = document.createElement(\"OPTION\");\r\n    my_option.text=document.form1.select1.options(i).text;\r\n    my_option.value=document.form1.select1.options(i).value;\r\n\r\n    document.form1.select1.add(my_option,i-1);\r\n    document.form1.select1.remove(i+1);\r\n    document.form1.select1.options(i-1).selected=true;\r\n  }\r\n}\r\nfunction func_down()\r\n{\r\n  sel_count=0;\r\n  for (i=document.form1.select1.options.length-1; i>=0; i--)\r\n  {\r\n    if(document.form1.select1.options(i).selected)\r\n       sel_count++;\r\n  }\r\n\r\n  if(sel_count==0)\r\n  {\r\n     alert(\"调整顺序时,请选择其中一项!\");\r\n     return;\r\n  }\r\n  else if(sel_count>1)\r\n  {\r\n     alert(\"调整顺序时,只能选择其中一项!\");\r\n     return;\r\n  }\r\n\r\n  i=document.form1.select1.selectedIndex;\r\n\r\n  if(i!=document.form1.select1.options.length-1)\r\n  {\r\n    var my_option = document.createElement(\"OPTION\");\r\n    my_option.text=document.form1.select1.options(i).text;\r\n    my_option.value=document.form1.select1.options(i).value;\r\n\r\n    document.form1.select1.add(my_option,i+2);\r\n    document.form1.select1.remove(i);\r\n    document.form1.select1.options(i+1).selected=true;\r\n  }\r\n}\r\n</script>\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\" onLoad=\"\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/send.gif\" width=\"18\" HEIGHT=\"18\"><span class=\"big3\"> 设置公开信息</span>\r\n    \t<span class=\"small1\"> 注意:字段设置为公开后,在查看在线人员列表时,点击姓名即可看到,请谨慎设置</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n";
$ALL_FIELD = array(
	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 FIELDSETTING where TABLENAME='HRMS' ORDER BY ORDERNO ASC ";
$cursor1 = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor1 ) )
{
	$temparray = array(
		$ROW['FIELDNO'],
		$ROW['FIELDNAME']
	);
	array_push( &$ALL_FIELD, $temparray );
}
$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\">\r\n  \t<table width=\"200\" align=\"center\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\"  bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" class=\"TableBlock\">\r\n      <tr bgcolor=\"#CCCCCC\">\r\n     <td align=\"center\">排序</td>\r\n    <td align=\"center\"><b>公开字段</b></td>\r\n    <td align=\"center\">&nbsp;</td>\r\n    <td align=\"center\" valign=\"top\"><b>可选字段</b></td>\r\n  </tr>\r\n  <tr>\r\n  \t<td align=\"center\" bgcolor=\"#999999\">\r\n      <input type=\"button\" class=\"SmallInput\" value=\" ↑ \" onClick=\"func_up();\">\r\n      <br><br>\r\n      <input type=\"button\" class=\"SmallInput\" value=\" ↓ \" onClick=\"func_down();\">\r\n    </td>\r\n    <td valign=\"top\" align=\"center\" bgcolor=\"#CCCCCC\">\r\n    <select  name=\"select1\" ondblclick=\"func_delete();\" MULTIPLE style=\"width:200;height:320\">\r\n";
$I = 0;
for ( ;	$I < count( $FIELD_ARRAY );	++$I	)
{
	if ( !( $FIELD_ARRAY[$I] == "" ) )
	{
		if ( $NAME_ARRAY[$I] == "" )
		{
			break;
		}
	}
	else
	{
		continue;
	}
	echo "<option value=\"".$FIELD_ARRAY[$I]."\">".$NAME_ARRAY[$I]."</option>";
}
echo "    </select>\r\n    <input type=\"button\" value=\" 全 选 \" onClick=\"func_select_all1();\" class=\"SmallInput\">\r\n    </td>\r\n    <td align=\"center\" bgcolor=\"#999999\">\r\n      <input type=\"button\" class=\"SmallInput\" value=\" ← \" onClick=\"func_insert();\">\r\n      <br><br>\r\n      <input type=\"button\" class=\"SmallInput\" value=\" → \" onClick=\"func_delete();\">\r\n    </td>\r\n    <td align=\"center\" valign=\"top\" bgcolor=\"#CCCCCC\">\r\n    <select  name=\"select2\" ondblclick=\"func_insert();\" MULTIPLE style=\"width:200;height:320\">\r\n";
$I = 0;
for ( ;	$I < count( $ALL_FIELD );	++$I	)
{
	if ( !( $ALL_FIELD[$I][0] == "" ) || !( $ALL_FIELD[$I][1] == "" ) )
	{
		if ( $Tmp_0 )
		{
			break;
		}
	}
	else
	{
		continue;
	}
	echo "<option value=\"".$ALL_FIELD[$I][0]."\">".$ALL_FIELD[$I][1]."</option>";
}
echo "    </select>\r\n    <input type=\"button\" value=\" 全 选 \" onClick=\"func_select_all2();\" class=\"SmallInput\">\r\n    </td>\r\n  </tr>\r\n    <tfoot align=\"center\" class=\"TableFooter\">\r\n      <td nowrap colspan=\"4\" align=\"center\">\r\n        <input type=\"button\" value=\"确定\" class=\"BigButton\" onClick=\"exreport()\">&nbsp;&nbsp;\r\n        <input type=\"reset\" value=\"返回\" class=\"BigButton\" onClick=\"history.back();\">\r\n        <input type=\"hidden\" name=\"FIELDMSG\">\r\n        <input type=\"hidden\" name=\"FIELDMSGNAME\">\r\n      </td>\r\n    </tfoot>\r\n    </table>\r\n</form>\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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