📄 send_email.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title>EMAIL工资条</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script src="/inc/js/module.js"></script>
<script>
function func_find(select_obj,option_text)
{
pos=option_text.indexOf("] ")+1;
option_text=option_text.substr(0,pos);
for (j=0; j<select_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=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;
//pos=func_find(select1,option_text);
select1.add(my_option);
select2.remove(i);
}
}//for
}
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;
//pos=func_find(select2,option_text);
select2.add(my_option);
select1.remove(i);
}
}//for
}
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 mysubmit()
{
fld_str="";
for (i=0; i< select1.options.length; i++)
{
options_value=select1.options(i).value;
fld_str+=options_value+",";
}
document.all("STYLE").value=fld_str;
}
function exreport()
{
fld_str="";
for (i=0; i< select1.options.length; i++)
{
options_value=select1.options(i).value;
fld_str+=options_value+",";
}
URL="email_result.php?COPY_TO_ID="+document.all("COPY_TO_ID").value+"&fld_str="+fld_str+"&FLOW_ID="+document.all("FLOW_ID").value;
location=URL;
}
</script>
</head>
<body class="bodycolor" topmargin="5" >
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/email.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> EMAIL工资条</span>
</td>
</tr>
</table>
<br>
<div align="center">
<table class="TableBlock" align="center" >
<tr>
<form name="form1">
<td nowrap class="TableContent"> 人员: </td>
<td nowrap class="TableData">
<input type="hidden" name="COPY_TO_ID" value="">
<textarea cols=40 name="COPY_TO_NAME" rows=3 class="BigStatic" wrap="yes" readonly></textarea>
<a href="javascript:;" class="orgAdd" onClick="SelectUser('','COPY_TO_ID', 'COPY_TO_NAME')">选择</a>
<a href="javascript:;" class="orgClear" onClick="ClearUser('COPY_TO_ID', 'COPY_TO_NAME')">清空</a>
</td>
</form>
</tr>
<tr>
<td nowrap class="TableContent"> 输出内容:</td>
<td nowrap class="TableData" align="left">
<table width="150" class="TableBlock">
<tr bgcolor="#CCCCCC">
<td align="center"><b>显示字段</b></td>
<td align="center"> </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">
<?
$query = "SELECT STYLE from SAL_FLOW where FLOW_ID=$FLOW_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$STYLE=$ROW["STYLE"];
}
if ($STYLE!="")
{
$STYLE_ARRAY=explode(",",$STYLE);
$ARRAY_COUNT=sizeof($STYLE_ARRAY);
$COUNT=0;
if($STYLE_ARRAY[$ARRAY_COUNT-1]=="")$ARRAY_COUNT--;
for($I=0;$I<$ARRAY_COUNT;$I++)
{
$query1 = "select ITEM_ID,ITEM_NAME from SAL_ITEM where ITEM_ID='$STYLE_ARRAY[$I]'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
{
$ITEM_NAME=$ROW["ITEM_NAME"];
$ITEM_ID=$ROW["ITEM_ID"];
}
?>
<option value="<?=$ITEM_ID?>"><?=$ITEM_NAME?></option>
<?
}
}
?>
</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">
<?
$query = "SELECT ITEM_ID,ITEM_NAME from SAL_ITEM where ISPRINT='1' ORDER BY `ITEM_ID`";
$cursor=exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
$ITEM_ID=$ROW["ITEM_ID"];
$ITEM_NAME=$ROW["ITEM_NAME"];
$sign=0;
for($I=0;$I<$ARRAY_COUNT;$I++)
{
if($STYLE_ARRAY[$I]==$ITEM_ID)$sign=1;
}
if($sign==0)
{
?>
<option value="<?=$ITEM_ID?>"><?=$ITEM_NAME?></option>
<?
}
}
?>
</select>
<input type="button" value=" 全 选 " onClick="func_select_all2();" class="SmallInput">
</td>
</tr>
</table>
</td>
</tr>
<tfoot align="center" class="TableFooter">
<td nowrap colspan="4" align="center">
<input type="hidden" name="FLOW_ID" value="<?=$FLOW_ID?>">
<input type="hidden" name="STYLE" value="">
<input type="submit" value="确定" class="BigButton" name="button" onClick="exreport()">
<input type="submit" value="返回" class="BigButton" name="button" onClick="location='index.php'">
</td>
</tfoot>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -