Code from the page that you view photos
<cfset teamsGateway = CreateObject("component",
APPLICATION.componentPath &
"dataobjects.teamsGateway").init(#APPLICATION.dsn#) />
<cfset photosGateway = CreateObject("component",
APPLICATION.componentPath &
"dataobjects.photosGateway").init(#APPLICATION.dsn#) />
<cfset galleriesGateway = CreateObject("component",
APPLICATION.componentPath &
"dataobjects.galleriesGateway").init(#APPLICATION.dsn#) />
<cfset qTeamInfo =
teamsGateway.getByAttributes(url.teamID) />
<cfset qPhotogalleries =
galleriesGateway.getByAttributes('',url.teamID,'',1,'',1,'galleryName')
/>
<cfif isDefined('url.gallery')>
<cfset qphotos =
photosGateway.getByAttributes('',url.teamID,url.gallery) />
<cfset qPhotoGalleryName =
galleriesGateway.getByAttributes(url.gallery) />
</cfif>
<cfsavecontent variable="scriptLinks">
<cfoutput>
<link rel="stylesheet"
href="#APPLICATION.dirpath#/css/lightbox.css" type="text/css"
media="screen" />
<script src="#APPLICATION.dirpath#/js/prototype.js"
type="text/javascript"></script>
<script
src="#APPLICATION.dirpath#/js/scriptaculous.js?load=effects,builder"
type="text/javascript"></script>
<script src="#APPLICATION.dirpath#/js/lightbox.js"
type="text/javascript"></script>
</cfoutput>
</cfsavecontent>
<cfhtmlhead text="#scriptLinks#">
<cfinclude template="includes/head.cfm">
<script type="text/javascript">
function openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</script>
<div id="teamMenu">
<cfoutput query="qTeamInfo">
<table border="0" width="100%">
<tr>
<td width="100">
<cfset logoPath = expandpath('assets/profileImages/'
& #url.teamID# & '/teamLogo.gif')>
<cfif FileExists("#logoPath#") is "Yes">
<img
src="#APPLICATION.dirpath#/assets/profileImages/#teamID#/teamLogo.gif"
border="0" align="absmiddle" hspace="5"/>
</cfif> </td>
<td>
<span class="teamName" style="color:#logoColor#;
font-size:32px;
font-weight:bold;"><cfoutput>#name#</cfoutput></span>
</td>
</tr> <tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="right">
<img src="assets/images/teamPhotoMenu.gif" border="0"
usemap="##Map" hspace="5"/>
</td>
</tr>
</table>
<map name="Map" id="Map">
<area shape="rect" coords="0,0,103,26"
href="teamHome.cfm?teamid=#teamID#" />
<area shape="rect" coords="103,3,200,26"
href="teamInfo.cfm?teamid=#teamID#" />
<area shape="rect" coords="200,3,294,27"
href="teamphotos.cfm?teamid=#teamID#" />
<area shape="rect" coords="293,3,393,25"
href="teamvideos.cfm?teamid=#teamID#" />
</map>
</cfoutput>
</div>
<cfif isDefined('url.gallery')>
<div id="teamPods">
<div id="xteamPods">
<b class="tBoxtop"><b
class="tBoxb1"></b><b class="tBoxb2"></b><b
class="tBoxb3"></b><b
class="tBoxb4"></b></b>
<div class="teamPodsContent">
<cfoutput><h3>#qPhotoGalleryName.galleryName#</h3></cfoutput>
<cfoutput query="qphotos">
<a
href="#APPLICATION.dirpath#/assets/profileimages/#qTeamInfo.teamID#/galleryphotos/#filename#"
rel="lightbox[#galleryID#]" title="#description#">
<img
src="#APPLICATION.dirpath#/assets/profileimages/#qTeamInfo.teamID#/galleryThumbnails/#filename#"
hspace="5" vspace="5" border="0"/>
</a>
</cfoutput>
</div> <!-- teamPodsContent -->
<b class="tBoxbottom"><b
class="tBoxb4"></b><b class="tBoxb3"></b><b
class="tBoxb2"></b><b
class="tBoxb1"></b></b>
</div> <!-- xteamPods -->
</div> <!-- teamPods -->
</cfif>
<div id="teamPods">
<div id="xteamPods">
<b class="tBoxtop"><b
class="tBoxb1"></b><b class="tBoxb2"></b><b
class="tBoxb3"></b><b
class="tBoxb4"></b></b>
<div class="teamPodsContent">
<cfif qPhotogalleries.recordcount GTE 1>
<h3>Choose a gallery</h3>
<cfoutput query="qPhotogalleries">
<a
href="#cgi.SCRIPT_NAME#?gallery=#galleryID#&teamID=#url.teamID#">
#galleryName#
</a><br/><br/>
</cfoutput>
<cfelse>
<div id="siteNotification">
No photo galleries have been created.
</div>
</cfif>
</div> <!-- teamPodsContent -->
<b class="tBoxbottom"><b
class="tBoxb4"></b><b class="tBoxb3"></b><b
class="tBoxb2"></b><b
class="tBoxb1"></b></b>
</div> <!-- xteamPods -->
</div> <!-- teamPods -->
<cfinclude template="includes/foot.cfm">