Artists 3.4.07
[DROP]
MUSIC
[END]
[CREATE]
MUSIC
A_ID
A_AMAZON#VARCHAR(255)#NULL#
A_ARTISTF#VARCHAR(50)#NULL#
A_ARTISTL#VARCHAR(50)#NULL#
A_IMAGE#VARCHAR(255)#NULL#
A_ITUNES#VARCHAR(255)#NULL#
A_TITLE#VARCHAR(255)#NULL#
A_URL#VARCHAR(255)#NULL#
A_VIMEO#VARCHAR(255)#NULL#
A_WEBSITE#VARCHAR(255)#NULL#
A_YOUTUBE#VARCHAR(255)#NULL#
[END]
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
Err.Clear
On Error Resume Next
Dim fnum, intPgSize, myPage:intPgSize=10
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""Artists.asp"">Artists</a><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table><br />" & vbNewLine
If strDBNTUserName = "" Then
Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Media</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There is a problem!<br /><br />You must be logged in to view this page.<br /><br /><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
" <br />" & vbNewLine
WriteFooter
Response.End
End If
If Request("mode")="delete" Then
my_Conn.Execute("DELETE FROM " & strTablePrefix & "MUSIC WHERE A_ID=" & Request("id"))
Response.Redirect "artists.asp"
End If
If Request("mode")="add" or (Request("mode")="edit" and Request("method_type")="doit") Then
strAmazon=trim(chkString(Request("A_Amazon"),"URL"))
strArtistF=trim(chkString(Request("A_ArtistF"),"SQLString"))
strArtistL=trim(chkString(Request("A_ArtistL"),"SQLString"))
strImage=trim(chkString(Request("A_Image"),"SQLString"))
strTitle=trim(chkString(Request("A_Title"),"SQLString"))
strItunes=trim(chkString(Request("A_Itunes"),"URL"))
strURL=trim(chkString(Request("A_URL"),"URL"))
strVimeo=trim(chkString(Request("A_Vimeo"),"URL"))
strWebsite=trim(chkString(Request("A_Website"),"URL"))
strYouTube=trim(chkString(Request("A_YouTube"),"URL"))
End If
If Request("method_type")="doit" Then
If Request("mode")="add" Then
strSql="INSERT INTO " & strTablePrefix & "MUSIC (A_AMAZON, A_ARTISTF, A_ARTISTL, A_IMAGE, A_TITLE, A_ITUNES, A_URL, A_VIMEO, A_WEBSITE, A_YOUTUBE) VALUES ('" & strAmazon & "', '" & strArtistF & "', '" & strArtistL & "', '" & strImage & "', '" & strTitle & "', '" & strItunes & "', '" & strURL & "', '" & strVimeo & "', '" & strWebsite & "', '" & strYouTube & "')"
Else
strSql="UPDATE " & strTablePrefix & "MUSIC SET A_AMAZON='" & strAmazon & "', A_ArtistF='" & strArtistF & "', A_ArtistL='" & strArtistL & "', A_IMAGE='" & strImage & "', A_TITLE='" & strTitle & "', A_ITUNES='" & strItunes & "', A_URL='" & strURL & "', A_VIMEO='" & strVimeo & "', A_WEBSITE='" & strWebsite & "', a_YouTube='" & strYouTube & "' WHERE A_ID=" & Request("id")
End If
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Response.Redirect "artists.asp"
End If
If Request("mode")="edit" Then
strSql="SELECT * FROM " & strTablePrefix & "MUSIC WHERE A_ID=" & Request("id")
Set rsArtists=my_Conn.Execute(strSql)
If not rsArtists.EOF Then
intID=rsArtists("A_ID")
strAmazon=rsArtists("A_Amazon")
strArtistF=rsArtists("A_ArtistF")
strArtistL=rsArtists("A_ArtistL")
strImage=rsArtists("A_Image")
strItunes=rsArtists("A_Itunes")
strTitle=rsArtists("A_Title")
strURL=rsArtists("A_URL")
strVimeo=rsArtists("A_Vimeo")
strWebsite=rsArtists("A_Website")
strYouTube=rsArtists("A_YouTube")
rsArtists.Close
End If
Set rsArtists=Nothing
End If
If Request("mode")="add" or Request("mode")="edit" Then
Response.Write "<form action=""artists.asp"" method=""post"">" & vbNewLine & _
" <input type=""hidden"" name=""mode"" value=""" & Request("mode") & """ />" & vbNewLine & _
" <input type=""hidden"" name=""method_type"" value=""doit"" />" & vbNewLine & _
" <input type=""hidden"" name=""id"" value=""" & Request("id") & """ />" & vbNewLine & _
" <table border=""0"" bgColor=""" & strPageBGColor & """ width=""600px;"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Artist, First Name: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""75"" style=""width:98%; border:1; color:maroon;"" name=""A_ArtistF"" value=""" & strArtistF & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Artist, Last Name: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""75"" style=""width:98%; border:1; color:maroon;"" name=""A_ArtistL"" value=""" & strArtistL & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Image: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_Image"" value=""" & strImage & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Title: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_Title"" value=""" & strTitle & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Amazon: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_Amazon"" value=""" & strAmazon & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>ITunes: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_Itunes"" value=""" & strItunes & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>URL (DL): </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_URL"" value=""" & strURL & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Vimeo: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_Vimeo"" value=""" & strVimeo & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Website: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_Website"" value=""" & strWebsite & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>YouTube: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ align=""center"" width=""70%"">" & vbNewLine & _
" <input type=""text"" maxlength=""255"" style=""width:98%; border:1; color:maroon;"" name=""A_YouTube"" value=""" & strYouTube & """ />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""top"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <td align=""center"" colspan=""2"" width=""100%"">" & vbNewLine & _
" <input type=""submit"" name=""Submit"""
If Request("mode")="add" Then Response.Write " value=""Add"" />" Else Response.Write " value=""Edit"" />"
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
"</form>" & vbNewLine
WriteFooter
Response.End
End If
nRefreshTime = Request.Cookies(strTempCookieType & "Reload")
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" function ChangePage(fnum){" & vbNewLine & _
" if (fnum == 1) {" & vbNewLine & _
" document.PageNum1.submit();" & vbNewLine & _
" }" & vbNewLine & _
" else {" & vbNewLine & _
" document.PageNum2.submit();" & vbNewLine & _
" }" & vbNewLine & _
" }" & vbNewLine & _
" </script>" & vbNewLine
If Request("whichpage")>"" Then
If not isNumeric(Request("whichpage")) Then
myPage=1
Else
myPage=cInt(trim(Request("whichpage")))
End If
Else
mypage=1
End If
If Request("sort")>"" Then
If Right(Request("sort"),4)="Desc" Then strOrder=" Desc" Else strOrder=" Asc"
If Left(Request("sort"),1)="A" Then
strSort=" ORDER BY A_ARTISTL " & strOrder & ", A_ARTISTF " & strOrder
Else
strSort=" ORDER BY A_TITLE" & strOrder
End If
Else
strSort=""
End If
If Request("strKeys")>"" Then
keyword=Request("strKeys")
ElseIf Request("keyword")>"" Then
keyword=Request("keyword")
Else
keyword=""
End If
If keyword>"" Then
If Request("category")="" Then
strCategory="A_Title"
Else
strCategory=Request("category")
End If
keyword = Request("keyword")
strWhere=""
If instr(keyword," ") Then
keywords = split(keyword)
keycnt = ubound(keywords)
For i = 0 to keycnt
If i = 0 Then
strKeywords = keywords(i)
Else
strKeywords = strKeywords & "," & keywords(i)
End If
Next
j=0:strWords=""
For each word in keywords
If j=1 Then strWords=strWords & Word
If word="NOT" Then j=1
Next
For each word in keywords
If instr(keyword," AND ") Then
If word <> "AND" and word>"" Then
If word="NOT" Then
If strCategory="A_Artist" Then
strWhere = left(strWhere, len(strWhere)-3) & " AND (A_ArtistF NOT LIKE '%" & strWords & "%' AND A_ArtistL NOT LIKE '%" & strWords & "%')"
Exit For
Else
strWhere = left(strWhere, len(strWhere)-3) & " AND " & strCategory & " NOT LIKE '%" & strWords & "%'"
Exit For
End If
Else
If strCategory="A_Artist" Then
strWhere = strWhere & "(A_ArtistF LIKE '%" & word & "%' OR A_ArtistL LIKE '%" & word & "%') AND "
Else
strWhere = strWhere & strCategory & " LIKE '%" & word & "%' AND "
End If
End If
End If
Else
If word <> "OR" and word>"" Then
If word="NOT" Then
If strCategory="A_Artist" Then
strWhere = left(strWhere, len(strWhere)-3) & " AND (A_ArtistF NOT LIKE '%" & strWords & "%' AND A_ArtistL NOT LIKE '%" & strWords & "%')"
Exit For
Else
strWhere = left(strWhere, len(strWhere)-3) & " AND " & strCategory & " NOT LIKE '%" & strWords & "%'"
Exit For
End If
Else
If strCategory="A_Artist" Then
strWhere = strWhere & "(A_ArtistF LIKE '%" & word & "%' OR A_ArtistL LIKE '%" & word & "%') OR "
Else
strWhere = strWhere & strCategory & " LIKE '%" & word & "%' OR "
End If
End If
End If
End If
Next
Else
If keyword>"" and keyword <> "NOT" Then
If strCategory="A_Artist" Then
strWhere = strWhere & "(A_ArtistF LIKE '%" & keyword & "%' OR A_ArtistL LIKE '%" & keyword & "%')"
Else
strWhere = strWhere & strCategory & " LIKE '%" & keyword & "%'"
End If
End If
End If
If right(strWhere,4)="AND " Then strWhere=left(strWhere,len(strWhere)-5)
If right(strWhere,3)="OR " Then strWhere=left(strWhere,len(strWhere)-4)
If left(keyword,1)=chr(34) and right(keyword,1)=chr(34) Then
strkeyword="#34;" & mid(keyword,2,len(keyword)-2) & "#34;"
If strCategory="A_Artist" Then
strWhere="A_ARTISTL LIKE '%" & mid(keyword,2,len(keyword)-2) & "%' OR A_ARTISTF LIKE '%" & mid(keyword,2,len(keyword)-2) & "%'"
Else
strWhere=strCategory & " LIKE '%" & mid(keyword,2,len(keyword)-2) & "%'"
End If
Else
strkeyword=keyword
End If
End If
If strWhere>"" Then
strWhere=" WHERE " & strWhere
End If
If right(strWhere,4)=" AND" Then strWhere=left(strWhere,len(strWhere)-4)
If right(strWhere,3)=" OR" Then strWhere=left(strWhere,len(strWhere)-3)
If Request("mode")="initial" Then strWhere=" WHERE uCase(Left(A_ArtistL,1))='" & Request("A_Artist") & "'"
Response.Write "<form action=""artists.asp"" method=""post"">" & vbNewLine & _
" <table border=""0"" bgColor=""" & strPageBGColor & """ width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td align=""center"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
" <font face=""" & strCategoryFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>Search</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td align=""center"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><input type=""radio"" name=""category"" value=""A_Artist""" & chkRadio(strCategory,"A_Artist",true) & " /> Artist <input type=""radio"" name=""category"" value=""A_Title""" & chkRadio(strCategory,"A_Title",true) & " /> Title<br /><input tabindex=""1"" type=""text"" size=""120"" id=""keyword"" name=""keyword"" value=""" & strkeyword & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine &_
" <td align=""center"" width=""100%"">" & vbNewLine & _
" <input type=""submit"" value=""Search"" />" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
"</form><p align=""center""><a href=""artists.asp""><acronym style=""text-decoration:underline; border:none;"" title=""Display all artists"">All</acronym></a> " & vbNewLine
For intChar = 65 to 90
Response.Write "<a href=""artists.asp?mode=initial&A_Artist=" & chr(intChar) & """><acronym style=""text-decoration:underline; border:none;"" title=""Display artists starting with '" & chr(intChar) & "'"">" & chr(intChar) & "</acronym></a> "
Next
Response.Write "<div style=""display: none; position: absolute; z-index: 110; left: 400; top: 150px; width: 15; height: 90%;"" id=""preview_div""></div>"
Response.Write "</p><form action=""artists.asp"" method=""post""><input type=""hidden"" name=""hid-page"" id=""hid-page"" value=""" & mypage & """ /><table border=""0"" bgColor=""" & strPageBGColor & """ width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine
strSql = "SELECT COUNT(A_ID) AS CNT FROM " & strTablePrefix & "MUSIC " & strWhere
Set rsArtists=my_Conn.Execute(strSql)
If not rsArtists.EOF Then
intCount=rsArtists("CNT")
maxpages=cInt(intCount/intPgSize)
If intCount/intPgSize>maxpages Then
maxpages=maxpages+1
End If
rsArtists.Close
End If
Response.Write " <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""1"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td align=""center"" colspan=""5"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
" <font face=""" & strCategoryFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>Results</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr bgColor=""" & strHeadCellColor & """ valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""15%"">" & vbNewLine & _
" <font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Image</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""40%"">" & vbNewLine & _
" <font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b><a href=""artists.asp?sort="
If Request("sort")="Title Desc" Then Response.Write "Title Asc" Else Response.Write "Title Desc"
If Request("mode")>"" Then Response.Write "&mode=" & Request("mode")
If Request("keyword")>"" Then Response.Write "&keyword=" & Request("keyword") & "&category=" & Request("category")
If Request("whichpage")>"" Then Response.Write "&whichpage=" & Request("whichpage")
Response.Write """" & dWStatus("Sort by Title") & "><acronym style=""text-decoration:underline; border:none;"" title=""Sort by Title""><b>Title</b></acronym></a>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""30%"">" & vbNewLine & _
" <font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b><a href=""artists.asp?sort="
If Request("sort")="Artist Desc" Then Response.Write "Artist Asc" Else Response.Write "Artist Desc"
If Request("mode")>"" Then Response.Write "&mode=" & Request("mode")
If Request("keyword")>"" Then Response.Write "&keyword=" & Request("keyword") & "&category=" & Request("category")
If Request("whichpage")>"" Then Response.Write "&whichpage=" & Request("whichpage")
Response.Write """" & dWStatus("Sort by Artist") & "><acronym style=""text-decoration:underline; border:none;"" title=""Sort by Artist""><b>Artist</b></acronym></a>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""10%"">" & vbNewLine & _
" <font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Links</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""5%"">" & vbNewLine
If mLev>3 Then
Response.Write " <font face=""" & strHeadFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Tools</b> <a href=""artists.asp?mode=add""" & dWStatus("Add") & "><acronym style=""border:none; text-decoration:none"" title=""Add""><img src=""" & strImageURL & "icon_folder_new.gif"" height=""16"" width=""16"" alt=""Add"" style=""border:none; text-decoration:none;""></acronym></a>" & vbNewLine & _
" </font>" & vbNewLine
Else
Response.Write " "
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
strSql = "SELECT COUNT(A_ID) AS CNT FROM " & strTablePrefix & "MUSIC " & strWhere
Set rsArtists=my_Conn.Execute(strSql)
If intCount=0 Then
Response.Write " <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" colspan=""5"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>No media found!" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table></form></div>" & vbNewLine
WriteFooter
Response.End
End If
Set rsArtists=Nothing
If strSort="" Then strSort = " ORDER BY A_TITLE ASC"
strSql = "SELECT * FROM " & strTablePrefix & "MUSIC" & strWhere & strSort
Set rsArtists=my_Conn.Execute(strSql)
If not rsArtists.EOF Then
If Request("whichpage") > 1 Then
intLocation=(cInt(Request("whichpage")-1)*intPgSize)
rsArtists.Move(intLocation)
If Err.Number <> 0 Then
MsgBox Err.Number & ": " & Err.Description & vbCrLf & " on line " & Err.Line & " of " & Err.Source
End If
On Error GoTo 0
Else
rsArtists.MoveFirst
End If
Rec=1
intI=0
Do while not rsArtists.EOF
strAmazon="":strArtistF="":strArtistL="":strImage="":strItunes="":strTitle="":strURL="":strVimeo="":strWebsite="":strYouTube=""
If intI=0 Then CColor=strForumFirstCellColor Else CColor=strAltForumCellColor
intID=rsArtists("A_ID")
If rsArtists("A_Amazon")>"" Then strAmazon=Replace(rsArtists("A_Amazon")," ","%20")
strArtistF=rsArtists("A_ArtistF")
strArtistL=rsArtists("A_ArtistL")
If rsArtists("A_Image")>"" Then strImage=Replace(rsArtists("A_Image")," ","%20")
If rsArtists("A_Itunes")>"" Then strItunes=Replace(rsArtists("A_Itunes")," ","%20")
strTitle=rsArtists("A_Title")
If rsArtists("A_URL")>"" Then strURL=Replace(rsArtists("A_URL")," ","%20")
If rsArtists("A_vimeo")>"" Then strVimeo=Replace(rsArtists("A_Vimeo")," ","%20")
If rsArtists("A_Website")>"" Then strWebsite=Replace(rsArtists("A_Website")," ","%20")
If rsArtists("A_YouTube")>"" Then strYouTube=Replace(rsArtists("A_YouTube")," ","%20")
If rsArtists("A_ArtistL")>"" and rsArtists("A_ArtistF")>"" Then
strArtist = rsArtists("A_ArtistL") &", " & rsArtists("A_ArtistF")
Else
strArtist=rsArtists("A_ArtistL")&rsArtists("A_ArtistF")
End If
strLinks=""
If strAmazon>"" Then strLinks="<a target=_blank href=" & strAmazon & ">Amazon</a>"
If strItunes>"" Then
If strLinks>"" Then strLinks=strLinks&"<br />"
strLinks=strLinks&"<a target=_blank href=" & strItunes & ">Itunes</a>"
End If
If strURL>"" Then
If strLinks>"" Then strLinks=strLinks&"<br />"
strLinks=strLinks&"<a target=_blank href=" & strURL & ">URL</a>"
End If
If strVimeo>"" Then
If strLinks>"" Then strLinks=strLinks&"<br />"
strLinks=strLinks&"<a target=_blank href=" & strVimeo & ">Vimeo</a>"
End If
If strWebsite>"" Then
If strLinks>"" Then strLinks=strLinks&"<br />"
strLinks=strLinks&"<a target=_blank href=" & strWebsite & ">Website</a>"
End If
If strYouTube>"" Then
If strLinks>"" Then strLinks=strLinks&"<br />"
strLinks=strLinks&"<a target=_blank href=" & strYouTube & ">YouTube</a>"
End If
Response.Write " <tr bgColor=""" & CColor & """ valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""15%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><img src=""" & rsArtists("A_Image") & """ height=""75px;"" width=""75px;"" onmouseover=""showtrail('" & rsArtists("A_Image") & "','" & rsArtists("A_Title") & "',500,700)"" onmouseout=""hidetrail()"" />"& vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""40%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & rsArtists("A_Title") & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strArtist & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""10%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & strLinks & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""5%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>"
If mLev>3 Then
Response.Write " <a href=""artists.asp?mode=edit&id=" & intID & """" & dWStatus("Edit Item") & "><acronym style=""border:none; text-decoration:none"" title=""Edit Item""><img src=""" & strImageURL & "icon_pencil.gif"" height=""16"" width=""16"" alt=""Edit Item"" style=""border:none; text-decoration:none;""></acronym></a>" & vbNewLine & _
" <a href=""artists.asp?mode=delete&id=" & intID & """" & dWStatus("Delete Item") & "><acronym style=""border:none; text-decoration:none"" title=""Delete Item""><img src=""" & strImageURL & "icon_trashcan.gif"" height=""16"" width=""16"" alt=""Delete Item"" style=""border:none; text-decoration:none;""></acronym></a>" & vbNewLine
End If
Response.Write " </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
intI=1-intI
Rec=Rec+1:If Rec>intPgSize Then Exit Do
rsArtists.MoveNext
Loop
rsArtists.Close
End If
Set rsArtists=Nothing
Response.Write " </table></form></div>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
If maxpages>1 Then
Response.Write " <tr><td colspan=""5"" width=""95%"" align=""left"" bgColor=""" & strPageBGColor & """>"
Call DropDownPaging2(2)
Response.Write " </td></tr>"
End If
Response.Write "</table>" & vbNewLine
WriteFooter
Sub DropDownPaging2(fnum)
If maxpages > 1 Then
If mypage = "" Then
pge = 1
Else
pge = mypage
End If
If Request.QueryString("type")>"" Then strAction=Request.QueryString("type")
Response.Write " <form name=""PageNum" & fnum & """ action=""artists.asp"">" & vbNewLine
If strAction>"" Then Response.Write " <input type=""hidden"" name=""type"" value=""" & strAction & """>" & vbNewLine
If Request("sort")>"" Then Response.Write " <input type=""hidden"" name=""sort"" value=""" & Request("sort") & """>" & vbNewLine
If Request("keyword")>"" Then Response.Write " <input type=""hidden"" name=""keyword"" value=""" & Request("keyword") & """>" & vbNewLine
If Request("category")>"" Then Response.Write " <input type=""hidden"" name=""category"" value=""" & Request("category") & """>" & vbNewLine
Response.Write " <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine
For counter = 1 to maxpages
If counter <> cLng(pge) Then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
Else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
End If
Next
Response.Write " </select><b> of " & maxpages & "</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </form>" & vbNewLine
End If
End Sub
%>
For OR, just include spaces between terms (e.g. crooked cop)
For exclusion, put NOT (in caps) before term (e.g., cop NOT crooked)