%@LANGUAGE="JAVASCRIPT"%>
<%
var rsOnLocationEg__MMColParam = "1";
if(String(Request.QueryString("idOnLocationEg")) != "undefined") {
rsOnLocationEg__MMColParam = String(Request.QueryString("idOnLocationEg"));
}
%>
<%
var rsOnLocationEg = Server.CreateObject("ADODB.Recordset");
rsOnLocationEg.ActiveConnection = MM_connUsers_STRING;
rsOnLocationEg.Source = "SELECT * FROM tblOnLocationEg WHERE idOnLocationEg = "+ rsOnLocationEg__MMColParam.replace(/'/g, "''");
rsOnLocationEg.CursorType = 0;
rsOnLocationEg.CursorLocation = 2;
rsOnLocationEg.LockType = 3;
rsOnLocationEg.Open();
var rsOnLocationEg_numRows = 0;
%>
<%
var arrIDs = new Array();
arrIDs[0] = rsOnLocationEg.Fields.Item("idImgHero").Value;
arrIDs[1] = rsOnLocationEg.Fields.Item("idImg1").Value;
arrIDs[2] = rsOnLocationEg.Fields.Item("idImg2").Value;
arrIDs[3] = rsOnLocationEg.Fields.Item("idImg3").Value;
arrIDs[4] = rsOnLocationEg.Fields.Item("idImg4").Value;
arrIDs[5] = rsOnLocationEg.Fields.Item("idImg5").Value;
var sList = arrIDs[0];
sList += ", " + arrIDs[1];
sList += ", " + arrIDs[2];
sList += ", " + arrIDs[3];
sList += ", " + arrIDs[4];
sList += ", " + arrIDs[5];
var rsImageList = Server.CreateObject("ADODB.Recordset");
rsImageList.ActiveConnection = MM_connUsers_STRING;
rsImageList.Source = "SELECT * FROM tblImages WHERE idImg IN (" + sList + ")";
rsImageList.CursorType = 0;
rsImageList.CursorLocation = 2;
rsImageList.LockType = 3;
rsImageList.Open();
var rsImageList_numRows = 0;
%>
<%
var Repeat2__numRows = -1;
var Repeat2__index = 0;
rsImageList_numRows += Repeat2__numRows;
%>
<%
// *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
// set the record count
var rsOnLocationEg_total = rsOnLocationEg.RecordCount;
// *** Recordset Stats: if we don't know the record count, manually count them
if (rsOnLocationEg_total == -1) {
// count the total records by iterating through the recordset
for (rsOnLocationEg_total=0; !rsOnLocationEg.EOF; rsOnLocationEg.MoveNext()) {
rsOnLocationEg_total++;
}
// reset the cursor to the beginning
if (rsOnLocationEg.CursorType > 0) {
if (!rsOnLocationEg.BOF) rsOnLocationEg.MoveFirst();
} else {
rsOnLocationEg.Requery();
}
}
%>
<%
// *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
// set the record count
var rsImageList_total = rsImageList.RecordCount;
// set the number of rows displayed on this page
if (rsImageList_numRows < 0) { // if repeat region set to all records
rsImageList_numRows = rsImageList_total;
} else if (rsImageList_numRows == 0) { // if no repeat regions
rsImageList_numRows = 1;
}
// set the first and last displayed record
var rsImageList_first = 1;
var rsImageList_last = rsImageList_first + rsImageList_numRows - 1;
// if we have the correct record count, check the other stats
if (rsImageList_total != -1) {
rsImageList_numRows = Math.min(rsImageList_numRows, rsImageList_total);
rsImageList_first = Math.min(rsImageList_first, rsImageList_total);
rsImageList_last = Math.min(rsImageList_last, rsImageList_total);
}
%>
<%
// *** Recordset Stats: if we don't know the record count, manually count them
if (rsImageList_total == -1) {
// count the total records by iterating through the recordset
for (rsImageList_total=0; !rsImageList.EOF; rsImageList.MoveNext()) {
rsImageList_total++;
}
// reset the cursor to the beginning
if (rsImageList.CursorType > 0) {
if (!rsImageList.BOF) rsImageList.MoveFirst();
} else {
rsImageList.Requery();
}
// set the number of rows displayed on this page
if (rsImageList_numRows < 0 || rsImageList_numRows > rsImageList_total) {
rsImageList_numRows = rsImageList_total;
}
// set the first and last displayed record
rsImageList_last = Math.min(rsImageList_first + rsImageList_numRows - 1, rsImageList_total);
rsImageList_first = Math.min(rsImageList_first, rsImageList_total);
}
%>
<%
var arrImages;
arrImages = new Array;
while ((Repeat2__numRows-- != 0) && (!rsImageList.EOF)) {
arrImages[Repeat2__index] = new Array;
arrImages[Repeat2__index][0] = rsImageList.Fields.Item("idImg").Value;
arrImages[Repeat2__index][1] = escape(rsImageList.Fields.Item("sImageSrc").Value);
if (rsImageList.Fields.Item("idImg").Value == rsOnLocationEg.Fields.Item("idImgHero").Value) {
var idImg = rsImageList.Fields.Item("idImg").Value;
var sTitle = rsImageList.Fields.Item("sTitle").Value;
var sClient = rsImageList.Fields.Item("sClient").Value;
var sAgency = rsImageList.Fields.Item("sAgency").Value;
var sCreative = rsImageList.Fields.Item("sTeam").Value;
var sAwards = rsImageList.Fields.Item("sAwards").Value;
var sComments = rsImageList.Fields.Item("sComments").Value;
}
Repeat2__index++;
rsImageList.MoveNext();
}
%>