![]() |
#2
jiazehua2010-08-17 16:00
模板文件PART 1
![]() <!--#include file = "inc/conn.asp"--> <% Dim getID getID=request("ID") if not isnumeric(getID) then response.Write("<script>alert('操作有误');location.href='/index.html';</script>") response.End() end if set rs=conn.execute("select * from DB_Hotel where ID="&getID&" and Is_Show=True") if rs.bof and rs.eof then response.write "数据无效" getID=0 else HotelName=rs("HotelName") EnHotelName=rs("EnHotelName") Star=rs("Star") if Star="五星级" then S=5 elseif Star="四星级" then S=4 elseif Star="三星级" then S=3 elseif Star="二星级" then S=2 end if Position=rs("Position") Hotel_Pic=rs("Hotel_Pic") Content=rs("Content") Info_Jbxx=rs("Info_Jbxx") Info_Fjss=rs("Info_Fjss") Info_Hyss=rs("Info_Hyss") Info_Cyss=rs("Info_Cyss") Info_Ylss=rs("Info_Ylss") Info_Dlwz=rs("Info_Dlwz") Info_Ccxl=rs("Info_Ccxl") Info_Gyjz=rs("Info_Gyjz") Info_Tbtx=rs("Info_Tbtx") Hotel_Map=rs("Hotel_Map") Map_Url=rs("Map_Url") FileName=rs("FileName") Title=rs("Title") Keywords=rs("Keywords") txtDescription=rs("Description") end if rs.close %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.> <html xmlns="http://www.> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <link href="/css/style.css" rel="stylesheet" type="text/css" /> <title><%=Title%></title> <meta name="keywords" content="<%=Keywords%>" /> <meta name="description" content="<%=txtDescription%>" /> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <script type="text/javascript" src="/Hotel_hits.asp?ID=<%=getID%>"></script> <script language="javascript" src="/js/msclass.js"></script> </head> <body> <center> <!--#include file="top.asp"--> <table width="980" height="24" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="text-align:left; color:#000000;">当前位置:<a href="/">首页</a>>><%=HotelName%> <font color="#FF6633"><b></b></font></td> </tr> </table> <table width="980" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="750" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:10px;"> <tr> <td height="317" align="left" valign="top" class="Hotel_Content"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" height="24" align="left" style="color:#FF3300"><h4>酒店名称:<%=HotelName%></h4></td> <td width="32%" align="left"><span class="hotel">酒店星级:</span><%for i=1 to s%><img src="/images/star.gif" width="9" height="8" /><%next%>(<%=Star%>)</td> <td width="23%" rowspan="4" align="center"> <table width="150" height="120" border="0" cellpadding="2" cellspacing="2" style="border:#dddddd 1px solid;"> <tr bgcolor="#FFFFFF"> <td align="center"><img src="/<%=Hotel_Pic%>" alt="<%=HotelName%>" width="150" height="120" /></td> </tr> </table> </td> </tr> <tr> <td height="24" align="left"><span class="hotel">英文名称:</span><a href="/dalianjiudian/<%=FileName%>" title="<%=EnHotelName%>"><font color="#FF6600"><%=EnHotelName%></font></a></td> <td align="left" class="hotel">预订电话1:0411-88888888</td> </tr> <tr> <td height="24" align="left" class="hotel">酒店地址:<%=Position%></td> <td align="left"><span class="hotel">预订电话2:0411-88888888</span></td> </tr> <tr> <td height="24" align="left" class="hotel">酒店介绍:</td> <td align="left"> </td> </tr> <tr> <td height="24" colspan="3" align="left" style="line-height:150%; border-bottom:#FF6600 1px dashed; padding-bottom:5px;"><%=changeCHR(Content)%></td> </tr> </table> <table width="100%" height="100" border="0" cellpadding="0" cellspacing="0" style="border-bottom:#FF6600 1px dashed;"> <tr> <td align="left"> <div id="marqueediv" style="width:730px;height:85px;"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <% set rs=conn.execute("select Name,Pic from DB_HotelPic where Hotel_ID="&getID&" order by SortIndex,ID Desc") if rs.bof and rs.eof then response.write "暂无酒店相关图片" else do while not rs.eof %> <td align="left"> <table width="124" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="85"><a href="/<%=rs("Pic")%>" target="_blank"><img src="/<%=rs("Pic")%>" alt="<%=rs("Name")%>" width="120" height="85" border="0" /></a></td> </tr> </table> </td> <% rs.movenext loop end if rs.close %> </tr> </table> </div> <script defer> var marquee1=new Marquee("marqueediv"); marquee1.Direction = "left" marquee1.Step = 1; marquee1.Width = 730; marquee1.Height = 85; marquee1.Timer = 50; marquee1.DelayTime = 0; marquee1.WaitTime =0; marquee1.Start(); </script> </td> </tr> </table> <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="text-align:left; font-weight:bold; color:#CC3300">温馨提示:您可以直接点击预定或者致电0411-88888888由我们的预定专员为您提供预定服务。</td> </tr> </table> |
书归正传:
网站ASP生成HTML页的酒店预订网站
是每次生成都是按照模板页生成的
我想要在模板页的底部合适位置增加一个酒店点评模块
1/就是类似于youku等网站的评论模式
2/并且需要通过审核后才显示
3/前台和后台都需要写……后台主要是修改、审核、删除留言
4/登陆后才能评论
-----------------
我的思路是,
1、在数据库新建一个表,然后建两个字段,前台建立表格,递交字段到后台
2、后台审核通过了直接递交到数据库的表里
3、主要是模板页的写法,要写进去评论按钮,以往审核通过的评论表格
4、然后登陆的问题就是在评论的位置加一个checklogin这样的代码
---------------
这个应该很费时间,希望大家能百忙中抽出点时间指点我具体的代码要怎么写
[ 本帖最后由 jiazehua 于 2010-8-17 22:37 编辑 ]