📄 shenpi.asp
字号:
<%
response.expires=-1
dim ThisKey
ThisKey = "b"
%>
<!--#include file="../inc/permission.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Date.asp"-->
<!--#include file="../../inc/RightsForOne.asp"-->
<%
ID=trim(request("ID"))
LoginName=Session("LoginName")
If RightsForOne(ID,LoginName)<3 Then
Response.Write "<Script Language='JavaScript'>"
Response.Write "alert('你没有编辑此项目的权限');"
Response.Write "self.close();"
Response.Write "</Script>"
Response.End
End If
%>
<html>
<head>
<title>修改投资情况</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet href="../css/main.css" type="text/css">
</head>
<%
set rs=server.createobject("adodb.recordset")
if trim(request("Del"))="1" then
conn.execute("delete from tblShenpi where ID="&trim(request("FID")))
response.redirect("Shenpi.asp?typet="&typet&"&ID="&trim(request("ID")))
end if
if trim(request("submit"))="确 定" then
FID=trim(request("FID"))
Item=replace(trim(request("Item")),"'","''")
Name=replace(trim(request("Name")),"'","''")
ShangbaoUnit=trim(request("ShangbaoUnit"))
ShangbaoNo=replace(trim(request("ShangbaoNo")),"'","''")
ShangbaoTime=replace(trim(request("ShangbaoTime")),"'","''")
ShenpiUnit=replace(trim(request("ShenpiUnit")),"'","''")
ShenpiNo=replace(trim(request("ShenpiNo")),"'","''")
ShenpiTime=replace(trim(request("ShenpiTime")),"'","''")
InvestPlan=replace(trim(request("InvestPlan")),"'","''")
Xinxiangmubiao=replace(trim(request("Xinxiangmubiao")),"'","''")
InputDate=replace(trim(request("InputDate")),"'","''")
content=trim(request("Content"))
if content="<HEAD><META content=""MSHTML 6.00.2600.0"" name=GENERATOR><BODY></BODY>" then
kcqksu=1
else
content=replace(content,"<HEAD><META content=""MSHTML 6.00.2600.0"" name=GENERATOR>","")
content=replace(replace(content,"",""),"</HEAD>","")
content=replace(replace(content,"<BODY>",""),"</BODY>","")
content=replace(content,"<A href=","<A target=""_blank"" href=")
content=replace(content,"<P>","")
content=replace(content,"</P>","<br>")
content=replace(content,"'","''")
'p=instr(kcqk,"<SPAN")
'while p>0
' i=instr(kcqk,"<SPAN")
' j=instr(i+5,kcqk,">")
' if i<>0 and j<>0 then
' kcqk_str=mid(kcqk,i,j-i+1)
' kcqk=replace(kcqk,kcqk_str,"")
' end if
' p=instr(kcqk,"<SPAN")
'wend
if content="" then
content=" "
end if
end if
if trim(request("FID"))="0" then
rs.open "select * from tblShenpi where ID is NULL",conn,1,2
rs.addnew
rs("ProjectID")=ID
rs("Item")=Item
rs("Name")=Name
rs("Content")=Content
rs("ShangbaoUnit")=ShangbaoUnit
rs("ShangbaoNo")=ShangbaoNo
rs("ShangbaoTime")=ShangbaoTime
rs("ShenpiUnit")=ShenpiUnit
rs("ShenpiNo")=ShenpiNo
rs("ShenpiTime")=ShenpiTime
rs("InvestPlan")=InvestPlan
rs("Xinxiangmubiao")=Xinxiangmubiao
rs("InputDate")=InputDate
rs("InputTime")=now()
rs.update
rs.close
response.write " 添加成功! <a href=# onclick='javascript:window.close();'>[关闭窗口]</a> "
else
rs.open "select * from tblShenpi where ID="&FID,conn,1,2
rs("Item")=Item
rs("Name")=Name
rs("Content")=Content
rs("ShangbaoUnit")=ShangbaoUnit
rs("ShangbaoNo")=ShangbaoNo
rs("ShangbaoTime")=ShangbaoTime
rs("ShenpiUnit")=ShenpiUnit
rs("ShenpiNo")=ShenpiNo
rs("ShenpiTime")=ShenpiTime
if Item="年度计划" then
rs("InvestPlan")=InvestPlan
rs("Xinxiangmubiao")=Xinxiangmubiao
end if
rs.update
rs.close
response.write " 修改成功! <a href=# onclick='javascript:window.close();'>[关闭窗口]</a> "
end if
end if
rs.open "select Name from tblBase where ID="&ID,conn,1,1
if not rs.eof then
ProjectName=trim(rs("Name"))
end if
rs.close
rs.open "select * from tblShenpi where ProjectID="&ID,conn,1,1
if not rs.eof then
reTotal=rs.recordcount
end if
if trim(request("num"))="" then
num=1
else
num=trim(request("num"))
end if
for i=1 to num-1
if not rs.eof then
rs.movenext
end if
next
FID=0
if trim(request("new"))<>"1" then
if not rs.eof then
FID=rs("ID")
Item=trim(rs("Item"))
Name=trim(rs("Name"))
Content=rs("Content")
ShangbaoUnit=trim(rs("ShangbaoUnit"))
ShangbaoNo=trim(rs("ShangbaoNo"))
ShangbaoTime=trim(rs("ShangbaoTime"))
ShenpiUnit=trim(rs("ShenpiUnit"))
ShenpiNo=trim(rs("ShenpiNo"))
ShenpiTime=trim(rs("ShenpiTime"))
InvestPlan=trim(rs("InvestPlan"))
Xinxiangmubiao=trim(rs("Xinxiangmubiao"))
InputDate=trim(rs("InputDate"))
InputTime=trim(rs("InputTime"))
end if
end if
rs.close
for j=1 to reTotal
if j=cint(num) then
response.write "  <a href='Shenpi.asp?typet="&typet&"&ID="&ID&"&num="&j&"'><font color=red>["&j&"]</font></a>"
else
response.write "  <a href='Shenpi.asp?typet="&typet&"&ID="&ID&"&num="&j&"'>["&j&"]</a>"
end if
next
if cint(FID)<>0 then
response.write " <a href='Shenpi.asp?typet="&typet&"&ID="&ID&"&FID="&FID&"&Del=1'>删除当前记录</a>"
end if
response.write " <a href='Shenpi.asp?typet="&typet&"&ID="&ID&"&new=1'>添加新记录</a>"
%>
<BODY bgcolor="#FFCC33" leftmargin=0 topmargin=5 onload="doLoad();">
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<form name="SubmitForm" method="post" action="Shenpi.asp" onsubmit="get_html();">
<tr>
<td valign="middle" align="center" style="border-left:1 solid #0047b0;border-top:1 solid #0047b0;border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<input type="hidden" name="ID" value="<%=ID%>">
<input type="hidden" name="FID" value="<%=FID%>">
<input type="hidden" name="num" value="<%=num%>">
<input type="hidden" name="typet" value="<%=typet%>">
<input type=hidden name=Content1 value='<%=Content%>'>
<tr valign="middle" align="left">
<td width=90 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">项目名称</td>
<td width=410 align="left" style="border-bottom:1 solid #0047b0"> <%=ProjectName%></td>
</tr>
<tr valign="middle">
<td align=center width=90 style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">审批对象</td>
<td width=410 align="left" style="border-bottom:1 solid #0047b0">
<select name="Item" onchange="Show()">
<option value="项目建议书" <%if Item="项目建议书" then%>selected<%end if%>>项目建议书</option>
<option value="可行性研究报告" <%if Item="可行性研究报告" then%>selected<%end if%>>可行性研究报告</option>
<option value="初步设计" <%if Item="初步设计" then%>selected<%end if%>>初步设计</option>
<option value="项目备案" <%if Item="项目备案" then%>selected<%end if%>>项目备案</option>
</select>
</td>
</tr>
<tr valign="middle" align="left" id=n1 style="display:<%if Item="项目备案" then%>none<%end if%>">
<td width=90 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">名称</td>
<td width=410 align="left" style="border-bottom:1 solid #0047b0"><input type=text name=Name value="<%=Name%>" size=56></td>
</tr>
<tr valign="middle" align="left">
<td width=90 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0"><span id=x1 style="display:<%if Item="项目备案" then%>none<%end if%>">内容</span><span id=b1 style="display:<%if Item<>"项目备案" then%>none<%end if%>">备案情况</span></td>
<td width=410 align="left" style="border-bottom:1 solid #0047b0"><IFRAME NAME=EditCtrl WIDTH=100%></IFRAME></td>
</tr>
</table>
<span style="display:none"><textarea name=Content rows=6 cols=86></textarea></span>
<table border=0 cellpadding=0 cellspacing=0 width="500" align=center>
<tr valign="middle" align="left">
<td width=91 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">上报单位</td>
<td width=159 align="left" style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0"><input type=text name=ShangbaoUnit value="<%=ShangbaoUnit%>" size=21></td>
<td width=90 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">上报文号</td>
<td width=160 align="left" style="border-bottom:1 solid #0047b0"><input type=text name=ShangbaoNo value="<%=ShangbaoNo%>" size=21></td>
</tr>
<tr valign="middle" align="left">
<td width=91 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">上报时间</td>
<td colspan=3 align="left" style="border-bottom:1 solid #0047b0"><input type=text name=ShangbaoTime value="<%if ShangbaoTime<>"" then%><%=ShangbaoTime%><%else%><%=date1%><%end if%>" size=21></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 width="500" align=center>
<tr valign="middle" align="left">
<td width=91 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0"><span id=xx style=<%if Item="项目备案" then%>"display:none"<%end if%>>审批单位</span><span id=bb style=<%if Item<>"项目备案" then%>"display:none"<%end if%>>备案单位</span></td>
<td width=159 align="left" style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0"><input type=text name=ShenpiUnit value="<%=ShenpiUnit%>" size=21></td>
<td width=90 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0"><span id=xxx style=<%if Item="项目备案" then%>"display:none"<%end if%>>审批文号</span><span id=bbb style=<%if Item<>"项目备案" then%>"display:none"<%end if%>>备案文号</span></td>
<td width=160 align="left" style="border-bottom:1 solid #0047b0"><input type=text name=ShenpiNo value="<%=ShenpiNo%>" size=21></td>
</tr>
<tr valign="middle" align="left">
<td width=91 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0"><span id=xxxx style=<%if Item="项目备案" then%>"display:none"<%end if%>>审批时间</span><span id=bbbb style=<%if Item<>"项目备案" then%>"display:none"<%end if%>>备案时间</span></td>
<td colspan=3 align="left" style="border-bottom:1 solid #0047b0"><input type=text name=ShenpiTime value="<%if ShenpiTime<>"" then%><%=ShenpiTime%><%else%><%=date1%><%end if%>" size=21></td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle" align="left">
<td width=89 align=center style="border-bottom:1 solid #0047b0;border-right:1 solid #0047b0">数据录入时间</td>
<td width=411 align="left" style="border-bottom:1 solid #0047b0"><%if InputDate<>"" then%> <%=InputDate%> <%else%> <%=date2%><input type=hidden name=InputDate value="<%=date2%>"><%end if%></td>
</tr>
<tr align="center" valign="middle">
<td colspan="2" valign="middle" align="center">
<INPUT TYPE="submit" name="submit" value="确 定">
<input type="reset" name="exit" value="重 写">
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</BODY>
</HTML>
<script language="JavaScript">
function Show(){
if (document.all("Item").value=="年度计划"){
//document.all("t").style.display = "";
//document.all("tt").style.display = "none";
document.all("n1").style.display = "";
document.all("x1").style.display = "";
document.all("xx").style.display = "";
document.all("xxx").style.display = "";
document.all("xxxx").style.display = "";
document.all("b1").style.display = "none";
document.all("bb").style.display = "none";
document.all("bbb").style.display = "none";
document.all("bbbb").style.display = "none";
}
else{
if (document.all("Item").value=="项目备案"){
document.all("t").style.display = "none";
//document.all("tt").style.display = "";
document.all("n1").style.display = "none";
document.all("x1").style.display = "none";
document.all("xx").style.display = "none";
document.all("xxx").style.display = "none";
document.all("xxxx").style.display = "none";
document.all("b1").style.display = "";
document.all("bb").style.display = "";
document.all("bbb").style.display = "";
document.all("bbbb").style.display = "";
}
else{
//document.all("t").style.display = "none";
//document.all("tt").style.display = "";
document.all("n1").style.display = "";
document.all("x1").style.display = "";
document.all("xx").style.display = "";
document.all("xxx").style.display = "";
document.all("xxxx").style.display = "";
document.all("b1").style.display = "none";
document.all("bb").style.display = "none";
document.all("bbb").style.display = "none";
document.all("bbbb").style.display = "none";
}
}
}
ls=document.SubmitForm.Content1.value
function get_html() {
if (true) {
document.SubmitForm.Content.value = EditCtrl.document.all[0].innerHTML
}
}
function doLoad() {
EditCtrl.document.designMode="on"
EditCtrl.focus()
EditCtrl.document.write(ls+" ")
}
</script>
<!--#include file="../inc/close.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -