zoukankan      html  css  js  c++  java
  • 让你的网站(MAXCMS4_0)按地区、年份、语言生成分页面(已经修正)

    演示

    演示:
    粤语电影:http://www.5film.com/html/yueyu.html
    香港地区:http://www.5film.com/html/HongKong.html
    2010年最新电影:http://www.5film.com/html/2010year.html
    标签使用方法和自定义模板那里一样
    lang=粤语
    area=香港
    year=2010或 2001,2002,2003....支持多个年份让你的网站(MAXCMS4_0)按地区、年份、语言生成分页面(已经修正) - 马克斯CMS讨论区 - CC视频站长交流论坛 播客系统播客程序威视视频程序马克斯电影程序 - Powered by Discuz!.htm

    下面是修改程序的代码
    打开inc目录的mainclass.asp文件找到
    1. dim vnum,vorder,vtype,vtopic,vtime,vstart,vstate,vcommend,vletter,vid,
    复制代码
    在后面添上
    1. ,vLang,vArea,vYear,whereLang,whereArea,whereYear
    复制代码
    然后在找到
    1. vcommend=attrDictionary("commend") : vid=attrDictionary("id")
    复制代码
    在后面添加上
    1. : vLang=attrDictionary("lang") : varea=attrDictionary("area") : vYear=attrDictionary("year")
    复制代码
    继续找到代码
    1.                         if isNul(vnum) then vnum=10 else vnum=clng(vnum)
    2.                         if isNul(vorder) AND isNul(vid) then vorder="time"
    3.                         if isNul(vorder) then vorder="id"
    复制代码
    另起一行加上
    1.             '另外加的标签
    2.                         if not Isnul(vlang) then
    3.                                 whereLang = " and m_lang='"&vlang&"'"
    4.                         else
    5.                                 whereLang = ""
    6.                         end if
    7.                         If not Isnul(varea) Then
    8.                                 whereArea = " and m_publisharea='"&varea&"'"
    9.                         else
    10.                                 whereArea = ""
    11.                         end if
    12.                         If not Isnul(vyear) Then
    13.                     select case trim(vyear)
    14.                         case "all" : whereYear=" and m_publishyear>0"
    15.                                         case else
    16.                                                 if instr(vyear,",")>0 then whereYear=" and m_publishyear in("&vyear&")" else whereYear = " and m_publishyear ="&vyear
    17.                                 end select
    18.                         else
    19.                                 whereYear = ""
    20.                         end if
    21.             '另外加的标签
    复制代码
    最后后还要找到
    1. sql=sql1&"where m_recycle=0"&whereStr&orderStr
    复制代码
    修改成为
    1. sql=sql1&"where m_recycle=0"&whereStr&whereLang&whereArea&whereYear&orderStr
    复制代码
    刚刚发布时漏发了这一段代码

    还有这个只是对自定义模板的代码修改
    如果你要修改视频列 表的话同样的方式修改就可以了
     MainClass.rar (14.92 KB)
  • 相关阅读:
    【SICP练习】80 练习2.52
    【SICP练习】79 练习2.51
    【SICP练习】78 练习2.50
    【SICP练习】77 练习2.48-2.49
    【SICP练习】76 练习2.47
    【SICP练习】75 练习2.46
    【SICP练习】74 练习2.45
    【SICP练习】73 练习2.44
    【SICP练习】72 练习2.43
    【SICP练习】71 练习2.42
  • 原文地址:https://www.cnblogs.com/94YY/p/2227310.html
Copyright © 2011-2022 走看看