添加电影时,图片不能上传;不能显示在线人数???

lycxiayu 2005-11-26 05:21:30
代码如下:admin_uploadsave1.asp

<%
OPTION EXPLICIT
Server.ScriptTimeOut=5000
%>
<!--#include FILE="UpLoadClass.asp"-->


<!--#include file="security.asp"-->
<%if session("flag")>1 then
response.write "<script>alert('您的操作权限不够!');history.back();</script>"
response.end
end if
%>
<%
dim request2,FileName

'建立上传对象
set request2=New UpLoadClass
'上传总大小为20M
request2.TotalSize= 2971520
'单文件最大10M
request2.MaxSize = 2485760
'允许上传rar/zip格式文件
request2.FileType = "gif/jpg"
request2.SavePath = "tupian/"
request2.open()
%>
<html>
<head>
<title>上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="all" name="robots">

<link href="../style/basic.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 9pt;
color: #000000;
}
body {
background-color: #E1F4EE;
}
-->
</style></head>

<body>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" ">
<tr>
<td bgcolor="#E1F4EE"><blockquote>
<%
'显示类版本

if request2.Error=4 then
response.Write("<p>总数据量超过限制,上传失败</p>")
else
response.Write("<p>总数据量没超过限制</p>")
end if


'显示源文件路径与名称
response.Write("<br>文件二:"&request2.Form("file1_Path")&request2.Form("file1_Name"))
response.Write("=>")

'显示目标文件路径与名称
response.Write(request2.SavePath&request2.Form("file1"))
FileName=request2.SavePath&request2.Form("file1")
response.write "<script>parent.document.myform.domurl3.value='" & fileName & "'</script>"
Response.Write "<a href=admin_uploadsavel.asp><span class=14p>上传成功 返回</span></a>"
%>
<%= request2.Form("file1") %>
</blockquote></td>
</tr>
</table>
</body>
</html>
<%
'释放上传对象
set request2=nothing
%>

-----------------------------------
onlinecount.asp

<%@ Language=JavaScript %>
<%
var strCountData="1234567890";
var theTime=new Date();
if (typeof(Application("GuestOnline"))=="undefined")
Application("GuestOnline")="0";
function CheckGuest()
{
//Check Me
if (typeof(Session("UserName"))=="undefined")
Session("UserName")="guest";
var strUserName=String(Session("UserName"));
var strGuestOnline=String(Application("GuestOnline"));
var GuestArray=strGuestOnline.split("\n");
var i;
var iGuestNum;
if (typeof(Session("GuestNum"))=="undefined")
{
for (i=0;i<GuestArray.length;i++)
{
if (GuestArray[i]=="0") break;
}
Session("GuestNum")=i;
}

iGuestNum=Session("GuestNum")*1;
if (iGuestNum>10000)iGuestNum=10000;

var strFormatTime=theTime.getTime();
strFormatTime="0000000000000000000"+strFormatTime;
strFormatTime=strFormatTime.substr(strFormatTime.length-16,16);

GuestArray[iGuestNum]=strFormatTime+strUserName;

strGuestOnline=GuestArray.join("\n");
Application("GuestOnline")=strGuestOnline;

return 1;
}
function GetNumber()
{
//Count Guests on line
var strFormatTime=theTime.getTime()-5*60*1000;
strFormatTime="0000000000000000000"+strFormatTime;
strFormatTime=strFormatTime.substr(strFormatTime.length-16,16);

var strGuestOnline=String(Application("GuestOnline"));
var GuestArray=strGuestOnline.split("\n");

var iGuestCounter=0;
var i;
for (i=0;i<GuestArray.length;i++)
{
if (GuestArray[i].substr(0,16)> strFormatTime)
iGuestCounter++;
else if (GuestArray[i].length>0)
GuestArray[i]="0";
}
strGuestOnline=GuestArray.join("\n");
Application("GuestOnline")=strGuestOnline;
return iGuestCounter;
}

CheckGuest();
//Output
strCountData=GetNumber();

var i;
strCountData="0"+strCountData;

var strDigits= new Array(
"0", "0x3c","0x66","0x66","0x66","0x66","0x66","0x66","0x66","0x66","0x3c", //0
"1","0x30","0x38","0x30","0x30","0x30","0x30","0x30","0x30","0x30","0x30", //1
"2","0x3c","0x66","0x60","0x60","0x30","0x18","0x0c","0x06","0x06","0x7e", //2
"3","0x3c","0x66","0x60","0x60","0x38","0x60","0x60","0x60","0x66","0x3c", //3
"4","0x30","0x30","0x38","0x38","0x34","0x34","0x32","0x7e","0x30","0x78", //4
"5","0x7e","0x06","0x06","0x06","0x3e","0x60","0x60","0x60","0x66","0x3c", //5
"6","0x38","0x0c","0x06","0x06","0x3e","0x66","0x66","0x66","0x66","0x3c", //6
"7","0x7e","0x66","0x60","0x60","0x30","0x30","0x18","0x18","0x0c","0x0c", //7
"8","0x3c","0x66","0x66","0x66","0x3c","0x66","0x66","0x66","0x66","0x3c", //8
"9","0x3c","0x66","0x66","0x66","0x66","0x7c","0x60","0x60","0x30","0x1c"); //9

var iCharCount=strCountData.length;
var iCharWidth=8;
var iCharHeight=10*1;
var theBit;
var theNum;
Response.ContentType ="image/x-xbitmap";
Response.Expires =0;

Response.Write ("#define counter_width "+ iCharWidth*iCharCount+"\r\n"); //图形宽
Response.Write ("#define counter_height "+ iCharHeight+"\r\n"); //图形高
Response.Write ("static unsigned char counter_bits[]={\r\n");

for (iRow=0;iRow<iCharHeight;iRow++)
for (i=0;i<iCharCount;i++)
{
theBit=strCountData.charAt(i);
for (k=0;k<strDigits.length;k+=(iCharHeight+1))
{
if (strDigits[k]==theBit)break;
}
if (k>=strDigits.length)k=0;
theOffset=k+1;

Response.Write (strDigits[theOffset+iRow]);
Response.Write (",");
}

Response.Write ("};\r\n");
%>


感谢大侠们,帮我看看,是什么地方出问题了。
...全文
174 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lycxiayu 2005-12-08
  • 打赏
  • 举报
回复
这两句是什么问题啊???

变量未定义: 'connstr'
/articleconn.asp, 第 9 行


网页:
POST 33186 ??? /admin_uploadsave1.asp
lycxiayu 2005-12-06
  • 打赏
  • 举报
回复
...
lycxiayu 2005-11-29
  • 打赏
  • 举报
回复
不好意思,我是菜鸟,我只能判断到这个程序有问题,具体在哪里,我不能确定,请大虾们帮忙看看。不能显示,下面是错误提示:

错误类型:
Microsoft VBScript 运行时错误 (0x800A01F4)
变量未定义: 'connstr'
/articleconn.asp, 第 9 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

网页:
POST 33186 ??? /admin_uploadsave1.asp
ailincn 2005-11-27
  • 打赏
  • 举报
回复
我觉得满奇怪的,看了好些提问题的,一下子就给那么长的代码,麻烦以后再问的时候把自己写的代码加上注释,回答问题的人能清楚的明了你的的意思,有的地方就不要那么长代码了,就用汉字说明你的功能就可以了,因为数字格式、变量定义这个大家都知道,就说你哪里有问题,要解决什么就可以了
lycxiayu 2005-11-27
  • 打赏
  • 举报
回复
up...

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧