- codeproject-forum.zip
- CodeProject-forum
- Common
- forum
- Images
- admin_del.gif
- admin_delall.gif
- admin_modify.gif
- cplogo.gif
- DELETE.GIF
- IND.GIF
- MODIFY.GIF
- NEW.GIF
- news_none.gif
- news_selected.gif
- news_unselected.gif
- RED.GIF
- smiley_biggrin.gif
- smiley_confused.gif
- smiley_cool.gif
- smiley_eek.gif
- smiley_frown.gif
- smiley_mad.gif
- smiley_redface.gif
- smiley_rolleyes.gif
- smiley_smile.gif
- smiley_tongue.gif
- smiley_wink.gif
- t.gif
- WHITE.GIF
- codeproject-asp-forum.zip
- CodeProject-asp-forum
- _vti_cnf
- database
- forum.mdb
- files
- forum
- images
- _vti_cnf
- blind.gif
- t.gif
- blind.gif
- t.gif
- img_forum
- admin_del.gif
- admin_delall.gif
- admin_modify.gif
- ind.gif
- news_none.gif
- news_selected.gif
- news_unselected.gif
- smiley_biggrin.gif
- smiley_frown.gif
- smiley_redface.gif
- smiley_smile.gif
- smiley_wink.gif
- t.gif
- index.html
- codeproject-aspforum-ax.zip
- src
- app
- AspForum.dsw
- AspForum.opt
- common
- foreign
- codeproject-php-forum.zip
- config.inc
- css
- functions.inc
- img_forum
- admin_del.gif
- admin_delall.gif
- admin_modify.gif
- cplogo.gif
- DELETE.GIF
- IND.GIF
- MODIFY.GIF
- NEW.GIF
- news_new.gif
- news_none.gif
- news_selected.gif
- news_unselected.gif
- RED.GIF
- smiley_biggrin.gif
- smiley_confused.gif
- smiley_cool.gif
- smiley_eek.gif
- smiley_frown.gif
- smiley_mad.gif
- smiley_redface.gif
- smiley_rolleyes.gif
- smiley_smile.gif
- smiley_tongue.gif
- smiley_wink.gif
- t.gif
- WHITE.GIF
- index.php
- install.txt
- new.php
- reply.php
|
<% option explicit
dim url
url = "http://www.elke.de?a=aal&e"
'url = "http://www.elke.de?if===&&&"
Dim d
Set d = CreateObject("Scripting.Dictionary")
sub trace
dim x,a,b,s
b = d.Items
a = d.Keys
For x = 0 To d.Count -1
s = s & a(x) & " " & b(x) & "<br>"
Next
Response.Write s
end sub
'--------------------------------------------------------------------------------
' build the internal map of name-value pairs from a given url.
function fromURL(url)
dim url_element
if InStr(url, "?") then
url_element = split(url, "?")
'if the url has no parameters
if url_element(1) = "" then
exit function
'if the url has parameters
else
dim params
dim item
params = split(url_element(1), "&")
dim x
For each x in params
if InStr(x, "=") then
item = split(x, "=")
'add key-item to object
d.Add item(0), item(1)
end if
Next
end if
end if
end function
fromURL(url)
'trace
'--------------------------------------------------------------------------------
' returns all values of the internal map url-encoded
' in the form "name=value&name=value&name=value&" etc.
' you can append this directly to an url.
function toUrl
dim x,s,a,b
a = d.Keys
b = d.Items
For x = 0 To d.Count -1
s = s & a(x) & "=" & Server.URLEncode(b(x)) & "&"
Next
toUrl = s
end function
'Response.Write toUrl
'--------------------------------------------------------------------------------
' the same as "toUrl" except that the value of the
' map-entry specified by "name" is replaced by "new_value".
function toUrlValue(key,new_item)
toUrl
dim x,s,a,b
if not d.Exists(key)then
d.Add key, new_item
end if
a = d.Keys
b = d.Items
For x = 0 To d.Count -1
if a(x)=key then
s = s & a(x) & "=" & Server.URLEncode(new_item) & "&"
else
s = s & a(x) & "=" & Server.URLEncode(b(x)) & "&"
end if
Next
toUrlValue = s
end function
'Response.Write "<b>" &toUrlValue("forumid","3") &"</b>"
Response.Write toUrlValue("forumid","3")
'--------------------------------------------------------------------------------
' the same as "toUrl" except that the value of the
' map-entry specified by "name1" is replaced by "new_value1" and
' the value of "name2" is replaced by "new_value2".
function toUrlValue2( key1, new_item1, key2, new_item2 )
dim x,s,a,b
a = d.Keys
b = d.Items
For x = 0 To d.Count -1
if a(x)=key1 then
s = s & a(x) & "=" & Server.URLEncode(new_item1) & "&"
elseif a(x)=key2 then
s = s & a(x) & "=" & Server.URLEncode(new_item2) & "&"
else
s = s & a(x) & "=" & Server.URLEncode(b(x)) & "&"
end if
Next
toUrlValue2 = s
end function
'Response.Write toUrlValue2("b", "elkebbbeeeh", "c", "romulus und rem�s") & "<br>"
'trace
%>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Chris Maunder is the co-founder of
CodeProject and
ContentLab.com, and has been a prominent figure in the software development community for nearly 30 years. Hailing from Australia, Chris has a background in Mathematics, Astrophysics, Environmental Engineering and Defence Research. His programming endeavours span everything from FORTRAN on Super Computers, C++/MFC on Windows, through to to high-load .NET web applications and Python AI applications on everything from macOS to a Raspberry Pi. Chris is a full-stack developer who is as comfortable with SQL as he is with CSS.
In the late 1990s, he and his business partner David Cunningham recognized the need for a platform that would facilitate knowledge-sharing among developers, leading to the establishment of CodeProject.com in 1999. Chris's expertise in programming and his passion for fostering a collaborative environment have played a pivotal role in the success of CodeProject.com. Over the years, the website has grown into a vibrant community where programmers worldwide can connect, exchange ideas, and find solutions to coding challenges. Chris is a prolific contributor to the developer community through his articles and tutorials, and his latest passion project,
CodeProject.AI.
In addition to his work with CodeProject.com, Chris co-founded ContentLab and DeveloperMedia, two projects focussed on helping companies make their Software Projects a success. Chris's roles included Product Development, Content Creation, Client Satisfaction and Systems Automation.