Server IP : 103.118.17.23 / Your IP : 216.73.216.169 Web Server : Microsoft-IIS/10.0 System : Windows NT RESELLERPLESK22 10.0 build 20348 (Windows Server 2016) AMD64 User : IWAM_plesk(default) ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : E:/Inetpub/vhosts/mesa.org.in/httpdocs/panel/ |
Upload File : |
<%@ CodePage="65001" %> <% Response.Buffer = EW_RESPONSE_BUFFER %> <!--#include file="ewcfg.asp"--> <!--#include file="bed_Homepage_Photosinfo.asp"--> <!--#include file="aspfn.asp"--> <!--#include file="userfn.asp"--> <% Call ew_Header(False, EW_CHARSET, False) %> <% ' Define page object Dim bed_Homepage_Photos_list Set bed_Homepage_Photos_list = New cbed_Homepage_Photos_list Set Page = bed_Homepage_Photos_list ' Page init processing Call bed_Homepage_Photos_list.Page_Init ' Page main Call bed_Homepage_Photos_list.Page_Main ' Global Page Rendering event (in userfn*.asp) Page_Rendering() ' Page Render event bed_Homepage_Photos_list.Page_Render() %> <!--#include file="header.asp"--> <% If bed_Homepage_Photos.Export = "" Then %> <script type="text/javascript"> // Form object var CurrentPageID = EW_PAGE_ID = "list"; var CurrentForm = fbed_Homepage_Photoslist = new ew_Form("fbed_Homepage_Photoslist", "list"); fbed_Homepage_Photoslist.FormKeyCountName = '<%= bed_Homepage_Photos_list.FormKeyCountName %>'; // Form_CustomValidate event fbed_Homepage_Photoslist.Form_CustomValidate = function(fobj) { // DO NOT CHANGE THIS LINE! // Your custom validation code here, return false if invalid. return true; } // Use JavaScript validation or not <% If EW_CLIENT_VALIDATE Then %> fbed_Homepage_Photoslist.ValidateRequired = true; // Use JavaScript validation <% Else %> fbed_Homepage_Photoslist.ValidateRequired = false; // No JavaScript validation <% End If %> // Dynamic selection lists fbed_Homepage_Photoslist.Lists["x_Enable"] = {"LinkField":"","Ajax":null,"AutoFill":false,"DisplayFields":["","","",""],"ParentFields":[],"ChildFields":[],"FilterFields":[],"Options":[],"Template":""}; fbed_Homepage_Photoslist.Lists["x_Enable"].Options = <%= ew_ArrayToJson(bed_Homepage_Photos.Enable.Options(False)) %>; <% Set arAS = Nothing %> // Form object for search var CurrentSearchForm = fbed_Homepage_Photoslistsrch = new ew_Form("fbed_Homepage_Photoslistsrch"); </script> <script type="text/javascript"> // Write your client script here, no need to add script tags. </script> <% End If %> <% If bed_Homepage_Photos.Export = "" Then %> <div class="ewToolbar"> <% If bed_Homepage_Photos_list.TotalRecs > 0 And bed_Homepage_Photos_list.ExportOptions.Visible Then %> <% Call bed_Homepage_Photos_list.ExportOptions.Render("body", "", "", "", "", "") %> <% End If %> <% If bed_Homepage_Photos_list.SearchOptions.Visible Then %> <% Call bed_Homepage_Photos_list.SearchOptions.Render("body", "", "", "", "", "") %> <% End If %> <% If bed_Homepage_Photos_list.FilterOptions.Visible Then %> <% Call bed_Homepage_Photos_list.FilterOptions.Render("body", "", "", "", "", "") %> <% End If %> <div class="clearfix"></div> </div> <% End If %> <% If bed_Homepage_Photos.Export = "" Or EW_EXPORT_MASTER_RECORD And bed_Homepage_Photos.Export = "print" Then %> <% End If %> <% 'bed_Homepage_Photos_list.TotalRecs = bed_Homepage_Photos_list.Recordset.RecordCount ' Already loaded ' ASP bed_Homepage_Photos_list.StartRec = 1 If bed_Homepage_Photos_list.DisplayRecs <= 0 Then ' Display all records bed_Homepage_Photos_list.DisplayRecs = bed_Homepage_Photos_list.TotalRecs End If If Not (bed_Homepage_Photos.ExportAll And bed_Homepage_Photos.Export <> "") Then Call bed_Homepage_Photos_list.SetupStartRec ' Set up start record position End If ' Load records ' ASP Set bed_Homepage_Photos_list.Recordset = bed_Homepage_Photos_list.LoadRecordset(bed_Homepage_Photos_list.StartRec-1, bed_Homepage_Photos_list.DisplayRecs) ' Set no record found message If bed_Homepage_Photos.CurrentAction = "" And bed_Homepage_Photos_list.TotalRecs = 0 Then If bed_Homepage_Photos_list.SearchWhere = "0=101" Then bed_Homepage_Photos_list.WarningMessage = Language.Phrase("EnterSearchCriteria") Else bed_Homepage_Photos_list.WarningMessage = Language.Phrase("NoRecord") End If End If Call bed_Homepage_Photos_list.RenderOtherOptions %> <% If Security.IsLoggedIn() Then %> <% If bed_Homepage_Photos.Export = "" And bed_Homepage_Photos.CurrentAction = "" Then %> <form name="fbed_Homepage_Photoslistsrch" id="fbed_Homepage_Photoslistsrch" class="form-inline ewForm ewExtSearchForm" action="<%= ew_CurrentPage %>"> <% SearchPanelClass = ew_IIf(bed_Homepage_Photos_list.SearchWhere <> "", " in", " in") %> <div id="fbed_Homepage_Photoslistsrch_SearchPanel" class="ewSearchPanel collapse<%= SearchPanelClass %>"> <input type="hidden" name="cmd" value="search"> <input type="hidden" name="t" value="bed_Homepage_Photos"> <div class="ewBasicSearch"> <div id="xsr_1" class="ewRow"> <div class="ewQuickSearch input-group"> <input type="text" name="<%= EW_TABLE_BASIC_SEARCH %>" id="<%= EW_TABLE_BASIC_SEARCH %>" class="form-control" value="<%= ew_HtmlEncode(bed_Homepage_Photos.BasicSearch.getKeyword()) %>" placeholder="<%= ew_HtmlEncode(Language.Phrase("Search")) %>"> <input type="hidden" name="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" id="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" value="<%= ew_HtmlEncode(bed_Homepage_Photos.BasicSearch.getSearchType()) %>"> <div class="input-group-btn"> <button type="button" data-toggle="dropdown" class="btn btn-default"><span id="searchtype"><%= bed_Homepage_Photos.BasicSearch.getSearchTypeNameShort() %></span><span class="caret"></span></button> <ul class="dropdown-menu pull-right" role="menu"> <li<% If bed_Homepage_Photos.BasicSearch.getSearchType() = "" Then Response.Write " class=""active""" %>><a href="javascript:void(0);" onclick="ew_SetSearchType(this)"><%= Language.Phrase("QuickSearchAuto") %></a></li> <li<% If bed_Homepage_Photos.BasicSearch.getSearchType() = "=" Then Response.Write " class=""active""" %>><a href="javascript:void(0);" onclick="ew_SetSearchType(this,'=')"><%= Language.Phrase("QuickSearchExact") %></a></li> <li<% If bed_Homepage_Photos.BasicSearch.getSearchType() = "AND" Then Response.Write " class=""active""" %>><a href="javascript:void(0);" onclick="ew_SetSearchType(this,'AND')"><%= Language.Phrase("QuickSearchAll") %></a></li> <li<% If bed_Homepage_Photos.BasicSearch.getSearchType() = "OR" Then Response.Write " class=""active""" %>><a href="javascript:void(0);" onclick="ew_SetSearchType(this,'OR')"><%= Language.Phrase("QuickSearchAny") %></a></li> </ul> <button class="btn btn-primary ewButton" name="btnsubmit" id="btnsubmit" type="submit"><%= Language.Phrase("SearchBtn") %></button> </div> </div> </div> </div> </div> </form> <% End If %> <% End If %> <% Call bed_Homepage_Photos_list.ShowPageHeader %> <% Call bed_Homepage_Photos_list.ShowMessage %> <% If bed_Homepage_Photos_list.TotalRecs > 0 Or bed_Homepage_Photos.CurrentAction <> "" Then %> <div class="box ewBox ewGrid<% If bed_Homepage_Photos.IsAddOrEdit() Then %> ewGridAddEdit<% End If %> bed_Homepage_Photos"> <% If bed_Homepage_Photos.Export = "" Then %> <div class="box-header ewGridUpperPanel"> <% If bed_Homepage_Photos.CurrentAction <> "gridadd" And bed_Homepage_Photos.CurrentAction <> "gridedit" Then %> <form name="ewPagerForm" class="form-inline ewForm ewPagerForm" action="<%= ew_CurrentPage %>"> <% If ew_Empty(bed_Homepage_Photos_list.Pager) Then Set bed_Homepage_Photos_list.Pager = ew_NewNumericPagerBase(bed_Homepage_Photos_list.StartRec, bed_Homepage_Photos_list.DisplayRecs, bed_Homepage_Photos_list.TotalRecs, bed_Homepage_Photos_list.RecRange, bed_Homepage_Photos_list.AutoHidePager) %> <% If bed_Homepage_Photos_list.Pager.RecordCount > 0 And bed_Homepage_Photos_list.Pager.Visible Then %> <div class="ewPager"> <div class="ewNumericPage"><ul class="pagination"> <% If bed_Homepage_Photos_list.Pager.FirstButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.FirstButton.Start %>"><%= Language.Phrase("PagerFirst") %></a></li> <% End If %> <% If bed_Homepage_Photos_list.Pager.PrevButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.PrevButton.Start %>"><%= Language.Phrase("PagerPrevious") %></a></li> <% End If %> <% For Each PagerItem In bed_Homepage_Photos_list.Pager.Items %> <li<% if Not PagerItem.Enabled Then Response.Write " class=""active""" End If %>><a href="<% If PagerItem.Enabled Then Response.Write bed_Homepage_Photos_list.PageUrl & "start=" & PagerItem.Start Else Response.Write "#" End If %>"><%= PagerItem.Text %></a></li> <% Next %> <% If bed_Homepage_Photos_list.Pager.NextButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.NextButton.Start %>"><%= Language.Phrase("PagerNext") %></a></li> <% End If %> <% If bed_Homepage_Photos_list.Pager.LastButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.LastButton.Start %>"><%= Language.Phrase("PagerLast") %></a></li> <% End If %> </ul></div> </div> <% End If %> <% If bed_Homepage_Photos_list.Pager.RecordCount > 0 Then %> <div class="ewPager ewRec"> <span><%= Language.Phrase("Record") %> <%= bed_Homepage_Photos_list.Pager.FromIndex %> <%= Language.Phrase("To") %> <%= bed_Homepage_Photos_list.Pager.ToIndex %> <%= Language.Phrase("Of") %> <%= bed_Homepage_Photos_list.Pager.RecordCount %></span> </div> <% End If %> </form> <% End If %> <div class="ewListOtherOptions"> <% Call bed_Homepage_Photos_list.AddEditOptions.Render("body", "", "", "", "", "") Call bed_Homepage_Photos_list.DetailOptions.Render("body", "", "", "", "", "") Call bed_Homepage_Photos_list.ActionOptions.Render("body", "", "", "", "", "") %> </div> <div class="clearfix"></div> </div> <% End If %> <form name="fbed_Homepage_Photoslist" id="fbed_Homepage_Photoslist" class="form-inline ewForm ewListForm" action="<%= ew_CurrentPage %>" method="post"> <% If bed_Homepage_Photos_list.CheckToken Then %> <input type="hidden" name="<%= EW_TOKEN_NAME %>" value="<%= bed_Homepage_Photos_list.Token %>"> <% End If %> <input type="hidden" name="t" value="bed_Homepage_Photos"> <div id="gmp_bed_Homepage_Photos" class="<% If ew_IsResponsiveLayout() Then %>table-responsive <% End If %>ewGridMiddlePanel"> <% If bed_Homepage_Photos_list.TotalRecs > 0 Or bed_Homepage_Photos.CurrentAction = "gridedit" Then %> <table id="tbl_bed_Homepage_Photoslist" class="table ewTable"> <thead> <tr class="ewTableHeader"> <% ' Header row bed_Homepage_Photos.RowType = EW_ROWTYPE_HEADER Call bed_Homepage_Photos_list.RenderListOptions ' Render list options (header, left) Call bed_Homepage_Photos_list.ListOptions.Render("header", "left", "", "", "", "") %> <% If bed_Homepage_Photos.ID.Visible Then ' ID %> <% If bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.ID) = "" Then %> <th data-name="ID" class="<%= bed_Homepage_Photos.ID.HeaderCellClass() %>"><div id="elh_bed_Homepage_Photos_ID" class="bed_Homepage_Photos_ID"><div class="ewTableHeaderCaption"><%= bed_Homepage_Photos.ID.FldCaption %></div></div></th> <% Else %> <th data-name="ID" class="<%= bed_Homepage_Photos.ID.HeaderCellClass() %>"><div class="ewPointer" onclick="ew_Sort(event,'<%= bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.ID) %>',1);"><div id="elh_bed_Homepage_Photos_ID" class="bed_Homepage_Photos_ID"> <div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><%= bed_Homepage_Photos.ID.FldCaption %></span><span class="ewTableHeaderSort"><% If bed_Homepage_Photos.ID.Sort = "ASC" Then %><span class="caret ewSortUp"></span><% ElseIf bed_Homepage_Photos.ID.Sort = "DESC" Then %><span class="caret"></span><% End If %></span></div> </div></div></th> <% End If %> <% End If %> <% If bed_Homepage_Photos.Photos.Visible Then ' Photos %> <% If bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.Photos) = "" Then %> <th data-name="Photos" class="<%= bed_Homepage_Photos.Photos.HeaderCellClass() %>"><div id="elh_bed_Homepage_Photos_Photos" class="bed_Homepage_Photos_Photos"><div class="ewTableHeaderCaption"><%= bed_Homepage_Photos.Photos.FldCaption %></div></div></th> <% Else %> <th data-name="Photos" class="<%= bed_Homepage_Photos.Photos.HeaderCellClass() %>"><div class="ewPointer" onclick="ew_Sort(event,'<%= bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.Photos) %>',1);"><div id="elh_bed_Homepage_Photos_Photos" class="bed_Homepage_Photos_Photos"> <div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><%= bed_Homepage_Photos.Photos.FldCaption %><%= Language.Phrase("SrchLegend") %></span><span class="ewTableHeaderSort"><% If bed_Homepage_Photos.Photos.Sort = "ASC" Then %><span class="caret ewSortUp"></span><% ElseIf bed_Homepage_Photos.Photos.Sort = "DESC" Then %><span class="caret"></span><% End If %></span></div> </div></div></th> <% End If %> <% End If %> <% If bed_Homepage_Photos.Enable.Visible Then ' Enable %> <% If bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.Enable) = "" Then %> <th data-name="Enable" class="<%= bed_Homepage_Photos.Enable.HeaderCellClass() %>"><div id="elh_bed_Homepage_Photos_Enable" class="bed_Homepage_Photos_Enable"><div class="ewTableHeaderCaption"><%= bed_Homepage_Photos.Enable.FldCaption %></div></div></th> <% Else %> <th data-name="Enable" class="<%= bed_Homepage_Photos.Enable.HeaderCellClass() %>"><div class="ewPointer" onclick="ew_Sort(event,'<%= bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.Enable) %>',1);"><div id="elh_bed_Homepage_Photos_Enable" class="bed_Homepage_Photos_Enable"> <div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><%= bed_Homepage_Photos.Enable.FldCaption %></span><span class="ewTableHeaderSort"><% If bed_Homepage_Photos.Enable.Sort = "ASC" Then %><span class="caret ewSortUp"></span><% ElseIf bed_Homepage_Photos.Enable.Sort = "DESC" Then %><span class="caret"></span><% End If %></span></div> </div></div></th> <% End If %> <% End If %> <% If bed_Homepage_Photos.Sequence.Visible Then ' Sequence %> <% If bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.Sequence) = "" Then %> <th data-name="Sequence" class="<%= bed_Homepage_Photos.Sequence.HeaderCellClass() %>"><div id="elh_bed_Homepage_Photos_Sequence" class="bed_Homepage_Photos_Sequence"><div class="ewTableHeaderCaption"><%= bed_Homepage_Photos.Sequence.FldCaption %></div></div></th> <% Else %> <th data-name="Sequence" class="<%= bed_Homepage_Photos.Sequence.HeaderCellClass() %>"><div class="ewPointer" onclick="ew_Sort(event,'<%= bed_Homepage_Photos.SortUrl(bed_Homepage_Photos.Sequence) %>',1);"><div id="elh_bed_Homepage_Photos_Sequence" class="bed_Homepage_Photos_Sequence"> <div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><%= bed_Homepage_Photos.Sequence.FldCaption %></span><span class="ewTableHeaderSort"><% If bed_Homepage_Photos.Sequence.Sort = "ASC" Then %><span class="caret ewSortUp"></span><% ElseIf bed_Homepage_Photos.Sequence.Sort = "DESC" Then %><span class="caret"></span><% End If %></span></div> </div></div></th> <% End If %> <% End If %> <% ' Render list options (header, right) Call bed_Homepage_Photos_list.ListOptions.Render("header", "right", "", "", "", "") %> </tr> </thead> <tbody><!-- Table body --> <% If bed_Homepage_Photos.ExportAll And bed_Homepage_Photos.Export <> "" Then bed_Homepage_Photos_list.StopRec = bed_Homepage_Photos_list.TotalRecs Else ' Set the last record to display If bed_Homepage_Photos_list.TotalRecs > bed_Homepage_Photos_list.StartRec + bed_Homepage_Photos_list.DisplayRecs - 1 Then bed_Homepage_Photos_list.StopRec = bed_Homepage_Photos_list.StartRec + bed_Homepage_Photos_list.DisplayRecs - 1 Else bed_Homepage_Photos_list.StopRec = bed_Homepage_Photos_list.TotalRecs End If End If ' Move to first record bed_Homepage_Photos_list.RecCnt = bed_Homepage_Photos_list.StartRec - 1 If Not bed_Homepage_Photos_list.Recordset.EOF Then ' Already positioned at first record, no need to move 'bed_Homepage_Photos_list.Recordset.MoveFirst 'If bed_Homepage_Photos_list.StartRec > 1 Then bed_Homepage_Photos_list.Recordset.Move bed_Homepage_Photos_list.StartRec - 1 ElseIf Not bed_Homepage_Photos.AllowAddDeleteRow And bed_Homepage_Photos_list.StopRec = 0 Then bed_Homepage_Photos_list.StopRec = bed_Homepage_Photos.GridAddRowCount End If ' Initialize Aggregate bed_Homepage_Photos.RowType = EW_ROWTYPE_AGGREGATEINIT Call bed_Homepage_Photos.ResetAttrs Call bed_Homepage_Photos_list.RenderRow bed_Homepage_Photos_list.RowCnt = 0 Do While CLng(bed_Homepage_Photos_list.RecCnt) < CLng(bed_Homepage_Photos_list.StopRec) bed_Homepage_Photos_list.RecCnt = bed_Homepage_Photos_list.RecCnt + 1 If CLng(bed_Homepage_Photos_list.RecCnt) >= CLng(bed_Homepage_Photos_list.StartRec) Then bed_Homepage_Photos_list.RowCnt = bed_Homepage_Photos_list.RowCnt + 1 ' Set up key count bed_Homepage_Photos_list.KeyCount = bed_Homepage_Photos_list.RowIndex Call bed_Homepage_Photos.ResetAttrs bed_Homepage_Photos.CssClass = "" If bed_Homepage_Photos.CurrentAction = "gridadd" Then Else Call bed_Homepage_Photos_list.LoadRowValues(bed_Homepage_Photos_list.Recordset) ' Load row values End If bed_Homepage_Photos.RowType = EW_ROWTYPE_VIEW ' Render view ' Set up row id / data-rowindex Call bed_Homepage_Photos.RowAttrs.AddAttributes(Array(Array("data-rowindex", bed_Homepage_Photos_list.RowCnt), Array("id", "r" & bed_Homepage_Photos_list.RowCnt & "_bed_Homepage_Photos"), Array("data-rowtype", bed_Homepage_Photos.RowType))) ' Render row Call bed_Homepage_Photos_list.RenderRow ' Render list options Call bed_Homepage_Photos_list.RenderListOptions %> <tr<%= bed_Homepage_Photos.RowAttributes %>> <% ' Render list options (body, left) Call bed_Homepage_Photos_list.ListOptions.Render("body", "left", bed_Homepage_Photos_list.RowCnt, "", "", "") %> <% If bed_Homepage_Photos.ID.Visible Then ' ID %> <td data-name="ID"<%= bed_Homepage_Photos.ID.CellAttributes %>> <span id="el<%= bed_Homepage_Photos_list.RowCnt %>_bed_Homepage_Photos_ID" class="bed_Homepage_Photos_ID"> <span<%= bed_Homepage_Photos.ID.ViewAttributes %>> <%= bed_Homepage_Photos.ID.ListViewValue %> </span> </span> </td> <% End If %> <% If bed_Homepage_Photos.Photos.Visible Then ' Photos %> <td data-name="Photos"<%= bed_Homepage_Photos.Photos.CellAttributes %>> <span id="el<%= bed_Homepage_Photos_list.RowCnt %>_bed_Homepage_Photos_Photos" class="bed_Homepage_Photos_Photos"> <span<%= bed_Homepage_Photos.Photos.ViewAttributes %>> <%= ew_GetFileViewTag(bed_Homepage_Photos.Photos, bed_Homepage_Photos.Photos.ListViewValue) %> </span> </span> </td> <% End If %> <% If bed_Homepage_Photos.Enable.Visible Then ' Enable %> <td data-name="Enable"<%= bed_Homepage_Photos.Enable.CellAttributes %>> <span id="el<%= bed_Homepage_Photos_list.RowCnt %>_bed_Homepage_Photos_Enable" class="bed_Homepage_Photos_Enable"> <span<%= bed_Homepage_Photos.Enable.ViewAttributes %>> <%= bed_Homepage_Photos.Enable.ListViewValue %> </span> </span> </td> <% End If %> <% If bed_Homepage_Photos.Sequence.Visible Then ' Sequence %> <td data-name="Sequence"<%= bed_Homepage_Photos.Sequence.CellAttributes %>> <span id="el<%= bed_Homepage_Photos_list.RowCnt %>_bed_Homepage_Photos_Sequence" class="bed_Homepage_Photos_Sequence"> <span<%= bed_Homepage_Photos.Sequence.ViewAttributes %>> <%= bed_Homepage_Photos.Sequence.ListViewValue %> </span> </span> </td> <% End If %> <% ' Render list options (body, right) Call bed_Homepage_Photos_list.ListOptions.Render("body", "right", bed_Homepage_Photos_list.RowCnt, "", "", "") %> </tr> <% End If If bed_Homepage_Photos.CurrentAction <> "gridadd" Then bed_Homepage_Photos_list.Recordset.MoveNext End If Loop %> </tbody> </table> <% End If %> <% If bed_Homepage_Photos.CurrentAction = "" Then %> <input type="hidden" name="a_list" id="a_list" value=""> <% End If %> </div> </form> <% ' Close recordset and connection bed_Homepage_Photos_list.Recordset.Close Set bed_Homepage_Photos_list.Recordset = Nothing %> <% If bed_Homepage_Photos.Export = "" Then %> <div class="box-footer ewGridLowerPanel"> <% If bed_Homepage_Photos.CurrentAction <> "gridadd" And bed_Homepage_Photos.CurrentAction <> "gridedit" Then %> <form name="ewPagerForm" class="ewForm form-inline ewPagerForm" action="<%= ew_CurrentPage %>"> <% If ew_Empty(bed_Homepage_Photos_list.Pager) Then Set bed_Homepage_Photos_list.Pager = ew_NewNumericPagerBase(bed_Homepage_Photos_list.StartRec, bed_Homepage_Photos_list.DisplayRecs, bed_Homepage_Photos_list.TotalRecs, bed_Homepage_Photos_list.RecRange, bed_Homepage_Photos_list.AutoHidePager) %> <% If bed_Homepage_Photos_list.Pager.RecordCount > 0 And bed_Homepage_Photos_list.Pager.Visible Then %> <div class="ewPager"> <div class="ewNumericPage"><ul class="pagination"> <% If bed_Homepage_Photos_list.Pager.FirstButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.FirstButton.Start %>"><%= Language.Phrase("PagerFirst") %></a></li> <% End If %> <% If bed_Homepage_Photos_list.Pager.PrevButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.PrevButton.Start %>"><%= Language.Phrase("PagerPrevious") %></a></li> <% End If %> <% For Each PagerItem In bed_Homepage_Photos_list.Pager.Items %> <li<% if Not PagerItem.Enabled Then Response.Write " class=""active""" End If %>><a href="<% If PagerItem.Enabled Then Response.Write bed_Homepage_Photos_list.PageUrl & "start=" & PagerItem.Start Else Response.Write "#" End If %>"><%= PagerItem.Text %></a></li> <% Next %> <% If bed_Homepage_Photos_list.Pager.NextButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.NextButton.Start %>"><%= Language.Phrase("PagerNext") %></a></li> <% End If %> <% If bed_Homepage_Photos_list.Pager.LastButton.Enabled Then %> <li><a href="<%= bed_Homepage_Photos_list.PageUrl %>start=<%= bed_Homepage_Photos_list.Pager.LastButton.Start %>"><%= Language.Phrase("PagerLast") %></a></li> <% End If %> </ul></div> </div> <% End If %> <% If bed_Homepage_Photos_list.Pager.RecordCount > 0 Then %> <div class="ewPager ewRec"> <span><%= Language.Phrase("Record") %> <%= bed_Homepage_Photos_list.Pager.FromIndex %> <%= Language.Phrase("To") %> <%= bed_Homepage_Photos_list.Pager.ToIndex %> <%= Language.Phrase("Of") %> <%= bed_Homepage_Photos_list.Pager.RecordCount %></span> </div> <% End If %> </form> <% End If %> <div class="ewListOtherOptions"> <% Call bed_Homepage_Photos_list.AddEditOptions.Render("body", "bottom", "", "", "", "") Call bed_Homepage_Photos_list.DetailOptions.Render("body", "bottom", "", "", "", "") Call bed_Homepage_Photos_list.ActionOptions.Render("body", "bottom", "", "", "", "") %> </div> <div class="clearfix"></div> </div> <% End If %> </div> <% End If %> <% If bed_Homepage_Photos_list.TotalRecs = 0 And bed_Homepage_Photos.CurrentAction = "" Then ' Show other options %> <div class="ewListOtherOptions"> <% Call bed_Homepage_Photos_list.AddEditOptions.Render("body", "", "", "", "", "") Call bed_Homepage_Photos_list.DetailOptions.Render("body", "", "", "", "", "") Call bed_Homepage_Photos_list.ActionOptions.Render("body", "", "", "", "", "") %> </div> <div class="clearfix"></div> <% End If %> <% If bed_Homepage_Photos.Export <> "" Then %> <script type="text/javascript"> ew_ApplyTemplate("body", "", "bed_Homepage_Photoslist", "<%= bed_Homepage_Photos.CustomExport %>"); </script> <% End If %> <% If bed_Homepage_Photos.Export = "" Then %> <script type="text/javascript"> fbed_Homepage_Photoslistsrch.FilterList = <%= bed_Homepage_Photos_list.GetFilterList() %>; fbed_Homepage_Photoslistsrch.Init(); fbed_Homepage_Photoslist.Init(); </script> <% End If %> <% Call bed_Homepage_Photos_list.ShowPageFooter If EW_DEBUG_ENABLED Then Response.Write ew_DebugMsg() %> <% If bed_Homepage_Photos.Export = "" Then %> <script type="text/javascript"> // Write your table-specific startup script here // document.write("page loaded"); </script> <% End If %> <!--#include file="footer.asp"--> <% ' Clean up and drop page object Call bed_Homepage_Photos_list.Page_Terminate("") Set bed_Homepage_Photos_list = Nothing %> <% ' ' Page Class ' Class cbed_Homepage_Photos_list ' Page ID Public Property Get PageID PageID = "list" End Property ' Project ID Public Property Get ProjectID ProjectID = "panel" End Property ' Table Name Public Property Get TableName TableName = "bed_Homepage_Photos" End Property ' Page Object Name Public Property Get PageObjName PageObjName = "bed_Homepage_Photos_list" End Property ' Field (ID) Public Property Get ID Set ID = bed_Homepage_Photos.ID End Property ' Field (Photos) Public Property Get Photos Set Photos = bed_Homepage_Photos.Photos End Property ' Field (Date) Public Property Get zDate Set zDate = bed_Homepage_Photos.zDate End Property ' Field (Enable) Public Property Get Enable Set Enable = bed_Homepage_Photos.Enable End Property ' Field (Title) Public Property Get Title Set Title = bed_Homepage_Photos.Title End Property ' Field (Sequence) Public Property Get Sequence Set Sequence = bed_Homepage_Photos.Sequence End Property ' Get field object dictionary (ASP) Public Property Get Fields Set Fields = bed_Homepage_Photos.Fields End Property ' Get field object by name (alias of Fields) (ASP) Public Function GetField(Name) Set GetField = Fields.Get(Name) End Function ' Get field object by parm (ASP) Public Function GetFieldByParm(Parm) Dim keys, key keys = Fields.Keys() For Each key In keys If Fields.Get(key).FldParm = Parm Then Set GetFieldByParm = Fields.Get(key) Exit Function End If Next Set GetFieldByParm = Nothing End Function ' Custom actions (ASP) Dim CustomActions ' Export document (ASP) Dim ExportDoc ' Grid form hidden field names Dim FormName Dim FormActionName Dim FormKeyName Dim FormOldKeyName Dim FormBlankRowName Dim FormKeyCountName ' Page headings Dim Heading Dim Subheading ' Page heading Function PageHeading() PageHeading = "" If Heading <> "" Then PageHeading = Heading ElseIf ew_NotEmpty(bed_Homepage_Photos) Then PageHeading = bed_Homepage_Photos.TableCaption End If End Function ' Page subheading Function PageSubheading() If Subheading <> "" Then PageSubheading = Subheading Else PageSubheading = "" If TableName <> "" Then PageSubheading = Language.Phrase(PageID) End If End If End Function ' Page Name Public Property Get PageName PageName = ew_CurrentPage() End Property ' Page Url Public Property Get PageUrl PageUrl = ew_CurrentPage() & "?" If bed_Homepage_Photos.UseTokenInUrl Then PageUrl = PageUrl & "t=" & bed_Homepage_Photos.TableVar & "&" ' add page token End Property ' Common URLs Dim AddUrl Dim EditUrl Dim CopyUrl Dim DeleteUrl Dim ViewUrl Dim ListUrl ' Export URLs Dim ExportPrintUrl Dim ExportHtmlUrl Dim ExportExcelUrl Dim ExportWordUrl Dim ExportXmlUrl Dim ExportCsvUrl Dim ExportPdfUrl ' Custom export Dim ExportExcelCustom Dim ExportWordCustom Dim ExportPdfCustom Dim ExportEmailCustom ' Inline URLs Dim InlineAddUrl Dim InlineCopyUrl Dim InlineEditUrl Dim GridAddUrl Dim GridEditUrl Dim MultiDeleteUrl Dim MultiUpdateUrl ' Message Public Property Get Message Message = Session(EW_SESSION_MESSAGE) End Property Public Property Let Message(v) Dim msg msg = Session(EW_SESSION_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_MESSAGE) = msg End Property Public Property Get FailureMessage FailureMessage = Session(EW_SESSION_FAILURE_MESSAGE) End Property Public Property Let FailureMessage(v) Dim msg msg = Session(EW_SESSION_FAILURE_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_FAILURE_MESSAGE) = msg End Property Public Property Get SuccessMessage SuccessMessage = Session(EW_SESSION_SUCCESS_MESSAGE) End Property Public Property Let SuccessMessage(v) Dim msg msg = Session(EW_SESSION_SUCCESS_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_SUCCESS_MESSAGE) = msg End Property Public Property Get WarningMessage WarningMessage = Session(EW_SESSION_WARNING_MESSAGE) End Property Public Property Let WarningMessage(v) Dim msg msg = Session(EW_SESSION_WARNING_MESSAGE) Call ew_AddMessage(msg, v) Session(EW_SESSION_WARNING_MESSAGE) = msg End Property ' Methods to clear message Public Sub ClearMessage() Session(EW_SESSION_MESSAGE) = "" End Sub Public Sub ClearFailureMessage() Session(EW_SESSION_FAILURE_MESSAGE) = "" End Sub Public Sub ClearSuccessMessage() Session(EW_SESSION_SUCCESS_MESSAGE) = "" End Sub Public Sub ClearWarningMessage() Session(EW_SESSION_WARNING_MESSAGE) = "" End Sub Public Sub ClearMessages() Session(EW_SESSION_MESSAGE) = "" Session(EW_SESSION_FAILURE_MESSAGE) = "" Session(EW_SESSION_SUCCESS_MESSAGE) = "" Session(EW_SESSION_WARNING_MESSAGE) = "" End Sub ' Show Message Public Sub ShowMessage() Dim hidden, html, sMessage hidden = False html = "" ' Message sMessage = Message Call Message_Showing(sMessage, "") If sMessage <> "" Then ' Message in Session, display If Not hidden Then sMessage = "<button type=""button"" class=""close"" data-dismiss=""alert"">×</button>" & sMessage html = html & "<div class=""alert alert-info ewInfo"">" & sMessage & "</div>" Session(EW_SESSION_MESSAGE) = "" ' Clear message in Session End If ' Warning message Dim sWarningMessage sWarningMessage = WarningMessage Call Message_Showing(sWarningMessage, "warning") If sWarningMessage <> "" Then ' Message in Session, display If Not hidden Then sWarningMessage = "<button type=""button"" class=""close"" data-dismiss=""alert"">×</button>" & sWarningMessage html = html & "<div class=""alert alert-warning ewWarning"">" & sWarningMessage & "</div>" Session(EW_SESSION_WARNING_MESSAGE) = "" ' Clear message in Session End If ' Success message Dim sSuccessMessage sSuccessMessage = SuccessMessage Call Message_Showing(sSuccessMessage, "success") If sSuccessMessage <> "" Then ' Message in Session, display If Not hidden Then sSuccessMessage = "<button type=""button"" class=""close"" data-dismiss=""alert"">×</button>" & sSuccessMessage html = html & "<div class=""alert alert-success ewSuccess"">" & sSuccessMessage & "</div>" Session(EW_SESSION_SUCCESS_MESSAGE) = "" ' Clear message in Session End If ' Failure message Dim sErrorMessage sErrorMessage = FailureMessage Call Message_Showing(sErrorMessage, "failure") If sErrorMessage <> "" Then ' Message in Session, display If Not hidden Then sErrorMessage = "<button type=""button"" class=""close"" data-dismiss=""alert"">×</button>" & sErrorMessage html = html & "<div class=""alert alert-danger ewError"">" & sErrorMessage & "</div>" Session(EW_SESSION_FAILURE_MESSAGE) = "" ' Clear message in Session End If Response.Write "<div class=""ewMessageDialog""" & ew_IIf(hidden, " style=""display: none;""", "") & ">" & html & "</div>" End Sub Dim PageHeader Dim PageFooter ' Show Page Header Public Sub ShowPageHeader() Dim sHeader sHeader = PageHeader Call Page_DataRendering(sHeader) If sHeader <> "" Then ' Header exists, display Response.Write "<p>" & sHeader & "</p>" End If End Sub ' Show Page Footer Public Sub ShowPageFooter() Dim sFooter sFooter = PageFooter Call Page_DataRendered(sFooter) If sFooter <> "" Then ' Footer exists, display Response.Write "<p>" & sFooter & "</p>" End If End Sub ' ' Validate Page request ' Public Function IsPageRequest() If bed_Homepage_Photos.UseTokenInUrl Then IsPageRequest = False If ew_NotEmpty(ObjForm) Then IsPageRequest = (bed_Homepage_Photos.TableVar = ObjForm.GetValue("t")) End If If Request.QueryString("t").Count > 0 Then IsPageRequest = (bed_Homepage_Photos.TableVar = Request.QueryString("t")) End If Else IsPageRequest = True End If End Function Dim Token Dim CheckToken Dim TokenTimeout ' Valid Post Function ValidPost() If Not CheckToken Or Not ew_IsPost() Then ValidPost = True Exit Function End If If Request.Form(EW_TOKEN_NAME).Count = 0 Then ValidPost = False Exit Function End If ValidPost = ew_CheckToken(Request.Form(EW_TOKEN_NAME),TokenTimeout) End Function ' Create Token Sub CreateToken() If CheckToken And Token = "" Then Token = ew_CreateToken() gsToken = Token ' Save to global variable End If End Sub ' ' Class initialize ' Private Sub Class_Initialize() Session.LCID = 1033 ' Always use US locale id If IsEmpty(StartTimer) Then StartTimer = Timer ' Init start time ' Grid form hidden field names FormName = "fbed_Homepage_Photoslist" FormActionName = "k_action" FormKeyName = "k_key" FormOldKeyName = "k_oldkey" FormBlankRowName = "k_blankrow" FormKeyCountName = "key_count" ' Check Token Token = "" CheckToken = EW_CHECK_TOKEN TokenTimeout = 0 TokenTimeout = ew_SessionTimeoutTime() ' Initialize language object If IsEmpty(Language) Then Set Language = New cLanguage Call Language.LoadPhrases End If ' Initialize table object If IsEmpty(bed_Homepage_Photos) Then Set bed_Homepage_Photos = New cbed_Homepage_Photos Set Table = bed_Homepage_Photos ExportExcelCustom = False ExportWordCustom = False ExportPdfCustom = True ' Always use ew_ApplyTemplate ExportEmailCustom = True ' Always use ew_ApplyTemplate ' Initialize URLs ExportPrintUrl = PageUrl & "export=print" ExportExcelUrl = PageUrl & "export=excel" ExportWordUrl = PageUrl & "export=word" ExportHtmlUrl = PageUrl & "export=html" ExportXmlUrl = PageUrl & "export=xml" ExportCsvUrl = PageUrl & "export=csv" ExportPdfUrl = PageUrl & "export=pdf" AddUrl = "bed_Homepage_Photosadd.asp" InlineAddUrl = PageUrl & "a=add" GridAddUrl = PageUrl & "a=gridadd" GridEditUrl = PageUrl & "a=gridedit" MultiDeleteUrl = "bed_Homepage_Photosdelete.asp" MultiUpdateUrl = "bed_Homepage_Photosupdate.asp" ' Initialize form object Set ObjForm = Nothing ' Get resize object Call ew_GetResizeObj ' Intialize page id (for backward compatibility) EW_PAGE_ID = "list" ' Initialize table name (for backward compatibility) EW_TABLE_NAME = "bed_Homepage_Photos" ' Debug message Call ew_LoadDebugMsg ' Open connection to the database If IsEmpty(Conn) Then Set Conn = ew_Connect(bed_Homepage_Photos.TableDBID) End If ' List options Set ListOptions = New cListOptions ListOptions.TableVar = bed_Homepage_Photos.TableVar ' Custom actions Set CustomActions = Dictionary() ' Export options Set ExportOptions = New cListOptions ExportOptions.TableVar = bed_Homepage_Photos.TableVar ExportOptions.Tag = "div" ExportOptions.TagClassName = "ewExportOption" ' Other options Set AddEditOptions = New cListOptions AddEditOptions.Tag = "div" AddEditOptions.TagClassName = "ewAddEditOption" Set DetailOptions = New cListOptions DetailOptions.Tag = "div" DetailOptions.TagClassName = "ewDetailOption" Set ActionOptions = New cListOptions ActionOptions.Tag = "div" ActionOptions.TagClassName = "ewActionOption" ' Filter options Set FilterOptions = New cListOptions FilterOptions.Tag = "div" FilterOptions.TagClassName = "ewFilterOption fbed_Homepage_Photoslistsrch" ' List actions Set ListActions = New cListActions End Sub ' ' Page_Init ' Sub Page_Init() ' User profile Set UserProfile = New cUserProfile ' Security Set Security = New cAdvancedSecurity If Not Security.IsLoggedIn() Then Security.AutoLogin() Call Security.LoadCurrentUserLevel(ProjectID & TableName) If Not Security.CanList Then Call Security.SaveLastUrl Call Page_Terminate(ew_GetUrl("default.asp")) End If ' Get grid add count Dim gridaddcnt gridaddcnt = Request.QueryString(EW_TABLE_GRID_ADD_ROW_COUNT) If IsNumeric(gridaddcnt) Then If gridaddcnt > 0 Then bed_Homepage_Photos.GridAddRowCount = gridaddcnt End If End If ' Set up list options Call SetupListOptions Call bed_Homepage_Photos.ID.SetVisibility(bed_Homepage_Photos) If bed_Homepage_Photos.IsAdd() Or bed_Homepage_Photos.IsCopy() Or bed_Homepage_Photos.IsGridAdd() Then bed_Homepage_Photos.ID.Visible = False End If Call bed_Homepage_Photos.Photos.SetVisibility(bed_Homepage_Photos) Call bed_Homepage_Photos.Enable.SetVisibility(bed_Homepage_Photos) Call bed_Homepage_Photos.Sequence.SetVisibility(bed_Homepage_Photos) ' Global page loading event (in userfn*.asp) Call Page_Loading ' Page load event, used in current page Call Page_Load ' Check token If Not ValidPost() Then Response.Write Language.Phrase("InvalidPostRequest") Call Page_Terminate("") Response.End End If ' Process auto fill Dim results If Request.Form("ajax") = "autofill" Then results = bed_Homepage_Photos.GetAutoFill(Request.Form("name"), Request.Form("q")) If results <> "" Then ' Clean output buffer If Response.Buffer Then Response.Clear Response.Write results Call Page_Terminate("") Response.End End If End If ' Create Token Call CreateToken ' Setup other options Call SetupOtherOptions ' Set up custom action (backward compatibility) Dim sKey, sAction For Each sKey In CustomActions.Keys() sAction = CustomActions.Get(sKey) Call ListActions.Add(sKey, sAction, True, EW_ACTION_POSTBACK, EW_ACTION_MULTIPLE, "", "glyphicon glyphicon-star ewIcon") Next ' Show checkbox column if multiple action Dim listact For i = 0 to ListActions.Count - 1 Set listact = ListActions(i) If listact.SelectType = EW_ACTION_MULTIPLE And listact.Allow Then ListOptions("checkbox").Visible = True Exit For End If Next End Sub ' ' Page_Terminate ' Sub Page_Terminate(url) If Request.Form("customexport")&"" = "" Then ' Page unload event, used in current page Call Page_Unload ' Global page unloaded event (in userfn*.asp) Call Page_Unloaded End If ' Export If ew_NotEmpty(bed_Homepage_Photos) Then If bed_Homepage_Photos.Export <> "" And Request.Form("data").Count > 0 Then Dim sContent sContent = Request.Form("data") gsExportFile = Request.Form("filename") If gsExportFile = "" Then gsExportFile = bed_Homepage_Photos.TableVar If bed_Homepage_Photos.Export = "pdf" Then Call ExportPdf(sContent) ElseIf bed_Homepage_Photos.Export = "email" Then Response.Write ExportEmail(sContent) ElseIf bed_Homepage_Photos.Export = "excel" Then Call ExportExcel(sContent) ElseIf bed_Homepage_Photos.Export = "word" Then Call ExportWord(sContent) End If End If End If Dim sRedirectUrl sRedirectUrl = url Call Page_Redirecting(sRedirectUrl) Call ew_CloseConn ' Close Connection Set Security = Nothing Set ListOptions = Nothing Set CustomActions = Nothing ' ASP Set ObjForm = Nothing Set gResizeObj = Nothing ' Go to URL if specified If gsExport & "" = "" Then If sRedirectUrl <> "" Then If Response.Buffer Then Response.Clear Call ew_SaveDebugMsg Response.Redirect sRedirectUrl End If End If Set bed_Homepage_Photos = Nothing Call ew_CleanUp End Sub ' ' Page_Terminate (End) ' Dim ListOptions ' List options Dim ExportOptions ' Export options Dim SearchOptions ' Search options Dim AddEditOptions ' Other options (add edit) Dim DetailOptions ' Other options (detail) Dim ActionOptions ' Other options (action) Dim FilterOptions ' Filter options Dim ListActions ' List actions Dim SelectedCount Dim SelectedIndex Dim DisplayRecs ' Number of display records Dim StartRec, StopRec, TotalRecs, RecRange Dim AutoHidePager, AutoHidePageSizeSelector Dim DefaultSearchWhere ' Default search WHERE clause Dim SearchWhere Dim RecCnt Dim EditRowCnt Dim StartRowCnt Dim RowCnt, RowIndex Dim Attrs Dim RecPerRow Dim MultiColumnClass Dim MultiColumnEditClass Dim MultiColumnCnt Dim MultiColumnEditCnt Dim GridCnt Dim ColCnt Dim KeyCount Dim RowAction Dim RowOldKey ' Row old key (for copy) Dim DbMasterFilter, DbDetailFilter Dim MasterRecordExists Dim MultiSelectKey Dim Command Dim RestoreSearch Dim Recordset, OldRecordset, DetailPages ' ' Page main ' Sub Page_Main() SelectedCount = 0 SelectedIndex = 0 DisplayRecs = 20 RecRange = 10 AutoHidePager = EW_AUTO_HIDE_PAGER AutoHidePageSizeSelector = EW_AUTO_HIDE_PAGE_SIZE_SELECTOR RecCnt = 0 ' Record count KeyCount = 0 ' Key count StartRowCnt = 1 ' Search filters Dim sSrchAdvanced, sSrchBasic, sFilter sSrchAdvanced = "" ' Advanced search filter sSrchBasic = "" ' Basic search filter SearchWhere = "" ' Search where clause DefaultSearchWhere = "" sFilter = "" ' Restore search RestoreSearch = False ' Get command Command = LCase(Request.QueryString("cmd")&"") ' Master/Detail DbMasterFilter = "" ' Master filter DbDetailFilter = "" ' Detail filter If IsPageRequest Then ' Validate request ' Process list action first If ProcessListAction() Then ' Ajax request Call Page_Terminate("") Response.End End If ' Handle reset command Call ResetCmd ' Set up Breadcrumb If bed_Homepage_Photos.Export = "" Then Call SetupBreadcrumb End If ' Hide list options If bed_Homepage_Photos.Export <> "" Then Call ListOptions.HideAllOptions(Array("sequence")) ListOptions.UseDropDownButton = False ' Disable drop down button ListOptions.UseButtonGroup = False ' Disable button group ElseIf bed_Homepage_Photos.CurrentAction = "gridadd" Or bed_Homepage_Photos.CurrentAction = "gridedit" Then Call ListOptions.HideAllOptions(Array()) ListOptions.UseDropDownButton = False ' Disable drop down button ListOptions.UseButtonGroup = False ' Disable button group End If ' Hide options If bed_Homepage_Photos.Export <> "" Or bed_Homepage_Photos.CurrentAction <> "" Then Call ExportOptions.HideAllOptions(Array()) Call FilterOptions.HideAllOptions(Array()) End If ' Hide other options If bed_Homepage_Photos.Export <> "" Then Call AddEditOptions.HideAllOptions(Array()) Call DetailOptions.HideAllOptions(Array()) Call ActionOptions.HideAllOptions(Array()) End If ' Get default search criteria Call ew_AddFilter(DefaultSearchWhere, BasicSearchWhere(True)) ' Get basic search values Call LoadBasicSearchValues ' Restore filter list Call ProcessFilterList ' Restore search parms from Session if not searching / reset / export If (bed_Homepage_Photos.Export <> "" Or Command <> "search" And Command <> "reset" And Command <> "resetall") And Command <> "json" And CheckSearchParms() Then Call RestoreSearchParms End If ' Call Recordset SearchValidated event Call bed_Homepage_Photos.Recordset_SearchValidated() ' Set Up Sorting Order Call SetupSortOrder ' Get basic search criteria If gsSearchError = "" Then sSrchBasic = BasicSearchWhere(False) End If End If ' End Validate Request ' Restore display records If Command <> "json" And bed_Homepage_Photos.RecordsPerPage <> "" Then DisplayRecs = bed_Homepage_Photos.RecordsPerPage ' Restore from Session Else DisplayRecs = 20 ' Load default End If ' Load Sorting Order If Command <> "json" Then Call LoadSortOrder ' Load search default if no existing search criteria If Not CheckSearchParms() Then ' Load basic search from default bed_Homepage_Photos.BasicSearch.Keyword = bed_Homepage_Photos.BasicSearch.KeywordDefault bed_Homepage_Photos.BasicSearch.SearchType = bed_Homepage_Photos.BasicSearch.SearchTypeDefault Call bed_Homepage_Photos.BasicSearch.setSearchType(bed_Homepage_Photos.BasicSearch.SearchTypeDefault) If bed_Homepage_Photos.BasicSearch.Keyword <> "" Then sSrchBasic = BasicSearchWhere(False) End If End If ' Build search criteria Call ew_AddFilter(SearchWhere, sSrchAdvanced) Call ew_AddFilter(SearchWhere, sSrchBasic) ' Call Recordset Searching event Call bed_Homepage_Photos.Recordset_Searching(SearchWhere) ' Save search criteria If Command = "search" And Not RestoreSearch Then bed_Homepage_Photos.SearchWhere = SearchWhere ' Save to Session StartRec = 1 ' Reset start record counter bed_Homepage_Photos.StartRecordNumber = StartRec ElseIf Command <> "json" Then SearchWhere = bed_Homepage_Photos.SearchWhere End If sFilter = "" Call ew_AddFilter(sFilter, DbDetailFilter) Call ew_AddFilter(sFilter, SearchWhere) ' Set up filter If Command = "json" Then bed_Homepage_Photos.UseSessionForListSQL = False ' Do not use session for ListSQL bed_Homepage_Photos.CurrentFilter = sFilter Else bed_Homepage_Photos.SessionWhere = sFilter bed_Homepage_Photos.CurrentFilter = "" End If ' Load record count first ' ASP TotalRecs = bed_Homepage_Photos.ListRecordCount() ' Search options Call SetupSearchOptions End Sub ' ' Build filter for all keys ' Function BuildKeyFilter() Dim rowindex, sThisKey Dim sKey Dim sWrkFilter, sFilter sWrkFilter = "" ' Update row index and get row key rowindex = 1 ObjForm.Index = rowindex sThisKey = ObjForm.GetValue("k_key") & "" Do While sThisKey <> "" If SetupKeyValues(sThisKey) Then sFilter = bed_Homepage_Photos.KeyFilter If sWrkFilter <> "" Then sWrkFilter = sWrkFilter & " OR " sWrkFilter = sWrkFilter & sFilter Else sWrkFilter = "0=1" Exit Do End If ' Update row index and get row key rowindex = rowindex + 1 ' Next row ObjForm.Index = rowindex sThisKey = ObjForm.GetValue("k_key") & "" Loop BuildKeyFilter = sWrkFilter End Function ' ' Set up key values ' Function SetupKeyValues(key) Dim arrKeyFlds arrKeyFlds = Split(key&"", EW_COMPOSITE_KEY_SEPARATOR) If UBound(arrKeyFlds) >= 0 Then bed_Homepage_Photos.ID.FormValue = arrKeyFlds(0) If Not IsNumeric(bed_Homepage_Photos.ID.FormValue) Then SetupKeyValues = False Exit Function End If End If SetupKeyValues = True End Function ' Get list of filters Function GetFilterList() ' Initialize Dim sFilterList, sWrk, sSavedFilterList ' Initialize sFilterList = "" sSavedFilterList = "" sFilterList = ew_Concat(sFilterList, bed_Homepage_Photos.ID.AdvancedSearch.ToJson(), ",") ' Field ID sFilterList = ew_Concat(sFilterList, bed_Homepage_Photos.Photos.AdvancedSearch.ToJson(), ",") ' Field Photos sFilterList = ew_Concat(sFilterList, bed_Homepage_Photos.zDate.AdvancedSearch.ToJson(), ",") ' Field Date sFilterList = ew_Concat(sFilterList, bed_Homepage_Photos.Enable.AdvancedSearch.ToJson(), ",") ' Field Enable sFilterList = ew_Concat(sFilterList, bed_Homepage_Photos.Title.AdvancedSearch.ToJson(), ",") ' Field Title sFilterList = ew_Concat(sFilterList, bed_Homepage_Photos.Sequence.AdvancedSearch.ToJson(), ",") ' Field Sequence If bed_Homepage_Photos.BasicSearch.Keyword <> "" Then sWrk = """" & EW_TABLE_BASIC_SEARCH & """:""" & ew_JsEncode2(bed_Homepage_Photos.BasicSearch.Keyword) & """,""" & EW_TABLE_BASIC_SEARCH_TYPE & """:""" & ew_JsEncode2(bed_Homepage_Photos.BasicSearch.SearchType) & """" sFilterList = ew_Concat(sFilterList, sWrk, ",") End If sFilterList = ew_RegExReplace(",$", sFilterList, "") ' Return filter list in json If sFilterList <> "" Then sFilterList = """data"":{" & sFilterList & "}" End If If sSavedFilterList <> "" Then If sFilterList <> "" Then sFilterList = sFilterList & "," End If sFilterList = sFilterList & """filters"":" & sSavedFilterList End If GetFilterList = ew_IIf(sFilterList <> "", "{" & sFilterList & "}" , "null") End Function ' Process filter list Sub ProcessFilterList() Dim filters, result If Request.Form("ajax") = "savefilters" Then filters = Request.Form("filters") Call UserProfile.SetSearchFilters(CurrentUserName(), "fbed_Homepage_Photoslistsrch", filters) ' Clean output buffer If Response.Buffer Then Response.Clear Set result = Dictionary() Call result.Add("success", True) Call ResponseJson Response.Write "[" & result.ToJson() & "]" Set result = Nothing Call Page_Terminate("") Response.End ElseIf Request.Form("cmd") = "resetfilter" Then RestoreFilterList() End If End Sub ' Restore list of filters Function RestoreFilterList() Dim filter ' Return if not reset filter If Request.Form("cmd") & "" <> "resetfilter" Then RestoreFilterList = False Exit Function End If If Request.form("filter").Count > 0 Then Set filter = ew_JsonDecode(Request.Form("filter")) Command = "search" ' Field ID If filter.Exists("x_ID") Then bed_Homepage_Photos.ID.AdvancedSearch.SearchValue = filter("x_ID") End If If filter.Exists("z_ID") Then bed_Homepage_Photos.ID.AdvancedSearch.SearchOperator = filter("z_ID") End If If filter.Exists("v_ID") Then bed_Homepage_Photos.ID.AdvancedSearch.SearchCondition = filter("v_ID") End If If filter.Exists("y_ID") Then bed_Homepage_Photos.ID.AdvancedSearch.SearchValue2 = filter("y_ID") End If If filter.Exists("w_ID") Then bed_Homepage_Photos.ID.AdvancedSearch.SearchOperator2 = filter("w_ID") End If Call bed_Homepage_Photos.ID.AdvancedSearch.Save ' Field Photos If filter.Exists("x_Photos") Then bed_Homepage_Photos.Photos.AdvancedSearch.SearchValue = filter("x_Photos") End If If filter.Exists("z_Photos") Then bed_Homepage_Photos.Photos.AdvancedSearch.SearchOperator = filter("z_Photos") End If If filter.Exists("v_Photos") Then bed_Homepage_Photos.Photos.AdvancedSearch.SearchCondition = filter("v_Photos") End If If filter.Exists("y_Photos") Then bed_Homepage_Photos.Photos.AdvancedSearch.SearchValue2 = filter("y_Photos") End If If filter.Exists("w_Photos") Then bed_Homepage_Photos.Photos.AdvancedSearch.SearchOperator2 = filter("w_Photos") End If Call bed_Homepage_Photos.Photos.AdvancedSearch.Save ' Field Date If filter.Exists("x_zDate") Then bed_Homepage_Photos.zDate.AdvancedSearch.SearchValue = filter("x_zDate") End If If filter.Exists("z_zDate") Then bed_Homepage_Photos.zDate.AdvancedSearch.SearchOperator = filter("z_zDate") End If If filter.Exists("v_zDate") Then bed_Homepage_Photos.zDate.AdvancedSearch.SearchCondition = filter("v_zDate") End If If filter.Exists("y_zDate") Then bed_Homepage_Photos.zDate.AdvancedSearch.SearchValue2 = filter("y_zDate") End If If filter.Exists("w_zDate") Then bed_Homepage_Photos.zDate.AdvancedSearch.SearchOperator2 = filter("w_zDate") End If Call bed_Homepage_Photos.zDate.AdvancedSearch.Save ' Field Enable If filter.Exists("x_Enable") Then bed_Homepage_Photos.Enable.AdvancedSearch.SearchValue = filter("x_Enable") End If If filter.Exists("z_Enable") Then bed_Homepage_Photos.Enable.AdvancedSearch.SearchOperator = filter("z_Enable") End If If filter.Exists("v_Enable") Then bed_Homepage_Photos.Enable.AdvancedSearch.SearchCondition = filter("v_Enable") End If If filter.Exists("y_Enable") Then bed_Homepage_Photos.Enable.AdvancedSearch.SearchValue2 = filter("y_Enable") End If If filter.Exists("w_Enable") Then bed_Homepage_Photos.Enable.AdvancedSearch.SearchOperator2 = filter("w_Enable") End If Call bed_Homepage_Photos.Enable.AdvancedSearch.Save ' Field Title If filter.Exists("x_Title") Then bed_Homepage_Photos.Title.AdvancedSearch.SearchValue = filter("x_Title") End If If filter.Exists("z_Title") Then bed_Homepage_Photos.Title.AdvancedSearch.SearchOperator = filter("z_Title") End If If filter.Exists("v_Title") Then bed_Homepage_Photos.Title.AdvancedSearch.SearchCondition = filter("v_Title") End If If filter.Exists("y_Title") Then bed_Homepage_Photos.Title.AdvancedSearch.SearchValue2 = filter("y_Title") End If If filter.Exists("w_Title") Then bed_Homepage_Photos.Title.AdvancedSearch.SearchOperator2 = filter("w_Title") End If Call bed_Homepage_Photos.Title.AdvancedSearch.Save ' Field Sequence If filter.Exists("x_Sequence") Then bed_Homepage_Photos.Sequence.AdvancedSearch.SearchValue = filter("x_Sequence") End If If filter.Exists("z_Sequence") Then bed_Homepage_Photos.Sequence.AdvancedSearch.SearchOperator = filter("z_Sequence") End If If filter.Exists("v_Sequence") Then bed_Homepage_Photos.Sequence.AdvancedSearch.SearchCondition = filter("v_Sequence") End If If filter.Exists("y_Sequence") Then bed_Homepage_Photos.Sequence.AdvancedSearch.SearchValue2 = filter("y_Sequence") End If If filter.Exists("w_Sequence") Then bed_Homepage_Photos.Sequence.AdvancedSearch.SearchOperator2 = filter("w_Sequence") End If Call bed_Homepage_Photos.Sequence.AdvancedSearch.Save If filter.Exists(EW_TABLE_BASIC_SEARCH) Then Call bed_Homepage_Photos.BasicSearch.setKeyword(filter(EW_TABLE_BASIC_SEARCH)) End If If filter.Exists(EW_TABLE_BASIC_SEARCH_TYPE) Then Call bed_Homepage_Photos.BasicSearch.setSearchType(filter(EW_TABLE_BASIC_SEARCH_TYPE)) End If Set filter = Nothing End If End Function ' ' Return basic search SQL ' Function BasicSearchSQL(arKeywords, typ) Dim sWhere sWhere = "" Call BuildBasicSearchSQL(sWhere, bed_Homepage_Photos.Photos, arKeywords, typ) Call BuildBasicSearchSQL(sWhere, bed_Homepage_Photos.Enable, arKeywords, typ) Call BuildBasicSearchSQL(sWhere, bed_Homepage_Photos.Title, arKeywords, typ) BasicSearchSQL = sWhere End Function ' ' Build basic search SQL ' Sub BuildBasicSearchSQL(Where, Fld, arKeywords, typ) Dim sDefcond, arSQL, arCond, cnt, i, j, ar Dim Keyword, sWrk, sFldExpression, bQuoted, sSql sDefCond = ew_IIf(typ = "OR", "OR", "AND") arSQL = Array() ' Array for SQL parts arCond = Array() ' Array for search conditions cnt = UBound(arKeywords)+1 j = 0 ' Number of SQL parts For i = 0 to cnt-1 Keyword = arKeywords(i) Keyword = Trim(Keyword) If EW_BASIC_SEARCH_IGNORE_PATTERN <> "" Then Keyword = ew_RegExReplace(EW_BASIC_SEARCH_IGNORE_PATTERN, Keyword, "\") ar = Split(Keyword, "\") Else ar = Array(Keyword) End If For Each Keyword In ar If Keyword <> "" Then sWrk = "" If Keyword = "OR" And typ = "" Then If j > 0 Then arCond(j-1) = "OR" End If ElseIf Keyword = EW_NULL_VALUE Then sWrk = Fld.FldExpression & " IS NULL" ElseIf Keyword = EW_NOT_NULL_VALUE Then sWrk = Fld.FldExpression & " IS NOT NULL" ElseIf Fld.FldIsVirtual Then sWrk = Fld.FldVirtualExpression & ew_Like(ew_QuotedValueBase("%" & Keyword & "%", EW_DATATYPE_STRING, bed_Homepage_Photos.TableDBID), bed_Homepage_Photos.TableDBID) ElseIf Fld.FldDataType <> EW_DATATYPE_NUMBER Or IsNumeric(Keyword) Then sWrk = Fld.FldBasicSearchExpression & ew_Like(ew_QuotedValueBase("%" & Keyword & "%", EW_DATATYPE_STRING, bed_Homepage_Photos.TableDBID), bed_Homepage_Photos.TableDBID) End If If sWrk <> "" Then If j > 0 Then ReDim Preserve arSQL(j) ReDim Preserve arCond(j) Else ReDim arSQL(0) ReDim arCond(0) End If arSQL(j) = sWrk arCond(j) = sDefCond j = j + 1 End If End If Next Next cnt = UBound(arSQL)+1 bQuoted = False sSql = "" If cnt > 0 Then For i = 0 to cnt-2 If arCond(i) = "OR" Then If Not bQuoted Then sSql = sSql & "(" bQuoted = True End If sSql = sSql & arSQL(i) If bQuoted And arCond(i) <> "OR" Then sSql = sSql & ")" bQuoted = False End If sSql = sSql & " " & arCond(i) & " " Next sSql = sSql & arSQL(cnt-1) If bQuoted Then sSql = sSql & ")" End If End If If sSql <> "" Then If Where <> "" Then Where = Where & " OR " Where = Where & "(" & sSql & ")" End If End Sub ' ' Return Basic Search Where based on search keyword and type ' Function BasicSearchWhere(bDefault) Dim sSearchStr, sSearchKeyword, sSearchType Dim sSearch, arKeyword, sKeyword, ar, Match, Matches, p, str, i sSearchStr = "" sSearchKeyword = ew_IIf(bDefault, bed_Homepage_Photos.BasicSearch.KeywordDefault, bed_Homepage_Photos.BasicSearch.Keyword) sSearchType = ew_IIf(bDefault, bed_Homepage_Photos.BasicSearch.SearchTypeDefault, bed_Homepage_Photos.BasicSearch.SearchType) ' Get search SQL If sSearchKeyword <> "" Then ar = bed_Homepage_Photos.BasicSearch.KeywordList(bDefault) ' Search keyword in any fields If (sSearchType = "OR" Or sSearchType = "AND") And bed_Homepage_Photos.BasicSearch.BasicSearchAnyFields Then For i = 0 to UBound(ar) sKeyword = ar(i) If sKeyword <> "" Then If sSearchStr <> "" Then sSearchStr = sSearchStr & " " & sSearchType & " " sSearchStr = sSearchStr & "(" & BasicSearchSQL(Array(sKeyword), sSearchType) & ")" End If Next Else sSearchStr = BasicSearchSQL(ar, sSearchType) End If If Not bDefault And ew_InArray(Command, Array("", "reset", "resetall")) Then Command = "search" End If If Not bDefault And Command = "search" Then Call bed_Homepage_Photos.BasicSearch.setKeyword(sSearchKeyword) Call bed_Homepage_Photos.BasicSearch.setSearchType(sSearchType) End If BasicSearchWhere = sSearchStr End Function ' Check if search parm exists Function CheckSearchParms() ' Check basic search If bed_Homepage_Photos.BasicSearch.IssetSession() Then CheckSearchParms = True Exit Function End If CheckSearchParms = False End Function ' Clear all search parameters Sub ResetSearchParms() ' Clear search where SearchWhere = "" bed_Homepage_Photos.SearchWhere = SearchWhere ' Clear basic search parameters Call ResetBasicSearchParms End Sub ' Load advanced search default values Function LoadAdvancedSearchDefault() LoadAdvancedSearchDefault = False End Function ' Clear all basic search parameters Sub ResetBasicSearchParms() Call bed_Homepage_Photos.BasicSearch.UnsetSession End Sub ' ' Restore all search parameters ' Sub RestoreSearchParms() ' Restore search flag RestoreSearch = True ' Restore basic search values Call bed_Homepage_Photos.BasicSearch.Load() End Sub ' ' Set up Sort parameters based on Sort Links clicked ' Sub SetupSortOrder() Dim sOrderBy Dim sSortField, sLastSort, sThisSort Dim bCtrl ' Check for an Order parameter If Request.QueryString("order").Count > 0 Then bed_Homepage_Photos.CurrentOrder = Request.QueryString("order") bed_Homepage_Photos.CurrentOrderType = Request.QueryString("ordertype") ' Field ID Call bed_Homepage_Photos.UpdateSort(bed_Homepage_Photos.ID) ' Field Photos Call bed_Homepage_Photos.UpdateSort(bed_Homepage_Photos.Photos) ' Field Enable Call bed_Homepage_Photos.UpdateSort(bed_Homepage_Photos.Enable) ' Field Sequence Call bed_Homepage_Photos.UpdateSort(bed_Homepage_Photos.Sequence) bed_Homepage_Photos.StartRecordNumber = 1 ' Reset start position End If End Sub ' ' Load Sort Order parameters ' Sub LoadSortOrder() Dim sOrderBy sOrderBy = bed_Homepage_Photos.SessionOrderBy ' Get order by from Session If sOrderBy = "" Then If bed_Homepage_Photos.SqlOrderBy <> "" Then sOrderBy = bed_Homepage_Photos.SqlOrderBy bed_Homepage_Photos.SessionOrderBy = sOrderBy End If End If End Sub ' ' Reset command based on querystring parameter "cmd" ' Sub ResetCmd() ' Check if reset command If Left(Command,5) = "reset" Then ' Reset search criteria If Command = "reset" Or Command = "resetall" Then Call ResetSearchParms End If ' Reset Sort Criteria If Command = "resetsort" Then Dim sOrderBy sOrderBy = "" bed_Homepage_Photos.SessionOrderBy = sOrderBy bed_Homepage_Photos.ID.Sort = "" bed_Homepage_Photos.Photos.Sort = "" bed_Homepage_Photos.Enable.Sort = "" bed_Homepage_Photos.Sequence.Sort = "" End If ' Reset start position StartRec = 1 bed_Homepage_Photos.StartRecordNumber = StartRec End If End Sub ' Set up list options Sub SetupListOptions() Dim item ' Add group option item Set item = ListOptions.Add(ListOptions.GroupOptionName) item.Body = "" item.OnLeft = False item.Visible = False ' View Set item = ListOptions.Add("view") item.CssClass = "text-nowrap;" item.Visible = Security.IsLoggedIn() item.OnLeft = False ' Edit Set item = ListOptions.Add("edit") item.CssClass = "text-nowrap;" item.Visible = Security.IsLoggedIn() item.OnLeft = False ' List actions Set item = ListOptions.Add("listactions") item.CssClass = "text-nowrap;" item.OnLeft = False item.Visible = False item.ShowInButtonGroup = False item.ShowInDropDown = False ' Checkbox Set item = ListOptions.Add("checkbox") item.Visible = Security.IsLoggedIn() item.OnLeft = False item.Header = "<input type=""checkbox"" name=""key"" id=""key"" onclick=""ew_SelectAllKey(this);"">" item.ShowInDropDown = False item.ShowInButtonGroup = False ' Drop down button for ListOptions ListOptions.UseImageAndText = True ListOptions.UseDropDownButton = False ListOptions.DropDownButtonPhrase = Language.Phrase("ButtonListOptions") ListOptions.UseButtonGroup = False If ListOptions.UseButtonGroup And ew_IsMobile() Then ListOptions.UseDropDownButton = True End If ListOptions.ButtonClass = "btn-sm" ' Class for button group Call ListOptions_Load Call SetupListOptionsExt ' Set up group item visibility ListOptions(ListOptions.GroupOptionName).Visible = ListOptions.GroupOptionVisible End Sub ' Render list options Sub RenderListOptions() Dim item, links, cancelurl Call ListOptions.LoadDefault ' Call ListOptions_Rendering event Call ListOptions_Rendering Dim viewcaption viewcaption = ew_HtmlTitle(Language.Phrase("ViewLink")) If Security.IsLoggedIn() Then ListOptions("view").Body = "<a class=""ewRowLink ewView"" title=""" & viewcaption & """ data-caption=""" & viewcaption & """ href=""" & ew_HtmlEncode(ViewUrl) & """>" & Language.Phrase("ViewLink") & "</a>" Else ListOptions("view").Body = "" End If Dim editcaption Set item = ListOptions("edit") editcaption = ew_HtmlTitle(Language.Phrase("EditLink")) If Security.IsLoggedIn() Then item.Body = "<a class=""ewRowLink ewEdit"" title=""" & editcaption & """ data-caption=""" & editcaption & """ href=""" & ew_HtmlEncode(EditUrl) & """>" & Language.Phrase("EditLink") & "</a>" Else item.Body = "" End If ' Set up list action buttons Dim oListOpt, body, content, link Dim listact, action, caption, icon Set oListOpt = ListOptions("listactions") If ew_NotEmpty(oListOpt) And bed_Homepage_Photos.Export = "" And bed_Homepage_Photos.CurrentAction = "" Then body = "" links = Array() For i = 0 to ListActions.Count - 1 Set listact = ListActions(i) If listact.SelectType = EW_ACTION_SINGLE And listact.Allow Then action = listact.Action caption = listact.Caption icon = ew_IIf(listact.Icon <> "", "<span class=""" & ew_HtmlEncode(Replace(listact.Icon, " ewIcon", "")) & """ data-caption=""" & ew_HtmlTitle(caption) & """></span> " , "") If UBound(links) < 0 Then ReDim links(0) Else ReDim Preserve links(UBound(links)+1) End If links(UBound(links)) = "<li><a class=""ewAction ewListAction"" data-action=""" & ew_HtmlEncode(action) & """ data-caption=""" & ew_HtmlTitle(caption) & """ href="""" onclick=""ew_SubmitAction(event,jQuery.extend({key:" & bed_Homepage_Photos.KeyToJson() & ",data:{rnd:" & ew_Random() & "}}," & listact.ToJson(True) & "));return false;"">" & icon & listact.Caption & "</a></li>" If UBound(links) = 0 Then ' Single button body = "<a class=""ewAction ewListAction"" data-action=""" & ew_HtmlEncode(action) & """ title=""" & ew_HtmlTitle(caption) & """ data-caption=""" & ew_HtmlTitle(caption) & """ href="""" onclick=""ew_SubmitAction(event,jQuery.extend({key:" & bed_Homepage_Photos.KeyToJson() & ",data:{rnd:" & ew_Random() & "}}," & listact.ToJson(True) & "));return false;"">" & Language.Phrase("ListActionButton") & "</a>" End If End If Next If UBound(links) > 0 Then ' More than one buttons, use dropdown body = "<button class=""dropdown-toggle btn btn-default btn-sm ewActions"" title=""" & ew_HtmlTitle(Language.Phrase("ListActionButton")) & """ data-toggle=""dropdown"">" & Language.Phrase("ListActionButton") & "<b class=""caret""></b></button>" content = "" For Each link In links content = content & "<li>" & link & "</li>" Next body = body & "<ul class=""dropdown-menu" & ew_IIf(oListOpt.OnLeft, "", " dropdown-menu-right") & """>" & content & "</ul>" body = "<div class=""btn-group"">" & body & "</div>" End If If UBound(links) >= 0 Then oListOpt.Body = body oListOpt.Visible = True End If End If ListOptions("checkbox").Body = "<input type=""checkbox"" name=""key_m"" class=""ewMultiSelect"" value=""" & ew_HtmlEncode(bed_Homepage_Photos.ID.CurrentValue) & """ onclick=""ew_ClickMultiCheckbox(event);"">" Call RenderListOptionsExt Call ListOptions_Rendered End Sub ' Set up other options Sub SetupOtherOptions() Dim opt, item, DetailTableLink, ar, i, caption, url, addcaption Set opt = AddEditOptions ' Add Set item = opt.Add("add") addcaption = ew_HtmlTitle(Language.Phrase("AddLink")) item.Body = "<a class=""ewAddEdit ewAdd"" title=""" & addcaption & """ data-caption=""" & addcaption & """ href=""" & ew_HtmlEncode(AddUrl) & """>" & Language.Phrase("AddLink") & "</a>" item.Visible = (AddUrl <> "" And Security.IsLoggedIn()) Set opt = ActionOptions ' Add multi delete Set item = opt.Add("multidelete") item.Body = "<a class=""ewAction ewMultiDelete"" title=""" & ew_HtmlTitle(Language.Phrase("DeleteSelectedLink")) & """ data-caption=""" & ew_HtmlTitle(Language.Phrase("DeleteSelectedLink")) & """ href="""" onclick=""ew_SubmitAction(event,{f:document.fbed_Homepage_Photoslist,url:'" & MultiDeleteUrl & "'});return false;"">" & Language.Phrase("DeleteSelectedLink") & "</a>" item.Visible = (Security.IsLoggedIn()) ' Set up options default Set opt = AddEditOptions opt.UseImageAndText = True opt.DropDownButtonPhrase = Language.Phrase("ButtonAddEdit") opt.UseDropDownButton = False opt.UseButtonGroup = True opt.ButtonClass = "btn-sm" ' Class for button group Set item = opt.Add(opt.GroupOptionName) item.Body = "" item.Visible = False Set opt = DetailOptions opt.UseImageAndText = True opt.DropDownButtonPhrase = Language.Phrase("ButtonDetails") opt.UseDropDownButton = False opt.UseButtonGroup = True opt.ButtonClass = "btn-sm" ' Class for button group Set item = opt.Add(opt.GroupOptionName) item.Body = "" item.Visible = False Set opt = ActionOptions opt.UseImageAndText = True opt.DropDownButtonPhrase = Language.Phrase("ButtonActions") opt.UseDropDownButton = False opt.UseButtonGroup = True opt.ButtonClass = "btn-sm" ' Class for button group Set item = opt.Add(opt.GroupOptionName) item.Body = "" item.Visible = False ' Filter button Set opt = FilterOptions Set item = opt.Add("savecurrentfilter") item.Body = "<a class=""ewSaveFilter"" data-form=""fbed_Homepage_Photoslistsrch"" href=""#"">" & Language.Phrase("SaveCurrentFilter") & "</a>" item.Visible = True Set item = opt.Add("deletefilter") item.Body = "<a class=""ewDeleteFilter"" data-form=""fbed_Homepage_Photoslistsrch"" href=""#"">" & Language.Phrase("DeleteFilter") & "</a>" item.Visible = True opt.UseDropDownButton = True opt.UseButtonGroup = Not FilterOptions.UseDropDownButton opt.DropDownButtonPhrase = Language.Phrase("Filters") ' Add group option item Set item = opt.Add(FilterOptions.GroupOptionName) item.Body = "" item.Visible = False End Sub ' Render other options Sub RenderOtherOptions() Dim opt, item, i, action, caption, icon, Name, cancelurl Set opt = ActionOptions opt.UseImageAndText = True ' Set up list action buttons Dim listact For i = 0 to ListActions.Count - 1 Set listact = ListActions(i) If listact.SelectType = EW_ACTION_MULTIPLE Then action = listact.Action caption = listact.Caption icon = ew_IIf(listact.Icon <> "", "<span class=""" & ew_HtmlEncode(listact.Icon) & """ data-caption=""" & ew_HtmlEncode(caption) & """></span> ", caption) Set item = opt.Add("custom_" & Action) item.Body = "<a class=""ewAction ewListAction"" title=""" & ew_HtmlEncode(caption) & """ data-caption=""" & ew_HtmlEncode(caption) & """ href="""" onclick=""ew_SubmitAction(event,jQuery.extend({f:document.fbed_Homepage_Photoslist}," & listact.ToJson(True) & "));return false;"">" & icon & "</a>" item.Visible = listact.Allow End If Next ' Hide grid edit and other options If TotalRecs <= 0 Then Set opt = AddEditOptions Set item = opt("gridedit") If ew_NotEmpty(item) Then item.Visible = False Set opt = ActionOptions Call opt.HideAllOptions(Array()) End If End Sub ' Process list action Function ProcessListAction() Dim userlist, user, sFilter, UserAction, Processed, ActionCaption userlist = "" user = "" sFilter = bed_Homepage_Photos.GetKeyFilter UserAction = Request.Form("useraction") & "" Processed = False If sFilter <> "" And UserAction <> "" Then ' Check permission first Dim listact ActionCaption = UserAction If ListActions.Exists(UserAction) Then Set listact = ListActions(UserAction) ActionCaption = listact.Caption If Not listact.Allow Then errmsg = Replace(Language.Phrase("CustomActionNotAllowed"), "%s", ActionCaption) If Request.Form("ajax") = UserAction Then ' Ajax Response.Write "<p class=""text-danger"">" & errmsg & "</p>" Else FailureMessage = errmsg End If ProcessListAction = False End If End If Dim cnn, sSql bed_Homepage_Photos.CurrentFilter = sFilter sSql = bed_Homepage_Photos.SQL Set cnn = bed_Homepage_Photos.TableConnection cnn.BeginTrans bed_Homepage_Photos.CurrentAction = UserAction ' Load recordset Dim Rs Set Rs = ew_LoadRecordsetByDbid(sSql, bed_Homepage_Photos.TableDBID) If Not Rs.EOF Then Rs.MoveFirst ' Call row custom action event SelectedCount = Rs.RecordCount SelectedIndex = 0 Do While Not Rs.EOF SelectedIndex = SelectedIndex + 1 Processed = Row_CustomAction(UserAction, Rs) If Not Processed Then Exit Do End If Rs.MoveNext Loop Rs.Close Set Rs = Nothing If Processed Then cnn.CommitTrans ' Commit the changes If SuccessMessage = "" Then SuccessMessage = Replace(Language.Phrase("CustomActionCompleted"), "%s", ActionCaption) ' Set up success message End If Else cnn.RollbackTrans ' Rollback transaction ' Set up error message If SuccessMessage <> "" Or FailureMessage <> "" Then ' Use the message, do nothing ElseIf bed_Homepage_Photos.CancelMessage <> "" Then FailureMessage = bed_Homepage_Photos.CancelMessage bed_Homepage_Photos.CancelMessage = "" Else FailureMessage = Replace(Language.Phrase("CustomActionFailed"), "%s", ActionCaption) End If End If bed_Homepage_Photos.CurrentAction = "" ' Clear action If Request.Form("ajax") = UserAction Then ' Ajax If SuccessMessage <> "" Then Response.Write "<p class=""text-success"">" & SuccessMessage & "</p>" Call ClearSuccessMessage ' Clear message End If If FailureMessage <> "" Then Response.Write "<p class=""text-danger"">" & FailureMessage & "</p>" Call ClearFailureMessage ' Clear message End If ProcessListAction = True End If Else ProcessListAction = False ' Not ajax request End If End Function ' Set up search options Sub SetupSearchOptions() Dim item, SearchToggleClass Set SearchOptions = New cListOptions SearchOptions.TableVar = bed_Homepage_Photos.TableVar ExportOptions.Tag = "div" SearchOptions.TagClassName = "ewSearchOption" ' Search button Set item = SearchOptions.Add("searchtoggle") SearchToggleClass = ew_IIf(SearchWhere <> "", " active", " active") item.Body = "<button type=""button"" class=""btn btn-default ewSearchToggle" & SearchToggleClass & """ title=""" & Language.Phrase("SearchPanel") & """ data-caption=""" & Language.Phrase("SearchPanel") & """ data-toggle=""button"" data-form=""fbed_Homepage_Photoslistsrch"">" & Language.Phrase("SearchLink") & "</button>" item.Visible = True ' Show all button Set item = SearchOptions.Add("showall") item.Body = "<a class=""btn btn-default ewShowAll"" title=""" & Language.Phrase("ShowAll") & """ data-caption=""" & Language.Phrase("ShowAll") & """ href=""" & PageUrl & "cmd=reset"">" & Language.Phrase("ShowAllBtn") & "</a>" item.Visible = (SearchWhere <> DefaultSearchWhere And SearchWhere <> "0=101") ' Button group for search SearchOptions.UseDropDownButton = False SearchOptions.UseImageAndText = True SearchOptions.UseButtonGroup = True SearchOptions.DropDownButtonPhrase = Language.Phrase("ButtonSearch") ' Add group option item Set item = SearchOptions.Add(SearchOptions.GroupOptionName) item.Body = "" item.Visible = False ' Hide search options If bed_Homepage_Photos.Export <> "" Or bed_Homepage_Photos.CurrentAction <> "" Then Call SearchOptions.HideAllOptions(Array()) End If End Sub Sub SetupListOptionsExt() End Sub Sub RenderListOptionsExt() End Sub Dim Pager ' ' Set up Starting Record parameters based on Pager Navigation ' Sub SetupStartRec() Dim PageNo ' Exit if DisplayRecs = 0 If DisplayRecs = 0 Then Exit Sub If IsPageRequest Then ' Validate request ' Check for a START parameter If Request.QueryString(EW_TABLE_START_REC).Count > 0 Then StartRec = Request.QueryString(EW_TABLE_START_REC) bed_Homepage_Photos.StartRecordNumber = StartRec ElseIf Request.QueryString(EW_TABLE_PAGE_NO).Count > 0 Then PageNo = Request.QueryString(EW_TABLE_PAGE_NO) If IsNumeric(PageNo) Then StartRec = (PageNo-1)*DisplayRecs+1 If StartRec <= 0 Then StartRec = 1 ElseIf StartRec >= ((TotalRecs-1)\DisplayRecs)*DisplayRecs+1 Then StartRec = ((TotalRecs-1)\DisplayRecs)*DisplayRecs+1 End If bed_Homepage_Photos.StartRecordNumber = StartRec End If End If End If StartRec = bed_Homepage_Photos.StartRecordNumber ' Check if correct start record counter If Not IsNumeric(StartRec) Or StartRec = "" Then ' Avoid invalid start record counter StartRec = 1 ' Reset start record counter bed_Homepage_Photos.StartRecordNumber = StartRec ElseIf CLng(StartRec) > CLng(TotalRecs) Then ' Avoid starting record > total records StartRec = ((TotalRecs-1)\DisplayRecs)*DisplayRecs+1 ' Point to last page first record bed_Homepage_Photos.StartRecordNumber = StartRec ElseIf (StartRec-1) Mod DisplayRecs <> 0 Then StartRec = ((StartRec-1)\DisplayRecs)*DisplayRecs+1 ' Point to page boundary bed_Homepage_Photos.StartRecordNumber = StartRec End If End Sub ' ' Load basic search values ' Sub LoadBasicSearchValues() bed_Homepage_Photos.BasicSearch.Keyword = Request.QueryString(EW_TABLE_BASIC_SEARCH)&"" If bed_Homepage_Photos.BasicSearch.Keyword <> "" And Command = "" Then Command = "search" bed_Homepage_Photos.BasicSearch.SearchType = Request.QueryString(EW_TABLE_BASIC_SEARCH_TYPE)&"" End Sub ' ' Load recordset ' Function LoadRecordset(offset, rowcnt) Dim sSql, rs, useSelectLimit, dbType, hasOrderBy useSelectLimit = rowcnt > 0 And offset >= 0 dbType = ew_GetConnectionType(bed_Homepage_Photos.TableDBID) If dbType = "MSSQL" Then If ew_IsMsSql2012(bed_Homepage_Photos.TableDBID) Then dbType = "MSSQL2012" ' ASP End If ' Load List page SQL sSql = bed_Homepage_Photos.ListSQL If useSelectLimit Then hasOrderBy = bed_Homepage_Photos.SqlOrderBy <> "" Or bed_Homepage_Photos.SessionOrderBy <> "" sSql = ew_GetSelectLimitSql(sSql, rowcnt, offset, hasOrderBy, dbType) End If ' Load recordset Set rs = ew_LoadRecordsetByDbid(sSql, bed_Homepage_Photos.TableDBID) If Not useSelectLimit Or dbType <> "MSSQL2012" And dbType <> "MYSQL" And dbType <> "POSTGRESQL" Then ' ASP If offset > 0 And Not rs.EOF Then rs.Move offset End If ' Call Recordset Selected event Call bed_Homepage_Photos.Recordset_Selected(rs) Set LoadRecordset = rs End Function ' ' Load row based on key values ' Function LoadRow() Dim RsRow, sSql, sFilter sFilter = bed_Homepage_Photos.KeyFilter ' Call Row Selecting event Call bed_Homepage_Photos.Row_Selecting(sFilter) ' Load SQL based on filter bed_Homepage_Photos.CurrentFilter = sFilter sSql = bed_Homepage_Photos.SQL Call ew_SetDebugMsg("LoadRow: " & sSql) ' Show SQL for debugging Set RsRow = ew_LoadRowByDbid(sSql, bed_Homepage_Photos.TableDBID) If RsRow.EOF Then LoadRow = False Else LoadRow = True RsRow.MoveFirst Call LoadRowValues(RsRow) ' Load row values End If RsRow.Close Set RsRow = Nothing End Function ' ' Load row values from recordset ' Sub LoadRowValues(RsRow) Dim sDetailFilter If Not EW_DEBUG_ENABLED Then On Error Resume Next If IsNull(RsRow) Then Set RsRow = NewRow() End If ' Call Row Selected event Call bed_Homepage_Photos.Row_Selected(RsRow) If ew_Empty(RsRow) Then Exit Sub If RsRow.EOF Then Exit Sub bed_Homepage_Photos.ID.DbValue = RsRow("ID") bed_Homepage_Photos.Photos.Upload.DbValue = RsRow("Photos") bed_Homepage_Photos.Photos.DbValue = bed_Homepage_Photos.Photos.Upload.DbValue bed_Homepage_Photos.zDate.DbValue = RsRow("Date") bed_Homepage_Photos.Enable.DbValue = RsRow("Enable") bed_Homepage_Photos.Title.DbValue = RsRow("Title") bed_Homepage_Photos.Sequence.DbValue = RsRow("Sequence") End Sub ' Return a row with default values Function NewRow Dim cnn, rs, sSql, sFilter ' Clear any previous errors Err.Clear Set cnn = bed_Homepage_Photos.TableConnection sFilter = bed_Homepage_Photos.CurrentFilter bed_Homepage_Photos.CurrentFilter = "(0 = 1)" sSql = bed_Homepage_Photos.SQL bed_Homepage_Photos.CurrentFilter = sFilter Set rs = Server.CreateObject("ADODB.Recordset") rs.CursorLocation = 3 ' adUseClient Call ew_SetDebugMsg("NewRow: " & sSql) ' Show SQL for debugging rs.Open sSql, cnn, 3, 4 ' adOpenStatic, adLockBatchOptimistic ' Disconnect the Recordset Set rs.ActiveConnection = Nothing ' Add new record rs.AddNew rs("Photos") = Null rs("Date") = Null rs("Enable") = Null rs("Title") = Null rs("Sequence") = Null ' Return the recordset If Err.Number = 0 Then Set NewRow = rs Else Set NewRow = Nothing End If End Function ' Load DbValue from recordset Sub LoadDbValues(Rs) If Not EW_DEBUG_ENABLED Then On Error Resume Next If ew_Empty(Rs) Then Exit Sub If Rs.EOF Then Exit Sub bed_Homepage_Photos.ID.m_DbValue = Rs("ID") bed_Homepage_Photos.Photos.Upload.DbValue = Rs("Photos") bed_Homepage_Photos.zDate.m_DbValue = Rs("Date") bed_Homepage_Photos.Enable.m_DbValue = Rs("Enable") bed_Homepage_Photos.Title.m_DbValue = Rs("Title") bed_Homepage_Photos.Sequence.m_DbValue = Rs("Sequence") End Sub ' Load old record Function LoadOldRecord() ' Load key values from Session Dim bValidKey bValidKey = True If bed_Homepage_Photos.GetKey("ID")&"" <> "" Then bed_Homepage_Photos.ID.CurrentValue = bed_Homepage_Photos.GetKey("ID") ' ID Else bValidKey = False End If ' Load old record OldRecordset = Null If bValidKey Then bed_Homepage_Photos.CurrentFilter = bed_Homepage_Photos.KeyFilter Dim sSql sSql = bed_Homepage_Photos.SQL Set OldRecordset = ew_LoadRecordsetByDbid(sSql, bed_Homepage_Photos.TableDBID) End If Call LoadRowValues(OldRecordset) ' Load row values LoadOldRecord = bValidKey End Function ' ' Render row values based on field settings ' Sub RenderRow() ' Initialize URLs ViewUrl = bed_Homepage_Photos.ViewUrl("") EditUrl = bed_Homepage_Photos.EditUrl("") InlineEditUrl = bed_Homepage_Photos.InlineEditUrl CopyUrl = bed_Homepage_Photos.CopyUrl("") InlineCopyUrl = bed_Homepage_Photos.InlineCopyUrl DeleteUrl = bed_Homepage_Photos.DeleteUrl ' Call Row Rendering event Call bed_Homepage_Photos.Row_Rendering ' ' Common render codes for all row types ' ' ID ' Photos ' Date ' Enable ' Title ' Sequence ' ' View Row ' If bed_Homepage_Photos.RowType = EW_ROWTYPE_VIEW Then ' View row ' ID bed_Homepage_Photos.ID.ViewValue = bed_Homepage_Photos.ID.CurrentValue bed_Homepage_Photos.ID.ViewCustomAttributes = "" ' Photos bed_Homepage_Photos.Photos.UploadPath = "../uploads/homepage/bed" If Not ew_Empty(bed_Homepage_Photos.Photos.Upload.DbValue) Then bed_Homepage_Photos.Photos.ViewValue = bed_Homepage_Photos.Photos.Upload.DbValue bed_Homepage_Photos.Photos.ViewValue = bed_Homepage_Photos.Photos.Upload.DbValue Else bed_Homepage_Photos.Photos.ViewValue = "" End If bed_Homepage_Photos.Photos.ViewCustomAttributes = "" ' Date bed_Homepage_Photos.zDate.ViewValue = bed_Homepage_Photos.zDate.CurrentValue bed_Homepage_Photos.zDate.ViewValue = ew_FormatDateTime(bed_Homepage_Photos.zDate.ViewValue, 0) bed_Homepage_Photos.zDate.ViewCustomAttributes = "" ' Enable If Not IsNull(bed_Homepage_Photos.Enable.CurrentValue) Then bed_Homepage_Photos.Enable.ViewValue = bed_Homepage_Photos.Enable.OptionCaption(bed_Homepage_Photos.Enable.CurrentValue) Else bed_Homepage_Photos.Enable.ViewValue = Null End If bed_Homepage_Photos.Enable.ViewCustomAttributes = "" ' Title bed_Homepage_Photos.Title.ViewValue = bed_Homepage_Photos.Title.CurrentValue bed_Homepage_Photos.Title.ViewCustomAttributes = "" ' Sequence bed_Homepage_Photos.Sequence.ViewValue = bed_Homepage_Photos.Sequence.CurrentValue bed_Homepage_Photos.Sequence.ViewCustomAttributes = "" ' View refer script ' ID bed_Homepage_Photos.ID.LinkCustomAttributes = "" bed_Homepage_Photos.ID.HrefValue = "" bed_Homepage_Photos.ID.TooltipValue = "" ' Photos bed_Homepage_Photos.Photos.LinkCustomAttributes = "" bed_Homepage_Photos.Photos.HrefValue = "" bed_Homepage_Photos.Photos.HrefValue2 = bed_Homepage_Photos.Photos.UploadPath & bed_Homepage_Photos.Photos.Upload.DbValue bed_Homepage_Photos.Photos.TooltipValue = "" ' Enable bed_Homepage_Photos.Enable.LinkCustomAttributes = "" bed_Homepage_Photos.Enable.HrefValue = "" bed_Homepage_Photos.Enable.TooltipValue = "" ' Sequence bed_Homepage_Photos.Sequence.LinkCustomAttributes = "" bed_Homepage_Photos.Sequence.HrefValue = "" bed_Homepage_Photos.Sequence.TooltipValue = "" End If ' Call Row Rendered event If bed_Homepage_Photos.RowType <> EW_ROWTYPE_AGGREGATEINIT Then Call bed_Homepage_Photos.Row_Rendered End If End Sub ' Set up Breadcrumb Sub SetupBreadcrumb() Dim PageId, url Set Breadcrumb = New cBreadcrumb url = Mid(ew_CurrentUrl(), InStrRev(ew_CurrentUrl(), "/") + 1) url = ew_RegExReplace("\?cmd=reset(all){0,1}$", url, "") ' Remove cmd=reset / cmd=resetall Call Breadcrumb.Add("list", bed_Homepage_Photos.TableVar, url, "", bed_Homepage_Photos.TableVar, True) End Sub ' Setup lookup filters of a field Sub SetupLookupFilters(fld, pageId) pageId = ew_IIf(ew_EmptyStr(pageId), bed_Homepage_Photos_list.PageID, pageId) Select Case fld.FldVar End Select End Sub ' Setup AutoSuggest filters of a field Sub SetupAutoSuggestFilters(fld, pageId) pageId = ew_IIF(ew_EmptyStr(pageId), bed_Homepage_Photos_list.PageID, pageId) Select Case fld.FldVar End Select End Sub Sub ExportPdf(html) Response.Write html End Sub ' Page Load event Sub Page_Load() 'Response.Write "Page Load" End Sub ' Page Unload event Sub Page_Unload() 'Response.Write "Page Unload" End Sub ' Page Redirecting event Sub Page_Redirecting(url) 'url = newurl End Sub ' Message Showing event ' typ = ""|"success"|"failure"|"warning" Sub Message_Showing(msg, typ) ' Example: 'If typ = "success" Then ' msg = "your success message" 'ElseIf typ = "failure" Then ' msg = "your failure message" 'ElseIf typ = "warning" Then ' msg = "your warning message" 'Else ' msg = "your message" 'End If End Sub ' Page Render event Sub Page_Render() 'Response.Write "Page Render" End Sub ' Page Data Rendering event Sub Page_DataRendering(header) ' Example: 'header = "your header" End Sub ' Page Data Rendered event Sub Page_DataRendered(footer) ' Example: 'footer = "your footer" End Sub ' Form Custom Validate event Function Form_CustomValidate(CustomError) 'Return error message in CustomError Form_CustomValidate = True End Function ' ListOptions Load event Sub ListOptions_Load() 'Example: ' Dim opt ' Set opt = ListOptions.Add("new") ' opt.OnLeft = True ' Link on left ' Call opt.MoveTo(0) ' Move to first column End Sub ' ListOptions Rendering event Sub ListOptions_Rendering() 'Example: ' xxx.DetailAdd = (...condition...) ' Set to True or False conditionally ' xxx.DetailEdit = (...condition...) ' Set to True or False conditionally ' xxx.DetailView = (...condition...) ' Set to True or False conditionally End Sub ' ListOptions Rendered event Sub ListOptions_Rendered() 'Example: 'ListOptions.GetItem("new").Body = "xxx" End Sub ' Row Custom Action event Function Row_CustomAction(action, rs) ' Return False to abort Row_CustomAction = True End Function ' Page Exporting event ' ExportDoc = export document object Function Page_Exporting() 'ExportDoc.Text = "my header" ' Export header 'Page_Exporting = False ' Return False to skip default export and use Row_Export event Page_Exporting = True ' Return True to use default export and skip Row_Export event End Function ' Row Export event ' ExportDoc = export document object Sub Row_Export(rs) 'ExportDoc.Text = ExportDoc.Text & "my content" ' Build HTML with field value: rs("MyField") or MyField.ViewValue End Sub ' Page Exported event ' ExportDoc = export document object Sub Page_Exported() 'ExportDoc.Text = ExportDoc.Text & "my footer" ' Export footer 'Response.Write ExportDoc.Text End Sub End Class %>