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

📄 set_item.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once 'inc/auth.php';
include_once 'inc/utility_html.php';
echo '
<html>
<head>
<title>编辑可写字段</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function func_color(select_obj)
{
 font_color="red";
 option_text="";
 for (j=0; j<select_obj.options.length; j++)
 {
 str=select_obj.options(j).text;
 if(str.indexOf(option_text)<0)
 {
		if(font_color=="red")
			 font_color="blue";
		else
			 font_color="red";
 }
 select_obj.options(j).style.color=font_color;
 pos=str.indexOf("] ")+1;
 option_text=str.substr(0,pos);
 }//for
 return j;
}
function func_insert()
{
 for (i=select2.options.length-1; i>=0; i--)
 {
 if(select2.options(i).selected)
 {
	 option_text=select2.options(i).text;
	 option_value=select2.options(i).value;
	 option_style_color=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;
	 select1.add(my_option);
	 select2.remove(i);
}
 }//for
 func_init();
}
function func_delete()
{
 for (i=select1.options.length-1; i>=0; i--)
 {
 if(select1.options(i).selected)
 {
	 option_text=select1.options(i).text;
	 option_value=select1.options(i).value;
	 var my_option = document.createElement("OPTION");
	 my_option.text=option_text;
	 my_option.value=option_value;
	 select2.add(my_option);
	 select1.remove(i);
}
 }//for
 func_init();
}
function func_select_all1()
{
 for (i=select1.options.length-1; i>=0; i--)
 select1.options(i).selected=true;
}
function func_select_all2()
{
 for (i=select2.options.length-1; i>=0; i--)
 select2.options(i).selected=true;
}
function func_init()
{
func_color(select2);
func_color(select1);
}
function mysubmit()
{
 fld_str="";
 for (i=0; i< select1.options.length; i++)
 {
		options_value=select1.options(i).value;
		fld_str+=options_value+",";
	}
 document.form1.FLD_STR.value=fld_str;
 document.form1.submit();
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="func_init();">
';
$query = 'select * from FLOW_TYPE where FLOW_ID=' . $FLOW_ID;
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
	$FORM_ID = $ROW['FORM_ID'];
	$FLOW_DOC = $ROW['FLOW_DOC'];
}
$query = 'select * from FLOW_PROCESS where FLOW_ID=' . $FLOW_ID . ' and ID=' . $ID;
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
	$PRCS_ITEM = $ROW['PRCS_ITEM'];
	$PRCS_ID = $ROW['PRCS_ID'];
	$PRCS_ITEM = str_replace ('+', '+', $PRCS_ITEM);
	$PRCS_ITEM = str_replace ('#', '#', $PRCS_ITEM);
	$PRCS_ITEM_AUTO = $ROW['PRCS_ITEM_AUTO'];
}
$query = 'select * from FLOW_FORM_TYPE where FORM_ID=' . $FORM_ID;
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
	$PRINT_MODEL = $ROW['PRINT_MODEL'];
}
$ELEMENT_ARRAY = html_element ($PRINT_MODEL);
$ARRAY_COUNT = sizeof ($ELEMENT_ARRAY);
for ($I = 0; $I < $ARRAY_COUNT; ++$I)
{
	$ETITLE = get_attr ($ELEMENT_ARRAY[$I], 'TITLE');
	$ECLASS = get_attr ($ELEMENT_ARRAY[$I], 'CLASS');
	if ($ECLASS != 'DATE')
	{
		$ITEM_NAME_ALL .= $ETITLE . ',';
		continue;
	}
}
if ($FLOW_DOC == '1')
{
	$ITEM_NAME_ALL .= '[A@],';
}
$ITEM_NAME_ALL = str_replace ('+', '+', $ITEM_NAME_ALL);
$ITEM_NAME_ALL = str_replace ('#', '#', $ITEM_NAME_ALL);
echo '
<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"><span class="big3"> 步骤';
echo $PRCS_ID;
echo ' - 编辑可写字段</span><br>
	</td>
</tr>
</table>
<br>
<table width="450" border="1" cellspacing="0" cellpadding="3" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" class="big">
<tr bgcolor="#CCCCCC">
	<td align="center"><b>本步骤可写字段</b></td>
	<td align="center">&nbsp;</td>
	<td align="center" valign="top"><b>备选字段</b></td>
</tr>
<tr>
	<td valign="top" align="center" bgcolor="#CCCCCC">
	<select  name="select1" ondblclick="func_delete();" MULTIPLE style="width:200;height:280">
		 ';
$MY_ARRAY = explode (',', $PRCS_ITEM);
$ARRAY_COUNT = sizeof ($MY_ARRAY);
if ($MY_ARRAY[$ARRAY_COUNT - 1] == '')
{
	--$ARRAY_COUNT;
}
for ($I = 0; $I < $ARRAY_COUNT; ++$I)
{
	$ITEM_ID = $MY_ARRAY[$I];
	if ($ITEM_ID == '[A@]')
	{
		$ITEM_NAME = '流程公共附件';
	}
	else
	{
		$ITEM_NAME = $ITEM_ID;
	}
	echo '       <option value="';
	echo $ITEM_ID;
	echo '">';
	echo $ITEM_NAME;
	echo '</option>
		 ';
}
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="#CCCCCC">
	<select  name="select2" ondblclick="func_insert();" MULTIPLE style="width:200;height:280">
		 ';
$MY_ARRAY = explode (',', $ITEM_NAME_ALL);
$ARRAY_COUNT = sizeof ($MY_ARRAY);
if ($MY_ARRAY[$ARRAY_COUNT - 1] == '')
{
	--$ARRAY_COUNT;
}
for ($I = 0; $I < $ARRAY_COUNT; ++$I)
{
	$ITEM_NAME = $MY_ARRAY[$I];
	if (!(find_id ($PRCS_ITEM, $ITEM_NAME)))
	{
		if ($ITEM_NAME != '[A@]')
		{
			echo '       <option value="';
			echo $ITEM_NAME;
			echo '">';
			echo $ITEM_NAME;
			echo '</option>
		 ';
			continue;
		}
		continue;
	}
}
if (!(find_id ($PRCS_ITEM, '[A@]')))
{
	if ($FLOW_DOC == '1')
	{
		echo '       <option value="[A@]">流程公共附件</option>
		 ';
	}
}
echo '    </select>
	<input type="button" value=" 全 选 " onclick="func_select_all2();" class="SmallInput">
	</td>
</tr>
<tr bgcolor="#CCCCCC">
	<form action="submit2.php" method="post" name="form1">
	<td colspan="3" class="small">
	<b>设定允许在不可写情况下自动赋值的宏控件,名称用英文逗号隔开:</b><br>
	<input type="text" class="BigInput" name="PRCS_ITEM_AUTO"  value="';
echo $PRCS_ITEM_AUTO;
echo '" size=50>
	</td>
</tr>
<tr bgcolor="#CCCCCC">
	<td align="center" valign="top" colspan="3">
	点击条目时,可以组合CTRL或SHIFT键进行多选<br>
		<input type="button" class="BigButton" value="保 存" onclick="mysubmit();">&nbsp;&nbsp;&nbsp;&nbsp;
';
if ($GRAPH == 1)
{
	echo '        <input type="button"  value="关 闭" class="BigButton" name="back" onClick="window.close();">
';
}
else
{
	echo '        <input type="button" class="BigButton" value="返 回" onclick="location=\'index.php?FLOW_ID=';
	echo $FLOW_ID;
	echo '\'">
';
}
echo '      <input type=\'hidden\' value="';
echo $GRAPH;
echo '" name="GRAPH">
		<input type="hidden" name="FLOW_ID" value="';
echo $FLOW_ID;
echo '">
		<input type="hidden" name="ID" value="';
echo $ID;
echo '">
		<input type="hidden" name="FLD_STR" value="">
	</form>
	</td>
</tr>
</table>
</body>
</html>
';
?>

⌨️ 快捷键说明

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