

01442 212000


<%= content.pagetext.ViewValue %>
404 - You seem to have come to a link that is non-existant
Get back onto the website by clicking on one of the links of the left.

% Response.Buffer = EW_RESPONSE_BUFFER %> <% Session.Timeout = 20 %> <% Response.Expires = 0 Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "pragma", "no-cache" Response.AddHeader "cache-control", "private, no-cache, no-store, must-revalidate" %> <% Server.ScriptTimeOut = 240 %> <% ' Define page object Dim content_view Set content_view = New ccontent_view Set Page = content_view ' Page init processing Call content_view.Page_Init() ' Page main processing Call content_view.Page_Main() %>




Get back onto the website by clicking on one of the links of the left.

" & m_DebugMsg & "
" Else DebugMsg = "" End If End Property Public Property Let DebugMsg(v) If m_DebugMsg <> "" Then ' Append m_DebugMsg = m_DebugMsg & "" & sMessage & "
" Session(EW_SESSION_MESSAGE) = "" ' Clear message in Session End Sub ' ----------------------- ' Validate Page request ' Public Function IsPageRequest() If content.UseTokenInUrl Then IsPageRequest = False If Not (ObjForm Is Nothing) Then IsPageRequest = (content.TableVar = ObjForm.GetValue("t")) End If If Request.QueryString("t").Count > 0 Then IsPageRequest = (content.TableVar = Request.QueryString("t")) End If Else IsPageRequest = True End If End Function ' ----------------------------------------------------------------- ' Class initialize ' - init objects ' - open ADO connection ' Private Sub Class_Initialize() StartTimer = Timer ' Init start time ' Initialize language object Set Language = New cLanguage ' Initialize table object Set content = New ccontent ' Initialize urls ' Initialize form object Set ObjForm = Nothing ' Intialize page id (for backward compatibility) EW_PAGE_ID = "view" ' Initialize table name (for backward compatibility) EW_TABLE_NAME = "content" ' Open connection to the database Call ew_Connect() End Sub ' ----------------------------------------------------------------- ' Subroutine Page_Init ' - called before page main ' - check Security ' - set up response header ' - call page load events ' Sub Page_Init() ' Global page loading event (in userfn7.asp) Call Page_Loading() ' Page load event, used in current page Call Page_Load() End Sub ' ----------------------------------------------------------------- ' Class terminate ' - clean up page object ' Private Sub Class_Terminate() Call Page_Terminate("") End Sub ' ----------------------------------------------------------------- ' Subroutine Page_Terminate ' - called when exit page ' - clean up ADO connection and objects ' - if url specified, redirect to url ' Sub Page_Terminate(url) ' Page unload event, used in current page Call Page_Unload() ' Global page unloaded event (in userfn60.asp) Call Page_Unloaded() If Not (Conn Is Nothing) Then Conn.Close ' Close Connection Set Conn = Nothing Set Security = Nothing Set content = Nothing Set ObjForm = Nothing ' Go to url if specified Dim sRedirectUrl sReDirectUrl = url Call Page_Redirecting(sReDirectUrl) If sReDirectUrl <> "" Then If Response.Buffer Then Response.Clear Response.Redirect sReDirectUrl End If End Sub ' ' Subroutine Page_Terminate (End) ' ---------------------------------------- Dim lDisplayRecs ' Number of display records Dim lStartRec, lStopRec, lTotalRecs, lRecRange Dim lRecCnt Dim arRecKey ' ----------------------------------------------------------------- ' Page main processing ' Sub Page_Main() Dim sReturnUrl sReturnUrl = "" Dim bMatchRecord bMatchRecord = False If IsPageRequest Then ' Validate request content.ID.QueryStringValue = 1 'Change Me ' Get action content.CurrentAction = "I" ' Display form Select Case content.CurrentAction Case "I" ' Get a record to display If Not LoadRow() Then ' Load record based on key Message = Language.Phrase("NoRecord") ' Set no record message sReturnUrl = "contentlist.asp" ' No matching record, return to list End If End Select Else sReturnUrl = "contentlist.asp" ' Not page request, return to list End If If sReturnUrl <> "" Then Call Page_Terminate(sReturnUrl) ' Render row content.RowType = EW_ROWTYPE_VIEW Call RenderRow() End Sub Dim Pager ' ----------------------------------------------------------------- ' Set up Starting Record parameters based on Pager Navigation ' Sub SetUpStartRec() Dim nPageNo ' Exit if lDisplayRecs = 0 If lDisplayRecs = 0 Then Exit Sub If IsPageRequest Then ' Validate request ' Check for a START parameter If Request.QueryString(EW_TABLE_START_REC).Count > 0 Then lStartRec = Request.QueryString(EW_TABLE_START_REC) content.StartRecordNumber = lStartRec ElseIf Request.QueryString(EW_TABLE_PAGE_NO).Count > 0 Then nPageNo = Request.QueryString(EW_TABLE_PAGE_NO) If IsNumeric(nPageNo) Then lStartRec = (nPageNo-1)*lDisplayRecs+1 If lStartRec <= 0 Then lStartRec = 1 ElseIf lStartRec >= ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 Then lStartRec = ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 End If content.StartRecordNumber = lStartRec End If End If End If lStartRec = content.StartRecordNumber ' Check if correct start record counter If Not IsNumeric(lStartRec) Or lStartRec = "" Then ' Avoid invalid start record counter lStartRec = 1 ' Reset start record counter content.StartRecordNumber = lStartRec ElseIf CLng(lStartRec) > CLng(lTotalRecs) Then ' Avoid starting record > total records lStartRec = ((lTotalRecs-1)\lDisplayRecs)*lDisplayRecs+1 ' Point to last page first record content.StartRecordNumber = lStartRec ElseIf (lStartRec-1) Mod lDisplayRecs <> 0 Then lStartRec = ((lStartRec-1)\lDisplayRecs)*lDisplayRecs+1 ' Point to page boundary content.StartRecordNumber = lStartRec End If End Sub ' ----------------------------------------------------------------- ' Load row based on key values ' Function LoadRow() Dim RsRow, sSql, sFilter sFilter = content.KeyFilter ' Call Row Selecting event Call content.Row_Selecting(sFilter) ' Load sql based on filter content.CurrentFilter = sFilter sSql = content.SQL If EW_DEBUG_ENABLED Then DebugMsg = "LoadRow: " & sSql ' Show SQL for debugging Set RsRow = ew_LoadRow(sSql) If RsRow.Eof Then LoadRow = False Else LoadRow = True RsRow.MoveFirst Call LoadRowValues(RsRow) ' Load row values ' Call Row Selected event Call content.Row_Selected(RsRow) End If RsRow.Close Set RsRow = Nothing End Function ' ----------------------------------------------------------------- ' Load row values from recordset ' Sub LoadRowValues(RsRow) Dim sDetailFilter content.ID.DbValue = RsRow("ID") dim memofield memofield = RsRow("pagetext") memofield=Replace(memofield,vbCrLf,"") content.pagetext.DbValue=memofield content.pagename.DbValue = RsRow("pagename") content.image1.Upload.DbValue = RsRow("image1") content.image2.Upload.DbValue = RsRow("image2") content.image3.Upload.DbValue = RsRow("image3") content.image4.Upload.DbValue = RsRow("image4") content.image5.Upload.DbValue = RsRow("image5") content.Keywords.DbValue = RsRow("Keywords") content.Image1Alt.DbValue = RsRow("Image1Alt") content.Image2Alt.DbValue = RsRow("Image2Alt") content.Image3Alt.DbValue = RsRow("Image3Alt") content.Image4Alt.DbValue = RsRow("Image4Alt") content.Image5Alt.DbValue = RsRow("Image5Alt") content.Description.DbValue = RsRow("Description") End Sub ' ----------------------------------------------------------------- ' Render row values based on field settings ' Sub RenderRow() ' Initialize urls ExportPrintUrl = PageUrl & "export=print&" & "ID=" & Server.URLEncode(content.ID.CurrentValue) ExportHtmlUrl = PageUrl & "export=html&" & "ID=" & Server.URLEncode(content.ID.CurrentValue) ExportExcelUrl = PageUrl & "export=excel&" & "ID=" & Server.URLEncode(content.ID.CurrentValue) ExportWordUrl = PageUrl & "export=word&" & "ID=" & Server.URLEncode(content.ID.CurrentValue) ExportXmlUrl = PageUrl & "export=xml&" & "ID=" & Server.URLEncode(content.ID.CurrentValue) ExportCsvUrl = PageUrl & "export=csv&" & "ID=" & Server.URLEncode(content.ID.CurrentValue) AddUrl = content.AddUrl EditUrl = content.EditUrl CopyUrl = content.CopyUrl DeleteUrl = content.DeleteUrl ListUrl = content.ListUrl ' Call Row Rendering event Call content.Row_Rendering() ' --------------------------------------- ' Common render codes for all row types ' --------------------------------------- ' ID content.ID.CellCssStyle = "" content.ID.CellCssClass = "" content.ID.CellAttrs.RemoveAll: content.ID.ViewAttrs.RemoveAll: content.ID.EditAttrs.RemoveAll ' pagetext content.pagetext.CellCssStyle = "" content.pagetext.CellCssClass = "" content.pagetext.CellAttrs.RemoveAll: content.pagetext.ViewAttrs.RemoveAll: content.pagetext.EditAttrs.RemoveAll ' pagename content.pagename.CellCssStyle = "" content.pagename.CellCssClass = "" content.pagename.CellAttrs.RemoveAll: content.pagename.ViewAttrs.RemoveAll: content.pagename.EditAttrs.RemoveAll ' image1 content.image1.CellCssStyle = "" content.image1.CellCssClass = "" content.image1.CellAttrs.RemoveAll: content.image1.ViewAttrs.RemoveAll: content.image1.EditAttrs.RemoveAll ' image2 content.image2.CellCssStyle = "" content.image2.CellCssClass = "" content.image2.CellAttrs.RemoveAll: content.image2.ViewAttrs.RemoveAll: content.image2.EditAttrs.RemoveAll ' image3 content.image3.CellCssStyle = "" content.image3.CellCssClass = "" content.image3.CellAttrs.RemoveAll: content.image3.ViewAttrs.RemoveAll: content.image3.EditAttrs.RemoveAll ' image4 content.image4.CellCssStyle = "" content.image4.CellCssClass = "" content.image4.CellAttrs.RemoveAll: content.image4.ViewAttrs.RemoveAll: content.image4.EditAttrs.RemoveAll ' image5 content.image5.CellCssStyle = "" content.image5.CellCssClass = "" content.image5.CellAttrs.RemoveAll: content.image5.ViewAttrs.RemoveAll: content.image5.EditAttrs.RemoveAll ' Keywords content.Keywords.CellCssStyle = "" content.Keywords.CellCssClass = "" content.Keywords.CellAttrs.RemoveAll: content.Keywords.ViewAttrs.RemoveAll: content.Keywords.EditAttrs.RemoveAll ' Image1Alt content.Image1Alt.CellCssStyle = "" content.Image1Alt.CellCssClass = "" content.Image1Alt.CellAttrs.RemoveAll: content.Image1Alt.ViewAttrs.RemoveAll: content.Image1Alt.EditAttrs.RemoveAll ' Image2Alt content.Image2Alt.CellCssStyle = "" content.Image2Alt.CellCssClass = "" content.Image2Alt.CellAttrs.RemoveAll: content.Image2Alt.ViewAttrs.RemoveAll: content.Image2Alt.EditAttrs.RemoveAll ' Image3Alt content.Image3Alt.CellCssStyle = "" content.Image3Alt.CellCssClass = "" content.Image3Alt.CellAttrs.RemoveAll: content.Image3Alt.ViewAttrs.RemoveAll: content.Image3Alt.EditAttrs.RemoveAll ' Image4Alt content.Image4Alt.CellCssStyle = "" content.Image4Alt.CellCssClass = "" content.Image4Alt.CellAttrs.RemoveAll: content.Image4Alt.ViewAttrs.RemoveAll: content.Image4Alt.EditAttrs.RemoveAll ' Image5Alt content.Image5Alt.CellCssStyle = "" content.Image5Alt.CellCssClass = "" content.Image5Alt.CellAttrs.RemoveAll: content.Image5Alt.ViewAttrs.RemoveAll: content.Image5Alt.EditAttrs.RemoveAll ' Description content.Description.CellCssStyle = "" content.Description.CellCssClass = "" content.Description.CellAttrs.RemoveAll: content.Description.ViewAttrs.RemoveAll: content.Description.EditAttrs.RemoveAll ' ----------- ' View Row ' ----------- If content.RowType = EW_ROWTYPE_VIEW Then ' View row ' ID content.ID.ViewValue = content.ID.CurrentValue content.ID.CssStyle = "" content.ID.CssClass = "" content.ID.ViewCustomAttributes = "" ' pagetext content.pagetext.ViewValue = content.pagetext.CurrentValue If Not IsNull(content.pagetext.ViewValue) Then content.pagetext.ViewValue = Replace(content.pagetext.ViewValue, vbLf, "