📄 fawen1.asp
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" -->
<html>
<head>
<title>办公自动化(OA)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
function MakeName()
dim fname
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
fname = int(fname) + int((10-1+1)*Rnd + 1)
MakeName=fname
end function
if Request.ServerVariables("Request_Method")="POST" and request("flag")="2" then
set bzwb=server.createobject("oaserver.fawen1")
bzwb.main(conn)
response.write("<script language=javascript>alert('提交公文成功!')</script>")
response.write("<script>document.location='right.asp'</script>")
response.end
end if
LocalFile="fawen1.asp"
DocFile="loadhg.asp"
SaveFile="savehg.asp"
PsoFile="pso.asp"
HttpUrl="http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
HttpUrl=Left(HttpUrl,Len(HttpUrl)-Len(LocalFile))
DocUrl=HttpUrl & DocFile
SaveUrl=HttpUrl & SaveFile
PsoUrl=HttpUrl & PsoFile
%>
<link rel="stylesheet" href="fawen.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false">
<!--#include file="checkuser.asp"-->
<%set rs=server.createobject("adodb.recordset")
flowid=CLng(request("flowid"))
if flowid="" then response.end
session("fawenid")=flowid
sql="select * from fawen where id="&flowid
rs.open sql,conn,1,1
if rs.eof then
response.redirect "error.htm"
response.end
end if
DocumentName=rs("documentname")
%>
<script language="JavaScript" src="fawen.js"></script>
<script language="JavaScript">
function checkform() {
if (form.wenhao.value=="") {
alert("请填写发文号!")
form.wenhao.focus()
return false
}
if (form.mainsend.value=="") {
alert("你的主送单位没有填写!")
form.mainsend.focus()
return false
}
if (form.title.value=="") {
alert("你没有填写发文主题!")
form.title.focus()
return false
}
if (form.hiddenselect.value=="") {
alert("你没有选择办理人!")
form.username.focus()
return false
}
if (form.opendoc.value=="") {
alert("你还没有修改公文正文呢!")
return false;
}
if(document.form.file.value!="") {
var isValid=1
var temp=document.form.file.value
if(temp.indexOf(".")==-1) {isValid=0}
if(temp.indexOf("\\")==-1) {isValid=0}
if (isValid==0) {alert("附件路径有误!");document.form.file.focus();return false;}
}
if (!confirm("您是否要提交公文呢?"))
{return false;}
else
{ SaveUrl="<%=SaveUrl%>"
FileName="<%=documentname%>"
FileSize="<%=session("MaxSize")%>"
FilePath="" //为空表示文件在默认位置
result=form.web.upload(SaveUrl,FileName,FilePath,FileSize) //上传公文到数据库
if (!result)
{
alert("找不到公文或与服务器连接失败!")
return false;
} //公文上传失败,返回起草公文页面
if(document.form.file.value!="") { //如果有附件上传附件
var result=false
var PsoUrl="<%=PsoUrl%>" //保存附件文件url路径
var MaxSize="<%=session("MaxSize")%>" //限制上传附件文件的大小
var PsoPath=document.form.file.value //定义附件路径
var PsoFile //定义附件的文件名
var PsoType //定义附件的扩展名
PsoFile=PsoPath
while(PsoFile.indexOf("\\")>0) //获得附件的文件名
{
i = PsoFile.indexOf("\\")
PsoFile = PsoFile.substring(i + 1, PsoFile.length);
} //获得附件的文件名
PsoPath=PsoPath.substring(0,PsoPath.lastIndexOf("\\")) //获得附件的路径
PsoType=PsoFile
if (PsoType.lastIndexOf(".")>0) //获得附件的扩展名
{
i = PsoType.lastIndexOf(".")
PsoType = PsoType.substring(i + 1, PsoType.length);
}
result=form.web.upload(PsoUrl,PsoFile,PsoPath,MaxSize) //向服务器上传附件
if (!result)
{
alert("对不起,你选择的附件不存在!")
document.form.fujian.value=""
document.form.file.focus();
return false; //上传附件失败,返回起草公文页面
}
document.form.fujian.value=PsoFile
document.form.fujiantype.value=PsoType
//form.web.delfile() //删除临时文件
} //上传附件完毕
} //上传公文与附件完毕
}
</script>
<form name="form" method="POST" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="400">
<tr height="25" valign="middle">
<td valign="middle" height="50" align="center"> <img src="images/gwng.gif" width="114" height="24">
</td>
<td height="50" valign="top" align="left"> </td>
</tr>
<tr height="25">
<td height="25" valign="top" align="center" >
<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="990000">
<tr bgcolor="ffffff" valign="middle">
<td height="35" width="46%"> 文 号:
<input type="text" class="fileinput" title="单击,请输入文件号" name="wenhao" size="20" value="<%=rs("wenhao")%>">
</td>
<td height="35" width="27%"> 密 级:
<select name="miji">
<option value="普通" selected>普通</option>
<option value="秘密">秘密</option>
<option value="绝密">绝密</option>
</select>
</td>
<td height="35" width="27%">缓 急:
<select name="huanji">
<option value="一般" selected>一般</option>
<option value="紧急">紧急</option>
<option value="加急">加急</option>
</select>
</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35"> 保密期限:
<input type="text" name="baomiqx" class="fileinput" title="单击,请输入保密时限" size="10" maxlength="4" value="<%=rs("baomiqx")%>">
</td>
<td height="35" colspan="2"> 定密依据:
<input type="text" class="fileinput" title="单击,请输入定密依据" name="dingmiyj" size="20" value="<%=rs("dingmiyj")%>">
</td>
</tr>
<tr valign="top">
<td height="70" bgcolor="f5f5f5">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr bgcolor="ffffff">
<td valign="top" width="27%" bgcolor="f5f5f5"> 核稿意见: </td>
<td valign="top" width="73%" bgcolor="f5f5f5"><font class="bblue"><%=rs("name_hg")%>
</font></td>
</tr>
</table>
</td>
<td height="70" colspan="2" bgcolor="f5f5f5">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td valign="top" width="27%"> 审核意见:</td>
<td valign="top" width="73%"><font class="bblue"><%=rs("name_sh")%></font></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="f5f5f5" valign="top">
<td height="70">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="27%" valign="top"> 签 发:</td>
<td width="73%" valign="top"> <font class="bblue"><%=rs("name_qf")%></font>
</td>
</tr>
</table>
</td>
<td height="70" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td valign="top" width="27%"> 会 签:</td>
<td valign="top" width="73%"><font class="bblue"><%=rs("name_hq")%></font></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35" colspan="3"> 主 送:
<input type="text" class="fileinput" title="单击,请输入主送部门" name="mainsend" size="40" maxlength="48" value="<%=rs("mainsend")%>">
</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35" colspan="3"> 抄 送:
<input type="text" name="tosend" title="单击,请输入抄送部门" class="fileinput" size="40" maxlength="48" value="<%=rs("tosend")%>">
</td>
</tr>
<tr bgcolor="f5f5f5" valign="middle">
<td height="35" width="46%"> 拟稿单位:<font class="bblue"><%=session("dep")%></font></td>
<td height="35"> 拟 稿 人:<font class="bblue"><%=session("username")%></font></td>
<td height="35"> 核 稿 人:</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35" width="46%" bgcolor="f5f5f5"> 印 制: </td>
<td height="35" bgcolor="f5f5f5"> 校 对: </td>
<td height="35"> 份 数:
<input type="text" name="copy" title="单击,请输入份数" class="fileinput" size="10" maxlength="5" value="<%=rs("copy")%>">
</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35" colspan="3">
<input type="image" name="Submit" value="公文正文" onClick="return OpenWindows()" src="images/zhengwengif.gif" alt="公文正文">
附 件:
<input type="file" name="file" >
</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35" colspan="3"> 标 题:
<input type="text" name="title" title="单击,请输入文件标题" class="fileinput" maxlength="48" size="48" value="<%=rs("title")%>">
</td>
</tr>
<tr bgcolor="ffffff" valign="middle">
<td height="35" colspan="3"> 主 题 词:
<input type="text" name="keyword" title="单击,请输入文件主题词" class="fileinput" maxlength="48" size="48" value="<%=rs("keywords")%>">
</td>
</tr>
</table>
</td>
<td valign="top" align="center" width="180" >
<!--#include file="turnonefawen.asp"-->
</td>
</tr>
<tr>
<td valign="bottom" height="35" class="bblue" align="center">下一流程:
<select name="typed">
<option value="1">核稿</option>
<option value="2">审核</option>
<option value="4">签发</option>
</select>
<input class=lineinput type="text" name="username" size="14" maxlength="20" value="请选择办理人" onClick="checkpeople()" style="cursor:hand">
<input type="image" name="send" value="提交公文" onClick="return checkform()" src="images/addpapergif.gif" alt="提交公文">
<input type="image" name="send2" value=" 返 回 " onClick="history.go(-1);return false;" src="images/fanhuigif.gif" alt="返回">
</td>
<td valign="bottom" height="35" >
<input type="hidden" name="hiddenselect">
<input type="hidden" name="hiddennum" value="0">
<input type="hidden" name="single" value="1">
<input type="hidden" name="flag" value="2">
<input type="hidden" name="fujian">
<input type="hidden" name="opendoc">
<input type="hidden" name="fujiantype">
<input type="hidden" name="nwid" value="<%=request("nwid")%>">
</td>
</tr>
<tr>
<td valign="top" height="25" colspan="3" >
<div align="left">
<object classid="clsid:8C9AA244-AC33-47F9-8968-CC114654A6EC" codebase="web.ocx" id="web" width="1" height="1">
<param name="_ExtentX" value="370">
<param name="_ExtentY" value="370">
</object> </div>
</td>
</tr>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<script language=javascript>
function OpenWindows() //下载打开公文函数
{
var DocumentName="<%=DocumentName%>"
if(document.form.opendoc.value=="") //如果ckicknum的值为空说明还没有下载公文
{
var result
HTTPURL="<%=DocUrl%>"
result=form.web.download(HTTPURL,DocumentName); //判断下载文件是否成功
if (!result)
{
alert("打开公文失败,请与管理员联系!")
return false;
}
else {
document.form.opendoc.value=DocumentName
}
}
var url="writeword.asp?documentname="+DocumentName //调用writeword.asp来打开文件
newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,top=0,left=150,resizable=yes,width=850,height=600");
return false;
}
</script>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -