%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
|
|
<%
IF Session("logged_in")=1 then
RESPONSE.WRITE("Logged in as " & Session("user_name"))
%> [LOG out] [change password] <%
IF canCreateModPost() = 1 then
%> [Create Post] <%
end IF
ELSE
%> [LOG in] [sign up] <%
end IF
%>
|
<%
'RESPONSE.WRITE("
")
RESPONSE.WRITE(rsp.Fields("heading").value & "" )
RESPONSE.WRITE("" & bodyFixed & "
") %><% RESPONSE.WRITE(shortLinkUrl) %><% if shorten <> 1 then RESPONSE.WRITE(" ?" & rs.Fields("body").value) %> ?<% RESPONSE.WRITE(" posted by " & rsname.Fields("user_name").value) RESPONSE.WRITE(" on " & rs.Fields("date_created").value) %> ? <% end if if canEditPost(rs.Fields("user_id").value) = 1 then %> ?[edit]<% end if %>
<% rsname.close rsp.close end sub ' Draw All comments for a given object id and object type sub drawComments(object_id, object_type) RESPONSE.WRITE("On " & createDateString(rsp.Fields("date_created").value)) RESPONSE.WRITE(" " & rsp.Fields("user_name").value & " wrote:") RESPONSE.WRITE("
" & rsp.Fields("body").value) if rsp.Fields("deleted").value = "1" then RESPONSE.WRITE("
COMMENT DELETED BY ADMIN") end if ' Draw button to allow admin user to delete this post. if canCreateModPost() = 1 then dim back_url back_url = curPageURLWithVariables() %>
<% end if if canCreateModPost() = 1 then dim delPostUrl delPostUrl = "action.asp?action=delete_comment&object_id=" & comment_id RESPONSE.WRITE("DELETE POST")
end if
'RESPONSE.WRITE("
?" & rsp.Fields("comment_id").value)
'RESPONSE.WRITE("
?" & rsp.Fields("post_id").value)
'RESPONSE.WRITE("
?" & rsp.Fields("user_id").value)
'RESPONSE.WRITE("
?" & rsp.Fields("user_name").value)
'RESPONSE.WRITE("
?" & rsp.Fields("body").value)
'RESPONSE.WRITE("
?" & createDateString(rsp.Fields("date_created").value))
'RESPONSE.WRITE("
?" & rsp.Fields("deleted").value)
rsp.close
end sub
' 2007.01.07 Draw form used for submitting comments.
' if the global variable g_enableComments is false then it displays
' a message instead.
sub drawCommentPostingForm(post_id, parent_type)
dim back_url
back_url = curPageURLWithVariables()
if g_enableComments <> true then
RESPONSE.WRITE("
Comment posting is currently disabled.")
else
RESPONSE.WRITE("
Post a comment:") %>
<% end if end sub sub updateTagCountForAllTags dim sql sql = "Select distinct tag_string FROM TAGS" sql = sql & " where deleted <> '1' and object_type='IMAGE'" rs.Open sql, conn if rs.EOF then RESPONSE.WRITE("Mos")
RESPONSE.WRITE("
Milly and Rupe")
RESPONSE.WRITE("
Imogen")
RESPONSE.WRITE("
Hidden Pictures")
RESPONSE.WRITE("
Vintage")
RESPONSE.WRITE("
Tabletop")
RESPONSE.WRITE("
")
RESPONSE.WRITE("
drawings")
RESPONSE.WRITE("
Panoramas")
RESPONSE.WRITE("
Portraits")
RESPONSE.WRITE("
Desktop Backgrounds")
call displayMostPopularTags(15)
call drawAdvert
RESPONSE.WRITE("
hits " & getEntityHitCount("gallery.asp", 1))
%>
Welcome to the new coolbubble gallery, the system has been updated to make it easier to find images and allows comment posting on images and other features. Please have a look around, I hope you find something interesting.
All images here were done by me [nick] over the last few years for various reasons.
Many were made to post on a website called b3ta,
some are drawings I have done in an attempt to learn to draw, and some were done
as features for this website, like Milly and Rupe,
Imogen,
the Hidden Pictures and of course, Mos!
<%
call displayListofAllTags
RESPONSE.WRITE("
")
end if
%>
" & description)
end if
rsp.close
end sub
' return a string representing the next image in the gallery.
' updated to use an offset (so can be used for both previous and next)
function getNameOfNextImage(image_name, offset)
if passedInGalleryName = "" then
getNameOfNextImage = ""
exit function
end if
' check if the array is empty
'If (Not imageNameArray) = -1 Then
' Array is empty
' getNameOfNextImage = ""
' exit function
'end if
if not IsArray(imageNameArray) then
' Array is empty
getNameOfNextImage = ""
exit function
end if
numImagesInGallery = UBound(imageNameArray, 2)
cur_image_index = -1
for iRowLoop = 0 to numImagesInGallery
if imageNameArray(0, iRowLoop) = image_name then
cur_image_index = iRowLoop
end if
next
if cur_image_index = -1 then getNameOfNextImage = ""
if cur_image_index+offset > numImagesInGallery then
getNameOfNextImage = ""
exit function
end if
if cur_image_index+offset < 0 then
getNameOfNextImage = ""
exit function
end if
getNameOfNextImage = imageNameArray(0, cur_image_index+offset)
end function
sub displayPrevAndNext
end sub
sub displayListOfImagesForTag(tagString)
dim sql
sql = "Select filename FROM IMAGES where image_id in (select object_id from TAGS where object_type='IMAGE' AND tag_string='" & tagString & "')"
sql = sql & " and deleted = '0'"
rsp.Open sql, conn
if rsp.EOF then
RESPONSE.WRITE("
No images found found.")
rsp.close
exit sub
end if
do until rsp.EOF
str_thumb = ""
str = ""& str_thumb & rsp.Fields("filename").value & ""
RESPONSE.WRITE("
" & str)
rsp.MoveNext
loop
rsp.close
end sub
' Create an array of image names based on a tag.
sub buildImageArrayFromTag(tagString)
dim sql
sql = "Select filename FROM IMAGES"
sql = sql & " where image_id in (select object_id from TAGS where object_type='IMAGE' "
sql = sql & " AND tag_string='" & tagString & "' and deleted='0')"
sql = sql & " and deleted = '0'"
sql = sql & " ORDER by date_created desc"
rsp.Open sql, conn
if rsp.EOF then
rsp.close
'RESPONSE.WRITE("
buildImageArrayFromTag - ERROR tag not found
" & str)
imageNameArraySize = 0
exit sub
end if
imageNameArray = rsp.GetRows()
imageNameArraySize = UBound(imageNameArray, 2)
'For iRowLoop = 0 to UBound(imageNameArray, 2)
' Response.Write(imageNameArray(0, iRowLoop) & "
")
' Response.Write("
")
'Next
rsp.close
end sub
' Draw image thumbnails.
sub displayListofImages_Grid
dim columnCount, maxColumn
maxColumn=4
RESPONSE.WRITE("
") fileName = imageNameArray(0, iRowLoop) ' Create shorter version of the filename filenameSmall = fileName if LEN(filenameSmall) > 18 then filenameSmall = LEFT(filenameSmall,15) + "..." end if ' Construct thumbnail string. str_img_thumb = " " & filenameSmall & "" RESPONSE.WRITE(str) RESPONSE.WRITE(" | ")
columnCount = columnCount + 1
if columnCount = maxColumn then
columnCount = 0
RESPONSE.WRITE("
global_image_id empty.") exit sub end if dim sql sql = "Select distinct tag_string, tag_id FROM TAGS" sql = sql & " WHERE object_type='IMAGE'" sql = sql & " AND object_id=" & global_image_id sql = sql & " AND deleted = '0'" rsp.Open sql, conn if rsp.EOF then RESPONSE.WRITE("
No tags found.") rsp.close exit sub end if dim url dim deletion_url RESPONSE.WRITE("
tags:")
do until rsp.EOF
'RESPONSE.WRITE(" " & rsp.Fields("tag_string").value )
url = "gallery.asp?gallery_name=" & rsp.Fields("tag_string").value
RESPONSE.WRITE("" & rsp.Fields("tag_string").value & " ")
'rsp.Fields("tag_id").value
if canCreateModPost() then
deletion_url = "[x]"
RESPONSE.WRITE("" & deletion_url & " ")
end if
rsp.MoveNext
loop
rsp.close
end sub
' TAG CLOUD
sub displayListofAllTags
dim sql
sql = "Select tag_string, tag_count from TAG_COUNT"
sql = sql & " where object_type = 'IMAGE'"
sql = sql & " order by tag_string"
'RESPONSE.WRITE("
sql: " & sql)
rsp.Open sql, conn
if rsp.EOF then
'RESPONSE.WRITE("
displayMostPopularTags(): No tags found.")
rsp.close
exit sub
end if
dim url,counter, fontSize, tagSum, tagAverage, tagmax
do until rsp.EOF
counter = counter + 1
tagSum = tagSum + rsp.Fields("tag_count").value
if rsp.Fields("tag_count").value > tagmax then
tagMax = rsp.Fields("tag_count").value
end if
rsp.MoveNext
loop
tagAverage = tagSum / counter
' Move back to start of records.
rsp.movefirst
RESPONSE.WRITE("
") do until rsp.EOF if rsp.Fields("tag_count").value > 2 then fontSize = calcFontSize(rsp.Fields("tag_count").value, tagmax) url = "gallery.asp?gallery_name=" & rsp.Fields("tag_string").value RESPONSE.WRITE(" " & rsp.Fields("tag_string").value & " ") end if rsp.MoveNext loop RESPONSE.WRITE("