男孩 于2006年11月13日
个性化修改自由动力3.6版全集(四)
作者:男孩 日期:2006-08-24
问:(bgymtj 2004-6-19 10:40:00)
[求助]怎样改变首页最新文章一栏显示图片的大小?
哪位高手指教:怎样改变首页最新文章一栏显示图片的大小?谢谢
答:(bossliu )
打开 Index.asp ,找到 TempStr = Replace(TempStr,"{$ShowPicArticle1}",ShowPicArticle(0,2,20,1,1,120,90,200,false,false)),其中120为图片宽度,90为图片高度。把这两个数值修改成你需要的大小即可。
___________________________________________________________________
问:(提交人: xie0909 2004-6-15 20:02:00 )
表格涨了不知如何处理
在最新调查之间表格涨了如何修改
答:(提交人:shiyu 2004-6-15 20:11:00)
1、style="word-break:break-all;Width:fixed"
2、style="word-break:break-all;TABLE-LAYOUT: fixed">
在表格属性中加 上面其中的一个代码 看看
___________________________________________________________________
__________________________________________________
频道下面的导航栏为什么超过六个就自动换行?
答:(xiaoluo1)
inc/ function.asp
搜索mod 5=0
改成 mod 你要的栏数 =0
最好是单数
___________________________________________________________________
如果不想显示全日期时间格式可再加这句
strcol(5)=month(strcol(5))&"-"&day(strcol(5))&" "&hour(strcol(5))&":"&minute(strcol(5))
月-日 时:分
如果你有我的补零函数,可以加入补零对齐,全日期格式的如下
strcol(5)=year(strcol(5))&"-"&bl(month(strcol(5)))&"-"&bl(day(strcol(5)))&" "&bl(hour(strcol(5)))&":"&bl(minute(strcol(5)))&":"&bl(second(strcol(5)))
___________________________________________________________________
修改用户排行个数
把 index.asp 中的 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(10))
修改为 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(3))
___________________________________________________________________
注册用户添加软件后,管理员在后台审核时出错:
错误类型:
Microsoft VBScript 运行时错误 (0x800A01F4)
变量未定义: 'WebmasterName'
/36/Admin_SoftProperty.asp, 第 133 行
答:
Admin_SoftProperty.asp里
在dim....
dim.....
下加上
dim WebmasterName
___________________________________________________________________
看来有不少朋友还是不希望有登录验证码的呀!
一、1、删除User_Login.asp中的48-53行:
if (document.Login.CheckCode.value=="")
{
alert ("请输入您的验证码!");
document.Login.CheckCode.focus();
return(false);
}
2、删除88-91行:
<tr>
<td align="right">验 证 码:</td>
<td><input name="CheckCode" size="6" maxlength="4"><img src="inc/checkcode.asp"></td>
</tr>
二、1、删除User_ChkLogin.asp中的第13行:
CheckCode=replace(trim(Request("CheckCode")),"'","")
2、删除User_ChkLogin.asp中的第29-34行:
if CheckCode="" then
FoundErr=True
ErrMsg=ErrMsg & "
<li>验证码不能为空!</li>"
end if
if session("CheckCode")="" then
FoundErr=True
3、删除User_ChkLogin.asp中的第37-40行:
if CheckCode<>CStr(session("CheckCode")) then
FoundErr=True
ErrMsg=ErrMsg & "
<li>您输入的确认码和系统产生的不一致,请重新输入。</li>"
end if
三、删除 Skin\51dsn03\main.js中的15-20行:
if (document.UserLogin.CheckCode.value=="")
{
alert ("请输入您的验证码!");
document.UserLogin.CheckCode.focus();
return(false);
}
(如果你使用linux模板,还得删除该目录下的相关内容)
四、删除inc\function.asp 中的1191行:
strLogin=strLogin & "<tr><td height='25' align='right'>附加验证:</td><td height='25'><input name='CheckCode' size='4' maxlength='4'> <img src='inc/checkcode.asp'></td></tr>" & vbcrlf
现在你再试试看---OK了!
___________________________________________________________________
就软件审核这个错误
webmastername 换成 nt2003.site_info(7)
就两处
___________________________________________________________________
找到inc/syscode_article.asp,然后打开编辑第十四行TempStr = Replace(TempStr,"{$ShowPicArticle1}",ShowPicArticle(0,1,20,1,1,120,90,200,false,false))
看到(0,1,20,1,1,120,90,200,false,false))中第二个1改成2就实现了调用两个图片文章!
___________________________________________________________________
__________________________________________________________________
除掉3.6首页最新软件更新中日期前的“|”方法
在index.asp 中找到:
'=================================================
'过程名:ShowNewSoft
'作 用:显示最新软件更新
'=================================================
一、保持原日期显示格式,仅去掉前面的 | 的方法:
1、将下句中的S.Keyword,删掉
sqlNew="select top 8 S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True order by S.SoftID desc"
2、分别把下句中的strcol(11) 改为strcol(10)
strcol(5) 改为strcol(4)
strcol(8) 改为strcol(7)
strcol(9) 改为strcol(8)
strcol(10) 改为strcol(9)
strcol(7) 改为strcol(6)
strcol(5) 改为strcol(4)
strtemp = strtemp & "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font color=#ff9900>·</font><a href='Soft_Show.asp?SoftID=" & strcol(0) & "' title='软件名称:" & strcol(1) & vbcrlf & "软件版本:" & strcol(2) & vbcrlf & "文件大小:" & strcol(11) & " K" & vbcrlf & "软件作者:" & strcol(3) & vbcrlf & "更新时间:" & strcol(5) & vbcrlf & "下载次数:今日:" & strcol(8) & " 本周:" & strcol(9) & " 本月:" & strcol(10) & " 总计:" & strcol(7) & "' target='_blank'>" & gotTopic(strcol(1) & " " & strcol(2),30) & "</td><td align=right>[<font color=#999999>" & strcol(5) & "</font>]</td></tr></table>"
这样在显示的日期前的 | 就去掉了。
___________________________________________________________________
改日期显示格式为 [06-23]这样的形式,并去掉前面的 | 的方法:
1、将下句中的S.Keyword,删掉
sqlNew="select top 8 S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True order by S.SoftID desc"
2、分别把下句中的 strcol(11) 改为strcol(10)
strcol(5) 改为strcol(4)
strcol(8) 改为strcol(7)
strcol(9) 改为strcol(8)
strcol(10) 改为strcol(9)
strcol(7) 改为strcol(6)
strcol(5) 改为strcol(4)
将下句中的最后(在[<font color=#999999>"后面的 & "</font>]</td></tr></table>"删掉
strtemp = strtemp & "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font color=#ff9900>·</font><a href='Soft_Show.asp?SoftID=" & strcol(0) & "' title='软件名称:" & strcol(1) & vbcrlf & "软件版本:" & strcol(2) & vbcrlf & "文件大小:" & strcol(11) & " K" & vbcrlf & "软件作者:" & strcol(3) & vbcrlf & "更新时间:" & strcol(5) & vbcrlf & "下载次数:今日:" & strcol(8) & " 本周:" & strcol(9) & " 本月:" & strcol(10) & " 总计:" & strcol(7) & "' target='_blank'>" & gotTopic(strcol(1) & " " & strcol(2),30) & "</td><td align=right>[<font color=#999999>" </td></tr></table>"
3、在上句(已修正)的下面,添加:
if month(strcol(4))<10 then
strtemp = strtemp & "0"
end if
strtemp = strtemp & month(strcol(4)) & "-"
if day(strcol(4))<10 then
strtemp = strtemp & "0"
end if
strtemp = strtemp & day(strcol(4)) & "</font>]</td></tr></table>"
这样时间显示格式改为 [06-23] 这种格式
___________________________________________________________________
这是俺的photo_viewer.asp
增加了上一张,下一张,取图片尺寸及数码图片exif信息
评论也移植过来了,呵呵
<!--#include file="Inc/syscode_Photo.asp"-->
<!--#include file="Inc/photo_class.asp"-->
<%
'请勿改动下面这三行代码
const ChannelID=4
Const ShowRunTime="Yes"
MaxPerPage=20
SkinID=0
PageTitle="查看图片"
dim UrlID,PrevPhotoID,NextPhotoID
UrlID=trim(request("UrlID"))
if UrlID="" then
UrlID=1
else
UrlID=Clng(UrlID)
end if
FoundErr=False
if rs("PhotoLevel")<=999 then
if UserLogined<>True then
FoundErr=True
ErrMsg=ErrMsg & "对不起,本图片为收费图片,要求至少是本站的注册用户才能欣赏!<br>您还没注册或者没有登录?所以不能欣赏本图片。请赶紧 <a href='User_Reg.asp'><font color=red><b>注册</b></font></a> 或 <a href='User_Login.asp'><font color=red><b>登录</a></font></a>吧!"
else
if UserLevel>rs("PhotoLevel") then
FoundErr=True
ErrMsg=ErrMsg & "对不起,本图片为收费图片,并且只有 <font color=blue>"
if rs("PhotoLevel")=999 then
ErrMsg=ErrMsg & "注册用户"
elseif rs("PhotoLevel")=99 then
ErrMsg=ErrMsg & "收费用户"
elseif rs("PhotoLevel")=9 then
ErrMsg=ErrMsg & "VIP用户"
elseif rs("PhotoLevel")=5 then
ErrMsg=ErrMsg & "管理员"
end if
ErrMsg=ErrMsg & "级别的用户</font> 才能欣赏。你目前的权限级别不够,所以不能欣赏。"
else
if ChargeType=1 and rs("PhotoPoint")>0 then
if Request.Cookies("asp163")("Pay_Photo" & PhotoID)<>"yes" then
if UserPoint<rs("PhotoPoint") then
FoundErr=True
ErrMsg=ErrMsg &"对不起,本图片为收费图片,并且欣赏本图片需要消耗 <b><font color=red>" & rs("PhotoPoint") & "</font></b> 点!"
ErrMsg=ErrMsg &"而你目前只有 <b><font color=blue>" & UserPoint & "</font></b> 点可用。点数不足,无法欣赏本图片。请与我们联系进行充值。"
else
if lcase(trim(request("Pay")))="yes" then
Conn_User.execute "update " & db_User_Table & " set " & db_User_UserPoint & "=" & db_User_UserPoint & "-" & rs("PhotoPoint") & " where " & db_User_Name & "='" & UserName & "'"
response.Cookies("asp163")("Pay_Photo" & PhotoID)="yes"
else
FoundErr=True
ErrMsg=ErrMsg & "<font color=red><b>注意</b></font>:欣赏本图片需要消耗 <font color=red><b>" & rs("PhotoPoint") & "</b></font>"
ErrMsg=ErrMsg &"你目前尚有 <b><font color=blue>" & UserPoint & "</font></b> 点可用。阅读本文后,你将剩下 <b><font color=green>" & UserPoint-rs("PhotoPoint") & "</font></b> 点"
ErrMsg=ErrMsg &"<br><br>你确实愿意花费 <b><font color=red>" & rs("PhotoPoint") & "</font></b> 点来欣赏本图片吗?"
ErrMsg=ErrMsg &"<br><br><a href='Photo_Viewer.asp?Pay=yes&UrlID=" & UrlID & "&PhotoID=" & PhotoID & "'>我愿意</a> <a href='index.asp'>我不愿意</a></p>"
end if
end if
end if
elseif ChargeType=2 then
if ValidDays<=0 then
FoundErr=True
ErrMsg=ErrMsg & "<font color=red>对不起,本图片为收费图片,而您的有效期已经过期,所以无法欣赏本图片。请与我们联系进行充值。</font>"
end if
end if
end if
end if
end if
if FoundErr<>True then
sql = "update photo set Hits=Hits+1"
if datediff("D",rs("LastHitTime"),now())<=0 then
sql=sql&",DayHits=DayHits+1"
else
sql=sql&",DayHits=1"
end if
if datediff("ww",rs("LastHitTime"),now())<=0 then
sql=sql&",WeekHits=WeekHits+1"
else
sql=sql&",WeekHits=1"
end if
if datediff("m",rs("LastHitTime"),now())<=0 then
sql=sql&",MonthHits=MonthHits+1"
else
sql=sql&",MonthHits=1"
end if
sql=sql&",LastHitTime=now()"
set rs=nt2003.execute(sql)
end if
nt2003.LoadTemplates("index")
nt2003.head()
call ConnectionDatabase()
sql="select * from Photo where PhotoID="&PhotoID&""
set rs=nt2003.execute(sql)
%>
<script language=javascript>
function smallit(){
var height1=PhotoViewer.images1.height;
var width1=PhotoViewer.images1.width;
PhotoViewer.images1.height=height1/1.2;
PhotoViewer.images1.width=width1/1.2;
}
function bigit(){
var height1=PhotoViewer.images1.height;
var width1=PhotoViewer.images1.width;
PhotoViewer.images1.height=height1*1.2;
PhotoViewer.images1.width=width1*1.2;
}
function fullit()
{
var width_s=screen.width-10;
var height_s=screen.height-30;
window.open("Photo_View.asp?UrlID=<%=UrlID%>&PhotoID=<%=PhotoID%>", "PhotoView", "width="+width_s+",height="+height_s+",left=0,top=0,location=no,toolbar=no,status=no,resizable=no,scrollbars=yes,menubar=no,directories=no");
}
function realsize()
{
PhotoViewer.images1.height=PhotoViewer.images2.height;
PhotoViewer.images1.width=PhotoViewer.images2.width;
PhotoViewer.block1.style.left = 0;
PhotoViewer.block1.style.top = 0;
}
function featsize()
{
var width1=PhotoViewer.images2.width;
var height1=PhotoViewer.images2.height;
var width2=760;
var height2=500;
var h=height1/height2;
var w=width1/width2;
if(height1<height2&&width1<width2)
{
PhotoViewer.images1.height=height1;
PhotoViewer.images1.width=width1;
}
else
{
if(h>w)
{
PhotoViewer.images1.height=height2;
PhotoViewer.images1.width=width1*height2/height1;
}
else
{
PhotoViewer.images1.width=width2;
PhotoViewer.images1.height=height1*width2/width1;
}
}
PhotoViewer.block1.style.left = 0;
PhotoViewer.block1.style.top = 0;
}
</script>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="40" align="center"><strong><font size="4"><%= dvhtmlencode(rs("PhotoName")) %></font></strong></td>
</tr>
<tr>
<td height="1" align="center" bgColor="FFFFFF"></td>
</tr>
<tr class="tdbg_rightall">
<td align="center"><table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<%
dim qswh,arr
set qswh=new qswhimg
arr=qswh.getimagesize(server.mappath(rs("PhotoUrl")))
%>
<td><div align="center">图片大小:<%= rs("PhotoSize") & " K [" %>
<%
response.write arr(1) & "*" & arr(2)&"]"
set arr=nothing
set qswh=nothing
%>
</div></td>
<td><div align="center">图片作者:
<%
if rs("Author")="" then
response.write "佚名"
else
response.write dvhtmlencode(rs("Author"))
end if%>
</div></td>
<td><div align="center">更新时间:<%= FormatDateTime(rs("UpdateTime"),2) %></div></td>
<td><div align="center">推荐等级:<font color="#009900"><%= string(rs("Stars"),"★") %></font></div></td>
<td>查看次数:<%=rs("Hits")%></td>
</tr><tr>
<td height="1" align="center" ></td>
</tr>
</table></td>
<tr>
<td height="1" align="center" bgColor="FFFFFF"></td>
</tr>
</tr>
<%if rs("PhotoUrl2")<>"" or rs("PhotoUrl3")<>"" or rs("PhotoUrl3")<>"" then%>
<tr>
<td align="center" valign="middle" class="tdbg_leftall" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td><%
if UrlID=1 then
response.write "<font color=red>图片地址一</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=1&PhotoID=" & rs("PhotoID") & "'>图片地址一" & "</a>"
end if
%>
</td>
<%if rs("PhotoUrl2")<>"" then %>
<td><%
if UrlID=2 then
response.write "<font color=red>图片地址二</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=2&PhotoID=" & rs("PhotoID") & "'>图片地址二" & "</a>"
end if
%>
</td>
<%
end if
if rs("PhotoUrl3")<>"" then %>
<td><%
if UrlID=3 then
response.write "<font color=red>图片地址三</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=3&PhotoID=" & rs("PhotoID") & "'>图片地址三" & "</a>"
end if
%>
</td>
<%
end if
if rs("PhotoUrl4")<>"" then %>
<td><%
if UrlID=4 then
response.write "<font color=red>图片地址四</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=4&PhotoID=" & rs("PhotoID") & "'>图片地址四" & "</a>"
end if
%>
</td>
<%end if%>
</tr>
</table></td>
</tr>
<%end if%>
<tr>
<td height="30" align="center" valign="middle" class="tdbg_leftall"><input name="smallit" type="button" id="smallit" onclick="smallit();" value="- 缩小 -">
<input name="bigit" type="button" id="bigit" onclick="bigit();" value="+ 放大 +">
<input name="fullit" type="button" id="fullit" value="全屏显示" onClick="fullit();">
<input name="realsize" type="button" id="realsize" value="实际大小" onClick="realsize();">
<input name="featsize" type="button" id="featsize" value="最合适大小" onClick="featsize();">
<%call ShowNextPhoto()%>
<%call ShowPrevPhoto()%></td>
</tr>
<tr>
<td height="500" align="center" valign="middle" class="tdbg_leftall"><%
if FoundErr=True then
response.write ErrMsg
else
response.write "<iframe id='PhotoViewer' width='99%' height='500' scrolling='no' src='Photo_View.asp?UrlID=" & UrlID & "&PhotoID=" & PhotoID &"'></iframe>"
end if%></td>
</tr>
<tr>
<td height="30" align="center" valign="middle" class="tdbg_leftall"><input name="smallit" type="button" id="smallit" onclick="smallit();" value="- 缩小 -">
<input name="bigit" type="button" id="bigit" onclick="bigit();" value="+ 放大 +">
<input name="fullit" type="button" id="fullit" value="全屏显示" onClick="fullit();">
<input name="realsize" type="button" id="realsize" value="实际大小" onClick="realsize();">
<input name="featsize" type="button" id="featsize" value="最合适大小" onClick="featsize();">
<%call ShowNextPhoto()%>
<%call ShowPrevPhoto()%>
</td>
</tr>
<tr><td><%=getimageexifinfo(rs("PhotoUrl"))%></td></tr>
<tr>
<td height="1" align="center" bgColor="FFFFFF"></td>
</tr>
</table>
<TABLE align=center border=0 cellPadding=2 cellSpacing=0 width="760">
<TBODY>
<TR class="nav_bottom">
<TD ><strong> <img src="Images/TEAM.gif" width="16" height="16" align="absmiddle"> 网友评论:</strong>(只显示最新5条。评论内容只代表网友观点,与本站立场无关!)</TD>
<TD align="right">【<a href="Photo_Comment.asp?PhotoID=<%=rs("PhotoID")%>" target="_blank">发表评论</a>】</TD>
</TR>
</TBODY>
</TABLE>
<TABLE align=center bgColor=#CCCCCC border=0 cellPadding=2
cellSpacing=1 style="WORD-BREAK: break-all" width="760">
<TBODY>
<TR>
<TD bgColor=#fffffe style="LINE-HEIGHT: 16px">
<%response.write ShowComment(5)%>
</TD>
</TR>
</TBODY>
</TABLE>
<%
nt2003.bottom()
call PopAnnouceWindow(400,300)
rs.close
set rs=nothing
sub ShowPrevPhoto()
dim rsPrev,sqlPrev
sqlPrev="Select Top 1 PhotoID From Photo Where Deleted=0 and Passed=1 and ClassID=" & rs("ClassID") & " and PhotoID<" & PhotoID & " order by PhotoID DESC"
Set rsPrev= Server.CreateObject("ADODB.Recordset")
rsPrev.open sqlPrev,conn,1,1
if rsPrev.Eof then
PrevPhotoID=0
response.write "<input name='Prev' type='button' id='Prev' value='下一张' disabled>"
else
PrevPhotoID=rsPrev("PhotoID")
response.write "<input name='Prev' type='button' id='Prev' value='下一张' onClick=""javascript:window.open('Photo_Viewer.asp?PhotoID=" & PrevPhotoID & "', '_self');"">"
end if
rsPrev.close
set rsPrev=nothing
end sub
sub ShowNextPhoto()
dim rsNext,sqlNext
sqlNext="Select Top 1 PhotoID From Photo Where Deleted=0 and Passed=1 and ClassID=" & rs("ClassID") & " and PhotoID>" & photoid & " order by PhotoID ASC"
Set rsNext= Server.CreateObject("ADODB.Recordset")
rsNext.open sqlNext,conn,1,1
if rsNext.Eof then
NextPhotoID=0
response.write "<input name='Next' type='button' id='Next' value='上一张' disabled>"
else
NextPhotoID=rsNext("PhotoID")
response.write "<input name='Next' type='button' id='Next' value='上一张' onClick=""javascript:window.open('Photo_Viewer.asp?PhotoID=" & NextPhotoID & "', '_self');"">"
end if
rsNext.close
set rsNext=nothing
end sub
%>
__________________________________________________________________
一个服务器安装两个动力不能正确显示的问题
修改 inc\function.asp 文件中
CacheName=Replace(Server.MapPath("\index.asp"),"index.asp","")
为
CacheName=Replace(Server.MapPath("index.asp"),"index.asp","")
___________________________________________________________________
___________________________________________________________________
问:(bgymtj 2004-6-19 10:40:00)
___________________________________________________________________
问:(提交人: xie0909 2004-6-15 20:02:00 )
表格涨了不知如何处理
在最新调查之间表格涨了如何修改
答:(提交人:shiyu 2004-6-15 20:11:00)
1、style="word-break:break-all;Width:fixed"
2、style="word-break:break-all;TABLE-LAYOUT: fixed">
在表格属性中加 上面其中的一个代码 看看
___________________________________________________________________
首页中的上部导航条下面的文章分栏怎么去掉啊!
动力3.6版本的首页中的上部导航条下面的文章分栏怎么去掉啊!
在首页中不应显示的,而只在文章栏目中显示的!
答:(yingyu 2004-6-18 9:16:00)
看我的!我已修改好了!
---------------------------------------------------
function.asp 找到head()
找到这句 strtmp = Replace(strtmp,"{$ClassMenu}",value)
改成
if channelid=1 then
strtmp = Replace(strtmp,"{$ClassMenu}","这里可以加上你想要在原首页文章分栏的内容显示-----如我的修改内容---注意引号不能去掉")
else
strtmp = Replace(strtmp,"{$ClassMenu}",value)
end if
___________________________________________________________________
频道下面的导航栏为什么超过六个就自动换行?
答:(xiaoluo1)
inc/ function.asp
搜索mod 5=0
改成 mod 你要的栏数 =0
最好是单数
___________________________________________________________________
如果不想显示全日期时间格式可再加这句
strcol(5)=month(strcol(5))&"-"&day(strcol(5))&" "&hour(strcol(5))&":"&minute(strcol(5))
月-日 时:分
如果你有我的补零函数,可以加入补零对齐,全日期格式的如下
strcol(5)=year(strcol(5))&"-"&bl(month(strcol(5)))&"-"&bl(day(strcol(5)))&" "&bl(hour(strcol(5)))&":"&bl(minute(strcol(5)))&":"&bl(second(strcol(5)))
___________________________________________________________________
问:(soulone 2004-6-11 0:03:00)
___________________________________________________________________
首页 JS 调用文件全代码:
<!--#include file="inc/conn.asp" -->
<!--#include file="inc/function.asp" -->
<!--#include file="inc/ubbcode.asp" -->
<%
dim ClassID,IncludeChild,SpecialID,ArticleNum,TitleMaxLen,ContentMaxLen,ShowType,ShowCols
dim ShowProperty,ShowClassName,ShowIncludePic,ShowTitle,ShowUpdateTime,ShowHits,ShowAuthor,ShowHot,ShowMore
dim Hot,Elite,DateNum,OrderField,OrderType,ImgWidth,ImgHeight
dim SystemPath,rs,sql,str,str1,topicLen,topic
dim i,FileType
dim tClass,trs,arrClassID
dim tLayout,LayoutFileName_Class,LayoutFileName_Article
dim Author,AuthorName,AuthorEmail
ClassID=trim(request.querystring("ClassID"))
IncludeChild=trim(request.QueryString("IncludeChild"))
SpecialID=trim(request.querystring("SpecialID"))
ArticleNum=trim(request.querystring("ArticleNum"))
TitleMaxLen=trim(request.querystring("TitleMaxLen"))
ContentMaxLen=trim(request.querystring("ContentMaxLen"))
ShowType=trim(request.querystring("ShowType"))
ShowCols=trim(request.querystring("ShowCols"))
ShowProperty=trim(request.querystring("ShowProperty"))
ShowClassName=trim(request.querystring("ShowClassName"))
ShowIncludePic=trim(request.querystring("ShowIncludePic"))
ShowTitle=trim(request.querystring("ShowTitle"))
ShowUpdateTime=trim(request.querystring("ShowUpdateTime"))
ShowHits=trim(request.querystring("ShowHits"))
ShowAuthor=trim(request.querystring("ShowAuthor"))
ShowHot=trim(request.querystring("ShowHot"))
ShowMore=trim(request.querystring("ShowMore"))
Hot=trim(request.querystring("Hot"))
Elite=trim(request.querystring("Elite"))
DateNum=trim(request.querystring("DateNum"))
orderField=trim(request.querystring("OrderField"))
orderType=trim(request.querystring("OrderType"))
ImgWidth=trim(request.querystring("ImgWidth"))
ImgHeight=trim(request.querystring("ImgHeight"))
SystemPath="http://";&request.servervariables("server_name")&replace(request.servervariables("script_name"),"article_js.asp","")
if ShowType<>"" then
ShowType=Cint(ShowType)
else
ShowType=1
end if
if ShowCols<>"" then
ShowCols=Cint(ShowCols)
else
ShowCols=1
end if
if ContentMaxLen<>"" then
ContentMaxLen=Cint(ContentMaxLen)
else
ContentMaxLen=200
end if
if ClassID="" then
ClassID=0
else
ClassID=Clng(ClassID)
end if
if SpecialID="" then
SpecialID=0
else
SpecialID=Clng(SpecialID)
end if
set tLayout=nt2003.execute("select LayoutFileName from Layout where LayoutType=2 and IsDefault=True")
LayoutFileName_Class=tLayout(0)
if isNull(LayoutFileName_Class) then LayoutFileName_Class="ShowClass.asp"
set tLayout=nt2003.execute("select LayoutFileName from Layout where LayoutType=3 and IsDefault=True")
LayoutFileName_Article=tLayout(0)
if isNull(LayoutFileName_Article) then LayoutFileName_Article="ShowArticle.asp"
set tLayout=nothing
sql="select"
if ArticleNum<>"" then sql=sql & " top " & Cint(ArticleNum)
if ShowClassName="true" then
sql=sql & " A.ArticleID,A.ClassID,C.ClassName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType,A.Content,"
sql=sql & " A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl from Article A"
sql=sql & " inner join ArticleClass C on A.ClassID=C.ClassID where A.Deleted=False and A.Passed=True"
else
sql=sql & " A.ArticleID,A.ClassID,L.LayoutID,L.LayoutFileName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType,A.Content,"
sql=sql & " A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl from Article A"
sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=False and A.Passed=True"
end if
if ClassID>0 then
set tClass=nt2003.execute("select ClassID,ParentPath,Child From ArticleClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
response.write "document.write (" & Chr(34) & "找不到指定的栏目,可能已经被管理员删除!请重新生成JS调用代码。" & Chr(34) & ");"
response.end
else
if IncludeChild="true" then
if tClass(2)>0 then
arrClassID=tClass(0)
set trs=nt2003.execute("select ClassID from ArticleClass where ParentID=" & tClass(0) & " or ParentPath like '%" & tClass(1) & "," & tClass(0) & ",%' and Child=0 and LinkUrl=''")
do while not trs.eof
arrClassID=arrClassID & "," & trs(0)
trs.movenext
loop
set trs=nothing
sql=sql & " and A.ClassID in (" & arrClassID & ")"
else
sql=sql & " and A.ClassID=" & Clng(ClassID)
end if
else
sql=sql & " and A.ClassID=" & Clng(ClassID)
end if
end if
set tClass=nothing
end if
if SpecialID>0 then sql=sql & " and A.SpecialID=" & SpecialID
if ShowType=3 or ShowType=4 then sql=sql & " and A.DefaultPicUrl<>''"
if Hot="true" then sql=sql & " and A.Hits>=" & nt2003.site_setting(14)
if Elite="true" then sql=sql & " and A.Elite=True"
if DateNum<>"" then sql=sql & " and DATEDIFF('d',UpdateTime,Date())<=" & Cint(DateNum)
sql=sql & " order by A.OnTop asc"
if orderField<>"" then sql=sql & " , A." & orderField
if orderType<>"" then
sql=sql & " " & orderType
else
sql=sql & " asc"
end if
set rs=nt2003.execute(sql)
if rs.bof and rs.eof then
response.write "document.write (" & Chr(34) & "没有符合条件的文章" & Chr(34) & ");"
else
if ShowType=3 or ShowType=4 then
response.write "document.write (" & Chr(34) & "<table cellspacing='5' align='center'><tr valign='top'>" & Chr(34) & ");" & vbcrlf
end if
do while not rs.eof
if TitleMaxLen<>"" then
topic=gotTopic(rs("title"),Cint(TitleMaxLen))
else
topic=rs("title")
end if
if rs("TitleFontType")=1 then
topic="<b>" & topic & "</b>"
elseif rs("TitleFontType")=2 then
topic="<em>" & topic & "</em>"
elseif rs("TitleFontType")=3 then
topic="<b><em>" & topic & "</em></b>"
end if
if rs("TitleFontColor")<>"" then
topic="<font color='" & rs("TitleFontColor") & "'>" & topic & "</font>"
end if
Author=rs("Author")
if instr(Author,"|")>0 then
AuthorName=left(Author,instr(Author,"|")-1)
AuthorEmail=right(Author,len(Author)-instr(Author,"|")-1)
else
AuthorName=Author
AuthorEmail=""
end if
if ShowType=1 or ShowType=2 then
str=""
else
str="<td width='" & ImgWidth & "' align='center'>"
end if
if ShowType=1 or ShowType=2 then
str="<table border=0 width='100%' cellspacing=0 cellpadding=1><tr><td align='left'><tr><td>"
if ShowProperty="true" then
if rs("OnTop")=true then
str=str & "<img src='images/article_ontop.gif' alt='固顶文章'> "
elseif rs("Elite")=true then
str=str & "<img src='images/article_elite.gif' alt='推荐文章'> "
else
str=str & "<img src='images/article_common.gif' alt='普通文章'> "
end if
end if
'if ShowIncludePic="true" and rs("IncludePic")=true then
'str=str & "<font color=blue>[图文]</font>"
'end if
if ShowClassName="true" then
str=str & "<font color=#ff9900>[" & rs("ClassName") & "]</font> "
str=str & "<a href='" & SystemPath & LayoutFileName_Article & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
else
str=str & "<a href='" & SystemPath & rs("LayoutFileName") & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
end if
str=str & Topic & "</a>"
else
if ShowClassName="true" then
str=str & "<font color=#ff9900>[" & rs("ClassName") & "]</font> "
str=str & "<a href='" & SystemPath & LayoutFileName_Article & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
else
str=str & "<a href='" & SystemPath & rs("LayoutFileName") & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
end if
FileType=right(lcase(rs("DefaultPicUrl")),3)
if FileType="swf" then
str=str & "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" & ImgWidth & "' height='" & ImgHeight & "'><param name='movie' value='" & rs("DefaultPicUrl") & "'><param name='quality' value='high'><embed src='" & rs("DefaultPicUrl") & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" & ImgWidth & "' height='" & ImgHeight & "'></embed></object>"
elseif fileType="jpg" or fileType="bmp" or fileType="png" or fileType="gif" then
str=str & "<img src='" & rs("DefaultPicUrl") & "' width='" & ImgWidth & "' height='" & ImgHeight & "' border='0'>"
else
str=str & "<img src='images/NoPic2.jpg' width='" & ImgWidth & "' height='" & ImgHeight & "' border='0'>"
end if
str=str & Topic & "</a>"
end if
if ShowAuthor="true" or ShowUpdateTime="true" or ShowHits="true" then
'str=str & " ("
if ShowAuthor="true" then
if AuthorEmail="" then
str=str & AuthorName
else
str=str & "<a href='mailto:" & AuthorEmail & "'>" & AuthorName & "</a>"
end if
end if
if ShowUpdateTime="true" then
if ShowAuthor="true" then
str=str & ","
end if
if CDate(FormatDateTime(rs("UpdateTime"),2))=date() then
str=str & "</td><td nowrap align='right' style='width:1%; padding-right:5px'><font color=red>"
else
str=str & "</td><td nowrap align='right' style='width:1%; padding-right:5px'><font color=#999999>"
end if
str=str & FormatDateTime(rs("UpdateTime"),2) & "</font>"
end if
if ShowHits="true" then
if ShowAuthor="true" or ShowUpdateTime="true" then
str=str & ","
end if
str=str & rs("Hits")
end if
'str=str & ")"
end if
if ShowHot="true" and rs("Hits")>=100 then
str=str & "<img src='" & SystemPath & "images/hot.gif' align='absmiddle' alt='热点文章'>"
end if
str=str & "</tr></table><table border=0 width='100%' height=1 cellspacing=1 cellpadding=0 ><tr><td height=1 background='images/bg_dian.gif'></td></tr></table>"
if ShowType=1 then
str=str & ""
elseif ShowType=2 then
str=str & "<br><div style='padding:0px 20px'>" & left(replace(replace(replace(nohtml(rs("content")),chr(34),""),chr(10),"\n"),chr(13),"\n"),ContentMaxLen) & "……</div>"
elseif ShowType=3 then
str=str & "</td>"
elseif ShowType=4 then
str=str & "</td><td>" & left(replace(replace(replace(nohtml(rs("content")),chr(34),""),chr(10),"\n"),chr(13),"\n"),ContentMaxLen) & "……</td>"
end if
rs.movenext
if ShowType=3 or ShowType=4 then
i=i+1
if ((i mod ShowCols=0) and (not rs.eof)) then
str=str & "</tr><tr valign='top'>"
end if
end if
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
loop
if ShowType=1 or ShowType=2 then
if ShowMore="true" then
if ClassID>0 then
str="<div align='right'><a href='" & SystemPath & LayoutFileName_Class & "?ClassID=" & ClassID & "'>more...</a></div>"
else
str="<div align='right'><a href='index.asp'>more...</a></div>"
end if
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
end if
else
str="</tr>"
if ShowMore="true" then
if ClassID>0 then
str=str & "<tr><td colspan='" & ShowCols*2 & "' align='right'><a href='" & SystemPath & LayoutFileName_Class & "?ClassID=" & ClassID & "'>更多……</a></td>"
else
str=str & "<tr><td colspan='" & ShowCols*2 & "' align='right'><a href='index.asp'>更多……</a></td>"
end if
end if
str=str & "</table>"
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
end if
end if
rs.close
set rs=nothing
%>
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
修改用户排行个数
把 index.asp 中的 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(10))
修改为 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(3))
___________________________________________________________________
注册用户添加软件后,管理员在后台审核时出错:
错误类型:
Microsoft VBScript 运行时错误 (0x800A01F4)
变量未定义: 'WebmasterName'
/36/Admin_SoftProperty.asp, 第 133 行
答:
Admin_SoftProperty.asp里
在dim....
dim.....
下加上
dim WebmasterName
___________________________________________________________________
图片频道的图片不能发表评论及后台管理出错的解决办法
在Photo_Comment.asp文件的第一个
<%
下加上下面一句
nt2003.GetSite_Setting()
在INC/syscode_Photo.asp文件中1079行也就是
response.write "<li>会员"
这一行的下面加上下面这段
IF UserTableType="Dvbbs7.0" then
set rsCommentUser=Conn_User.execute("select " & db_User_ID & "," & db_User_Name & "," & db_User_Email & "," & db_User_UserIM & " from " & db_User_Table & " where " & db_User_Name & "='" & rsComment("UserName") & "'")
dim UserIM,homepage,QQ
UserIM=split(rsCommentUser(3),"|||")
homepage=UserIM(0)
QQ=UserIM(1)
if rsCommentUser.bof and rsCommentUser.eof then
response.write rsComment("UserName")
else
response.write "『<a href='UserInfo.asp?UserID=" & rsCommentUser(0) & "' title='姓名:" & rsCommentUser(1) & vbcrlf & "信箱:" & rsCommentUser(2) & vbcrlf & "Oicq:" & QQ & vbcrlf & "主页:" & homepage &"'><font color='blue'>" & rsComment("UserName") & "</font></a>』"
end if
Else
在1098行再加一个
end if
___________________________________________________________________
___________________________________________________________________
就软件审核这个错误
webmastername 换成 nt2003.site_info(7)
就两处
___________________________________________________________________
找到inc/syscode_article.asp,然后打开编辑第十四行TempStr = Replace(TempStr,"{$ShowPicArticle1}",ShowPicArticle(0,1,20,1,1,120,90,200,false,false))
看到(0,1,20,1,1,120,90,200,false,false))中第二个1改成2就实现了调用两个图片文章!
[求助]怎样改变首页最新文章一栏显示图片的大小?
哪位高手指教:怎样改变首页最新文章一栏显示图片的大小?谢谢
答:(bossliu )
打开 Index.asp ,找到 TempStr = Replace(TempStr,"{$ShowPicArticle1}",ShowPicArticle(0,2,20,1,1,120,90,200,false,false)),其中120为图片宽度,90为图片高度。把这两个数值修改成你需要的大小即可。
___________________________________________________________________
问:(提交人: xie0909 2004-6-15 20:02:00 )
表格涨了不知如何处理
在最新调查之间表格涨了如何修改
答:(提交人:shiyu 2004-6-15 20:11:00)
1、style="word-break:break-all;Width:fixed"
2、style="word-break:break-all;TABLE-LAYOUT: fixed">
在表格属性中加 上面其中的一个代码 看看
___________________________________________________________________
__________________________________________________
频道下面的导航栏为什么超过六个就自动换行?
答:(xiaoluo1)
inc/ function.asp
搜索mod 5=0
改成 mod 你要的栏数 =0
最好是单数
___________________________________________________________________
如果不想显示全日期时间格式可再加这句
strcol(5)=month(strcol(5))&"-"&day(strcol(5))&" "&hour(strcol(5))&":"&minute(strcol(5))
月-日 时:分
如果你有我的补零函数,可以加入补零对齐,全日期格式的如下
strcol(5)=year(strcol(5))&"-"&bl(month(strcol(5)))&"-"&bl(day(strcol(5)))&" "&bl(hour(strcol(5)))&":"&bl(minute(strcol(5)))&":"&bl(second(strcol(5)))
___________________________________________________________________
修改用户排行个数
把 index.asp 中的 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(10))
修改为 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(3))
___________________________________________________________________
注册用户添加软件后,管理员在后台审核时出错:
错误类型:
Microsoft VBScript 运行时错误 (0x800A01F4)
变量未定义: 'WebmasterName'
/36/Admin_SoftProperty.asp, 第 133 行
答:
Admin_SoftProperty.asp里
在dim....
dim.....
下加上
dim WebmasterName
___________________________________________________________________
看来有不少朋友还是不希望有登录验证码的呀!
一、1、删除User_Login.asp中的48-53行:
if (document.Login.CheckCode.value=="")
{
alert ("请输入您的验证码!");
document.Login.CheckCode.focus();
return(false);
}
2、删除88-91行:
<tr>
<td align="right">验 证 码:</td>
<td><input name="CheckCode" size="6" maxlength="4"><img src="inc/checkcode.asp"></td>
</tr>
二、1、删除User_ChkLogin.asp中的第13行:
CheckCode=replace(trim(Request("CheckCode")),"'","")
2、删除User_ChkLogin.asp中的第29-34行:
if CheckCode="" then
FoundErr=True
ErrMsg=ErrMsg & "
<li>验证码不能为空!</li>"
end if
if session("CheckCode")="" then
FoundErr=True
3、删除User_ChkLogin.asp中的第37-40行:
if CheckCode<>CStr(session("CheckCode")) then
FoundErr=True
ErrMsg=ErrMsg & "
<li>您输入的确认码和系统产生的不一致,请重新输入。</li>"
end if
三、删除 Skin\51dsn03\main.js中的15-20行:
if (document.UserLogin.CheckCode.value=="")
{
alert ("请输入您的验证码!");
document.UserLogin.CheckCode.focus();
return(false);
}
(如果你使用linux模板,还得删除该目录下的相关内容)
四、删除inc\function.asp 中的1191行:
strLogin=strLogin & "<tr><td height='25' align='right'>附加验证:</td><td height='25'><input name='CheckCode' size='4' maxlength='4'> <img src='inc/checkcode.asp'></td></tr>" & vbcrlf
现在你再试试看---OK了!
___________________________________________________________________
就软件审核这个错误
webmastername 换成 nt2003.site_info(7)
就两处
___________________________________________________________________
找到inc/syscode_article.asp,然后打开编辑第十四行TempStr = Replace(TempStr,"{$ShowPicArticle1}",ShowPicArticle(0,1,20,1,1,120,90,200,false,false))
看到(0,1,20,1,1,120,90,200,false,false))中第二个1改成2就实现了调用两个图片文章!
___________________________________________________________________
__________________________________________________________________
除掉3.6首页最新软件更新中日期前的“|”方法
在index.asp 中找到:
'=================================================
'过程名:ShowNewSoft
'作 用:显示最新软件更新
'=================================================
一、保持原日期显示格式,仅去掉前面的 | 的方法:
1、将下句中的S.Keyword,删掉
sqlNew="select top 8 S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True order by S.SoftID desc"
2、分别把下句中的strcol(11) 改为strcol(10)
strcol(5) 改为strcol(4)
strcol(8) 改为strcol(7)
strcol(9) 改为strcol(8)
strcol(10) 改为strcol(9)
strcol(7) 改为strcol(6)
strcol(5) 改为strcol(4)
strtemp = strtemp & "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font color=#ff9900>·</font><a href='Soft_Show.asp?SoftID=" & strcol(0) & "' title='软件名称:" & strcol(1) & vbcrlf & "软件版本:" & strcol(2) & vbcrlf & "文件大小:" & strcol(11) & " K" & vbcrlf & "软件作者:" & strcol(3) & vbcrlf & "更新时间:" & strcol(5) & vbcrlf & "下载次数:今日:" & strcol(8) & " 本周:" & strcol(9) & " 本月:" & strcol(10) & " 总计:" & strcol(7) & "' target='_blank'>" & gotTopic(strcol(1) & " " & strcol(2),30) & "</td><td align=right>[<font color=#999999>" & strcol(5) & "</font>]</td></tr></table>"
这样在显示的日期前的 | 就去掉了。
___________________________________________________________________
改日期显示格式为 [06-23]这样的形式,并去掉前面的 | 的方法:
1、将下句中的S.Keyword,删掉
sqlNew="select top 8 S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True order by S.SoftID desc"
2、分别把下句中的 strcol(11) 改为strcol(10)
strcol(5) 改为strcol(4)
strcol(8) 改为strcol(7)
strcol(9) 改为strcol(8)
strcol(10) 改为strcol(9)
strcol(7) 改为strcol(6)
strcol(5) 改为strcol(4)
将下句中的最后(在[<font color=#999999>"后面的 & "</font>]</td></tr></table>"删掉
strtemp = strtemp & "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font color=#ff9900>·</font><a href='Soft_Show.asp?SoftID=" & strcol(0) & "' title='软件名称:" & strcol(1) & vbcrlf & "软件版本:" & strcol(2) & vbcrlf & "文件大小:" & strcol(11) & " K" & vbcrlf & "软件作者:" & strcol(3) & vbcrlf & "更新时间:" & strcol(5) & vbcrlf & "下载次数:今日:" & strcol(8) & " 本周:" & strcol(9) & " 本月:" & strcol(10) & " 总计:" & strcol(7) & "' target='_blank'>" & gotTopic(strcol(1) & " " & strcol(2),30) & "</td><td align=right>[<font color=#999999>" </td></tr></table>"
3、在上句(已修正)的下面,添加:
if month(strcol(4))<10 then
strtemp = strtemp & "0"
end if
strtemp = strtemp & month(strcol(4)) & "-"
if day(strcol(4))<10 then
strtemp = strtemp & "0"
end if
strtemp = strtemp & day(strcol(4)) & "</font>]</td></tr></table>"
这样时间显示格式改为 [06-23] 这种格式
___________________________________________________________________
这是俺的photo_viewer.asp
增加了上一张,下一张,取图片尺寸及数码图片exif信息
评论也移植过来了,呵呵
<!--#include file="Inc/syscode_Photo.asp"-->
<!--#include file="Inc/photo_class.asp"-->
<%
'请勿改动下面这三行代码
const ChannelID=4
Const ShowRunTime="Yes"
MaxPerPage=20
SkinID=0
PageTitle="查看图片"
dim UrlID,PrevPhotoID,NextPhotoID
UrlID=trim(request("UrlID"))
if UrlID="" then
UrlID=1
else
UrlID=Clng(UrlID)
end if
FoundErr=False
if rs("PhotoLevel")<=999 then
if UserLogined<>True then
FoundErr=True
ErrMsg=ErrMsg & "对不起,本图片为收费图片,要求至少是本站的注册用户才能欣赏!<br>您还没注册或者没有登录?所以不能欣赏本图片。请赶紧 <a href='User_Reg.asp'><font color=red><b>注册</b></font></a> 或 <a href='User_Login.asp'><font color=red><b>登录</a></font></a>吧!"
else
if UserLevel>rs("PhotoLevel") then
FoundErr=True
ErrMsg=ErrMsg & "对不起,本图片为收费图片,并且只有 <font color=blue>"
if rs("PhotoLevel")=999 then
ErrMsg=ErrMsg & "注册用户"
elseif rs("PhotoLevel")=99 then
ErrMsg=ErrMsg & "收费用户"
elseif rs("PhotoLevel")=9 then
ErrMsg=ErrMsg & "VIP用户"
elseif rs("PhotoLevel")=5 then
ErrMsg=ErrMsg & "管理员"
end if
ErrMsg=ErrMsg & "级别的用户</font> 才能欣赏。你目前的权限级别不够,所以不能欣赏。"
else
if ChargeType=1 and rs("PhotoPoint")>0 then
if Request.Cookies("asp163")("Pay_Photo" & PhotoID)<>"yes" then
if UserPoint<rs("PhotoPoint") then
FoundErr=True
ErrMsg=ErrMsg &"对不起,本图片为收费图片,并且欣赏本图片需要消耗 <b><font color=red>" & rs("PhotoPoint") & "</font></b> 点!"
ErrMsg=ErrMsg &"而你目前只有 <b><font color=blue>" & UserPoint & "</font></b> 点可用。点数不足,无法欣赏本图片。请与我们联系进行充值。"
else
if lcase(trim(request("Pay")))="yes" then
Conn_User.execute "update " & db_User_Table & " set " & db_User_UserPoint & "=" & db_User_UserPoint & "-" & rs("PhotoPoint") & " where " & db_User_Name & "='" & UserName & "'"
response.Cookies("asp163")("Pay_Photo" & PhotoID)="yes"
else
FoundErr=True
ErrMsg=ErrMsg & "<font color=red><b>注意</b></font>:欣赏本图片需要消耗 <font color=red><b>" & rs("PhotoPoint") & "</b></font>"
ErrMsg=ErrMsg &"你目前尚有 <b><font color=blue>" & UserPoint & "</font></b> 点可用。阅读本文后,你将剩下 <b><font color=green>" & UserPoint-rs("PhotoPoint") & "</font></b> 点"
ErrMsg=ErrMsg &"<br><br>你确实愿意花费 <b><font color=red>" & rs("PhotoPoint") & "</font></b> 点来欣赏本图片吗?"
ErrMsg=ErrMsg &"<br><br><a href='Photo_Viewer.asp?Pay=yes&UrlID=" & UrlID & "&PhotoID=" & PhotoID & "'>我愿意</a> <a href='index.asp'>我不愿意</a></p>"
end if
end if
end if
elseif ChargeType=2 then
if ValidDays<=0 then
FoundErr=True
ErrMsg=ErrMsg & "<font color=red>对不起,本图片为收费图片,而您的有效期已经过期,所以无法欣赏本图片。请与我们联系进行充值。</font>"
end if
end if
end if
end if
end if
if FoundErr<>True then
sql = "update photo set Hits=Hits+1"
if datediff("D",rs("LastHitTime"),now())<=0 then
sql=sql&",DayHits=DayHits+1"
else
sql=sql&",DayHits=1"
end if
if datediff("ww",rs("LastHitTime"),now())<=0 then
sql=sql&",WeekHits=WeekHits+1"
else
sql=sql&",WeekHits=1"
end if
if datediff("m",rs("LastHitTime"),now())<=0 then
sql=sql&",MonthHits=MonthHits+1"
else
sql=sql&",MonthHits=1"
end if
sql=sql&",LastHitTime=now()"
set rs=nt2003.execute(sql)
end if
nt2003.LoadTemplates("index")
nt2003.head()
call ConnectionDatabase()
sql="select * from Photo where PhotoID="&PhotoID&""
set rs=nt2003.execute(sql)
%>
<script language=javascript>
function smallit(){
var height1=PhotoViewer.images1.height;
var width1=PhotoViewer.images1.width;
PhotoViewer.images1.height=height1/1.2;
PhotoViewer.images1.width=width1/1.2;
}
function bigit(){
var height1=PhotoViewer.images1.height;
var width1=PhotoViewer.images1.width;
PhotoViewer.images1.height=height1*1.2;
PhotoViewer.images1.width=width1*1.2;
}
function fullit()
{
var width_s=screen.width-10;
var height_s=screen.height-30;
window.open("Photo_View.asp?UrlID=<%=UrlID%>&PhotoID=<%=PhotoID%>", "PhotoView", "width="+width_s+",height="+height_s+",left=0,top=0,location=no,toolbar=no,status=no,resizable=no,scrollbars=yes,menubar=no,directories=no");
}
function realsize()
{
PhotoViewer.images1.height=PhotoViewer.images2.height;
PhotoViewer.images1.width=PhotoViewer.images2.width;
PhotoViewer.block1.style.left = 0;
PhotoViewer.block1.style.top = 0;
}
function featsize()
{
var width1=PhotoViewer.images2.width;
var height1=PhotoViewer.images2.height;
var width2=760;
var height2=500;
var h=height1/height2;
var w=width1/width2;
if(height1<height2&&width1<width2)
{
PhotoViewer.images1.height=height1;
PhotoViewer.images1.width=width1;
}
else
{
if(h>w)
{
PhotoViewer.images1.height=height2;
PhotoViewer.images1.width=width1*height2/height1;
}
else
{
PhotoViewer.images1.width=width2;
PhotoViewer.images1.height=height1*width2/width1;
}
}
PhotoViewer.block1.style.left = 0;
PhotoViewer.block1.style.top = 0;
}
</script>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="40" align="center"><strong><font size="4"><%= dvhtmlencode(rs("PhotoName")) %></font></strong></td>
</tr>
<tr>
<td height="1" align="center" bgColor="FFFFFF"></td>
</tr>
<tr class="tdbg_rightall">
<td align="center"><table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<%
dim qswh,arr
set qswh=new qswhimg
arr=qswh.getimagesize(server.mappath(rs("PhotoUrl")))
%>
<td><div align="center">图片大小:<%= rs("PhotoSize") & " K [" %>
<%
response.write arr(1) & "*" & arr(2)&"]"
set arr=nothing
set qswh=nothing
%>
</div></td>
<td><div align="center">图片作者:
<%
if rs("Author")="" then
response.write "佚名"
else
response.write dvhtmlencode(rs("Author"))
end if%>
</div></td>
<td><div align="center">更新时间:<%= FormatDateTime(rs("UpdateTime"),2) %></div></td>
<td><div align="center">推荐等级:<font color="#009900"><%= string(rs("Stars"),"★") %></font></div></td>
<td>查看次数:<%=rs("Hits")%></td>
</tr><tr>
<td height="1" align="center" ></td>
</tr>
</table></td>
<tr>
<td height="1" align="center" bgColor="FFFFFF"></td>
</tr>
</tr>
<%if rs("PhotoUrl2")<>"" or rs("PhotoUrl3")<>"" or rs("PhotoUrl3")<>"" then%>
<tr>
<td align="center" valign="middle" class="tdbg_leftall" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td><%
if UrlID=1 then
response.write "<font color=red>图片地址一</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=1&PhotoID=" & rs("PhotoID") & "'>图片地址一" & "</a>"
end if
%>
</td>
<%if rs("PhotoUrl2")<>"" then %>
<td><%
if UrlID=2 then
response.write "<font color=red>图片地址二</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=2&PhotoID=" & rs("PhotoID") & "'>图片地址二" & "</a>"
end if
%>
</td>
<%
end if
if rs("PhotoUrl3")<>"" then %>
<td><%
if UrlID=3 then
response.write "<font color=red>图片地址三</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=3&PhotoID=" & rs("PhotoID") & "'>图片地址三" & "</a>"
end if
%>
</td>
<%
end if
if rs("PhotoUrl4")<>"" then %>
<td><%
if UrlID=4 then
response.write "<font color=red>图片地址四</font>"
else
response.write "<a href='Photo_Viewer.asp?UrlID=4&PhotoID=" & rs("PhotoID") & "'>图片地址四" & "</a>"
end if
%>
</td>
<%end if%>
</tr>
</table></td>
</tr>
<%end if%>
<tr>
<td height="30" align="center" valign="middle" class="tdbg_leftall"><input name="smallit" type="button" id="smallit" onclick="smallit();" value="- 缩小 -">
<input name="bigit" type="button" id="bigit" onclick="bigit();" value="+ 放大 +">
<input name="fullit" type="button" id="fullit" value="全屏显示" onClick="fullit();">
<input name="realsize" type="button" id="realsize" value="实际大小" onClick="realsize();">
<input name="featsize" type="button" id="featsize" value="最合适大小" onClick="featsize();">
<%call ShowNextPhoto()%>
<%call ShowPrevPhoto()%></td>
</tr>
<tr>
<td height="500" align="center" valign="middle" class="tdbg_leftall"><%
if FoundErr=True then
response.write ErrMsg
else
response.write "<iframe id='PhotoViewer' width='99%' height='500' scrolling='no' src='Photo_View.asp?UrlID=" & UrlID & "&PhotoID=" & PhotoID &"'></iframe>"
end if%></td>
</tr>
<tr>
<td height="30" align="center" valign="middle" class="tdbg_leftall"><input name="smallit" type="button" id="smallit" onclick="smallit();" value="- 缩小 -">
<input name="bigit" type="button" id="bigit" onclick="bigit();" value="+ 放大 +">
<input name="fullit" type="button" id="fullit" value="全屏显示" onClick="fullit();">
<input name="realsize" type="button" id="realsize" value="实际大小" onClick="realsize();">
<input name="featsize" type="button" id="featsize" value="最合适大小" onClick="featsize();">
<%call ShowNextPhoto()%>
<%call ShowPrevPhoto()%>
</td>
</tr>
<tr><td><%=getimageexifinfo(rs("PhotoUrl"))%></td></tr>
<tr>
<td height="1" align="center" bgColor="FFFFFF"></td>
</tr>
</table>
<TABLE align=center border=0 cellPadding=2 cellSpacing=0 width="760">
<TBODY>
<TR class="nav_bottom">
<TD ><strong> <img src="Images/TEAM.gif" width="16" height="16" align="absmiddle"> 网友评论:</strong>(只显示最新5条。评论内容只代表网友观点,与本站立场无关!)</TD>
<TD align="right">【<a href="Photo_Comment.asp?PhotoID=<%=rs("PhotoID")%>" target="_blank">发表评论</a>】</TD>
</TR>
</TBODY>
</TABLE>
<TABLE align=center bgColor=#CCCCCC border=0 cellPadding=2
cellSpacing=1 style="WORD-BREAK: break-all" width="760">
<TBODY>
<TR>
<TD bgColor=#fffffe style="LINE-HEIGHT: 16px">
<%response.write ShowComment(5)%>
</TD>
</TR>
</TBODY>
</TABLE>
<%
nt2003.bottom()
call PopAnnouceWindow(400,300)
rs.close
set rs=nothing
sub ShowPrevPhoto()
dim rsPrev,sqlPrev
sqlPrev="Select Top 1 PhotoID From Photo Where Deleted=0 and Passed=1 and ClassID=" & rs("ClassID") & " and PhotoID<" & PhotoID & " order by PhotoID DESC"
Set rsPrev= Server.CreateObject("ADODB.Recordset")
rsPrev.open sqlPrev,conn,1,1
if rsPrev.Eof then
PrevPhotoID=0
response.write "<input name='Prev' type='button' id='Prev' value='下一张' disabled>"
else
PrevPhotoID=rsPrev("PhotoID")
response.write "<input name='Prev' type='button' id='Prev' value='下一张' onClick=""javascript:window.open('Photo_Viewer.asp?PhotoID=" & PrevPhotoID & "', '_self');"">"
end if
rsPrev.close
set rsPrev=nothing
end sub
sub ShowNextPhoto()
dim rsNext,sqlNext
sqlNext="Select Top 1 PhotoID From Photo Where Deleted=0 and Passed=1 and ClassID=" & rs("ClassID") & " and PhotoID>" & photoid & " order by PhotoID ASC"
Set rsNext= Server.CreateObject("ADODB.Recordset")
rsNext.open sqlNext,conn,1,1
if rsNext.Eof then
NextPhotoID=0
response.write "<input name='Next' type='button' id='Next' value='上一张' disabled>"
else
NextPhotoID=rsNext("PhotoID")
response.write "<input name='Next' type='button' id='Next' value='上一张' onClick=""javascript:window.open('Photo_Viewer.asp?PhotoID=" & NextPhotoID & "', '_self');"">"
end if
rsNext.close
set rsNext=nothing
end sub
%>
__________________________________________________________________
一个服务器安装两个动力不能正确显示的问题
修改 inc\function.asp 文件中
CacheName=Replace(Server.MapPath("\index.asp"),"index.asp","")
为
CacheName=Replace(Server.MapPath("index.asp"),"index.asp","")
___________________________________________________________________
___________________________________________________________________
问:(bgymtj 2004-6-19 10:40:00)
___________________________________________________________________
问:(提交人: xie0909 2004-6-15 20:02:00 )
表格涨了不知如何处理
在最新调查之间表格涨了如何修改
答:(提交人:shiyu 2004-6-15 20:11:00)
1、style="word-break:break-all;Width:fixed"
2、style="word-break:break-all;TABLE-LAYOUT: fixed">
在表格属性中加 上面其中的一个代码 看看
___________________________________________________________________
首页中的上部导航条下面的文章分栏怎么去掉啊!
动力3.6版本的首页中的上部导航条下面的文章分栏怎么去掉啊!
在首页中不应显示的,而只在文章栏目中显示的!
答:(yingyu 2004-6-18 9:16:00)
看我的!我已修改好了!
---------------------------------------------------
function.asp 找到head()
找到这句 strtmp = Replace(strtmp,"{$ClassMenu}",value)
改成
if channelid=1 then
strtmp = Replace(strtmp,"{$ClassMenu}","这里可以加上你想要在原首页文章分栏的内容显示-----如我的修改内容---注意引号不能去掉")
else
strtmp = Replace(strtmp,"{$ClassMenu}",value)
end if
___________________________________________________________________
频道下面的导航栏为什么超过六个就自动换行?
答:(xiaoluo1)
inc/ function.asp
搜索mod 5=0
改成 mod 你要的栏数 =0
最好是单数
___________________________________________________________________
如果不想显示全日期时间格式可再加这句
strcol(5)=month(strcol(5))&"-"&day(strcol(5))&" "&hour(strcol(5))&":"&minute(strcol(5))
月-日 时:分
如果你有我的补零函数,可以加入补零对齐,全日期格式的如下
strcol(5)=year(strcol(5))&"-"&bl(month(strcol(5)))&"-"&bl(day(strcol(5)))&" "&bl(hour(strcol(5)))&":"&bl(minute(strcol(5)))&":"&bl(second(strcol(5)))
___________________________________________________________________
问:(soulone 2004-6-11 0:03:00)
___________________________________________________________________
首页 JS 调用文件全代码:
<!--#include file="inc/conn.asp" -->
<!--#include file="inc/function.asp" -->
<!--#include file="inc/ubbcode.asp" -->
<%
dim ClassID,IncludeChild,SpecialID,ArticleNum,TitleMaxLen,ContentMaxLen,ShowType,ShowCols
dim ShowProperty,ShowClassName,ShowIncludePic,ShowTitle,ShowUpdateTime,ShowHits,ShowAuthor,ShowHot,ShowMore
dim Hot,Elite,DateNum,OrderField,OrderType,ImgWidth,ImgHeight
dim SystemPath,rs,sql,str,str1,topicLen,topic
dim i,FileType
dim tClass,trs,arrClassID
dim tLayout,LayoutFileName_Class,LayoutFileName_Article
dim Author,AuthorName,AuthorEmail
ClassID=trim(request.querystring("ClassID"))
IncludeChild=trim(request.QueryString("IncludeChild"))
SpecialID=trim(request.querystring("SpecialID"))
ArticleNum=trim(request.querystring("ArticleNum"))
TitleMaxLen=trim(request.querystring("TitleMaxLen"))
ContentMaxLen=trim(request.querystring("ContentMaxLen"))
ShowType=trim(request.querystring("ShowType"))
ShowCols=trim(request.querystring("ShowCols"))
ShowProperty=trim(request.querystring("ShowProperty"))
ShowClassName=trim(request.querystring("ShowClassName"))
ShowIncludePic=trim(request.querystring("ShowIncludePic"))
ShowTitle=trim(request.querystring("ShowTitle"))
ShowUpdateTime=trim(request.querystring("ShowUpdateTime"))
ShowHits=trim(request.querystring("ShowHits"))
ShowAuthor=trim(request.querystring("ShowAuthor"))
ShowHot=trim(request.querystring("ShowHot"))
ShowMore=trim(request.querystring("ShowMore"))
Hot=trim(request.querystring("Hot"))
Elite=trim(request.querystring("Elite"))
DateNum=trim(request.querystring("DateNum"))
orderField=trim(request.querystring("OrderField"))
orderType=trim(request.querystring("OrderType"))
ImgWidth=trim(request.querystring("ImgWidth"))
ImgHeight=trim(request.querystring("ImgHeight"))
SystemPath="http://";&request.servervariables("server_name")&replace(request.servervariables("script_name"),"article_js.asp","")
if ShowType<>"" then
ShowType=Cint(ShowType)
else
ShowType=1
end if
if ShowCols<>"" then
ShowCols=Cint(ShowCols)
else
ShowCols=1
end if
if ContentMaxLen<>"" then
ContentMaxLen=Cint(ContentMaxLen)
else
ContentMaxLen=200
end if
if ClassID="" then
ClassID=0
else
ClassID=Clng(ClassID)
end if
if SpecialID="" then
SpecialID=0
else
SpecialID=Clng(SpecialID)
end if
set tLayout=nt2003.execute("select LayoutFileName from Layout where LayoutType=2 and IsDefault=True")
LayoutFileName_Class=tLayout(0)
if isNull(LayoutFileName_Class) then LayoutFileName_Class="ShowClass.asp"
set tLayout=nt2003.execute("select LayoutFileName from Layout where LayoutType=3 and IsDefault=True")
LayoutFileName_Article=tLayout(0)
if isNull(LayoutFileName_Article) then LayoutFileName_Article="ShowArticle.asp"
set tLayout=nothing
sql="select"
if ArticleNum<>"" then sql=sql & " top " & Cint(ArticleNum)
if ShowClassName="true" then
sql=sql & " A.ArticleID,A.ClassID,C.ClassName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType,A.Content,"
sql=sql & " A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl from Article A"
sql=sql & " inner join ArticleClass C on A.ClassID=C.ClassID where A.Deleted=False and A.Passed=True"
else
sql=sql & " A.ArticleID,A.ClassID,L.LayoutID,L.LayoutFileName,A.Title,A.Key,A.Author,A.CopyFrom,A.UpdateTime,A.Editor,A.TitleFontColor,A.TitleFontType,A.Content,"
sql=sql & " A.Hits,A.OnTop,A.Hot,A.Elite,A.Passed,A.IncludePic,A.Stars,A.PaginationType,A.ReadLevel,A.ReadPoint,A.DefaultPicUrl from Article A"
sql=sql & " inner join Layout L on A.LayoutID=L.LayoutID where A.Deleted=False and A.Passed=True"
end if
if ClassID>0 then
set tClass=nt2003.execute("select ClassID,ParentPath,Child From ArticleClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
response.write "document.write (" & Chr(34) & "找不到指定的栏目,可能已经被管理员删除!请重新生成JS调用代码。" & Chr(34) & ");"
response.end
else
if IncludeChild="true" then
if tClass(2)>0 then
arrClassID=tClass(0)
set trs=nt2003.execute("select ClassID from ArticleClass where ParentID=" & tClass(0) & " or ParentPath like '%" & tClass(1) & "," & tClass(0) & ",%' and Child=0 and LinkUrl=''")
do while not trs.eof
arrClassID=arrClassID & "," & trs(0)
trs.movenext
loop
set trs=nothing
sql=sql & " and A.ClassID in (" & arrClassID & ")"
else
sql=sql & " and A.ClassID=" & Clng(ClassID)
end if
else
sql=sql & " and A.ClassID=" & Clng(ClassID)
end if
end if
set tClass=nothing
end if
if SpecialID>0 then sql=sql & " and A.SpecialID=" & SpecialID
if ShowType=3 or ShowType=4 then sql=sql & " and A.DefaultPicUrl<>''"
if Hot="true" then sql=sql & " and A.Hits>=" & nt2003.site_setting(14)
if Elite="true" then sql=sql & " and A.Elite=True"
if DateNum<>"" then sql=sql & " and DATEDIFF('d',UpdateTime,Date())<=" & Cint(DateNum)
sql=sql & " order by A.OnTop asc"
if orderField<>"" then sql=sql & " , A." & orderField
if orderType<>"" then
sql=sql & " " & orderType
else
sql=sql & " asc"
end if
set rs=nt2003.execute(sql)
if rs.bof and rs.eof then
response.write "document.write (" & Chr(34) & "没有符合条件的文章" & Chr(34) & ");"
else
if ShowType=3 or ShowType=4 then
response.write "document.write (" & Chr(34) & "<table cellspacing='5' align='center'><tr valign='top'>" & Chr(34) & ");" & vbcrlf
end if
do while not rs.eof
if TitleMaxLen<>"" then
topic=gotTopic(rs("title"),Cint(TitleMaxLen))
else
topic=rs("title")
end if
if rs("TitleFontType")=1 then
topic="<b>" & topic & "</b>"
elseif rs("TitleFontType")=2 then
topic="<em>" & topic & "</em>"
elseif rs("TitleFontType")=3 then
topic="<b><em>" & topic & "</em></b>"
end if
if rs("TitleFontColor")<>"" then
topic="<font color='" & rs("TitleFontColor") & "'>" & topic & "</font>"
end if
Author=rs("Author")
if instr(Author,"|")>0 then
AuthorName=left(Author,instr(Author,"|")-1)
AuthorEmail=right(Author,len(Author)-instr(Author,"|")-1)
else
AuthorName=Author
AuthorEmail=""
end if
if ShowType=1 or ShowType=2 then
str=""
else
str="<td width='" & ImgWidth & "' align='center'>"
end if
if ShowType=1 or ShowType=2 then
str="<table border=0 width='100%' cellspacing=0 cellpadding=1><tr><td align='left'><tr><td>"
if ShowProperty="true" then
if rs("OnTop")=true then
str=str & "<img src='images/article_ontop.gif' alt='固顶文章'> "
elseif rs("Elite")=true then
str=str & "<img src='images/article_elite.gif' alt='推荐文章'> "
else
str=str & "<img src='images/article_common.gif' alt='普通文章'> "
end if
end if
'if ShowIncludePic="true" and rs("IncludePic")=true then
'str=str & "<font color=blue>[图文]</font>"
'end if
if ShowClassName="true" then
str=str & "<font color=#ff9900>[" & rs("ClassName") & "]</font> "
str=str & "<a href='" & SystemPath & LayoutFileName_Article & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
else
str=str & "<a href='" & SystemPath & rs("LayoutFileName") & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
end if
str=str & Topic & "</a>"
else
if ShowClassName="true" then
str=str & "<font color=#ff9900>[" & rs("ClassName") & "]</font> "
str=str & "<a href='" & SystemPath & LayoutFileName_Article & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
else
str=str & "<a href='" & SystemPath & rs("LayoutFileName") & "?ArticleID=" & rs("articleid") & "' title='文章标题:" & rs("Title") & "\n" & "作 者:" & AuthorName & "\n" & "更新时间:" & rs("UpdateTime") & "\n" & "点击次数:" & rs("Hits") & " ' target='_blank'>"
end if
FileType=right(lcase(rs("DefaultPicUrl")),3)
if FileType="swf" then
str=str & "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" & ImgWidth & "' height='" & ImgHeight & "'><param name='movie' value='" & rs("DefaultPicUrl") & "'><param name='quality' value='high'><embed src='" & rs("DefaultPicUrl") & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" & ImgWidth & "' height='" & ImgHeight & "'></embed></object>"
elseif fileType="jpg" or fileType="bmp" or fileType="png" or fileType="gif" then
str=str & "<img src='" & rs("DefaultPicUrl") & "' width='" & ImgWidth & "' height='" & ImgHeight & "' border='0'>"
else
str=str & "<img src='images/NoPic2.jpg' width='" & ImgWidth & "' height='" & ImgHeight & "' border='0'>"
end if
str=str & Topic & "</a>"
end if
if ShowAuthor="true" or ShowUpdateTime="true" or ShowHits="true" then
'str=str & " ("
if ShowAuthor="true" then
if AuthorEmail="" then
str=str & AuthorName
else
str=str & "<a href='mailto:" & AuthorEmail & "'>" & AuthorName & "</a>"
end if
end if
if ShowUpdateTime="true" then
if ShowAuthor="true" then
str=str & ","
end if
if CDate(FormatDateTime(rs("UpdateTime"),2))=date() then
str=str & "</td><td nowrap align='right' style='width:1%; padding-right:5px'><font color=red>"
else
str=str & "</td><td nowrap align='right' style='width:1%; padding-right:5px'><font color=#999999>"
end if
str=str & FormatDateTime(rs("UpdateTime"),2) & "</font>"
end if
if ShowHits="true" then
if ShowAuthor="true" or ShowUpdateTime="true" then
str=str & ","
end if
str=str & rs("Hits")
end if
'str=str & ")"
end if
if ShowHot="true" and rs("Hits")>=100 then
str=str & "<img src='" & SystemPath & "images/hot.gif' align='absmiddle' alt='热点文章'>"
end if
str=str & "</tr></table><table border=0 width='100%' height=1 cellspacing=1 cellpadding=0 ><tr><td height=1 background='images/bg_dian.gif'></td></tr></table>"
if ShowType=1 then
str=str & ""
elseif ShowType=2 then
str=str & "<br><div style='padding:0px 20px'>" & left(replace(replace(replace(nohtml(rs("content")),chr(34),""),chr(10),"\n"),chr(13),"\n"),ContentMaxLen) & "……</div>"
elseif ShowType=3 then
str=str & "</td>"
elseif ShowType=4 then
str=str & "</td><td>" & left(replace(replace(replace(nohtml(rs("content")),chr(34),""),chr(10),"\n"),chr(13),"\n"),ContentMaxLen) & "……</td>"
end if
rs.movenext
if ShowType=3 or ShowType=4 then
i=i+1
if ((i mod ShowCols=0) and (not rs.eof)) then
str=str & "</tr><tr valign='top'>"
end if
end if
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
loop
if ShowType=1 or ShowType=2 then
if ShowMore="true" then
if ClassID>0 then
str="<div align='right'><a href='" & SystemPath & LayoutFileName_Class & "?ClassID=" & ClassID & "'>more...</a></div>"
else
str="<div align='right'><a href='index.asp'>more...</a></div>"
end if
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
end if
else
str="</tr>"
if ShowMore="true" then
if ClassID>0 then
str=str & "<tr><td colspan='" & ShowCols*2 & "' align='right'><a href='" & SystemPath & LayoutFileName_Class & "?ClassID=" & ClassID & "'>更多……</a></td>"
else
str=str & "<tr><td colspan='" & ShowCols*2 & "' align='right'><a href='index.asp'>更多……</a></td>"
end if
end if
str=str & "</table>"
response.write "document.write (" & Chr(34) & str & Chr(34) & ");" & vbcrlf
end if
end if
rs.close
set rs=nothing
%>
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
修改用户排行个数
把 index.asp 中的 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(10))
修改为 TempStr = Replace(TempStr,"{$ShowTopUser}",ShowTopUser(3))
___________________________________________________________________
注册用户添加软件后,管理员在后台审核时出错:
错误类型:
Microsoft VBScript 运行时错误 (0x800A01F4)
变量未定义: 'WebmasterName'
/36/Admin_SoftProperty.asp, 第 133 行
答:
Admin_SoftProperty.asp里
在dim....
dim.....
下加上
dim WebmasterName
___________________________________________________________________
图片频道的图片不能发表评论及后台管理出错的解决办法
在Photo_Comment.asp文件的第一个
<%
下加上下面一句
nt2003.GetSite_Setting()
在INC/syscode_Photo.asp文件中1079行也就是
response.write "<li>会员"
这一行的下面加上下面这段
IF UserTableType="Dvbbs7.0" then
set rsCommentUser=Conn_User.execute("select " & db_User_ID & "," & db_User_Name & "," & db_User_Email & "," & db_User_UserIM & " from " & db_User_Table & " where " & db_User_Name & "='" & rsComment("UserName") & "'")
dim UserIM,homepage,QQ
UserIM=split(rsCommentUser(3),"|||")
homepage=UserIM(0)
QQ=UserIM(1)
if rsCommentUser.bof and rsCommentUser.eof then
response.write rsComment("UserName")
else
response.write "『<a href='UserInfo.asp?UserID=" & rsCommentUser(0) & "' title='姓名:" & rsCommentUser(1) & vbcrlf & "信箱:" & rsCommentUser(2) & vbcrlf & "Oicq:" & QQ & vbcrlf & "主页:" & homepage &"'><font color='blue'>" & rsComment("UserName") & "</font></a>』"
end if
Else
在1098行再加一个
end if
___________________________________________________________________
___________________________________________________________________
就软件审核这个错误
webmastername 换成 nt2003.site_info(7)
就两处
___________________________________________________________________
找到inc/syscode_article.asp,然后打开编辑第十四行TempStr = Replace(TempStr,"{$ShowPicArticle1}",ShowPicArticle(0,1,20,1,1,120,90,200,false,false))
看到(0,1,20,1,1,120,90,200,false,false))中第二个1改成2就实现了调用两个图片文章!
评论: 0 | 引用: 36 | 查看次数: 7247
发表评论