%
set Category = Server.CreateObject("ADODB.Recordset")
Category.ActiveConnection = MM_photogallerymanager_STRING
Category.Source = "SELECT tblPhotoGalleryCategory.CategoryName, Count(tblPhotoGallery.ItemID) AS CountOfItemID, tblPhotoGalleryCategory.CategoryID FROM tblPhotoGallery INNER JOIN tblPhotoGalleryCategory ON tblPhotoGallery.CategoryID = tblPhotoGalleryCategory.CategoryID WHERE tblPhotoGallery.Activated = 'True' GROUP BY tblPhotoGalleryCategory.CategoryName, tblPhotoGalleryCategory.CategoryID"
Category.CursorType = 0
Category.CursorLocation = 2
Category.LockType = 3
Category.Open()
Category_numRows = 0
%>
<%
Dim photogallery_list__MMColParam1
photogallery_list__MMColParam1 = "%"
If (Request.Form("search") <> "") Then
photogallery_list__MMColParam1 = Request.Form("search")
End If
%>
<%
Dim photogallery_list__MMColParam2
photogallery_list__MMColParam2 = "%"
If (Request.QueryString("cid") <> "") Then
photogallery_list__MMColParam2 = Request.QueryString("cid")
End If
%>
<%
set photogallery_list = Server.CreateObject("ADODB.Recordset")
photogallery_list.ActiveConnection = MM_photogallerymanager_STRING
photogallery_list.Source = "SELECT tblPhotoGallery.*, tblPhotoGalleryCategory.CategoryName FROM tblPhotoGallery INNER JOIN tblPhotoGalleryCategory ON tblPhotoGallery.CategoryID = tblPhotoGalleryCategory.CategoryID WHERE tblPhotoGallery.Activated = 'True' AND tblPhotoGalleryCategory.CategoryID Like '" + Replace(photogallery_list__MMColParam2, "'", "''") + "' AND (tblPhotoGallery.ItemDesc Like '%" + Replace(photogallery_list__MMColParam1, "'", "''") + "%' OR tblPhotoGallery.ItemName Like '%" + Replace(photogallery_list__MMColParam1, "'", "''") + "%') ORDER BY tblPhotoGalleryCategory.CategoryID"
photogallery_list.CursorType = 0
photogallery_list.CursorLocation = 2
photogallery_list.LockType = 3
photogallery_list.Open()
photogallery_list_numRows = 0
%>
<%
Dim photogallery_detail__MMColParam2
photogallery_detail__MMColParam2 = "%"
If (Request.QueryString("ItemID") <> "") Then
photogallery_detail__MMColParam2 = Request.QueryString("ItemID")
End If
%>
<%
Dim photogallery_detail__MMColParam3
photogallery_detail__MMColParam3 = "%"
If (Request.QueryString("cid") <> "") Then
photogallery_detail__MMColParam3 = Request.QueryString("cid")
End If
%>
<%
set photogallery_detail = Server.CreateObject("ADODB.Recordset")
photogallery_detail.ActiveConnection = MM_photogallerymanager_STRING
photogallery_detail.Source = "SELECT tblPhotoGallery.*, tblPhotoGalleryCategory.CategoryName FROM tblPhotoGallery INNER JOIN tblPhotoGalleryCategory ON tblPhotoGallery.CategoryID = tblPhotoGalleryCategory.CategoryID WHERE tblPhotoGallery.Activated = 'True' AND tblPhotoGallery.ItemID Like '" + Replace(photogallery_detail__MMColParam2, "'", "''") + "' AND tblPhotoGallery.CategoryID Like '" + Replace(photogallery_detail__MMColParam3, "'", "''") + "' ORDER BY tblPhotoGalleryCategory.CategoryID"
photogallery_detail.CursorType = 0
photogallery_detail.CursorLocation = 2
photogallery_detail.LockType = 3
photogallery_detail.Open()
photogallery_detail_numRows = 0
%>
<%
Dim HLooper1__numRows
HLooper1__numRows = -2
Dim HLooper1__index
HLooper1__index = 0
photogallery_list_numRows = photogallery_list_numRows + HLooper1__numRows
%>
Photo Gallery Manager
 |
 |
 |
|
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 2
numrows = -1
while((numrows <> 0) AND (Not photogallery_list.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<%
While ((startrw <= endrw) AND (Not photogallery_list.EOF))
%>
| |
<%
startrw = startrw + 1
photogallery_list.MoveNext()
Wend
%>
<%
numrows=numrows-1
Wend
%>
<% If photogallery_list.EOF And photogallery_list.BOF Then %>
No Records Found.....Please Try
Again |
<% End If ' end photogallery_list.EOF And photogallery_list.BOF %>
|
<% If Not photogallery_detail.EOF Or Not photogallery_detail.BOF Then %>
<% ItemName = photogallery_detail.Fields.Item("ItemName").Value %>
<% if ItemName <> "" then %>
| Name: |
<%= ItemName %> |
<%end if%>
<% if photogallery_detail.Fields.Item("DateAdded").Value <> "" then %>
| Date: |
<%=(photogallery_detail.Fields.Item("DateAdded").Value)%> |
<%end if%>
<% ItemDesc = photogallery_detail.Fields.Item("ItemDesc").Value %>
<% if ItemDesc <> "" then %>
| Description: |
<%=Replace(ItemDesc,Chr(13)," ")%> |
<%end if%>
|
<% if photogallery_detail.Fields.Item("ImageFileA").Value <> "" then %>
<% if photogallery_detail.Fields.Item("ImageFileA").Value <> "" then %>
 " border="0">
<% end if ' image check %>
|
<%end if%>
<% if photogallery_detail.Fields.Item("ImageFileB").Value <> "" then %>
<% if photogallery_detail.Fields.Item("ImageFileB").Value <> "" then %>
 " border="0">
<% end if ' image check %>
|
<%end if%>
<% End If ' end Not photogallery_detail.EOF Or NOT photogallery_detail.BOF %>
|
|
|
|
 |
|
 |
<%
Category.Close()
Set Category = Nothing
%>
<%
photogallery_list.Close()
Set photogallery_list = Nothing
%>
<%
photogallery_detail.Close()
Set photogallery_detail = Nothing
%>