A side menu bar written in ASP
The code is as follows
<% class menus Public Title, ID, Image, TitleColor, Target, Background, HeadImage, Height, Width, Bgcolor, Style Private menuItem, menuStr Private Sub Class_Initialize Title = "" ID = "" menuItem = "" Image="" TitleColor = "#000000" Target = "_blank" Background = "" HeadImage = "" Height = "20" Width = "100%" Bgcolor = "" Style = "" script End Sub Private Sub Class_Terminate Title = "" ID = "" menuItem = "" End Sub Public Function AddItem(Byval nItem, Byval nURL) menuItem = menuItem & "<tr><td style='font-size:12px;' align='left'> {$Image}<a href='" & nURL & "' target='"&Target&"' class='"& Style &"'>" & nItem & "</a></td></tr>" End Function Public Sub Show() menuStr = "<table border=0 width='"& Width &"' style='border:1px solid #999999;' bgcolor='"& Bgcolor &"'><tr><td height='"& Height &"' Onclick=menus('" & ID & "') bgcolor='"& Bgcolor &"' valign='bottom' style='" & _ "font-size:12px;color:"&TitleColor&";cursor: hand;' background='"&Background&"' align='left'> {$HeadImage}" & Title & "</td></tr></table><p id=" & chr(34) & ID & chr(34) & " style=" &chr(34) & _ "display:none;"& chr(34) & "><table width=100% border=0 style='border-left:1px solid #999999;border-right:1px solid #999999;border-bottom:1px solid #999999;'>" & menuItem & "</table></p>" if Image<>"" then menuStr = replace(menuStr, "{$Image}", Image) else menuStr = replace(menuStr, "{$Image}", "") end if if HeadImage<>"" then menuStr = replace(menuStr, "{$HeadImage}", HeadImage) else menuStr = replace(menuStr, "{$HeadImage}", "") end if Response.Write menuStr End Sub Private Function script() Dim JScript JScript = "<script language="&chr(34)&"JavaScript"&chr(34)&"type="&chr(34)&"text/JavaScript"&chr(34)& _ ">"&vbcrlf&"<!--"&vbcrlf&"function menus(str){"&vbcrlf&"var obj;if (document.getElementById(str)){"&vbcrlf& _ "obj=document.getElementById(str);"& _ "if (obj.style.display =="&chr(34)&"none"&chr(34)&"){obj.style.display ="&chr(34)&chr(34)& _ ";}else{obj.style.display ="&chr(34)&"none"&chr(34)&";}}}//--></script>" response.Write JScript End Function Public Sub AddNew() Title = "" ID = "" menuItem = "" menuStr = "" End Sub Public Sub OpenItem(Byval ItemID) End Sub end class %>
##Usage method:
<% Dim NewMenus Set NewMenus = new menus NewMenus.Target = "" '打开方式 NewMenus.Bgcolor = "#336699" '主标签背景色 NewMenus.TitleColor = "#FFFFFF" '主标签字体颜色 NewMenus.Height = "10px" '高度 NewMenus.Style ="a1" '子标签样式 NewMenus.Width = "100%" '菜单宽度 NewMenus.AddNew NewMenus.Title = "门户网站" NewMenus.ID = "menu1" NewMenus.AddItem "网易", "http://www.163.com" NewMenus.AddItem "搜狐", "http://www.sohu.com" NewMenus.Show NewMenus.AddNew NewMenus.Title = "个人网站" NewMenus.ID = "menu2" NewMenus.AddItem "IEBSoft studio", "http://iebsoft.512j.com" NewMenus.AddItem "租用的空间", "http://107814.hxidc.com" NewMenus.Show NewMenus.AddNew NewMenus.Title = "网站新闻管理" NewMenus.ID = "menu3" NewMenus.AddItem "新闻列表", "#" NewMenus.AddItem "图片新闻", "#" NewMenus.AddItem "新闻管理", "#" NewMenus.Show Set NewMenus = Nothing %>
The above is the detailed content of A side menu bar written in ASP. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



ASP built-in objects include Request, Response, Session, Application, Server, Session.Contents, Application.Contents, Server.CreateObject, Server.MapPath, Server.Execute, Server.Transfer, etc. Detailed introduction: 1. Request: represents HTTP request object, etc.

ASP development tools include Visual Studio, Dreamweaver, FrontPage, EditPlus, UltraEdit, SQL Server Management Studio, RAD Studio, Delphi, Asp.NET and Oracle SQL Developer.

ASP scanning tool vulnerability detection: 1. Select the appropriate scanning tool; 2. Configure the scanning target in the scanning tool; 3. Configure scanning options as needed; 4. After the configuration is completed, start the scanning tool to start scanning; 5. Scanning tool A report will be generated listing the detected vulnerabilities and security issues; 6. Fix the detected vulnerabilities and security issues according to the recommendations in the report; 7. After fixing the vulnerability, re-run the scanning tool to ensure that the vulnerability has been successfully exploited repair.

ASP manual detection of vulnerabilities: 1. Check the ASP application's verification and filtering mechanism for user input; 2. Check the ASP application's encoding and filtering mechanism for output data; 3. Check the ASP application's authentication and session management mechanism; 4. Check the ASP application's permission control on files and directories; 5. Check the ASP application's handling of errors; 6. Check the ASP application's database security; 7. Check the ASP application's configuration file and server configuration.

Methods include: 1. Use specialized vulnerability scanning tools; 2. Manual testing to discover and verify vulnerabilities in ASP applications; 3. Conduct security audits to check the code and configuration files of ASP applications; 4. Use vulnerability exploitation frameworks; 5. Review the code of the ASP application.

Connection method: 1. Use ADO to connect to the database; 2. Use DSN to connect to the database; 3. Use the connection string to connect to the database.

iPhone average selling price (ASP) achieved double-digit growth last year, growing 14% year-on-year. The popularity of iPhone 13 is a key driver, helping push the global smartphone market as a whole to a record annual revenue of $448B. Despite parts shortages, the smartphone market grew 7% year-on-year, with Apple taking by far the largest share... Market intelligence firm Counterpoint released its latest estimates today. According to the latest research from Counterpoint's MarketMonitorService, the global smartphone market revenue will exceed US$448 billion in 2021. Even as component shortages and COVID-19 restrictions continue to disrupt global supply

ASP security audit vulnerability detection steps: 1. Collect relevant information about the ASP application; 2. Carefully analyze the source code of the ASP application; 3. Check the ASP application's verification and filtering mechanism for user input; 4. Check the application's Encoding and filtering mechanism of output data; 5. Check the application's authentication and session management mechanism; 6. Check the application's permission control on files and directories; 7. Check the application's handling of errors; 8. Check the application's Configuration files and server configuration; 9. Fix vulnerabilities.
