添加电影时,图片不能上传;不能显示在线人数???
代码如下: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");
%>
感谢大侠们,帮我看看,是什么地方出问题了。