• asp企业网站源码部分


    ASP的网页文件的格式是.asp,现在常用于各种动态网站中。
    PHP是一种 HTML 内嵌式的语言,PHP与微软的ASP颇有几分相似,都是一种在服务器端执行的嵌入HTML文档的脚本语言,语言的风格有类似于C语言,现在被很多的网站编程人员广泛的运用。

      1 <!--#include file="Inc/Conn.asp"-->
      2 <!--#include file="Inc/Function.asp"-->
      3 <!--#include file="Inc/Web_safe.asp"--> 
      4 <!--#include file="Inc/PublicFunction.asp"-->
      5 <!--#include file="Inc/webClose.Asp"-->
      6 <html xmlns="http://www.w3.org/1999/xhtml">
      7 <head>
      8 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
      9 <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
     10 <meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)" >
     11 <meta content="<%=WebAbout%>" name="description">
     12 <meta content="<%=KeysWord%>" name="keywords">
     13 <title><%=WebName%>-关于我们</title>
     14 <%
     15 Dim id
     16 Id =Request.QueryString("Id")
     17 If Id ="" Or Not IsNumeric(Id) Or IsNull(Id) Then
     18    Id = 2
     19 End If
     20 Function webTitle(Id)
     21     Select Case Id
     22            Case 2    webTitle = "gsjj.png" 
     23            Case 5    webTitle = "zzry.png" 
     24            Case 6    webTitle = "zzjg.png"
     25            Case Else webTitle = "gsjj.png"
     26     End Select       
     27 End Function
     28 %>
     29 <script language=JavaScript src="js/scroll.js"></script>
     30 <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
     31 </head>
     32 <link rel="stylesheet" type="text/css" href="css/style.css" />
     33 <body>
     34 <div id="bodymain">
     35 <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
     36   <tr>
     37     <td height="35" valign="bottom"><!--#include file="An.Asp"--></td>
     38   </tr>
     39   <tr>
     40     <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
     41       <tr>
     42         <td width="25%"><img src="images/logo.png" width="224" height="72" /></td>
     43         <td width="75%"><script type="text/javascript">
     44 AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','500','height','72','src','flash/menu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','flash/menu' ); //end AC code
     45 </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="500" height="72">
     46           <param name="movie" value="flash/menu.swf" />
     47           <param name="quality" value="high" />
     48           <param name="wmode" value="transparent" />
     49           <embed src="flash/menu.swf" width="500" height="72" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
     50         </object>
     51 </noscript></td>
     52       </tr>
     53     </table></td>
     54   </tr>
     55   <tr>
     56     <td>&nbsp;</td>
     57   </tr>
     58   <tr>
     59     <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
     60       <tr>
     61         <td width="69%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
     62           <tr>
     63             <td><script type="text/javascript">
     64 AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','691','height','228','src','flash/center','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','flash/center' ); //end AC code
     65 </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="691" height="228">
     66               <param name="movie" value="flash/center.swf" />
     67               <param name="quality" value="high" />
     68               <param name="wmode" value="transparent" />
     69               <embed src="flash/center.swf" width="691" height="228" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
     70             </object>
     71 </noscript></td>
     72           </tr>
     73           <tr>
     74             <td>&nbsp;</td>
     75           </tr>
     76           <tr>
     77             <td><img src="images/<%=webTitle(Id)%>" /></td>
     78           </tr>
     79           <tr>
     80             <td valign="top">
     81             <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
     82               <tr>
     83                 <td bgcolor="#4B4B4B"><table width="100%" border="0" cellspacing="0" cellpadding="0">
     84                   <tr>
     85                     <td colspan="3">&nbsp;</td>
     86                     </tr>
     87                   <tr>
     88                     <td width="2%">&nbsp;</td>
     89                     <td>
     90                     <table width="100%" border="0" cellspacing="0" cellpadding="0">
     91                       <tr>
     92                         <td height="300" align="left" valign="top">
     93                         <%
     94                          If Id = 5 Then
     95                          Set Rs=server.CreateObject("adodb.recordset")
     96                             Sql="select title,About,id,Sm_img,Addtime from Content where BoardId="&id&" and Isdel = 0 order by IsTop Desc,IfGood Desc,Addtime Desc"
     97                             Rs.Open Sql,Conn,1,1
     98                         If Rs.Eof Then
     99                             Response.Write("没有信息")
    100                         Else
    101                         Rs.PageSize =20     
    102                           pre = true
    103                           last = true
    104                           page = trim(Request.QueryString("page"))
    105                           
    106                           If len(page) = 0 then
    107                                       intpage = 1
    108                                       pre = false
    109                           else
    110                               If cint(page) =< 1 then
    111                                    intpage = 1
    112                                    pre = false
    113                               else
    114                                   If cint(page) >= rs.PageCount then
    115                                       intpage = rs.PageCount
    116                                       last = false
    117                                   else
    118                                        intpage = cint(page)
    119                                  end If
    120                              end If
    121                           end If
    122                         If not rs.eof then
    123                              rs.AbsolutePage = intpage
    124                         end If 
    125                         for i=1 to rs.PageSize
    126                         If rs.EOF or rs.BOF then exit for
    127                                     %>
    128                             <table width="100%" border="0" cellspacing="0" cellpadding="0">
    129                               <tr>
    130                                 <td width="26%">
    131                                  <a href="showImg.Asp?idd=<%=Rs("id")%>" target="_blank">
    132                                   <img src=" <%=Rs("Sm_img")%>" width="170" height="110" border="0">
    133                                   </a>
    134                                 </td>
    135                                 <td width="74%" valign="top"><table width="96%" border="0" align="right" cellpadding="6" cellspacing="0">
    136                                   <tr>
    137                                     <td height="20" valign="top" style="border-bottom:dashed 1px #d9683b">
    138                                     <%=Rs("title")%> [ <%=FormatDate(Rs("Addtime"),2)%> ]
    139                                     </td>
    140                                   </tr>
    141                                   <tr>
    142                                     <td height="70" valign="top" style="border-bottom:dashed 1px #d9683b">
    143                                       <%=Rs("About")%>
    144                                     </td>
    145                                   </tr>
    146                                 </table>
    147                                 </td>
    148                               </tr>
    149                               <tr>
    150                                 <td>&nbsp;</td>
    151                                 <td>&nbsp;</td>
    152                               </tr>
    153                             </table>
    154                         <%
    155                         Rs.movenext
    156                         Next 
    157                         End If
    158                         %>
    159                         <%
    160                         Call showpage("?id="&id&"&")
    161                           Set Rs=Nothing
    162                         Else
    163                           Echo(OneMsg(Id))
    164                         End If
    165                         %>
    166                         </td>
    167                       </tr>
    168                     </table>
    169                     </td>
    170                     <td width="2%">&nbsp;</td>
    171                   </tr>
    172                   <tr>
    173                     <td colspan="3">&nbsp;</td>
    174                   </tr>
    175                 </table></td>
    176               </tr>
    177             </table>
    178             </td>
    179           </tr>
    180           <tr>
    181           <tr><td height="20">&nbsp;</td></tr>
    182              <!--#include file="footer.Asp"-->
    183         </table></td>
    184         <td width="31%" valign="top"><table width="95%" border="0" align="right" cellpadding="0" cellspacing="0">
    185           <tr>
    186             <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
    187                 <tr>
    188                   <td height="20" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    189                     <tr>
    190                       <td><a href="About.Asp?id=2"><img src="images/gyhs_gsjj.png" width="271" height="48" border="0" /></a></td>
    191                     </tr>
    192                     <tr>
    193                       <td>&nbsp;</td>
    194                     </tr>
    195                     <tr>
    196                       <td><a href="About.Asp?id=5"><img src="images/gyhs_zzry.png" width="271" height="48" border="0" /></a></td>
    197                     </tr>
    198                     <tr>
    199                       <td>&nbsp;</td>
    200                     </tr>
    201                     <tr>
    202                       <td><a href="About.Asp?id=6"><img src="images/gyhs_zzjg.png" width="271" height="48" border="0" /></a></td>
    203                     </tr>
    204                   </table></td>
    205                 </tr>
    206               </table>
    207               <table width="100%" border="0" cellspacing="0" cellpadding="0">
    208                 <tr>
    209                   <td height="15"></td>
    210                 </tr>
    211               </table>
    212               <table width="100%" border="0" cellspacing="0" cellpadding="0">
    213                 <tr>
    214                   <td bgcolor="4b4b4b" height="30"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
    215                     <tr>
    216                       <td><img src="images/lxfs.jpg" width="120" height="14" /></td>
    217                     </tr>
    218                   </table></td>
    219                 </tr>
    220               </table>
    221               <table width="100%" border="0" cellspacing="0" cellpadding="0">
    222                 <tr>
    223                   <td height="5"></td>
    224                 </tr>
    225               </table>
    226               <table width="100%" border="0" cellspacing="0" cellpadding="0">
    227                 <tr>
    228                   <td height="15" bgcolor="4b4b4b"><%=OneMsg(23)%></td>
    229                 </tr>
    230               </table></td>
    231           </tr>
    232         </table></td>
    233       </tr>
    234     </table></td>
    235   </tr>
    236 </table>
    237 <div id=divMenu style="Z-INDEX: 1; LEFT: 715px; WIDTH: 271px; POSITION: absolute; TOP: 7px; HEIGHT: 48px;">
    238    <a href="lxwm.Asp"> <img src="images/fdlx.png" width="271" height="48" border="0"></a>
    239 </div>
    240 <script language=JavaScript src="js/scroll.js"></script>
    241 </div>
    242 <script type="text/javascript" src="/Web_Stat/stat.js"></script>
    243 </body>
    244 </html>
    View Code
      1 <!--#include file="../Inc/Conn.asp"-->
      2 <!--#include file="../Inc/Function.asp"-->
      3 <!--#include file="Web_Save.asp"-->
      4 <!--#include file="../Inc/Web_Safe.asp"-->
      5 <%
      6 Dim BoardId,Id,BoardName,style,Action,Classification
      7 Dim Title,About,Content,AddMan,MyPx,IfGood,IsTop,Pic,nfrom,PicNews,Sm_Img,IsColse,Big_Img,Att,AddTime,Http,Articlekey   
      8 
      9     BoardId     = Request("BoardId")
     10          Id     = Request("Id")
     11     BoardName   = Trim(Request("BoardName"))
     12     style       = Request.QueryString("style")
     13     Action      = Request.Form("Action")
     14     Title       = Trim(Request.Form("Title"))
     15     Content     = Request.Form("Content")
     16     About       = Request.Form("About")
     17     AddMan      = Request.Form("AddMan")
     18     Articlekey  = Request.Form("Articlekey")
     19     MyPx        = Request.Form("MyPx")
     20     IfGood      = Request.Form("IfGood")
     21     IsTop       = Request.Form("IsTop")
     22     Pic         = Request.Form("Pic")
     23     web_url     = Request.Form("web_url")
     24     Http        = Request.Form("Http")
     25     nfrom       = Request.Form("nfrom")
     26     PicNews     = Request.Form("PicNews")
     27     IsColse     = Request.Form("IsColse")
     28     Sm_img      = Request.Form("Sm_img")
     29     Big_Img     = Request.Form("Big_Img")
     30     Att         = Request.Form("Att")
     31     AddTime     = Request.Form("AddTime")
     32     Classification = Request.Form("Classification")
     33     If MyPx="" Then   
     34        MyPx=0
     35     End If
     36     If IsColse="" Then   
     37        IsColse=0
     38     End If
     39     If PicNews="" Then   
     40        PicNews=0
     41     End If
     42     If IsTop="" Then   
     43        IsTop=0
     44     End If
     45     If IfGood="" Then   
     46        IfGood=0
     47     End If
     48     If Classification = "" Then
     49        Classification = 0
     50     End If
     51 Sub Do_Add(DoId)
     52     Set Rs=server.CreateObject("adodb.recordset")
     53         Sql="select * from Content"
     54         Rs.Open Sql,Conn,1,3
     55         Rs.addnew
     56         Rs("BoardId")  = BoardId
     57         Rs("Title")    = Title
     58         Rs("About")    = About
     59         Rs("Content")  = Content
     60         Rs("Articlekey") = Articlekey
     61         Rs("MyPx")     = MyPx
     62         Rs("IfGood")   = IfGood
     63         Rs("IsTop")    = IsTop
     64         Rs("Pic")      = Pic
     65         Rs("nfrom")    = nfrom
     66         Rs("PicNews")  = PicNews
     67         Rs("Sm_Img")   = Sm_Img
     68         Rs("IsColse")  = IsColse
     69         Rs("Big_Img")  = Big_Img
     70         Rs("web_url")  = web_url
     71         Rs("Http")     = Http
     72         Rs("Att")      = Att
     73         Rs("Classification") = Classification
     74         Rs("AddTime")  = now()
     75         Rs.Update
     76         Call Show_Msg("信息添加成功!","Public_List.asp?Boardid="&Boardid&"&Boardname="&Boardname)
     77         Rs.Close
     78     Set Rs=Nothing
     79 End Sub
     80 
     81 Sub Do_Edit(DoId)
     82 
     83     Set Rs=server.CreateObject("adodb.recordset")
     84         Sql="select * from Content where Id= "&DoId
     85         Rs.Open Sql,Conn,1,3
     86         Rs("BoardId")  = BoardId
     87         Rs("Title")    = Title
     88         Rs("About")    = About
     89         Rs("Content")  = Content
     90         Rs("AddMan")   = AddMan
     91         Rs("Articlekey") = Articlekey
     92         Rs("MyPx")     = MyPx
     93         Rs("IfGood")   = IfGood
     94         Rs("IsTop")    = IsTop
     95         Rs("Pic")      = Pic
     96         Rs("nfrom")    = nfrom
     97         Rs("PicNews")  = PicNews
     98         Rs("Sm_Img")   = Sm_Img
     99         Rs("IsColse")  = IsColse
    100         Rs("Big_Img")  = Big_Img
    101         Rs("web_url")  = web_url
    102         Rs("Http")     = Http
    103         Rs("Att")      = Att
    104         Rs("AddTime")  = AddTime
    105         Rs("Classification") = Classification
    106         Rs.Update
    107            Call Show_Msg("信息修改成功!","Public_List.asp?Boardid="&Boardid&"&Boardname="&Boardname)
    108         Rs.Close
    109     Set Rs=Nothing
    110     
    111 End Sub
    112 
    113 
    114 If style="del" Then
    115     'Conn.Execute("update Content set IsDel=1 where Id in("&Id&")")
    116     Conn.Execute(" Delete * From  Content where Id in("&Id&")")
    117    Call Show_Msg("删除成功!","Public_List.asp?Boardid="&Boardid&"&Boardname="&Boardname)
    118 End If
    119 
    120 Select Case action
    121        Case "DoAdd"  Call Do_Add(BoardId)
    122        Case "DoEdit" Call Do_Edit(Id)
    123 End Select
    124 %>
  • 相关阅读:
    linux基本命令
    操作系统
    罗马数字和整型的关系
    LightOJ 1234 Harmonic Number(打表 + 技巧)
    LightOJ 1236 Pairs Forming LCM (LCM 唯一分解定理 + 素数筛选)
    LightOJ 1245 Harmonic Number (II)(找规律)
    LightOJ 1259 Goldbach`s Conjecture (哥德巴赫猜想 + 素数筛选法)
    LightOJ 1282 Leading and Trailing (快数幂 + 数学)
    LightOJ 13361336
    hdu 5510 Bazinga
  • 原文地址:https://www.cnblogs.com/cykj/p/ASP-enterprise-website-source-part.html
Copyright © 2020-2023  润新知