分类: Cms预览模式: 普通 | 列表

首页调用论坛图片

sub forum_pic(n)
dim tmp1,id,iid,pic,topic,fid,name,counter
tmp1=vbcrlf&"<tr align=center>"
sql="select top "&n&" upload.id,upload.iid,bbs_topic.topic,bbs_topic.counter,bbs_topic.forum_id,bbs_topic.username,upload.url from upload INNER JOIN bbs_topic ON upload.iid = bbs_topic.id where nsort='forum' and genre='jpg' or genre='gif' or genre='bmp' order by upload.id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
  id=rs("iid")
  pic=rs("url")
  topic=rs("topic")
  fid=rs("forum_id")
  name=rs("username")
  counter=rs("counter")
  tmp1=tmp1&vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
            vbcrlf&" <tr><td>"&pic_fk(pic,4,"forum/forum_view.asp?forum_id="&fid&"&view_id="&id)&"</td>" & _
            vbcrlf&" <td><a href='forum/forum_view.asp?forum_id="&fid&"&view_id="&id&"' target=_blank alt='标题:"&joekoe_cms.code_html(topic,1,0)&"<br>人气:"&counter&"<br>发 布 人:"&name&"'>"&joekoe_cms.code_html(topic,1,30)&"</a></td></td>" & _
  rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</tr>"
tmp1="<table border=0 cellspacing=0 cellpadding=0 width='100%'>"&tmp1&vbcrlf&"</table>"
  response.write vbcrlf&"<table cellspacing=0 cellpadding=0 class=table>" & _
                 vbcrlf&"<tr><td align=center>"&tmp1&"</td></tr>" & _
                 vbcrlf&"</table>"
end sub

调用方法:<%call forum_pic(1)%>

查看更多...

分类:Cms | 固定链接 | 评论: 6 | 引用: 0 | 查看次数: 725

竖排调用一二级分类新闻图片

隐藏内容 隐藏内容
该内容已经被作者隐藏,只有会员才允许查阅 登录 | 注册


调用:
call main_news_pic(4,24,122)
红色:图片数量
紫色:标题字数
蓝色:分类ID
sql中的修改:
c_id为一级分类
s_id为二级分类

查看更多...

分类:Cms | 固定链接 | 评论: 7 | 引用: 0 | 查看次数: 672

为注册功能增加密码强度检查 FOR 1.2

把附件文件解压到style目录

打开register.asp
查找
<tr><td>登陆密码:</td><td><input type=password name=password size=20 maxlength=20><%response.write redx%></td></tr>

替换为
<tr><td>登陆密码:</td><td><input type=password name=password size=20 maxlength=20 onkeyup="javascript:SetPwdStrengthEx(document.reg_frm,this.value);"><%response.write redx%></td></tr>
<script type="text/javascript" src="Style/Pw.js"></script>
<script type="text/javascript">
function DispPwdStrength(iN,sHL){ if(iN>3){ iN=3;}for(var i=0;i<4;i++){ var sHCR="css0162";if(i<=iN){ sHCR=sHL;}if(i>0){ GEId("IDSM"+i).className=sHCR;}GEId("IDSMT"+i).style.display=((i==iN)?"inline":"none");}}
</script> 
<tr><td>密码强度:</td><td><table style="width: 135px; height: 20px;" cellpadding="0" cellspacing="0"><tbody><tr><td id="IDSM1" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;" align="center" valign="middle" width="33%"><span style="font-size: 1px;"> </span><span id="IDSMT1" style="display: none; color:#FF0000">弱</span></td> <td id="IDSM2" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;" align="center" valign="middle" width="34%"><span style="font-size: 1px;"> </span><span id="IDSMT0" style="display: inline; font-weight: normal; color:#6633FF">未评级</span><span id="IDSMT2" style="display: none; color:#FF9900">中</span></td><td id="IDSM3" style="background-color:#EBEBEB;border-right:solid 1px #BEBEBE;border-bottom:solid 1px #BEBEBE;"  align="center" valign="middle" width="33%"><span style="font-size: 1px;"> </span><span id="IDSMT3" style="display: none; color:#339900">强</span></td></tr></tbody></table></td></tr>


打开user_pass.asp
查找<tr class=bg_tds>
<...

查看更多...

分类:Cms | 固定链接 | 评论: 8 | 引用: 0 | 查看次数: 700

解决弹出影院拦截...

一、在影院的 模板管理中 
HtmlNums(12)

把框中的原来的代码都换成

<script language=javascript>
<!--
function video_view(id,fid)
{
  if (note_emoney('在线收看此影片','{$v_emoney}','{$v_power}'))
  {
  open_win('video_player.asp?id='+id+'&fid='+fid,'video_player',600,430,'no');
  }
}
-->
</script>
  <tr>
  <td width='25%'><img src='{$picurl}small_plays.gif' border=0></td>
  <td width='75%'>{$nodown}{$friend}</td>
  </tr>
  <tr><td height=2></td><td></td></tr>
  <tr><td colspan=2 align=center width='100%' class=bw>
    <table border=0 width='98%' class=tf>
    <tr><td>
    {$body}
    </td></tr>
    </table>
  </td></tr>
=========================================================================
二、把下面代码自制后,另存为一个video_player.asp文件
源码如下:
======================================================
<!-- #include file="include/con_video.asp" -->
<!-- #include file="include/jk_emoney.asp" -->
<%
dim id,fid
id=trim(request.querystring("id"))
fid=trim(request.querystring("fid"))
if not(isnumeric(id)) or not(isnumeric(fid)) then call video_error("id")

dim rob_true,rob_size,rob_debug
rob_true=int(mid(video_dim(3),3,1))
rob_size=0
rob_debug=0 'Debug开关,可检验地址是否正确
rob_debug=int(mid(video_dim(3),2,1))

sql="select video.username,video.name,video.emoney,video.power,video.viewtype,video.tim,video.genre,video.isfree,video.server_id" & _
",video_url.url,video_url.urlname,video_url.video_size from video_url inner join video on video_url.nameid=video.id" & _
" where video.hidden=1 and video_url.id="&fid&" and video.id="&id
set rs=joekoe_cms.exec(sql,1)
if rs.eof then
  rs.close
  call video_error("id")
end if
dim power,emoney,vname,vtype,username,tim,genre,fname,furl,video_url,vserver,isfree
username=rs("username")
vname=rs("name")
power=rs("power")
emoney=int(rs("emoney"))
vtype=int(rs("viewtype"))
tim=rs("tim")
genre=rs("genre")
furl=rs("url")
fname=rs("urlname")
vserver=int(rs...

查看更多...

分类:Cms | 固定链接 | 评论: 7 | 引用: 1 | 查看次数: 904

加载 DLL 时出错: 'RegExp'的解决方法

今天打开本机原正常的asp程序,突然发现有错误,提示:

错误类型:Microsoft VBScript 运行时错误 (0x800A0030) 加载 DLL 时出错: 'RegExp'

奇怪,难道昨天新装了什么东东,把这个dll给干掉了?

想到前几天学到,RegExp是存在于VBscript.dll中,于是运行:regsvr32 vbscript.dll,提示加载成功。

刷新网页,程序正常运行:)

在网上搜索了一下,发现也有好些人碰到此问题,总结一下:

1.加载VBscript.dll,方法:开始 - 运行 ,输入cmd,然后输入regsvr32 vbscript.dll
如果提示找不到,可以加上路径,一般是在系统盘的system32目录下。

2.如果以前没装过,则需要下载Script5.6安装即可。

查看更多...

分类:Cms | 固定链接 | 评论: 8 | 引用: 0 | 查看次数: 671

cms1.2 添加cache 统计

cache <font class=red>"&Application.Contents.count&"</font>

查看更多...

分类:Cms | 固定链接 | 评论: 8 | 引用: 0 | 查看次数: 695

文章正文改成左右栏的

call web_head(0,0,3,0,0)
改为
call web_head(0,0,0,0,0)
再在
response.write vbcrlf&"article_view1("&id&",'"&topic&"','"&joekoe_cms.time_type(tim,5)&"','"&comto&"','"&author&"');"
之上插入下列行
call web_center(0)
再在这行之上加入左栏调用即可。

查看更多...

分类:Cms | 固定链接 | 评论: 6 | 引用: 0 | 查看次数: 765

1.2水印修改办法

关键是这步:
打开web_dim(14)=""改为web_dim(14)="gif,jpg,swf,rar,zip|500|1|0|prg/|1|1|1|3300FF|3|images/youimg.bmp|160|50|50|你网站的名字|10|10|gif,jpg,jpeg,bmp|rar,zip,doc||||0033FF"
第一次修改上传设置后,如果没下面红色的那个数字就自己打开common.asp,在那里加个数字.注意看:
web_dim(14)="gif,jpg,swf,rar,zip|500|1|0|prg/|1|1|1|3300FF|3|images/youimg.bmp|160|50|50|你网站的名字|10|10|gif,jpg,jpeg,bmp|rar,zip,doc||||0033FF"
还有加代码的时候不要用自动换行!
如果用了还不行的,请对照下面修改:
打开include/admin_config_edit.asp
sub joekoe_chk_upload()
  dim tdown
  if chk() then
    web_down=code_config(request.form("tdown_0"),4)&"|"&code_config(request.form("tdown_1"),4)
    web_dim(13)=code_url(code_config(request.form("web_upload"),2))
    web_dim(14)=code_config(request.form("tdim_0"),2)&"|"&code_num(request.form("tdim_1"),500)&"|"&code_num(request.form("tdim_2"),5)&"|"& _
     code_num(request.form("tdim_3"),0)&"|"&code_url(code_config(request.form("tdim_4"),2))&"|"& _
  code_config(request.form("tdim_5"),2)&"|"&code_config(request.form("tdim_6"),2)&"|"& _
        code_num(request.form("tdim_7"),0)&"|"&code_config(request.form("tdim_8"),2)&"|" & _
  code_num(request.form("tdim_9"),0)&"|"&code_config(request.form("tdim_10"),2)&"|" & _
        code_num(request.form("tdim_11"),0)&"|"&code_num(request.form("tdim_12"),0)&"|" & _
        code_num(request.form("tdim_13"),0)&"|"&code_config(request.form("tdim_14"),2)&"|" & _
        code_config(request.form("tdim_15"),2)&"|"&code_config(request.form("tdim_16"),2)&"|" & _
        code_config(request.form("tdim_17"),2)&"|"&code_config(request.form("tdim_18"),2)&"|" & _
        code_config(request.form("tdim_19"),2)&"|"&code_config(request.form("tdim_20"),2)&"|" & _
        code_config(request.form("tdim_21"),2)&"|"&code_config(request.form("tdim_22"),2)
    call joekoe_template_common()
    call joekoe_te...

查看更多...

分类:Cms | 固定链接 | 评论: 6 | 引用: 0 | 查看次数: 732

ASP生成静态Html文件方法

1,下面这个例子直接利用FSO把html代码写入到文件中然后生成.html格式的文件 <% 
filename="test.htm" 
if request("body")<>"" then 
set fso = Server.CreateObject("Scripting.FileSystemObject") 
set htmlwrite = fso.CreateTextFile(server.mappath(""&filename&"")) 
htmlwrite.write "<html><head><title>" & request.form("title") & "</title></head>" 
htmlwrite.write "<body>输出Title内容: " & request.form("title") & "<br /> 输出Body内容:" & request.form("body")& "</body></html>" 
htmlwrite.close 
set fout=nothing 
set fso=nothing 
end if 
%> 
<form name="form" method="post" action=""> 
<input name="title" value="Title" size=26> 
<br> 
<textarea name="body">Body</textarea> 
<br> 
<br> 
<input type="submit" name="Submit" value="生成html"> 
</form> 
2,但是按照上面的方法生成html文件非常不方便,第二种方法就是利用模板技术,将模板中特殊代码的值替换为从表单或是数据库字段中接受过来的值,完成模板功能;将最终替换过的所有模板代码生成HTML文件.这种技术采用得比较多,HSCMS以后就可以使用这类方法. 
template.htm ' //模板文件 <html> 
<head> 
<title>$title$ by aspid.cn</title> 
</head> 
<body> 
$body$ 
</body> 
</html> ? 

TestTemplate.asp '// 生成Html <% 
Dim fso,htmlwrite 
Dim strTitle,strContent,strOut 
'// 创建文件系统对象 
Set fso=Server.CreateObject("Scripting.FileSystemObject") 
'// 打开网页模板文件,读取模板内容 
Set htmlwrite=fso.OpenTextFile(Server.MapPath("Template.htm")) 
strOut=f.ReadAll 
htmlwrite.close 

strTitle="生成的网页标题" 
strContent="生成的网页内容" 

'// 用真实内容替换模板中的标记 
strOut=Replace(strOut,"$title$",strTitle) 
strOut=Replace(strOut,"$body$",strContent) 

'// 创建要生成的静态页 
Set htmlwrite=fso.CreateTextFile(Server.MapPath("test.htm"),true) 

'// 写入网页内容 
htmlwrite.WriteLine strOut 
htmlwrite.close 

Response.Write "生成静态页成功!" 

'// 释放文件系统对象 
set htmlwrite=Nothing 
set fso=Nothing 
%> 

3,第三种方法就是用XMLHTTP获取动态页生成的HTML内容,再用ADODB.Stream或者Scripting.FileSystemObject保存成html文件。 
<% 

'常用函数 
'1、输入url目标网页地址,返回值getHTTPPage是目标网页的html代码 
function getHTTP...

查看更多...

分类:Cms | 固定链接 | 评论: 7 | 引用: 0 | 查看次数: 767
引用内容 引用内容
用户登录前访问的是静态页页,登录后是动态的。

演示地址:http://www.gzdrug.com/lotus

一、将原来的index.asp 改名为main.asp
二、新建一个index.asp文件,代码如下:
<!-- #include file="include/skin.asp" -->
<% 
if  var_null(login_username)="" then
  response.redirect("main.htm")
  else
  response.redirect("main.asp")
end if
%>
三、新建一个htm.asp文件(与main.asp,index.asp同目录),代码如下(记得把下面的lotus换成你网站的目录):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Refresh"content="2;URL=index.asp"/>
<title>更新网页</title>
</head>

<body>
<%
dim strUrl,Item_Classid,id,FileName,FilePath,Do_Url,Html_Temp
Html_Temp="<UL>"
Html_Temp = Html_Temp&"<LI>"
FileName = "main.htm"
FilePath = Server.MapPath("/lotus/")&"\"&FileName
Html_Temp = Html_Temp&FilePath&"</LI>"
Do_Url = "http://"
Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME")&"/lotus/main.asp"
strUrl = Do_Url
dim objXmlHttp
set objXmlHttp = Server.createObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
Dim binFileData
binFileData = objXmlHttp.responseBody
Dim objAdoStream
set objAdoStream = Server.createObject("ADODB.Stream")
objAdoStream.Type = 1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2 
objAdoStream.Close()
Html_Temp = Html_Temp&"<UL>"
%>
<%
Response.Write ( "成功生成文件: main.htm<br>更新页面成功,2秒后自动返回" )
Response.Write("")
'Response.Write ( "<BR>" )
'Response.Write Html_Temp
%>
</body>
</html>
四、在首页合适的位置放一个htm.asp文件的连接,只要打开htm.asp即是更新静态页面。OK

查看更多...

分类:Cms | 固定链接 | 评论: 8 | 引用: 0 | 查看次数: 968