大家帮我估估价,看我该要多少钱合适呢?我是专科,下面是我一个小时写的一段ASP程序!!
3108 2004-04-02 06:27:36 <%
'##############################################################
'#### created by 3108 2004.3.31 corp. abcd
'#### 程序需要ORACLE客户端支持,需要
'#### IIS支持FSO,并且用到了绝对路径。
'##############################################################
%>
<%
Set OraSession=server.CreateObject("OracleInProcServer.XOraSession")
Set OraDatabase=OraSession.OpenDatabase("Ora817","admin/admin",Cint(0))
%>
<%
user="user_xj"
'本段代码是通过USERID,取U INFORMATION表中的auto_id
sql="select * from u_information where userid="&"'"&user&"'"
Set OraDynaset=OraDatabase.DbCreateDynaset(sql,cint(0))
While not OraDynaset.EOF
auto_id= OraDynaset.fields("auto_id").value
OraDynaset.MoveNext
wend
set OraDynaset=nothing
'取auto_id结束
%>
<%
'本段代码是通过auto_ID,取F_B520表中的CODE法人码
sql="select * from f_b520 where uinfo_id="&"'"&auto_id&"'"
Set OraDynaset=OraDatabase.DbCreateDynaset(sql,cint(0))
While not OraDynaset.EOF
code= OraDynaset.fields("code").value
OraDynaset.MoveNext
wend
set OraDynaset=nothing
'取CODE法人码结束
%>
<%
if request("keyword1")="keyword" then
year1=request("year")
month1=request("month")
checkbox=request("checkbox")
if checkbox="checkbox" then
title="EA"
else
title="EB"
end if
filename=title&code&year1&month1&".txt"
'开始生成文件名和内容
if title="EA" then
sql="select * from F_E201_1_1 where uinfo_id="&"'"&auto_id&"'"&"and ryear=200"&year1
Set OraDynaset=OraDatabase.DbCreateDynaset(sql,cint(0))
if OraDynaset.EOF then
response.write "当前报表没有填报,无法导出"&"<a href=output.asp>返回</a>"
response.end
end if
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("f:\"&filename, True)
While not OraDynaset.EOF
content=""""&code&""""
for i=1 to 8
if isnull(OraDynaset.fields("c"&i).value) then
content=content&","&"0"
else
content=content&","&OraDynaset.fields("c"&i).value
end if
next
tf.WriteLine(content)
OraDynaset.MoveNext
wend
set OraDynaset=nothing
end if
if title="EB" then
sql="select * from F_E203 where uinfo_id="&"'"&auto_id&"'"&"and ryear=200"&year1
Set OraDynaset=OraDatabase.DbCreateDynaset(sql,cint(0))
if OraDynaset.EOF then
response.write "当前报表没有填报,无法导出"&"<a href=output.asp>返回</a>"
response.end
end if
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("f:\"&filename, True)
content=""""&code&""""
While not OraDynaset.EOF
for i=2 to 3
if isnull(OraDynaset.fields("c"&i).value) then
content=content&","&"0"
else
content=content&","&OraDynaset.fields("c"&i).value
end if
next
OraDynaset.MoveNext
wend
set OraDynaset=nothing
tf.WriteLine(content)
end if
tf.Close
response.write "数据导出成功!"&"<a href=output.asp>返回</a>"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据导出程序</title>
<style type=text/css>
A:link {font-size: 9pt ; color:#0099ff; font-style: normal; text-decoration: none; cursor: hand; font-family:tahoma,verdana,helvetica,helvetica;}
A:visited {font-size: 9pt ; color:#0099ff; font-style: normal; text-decoration: none; font-family:tahoma,verdana,helvetica,helvetica;}
A:active {font-size: 9pt ; font-style: normal; text-decoration: none; font-family:tahoma,verdana,helvetica,helvetica;}
A:hover {font-size: 9pt ; color:#000000; font-style:bold; text-decoration: none; font-family:tahoma,verdana,helvetica,helvetica;}
.top{font-size: 9pt ; color:#000000; font-style: normal; text-decoration: none; font-family:tahoma,verdana,helvetica,helvetica;}
body{ font-family:tahoma,verdana,arial,helvetica; font-size: 9pt }
td{color:#000000; font-size:9pt}
.button1 {
BACKGROUND-COLOR: #eff5ee;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;
FONT-SIZE: 9pt;
width:85;
height:17;
}
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function ConfirmDelete()
{
if (form0.checkbox.checked==false && form0.checkbox1.checked==false) {
alert("请选择要导出的表!");
return false; }
if (confirm("您确认要导出吗?"))
{return true;}
else
{return false;}
}
//-->
</SCRIPT>
</head>
<body>
<table width="776" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bordercolordark=#ffffff borderlightcolor=#ffffff >
<form action="output.asp" method="get" name="form0" onSubmit="return ConfirmDelete()">
<tr align="center">
<td bgcolor="d7deea" >请选择年:
<SELECT name=year style="BACKGROUND-COLOR: #eff5ee;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;
FONT-SIZE: 9pt;
height:17;">
<%for i=1 to 9%>
<option value="<%=i%>">200<%response.write i%></option>
<%next%>
</SELECT>
请选择月:
<SELECT name=month style="BACKGROUND-COLOR: #eff5ee;
BORDER-BOTTOM: #000000 1px solid;
BORDER-LEFT: #000000 1px solid;
BORDER-RIGHT: #000000 1px solid;
BORDER-TOP: #000000 1px solid;
FONT-SIZE: 9pt;
height:17;">
<%for i=1 to 12%>
<%if i<10 then%>
<option value="0<%=i%>"><%response.write i%></option>
<%else%>
<option value="<%=i%>"><%response.write i%></option>
<%end if%>
<%next%>
</SELECT>
</td>
</tr>
<tr align="center" >
<td bgcolor="d7deea" >请选择操作的报表: <input type="checkbox" name="checkbox" value="checkbox">
<font color="red"> F_E201_1_1</font> 限额以上批发零售贸易业商品销售总值及类值 </td>
</tr>
<tr align="center" >
<td bgcolor="d7deea" > <input type="checkbox" name="checkbox1" value="checkbox1">
<font color="red">F_E203</font> 重点批发零售贸易企业主要经济指标</td>
</tr>
<tr align="center" >
<td bgcolor="d7deea" > <input type="submit" name="Submit" value="数据导出" class="button1" >
</td>
</tr>
<input type="hidden" value="keyword" name="keyWord1">
</form>
</table>
<%
dim folder,file,obj
set obj=server.CreateObject("Scripting.FileSystemObject")
set folder=obj.GetFolder("f:")'此处用到了绝对路径
for each file in folder.files
if lcase(left(file.name,1))="e" and lcase(right(file.name,3))="txt" then%>
<table width="776" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bordercolordark=#ffffff borderlightcolor=#ffffff bgcolor="d7deea">
<tr align="center" >
<td width="776" height="11"><a href="<%=file.name%>">
<%response.write file.name&"</a>"
response.write " <a href=del.asp?filename="&file.name&">删除</a><br>"
%>
</td>
</tr>
</table>
<%
end if
next
%>
</body>
</html>
=======================================================================
本人对数据库技术,CSS,JAVASCRIPT等技术都比较熟悉!!找工作!!