selected.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 181 行
PHP
181 行
<?
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">
</head>
';
echo '<s';
echo 'cript>
var ParentWindow=parent.opener.window;
var DirArray = new Array();
var NameArray = new Array();
var TypeArray = new Array();
if(ParentWindow.document.all("';
echo $DIR_FIELD;
echo '")&&ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value!="")
DirArray=ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value.split("*");
if(ParentWindow.document.all("';
echo $NAME_FIELD;
echo '")&&ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value!="")
NameArray=ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value.split("*");
if(ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '")&&ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value!="")
TypeArray=ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value.split("*");
function DoLoad()
{
if(NameArray.length==0 && document.getElementById("BodyDiv"))
{
document.getElementById("BodyDiv").innerHTML="<br><div align=center>';
echo '<s';
echo 'pan style=\'BACKGROUND:#EEEEFF;COLOR:#FF6633;margin: 10px;border:1px dotted #FF6633;font-weight:bold;padding:8px;width=140\'>尚无选择文件</span></div>";
return;
}
var BodyDivInnerHTML="<table border=0 cellspacing=1 width=100% class=small bgcolor=#000000 cellpadding=3><thead class=TableHeader align=center><td width=40>选择</td><td>文件名</td></thead>";
for(i=0;i<NameArray.length;i++)
';
echo ' {
if(NameArray[i]=="")
continue;
BodyDivInnerHTML+="<tr class=TableData><td align=center><input type=checkbox name=email_select onclick=\'SelFile()\' checked></td><td>"+NameArray[i]+"</td></tr>";
}
BodyDivInnerHTML+="</table>";
document.getElementById("BodyDiv").innerHTML=BodyDivInnerHTML;
//alert(document.getElementById("BodyDiv").innerHTML)
}
function SelFile(';
echo ')
{
if(!ParentWindow.document.all("';
echo $DIR_FIELD;
echo '") || !ParentWindow.document.all("';
echo $NAME_FIELD;
echo '") || !ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '") || !ParentWindow.document.getElementById("';
echo $DIV_ID;
echo '"))
return;
ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value="";
ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value="";
ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value="";
ParentWindow.document.getElementById("';
echo $DIV_ID;
echo '").innerHTML="";
for(i=0;i<document.all("email_select").length;i++)
{
var el=document.all("email_select").item(i);
if(!el.checked)
continue;
';
if ($MULTI_SELECT)
{
echo ' ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value+=DirArray[i]+"*";
ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value+=NameArray[i]+"*";
ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value+=TypeArray[i]+"*";
ParentWindow.document.getElementById("';
echo $DIV_ID;
echo '").innerHTML+=NameArray[i]+"<br>";
';
}
else
{
echo ' ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value=DirArray[i];
ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value=NameArray[i];
ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value=TypeArray[i];
ParentWindow.document.getElementById("';
echo $DIV_ID;
echo '").innerHTML=NameArray[i];
';
}
echo ' }
if(i==0 && document.all("email_select").checked)
{
';
if ($MULTI_SELECT)
{
echo ' ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value+=DirArray[i]+"*";
ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value+=NameArray[i]+"*";
ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value+=TypeArray[i]+"*";
ParentWindow.document.getElementById("';
echo $DIV_ID;
echo '").innerHTML+=NameArray[i]+"<br>";
';
}
else
{
echo ' ParentWindow.document.all("';
echo $DIR_FIELD;
echo '").value=DirArray[i];
ParentWindow.document.all("';
echo $NAME_FIELD;
echo '").value=NameArray[i];
ParentWindow.document.all("';
echo $TYPE_FIELD;
echo '").value=TypeArray[i];
ParentWindow.document.getElementById("';
echo $DIV_ID;
echo '").innerHTML=NameArray[i];
';
}
echo ' }
}
</script>
<body class="bodycolor" topmargin="0" onload="DoLoad();">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_open.gif" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 已选择文件</span>
</td>
</tr>
</table>
<div id="BodyDiv" width="100%"></div>
<br>
<div align="center">
<input type="button" value="关闭" class="BigButton" onClick="parent.window.close();">
</div>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?