<% @ Language=VBScript codepage=1255 %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Rich Text Editor '** '** Copyright 2001-2003 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to Web Wiz Guide and powered by logo's must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** You should have received a copy of the License along with this program; '** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwizguide.info/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.info '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting Response.Buffer = True 'Make sure this page is not cached Response.Expires = -1 Response.ExpiresAbsolute = Now() - 2 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "No-Store" 'Dimension variables Dim strMode 'Holds the mode of the page Dim intForumID 'Holds the forum ID number Dim lngTopicID 'Holds the Topic ID number Dim strTopicSubject 'Holds the title of the topic Dim intTopicPriority 'Holds the priority of the topic Dim lngMessageID 'Holds the message ID to be edited Dim lngPostUserID 'Holds the user ID of the user to post the message Dim blnForumLocked 'Set to true if the forum is locked Dim blnEmailNotify 'Set to true if the users want to be notified by e-mail of a post Dim strPostPage 'Holds the page the form is posted to Dim intRecordPositionPageNum 'Holds the recorset page number to show the Threads for Dim strMessage 'Holds the post message Dim strForumName 'Holds the name of the forum Dim intIndexPosition 'Holds the idex poistion in the emiticon array Dim intNumberOfOuterLoops 'Holds the outer loop number for rows Dim intLoop 'Holds the loop index position Dim intInnerLoop 'Holds the inner loop number for columns 'If the user is user is using a banned IP redirect to an error page If bannedIP() Then 'Clean up Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'Redirect Response.Redirect("insufficient_permission.asp?M=IP") End If 'Read in the message ID number to edit lngMessageID = CLng(Request.QueryString("PID")) intRecordPositionPageNum = CInt(Request.QueryString("TPN")) strMode = "edit" 'Get the message from the database 'Initalise the strSQL variable with an SQL statement to query the database get the message details strSQL = "SELECT " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Forum_ID, " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Priority, " & strDbTable & "Topic.Start_date, " & strDbTable & "Topic.Locked, " & strDbTable & "Thread.Author_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date " strSQL = strSQL & "FROM " & strDbTable & "Topic, " & strDbTable & "Thread " strSQL = strSQL & "WHERE " & strDbTable & "Topic.Topic_ID = " & strDbTable & "Thread.Topic_ID AND " & strDbTable & "Thread.Thread_ID=" & lngMessageID & ";" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the details from the recordset lngTopicID = CLng(rsCommon("Topic_ID")) intForumID = CInt(rsCommon("Forum_ID")) strMessage = rsCommon("Message") lngPostUserID = CLng(rsCommon("Author_ID")) strTopicSubject = rsCommon("Subject") intTopicPriority = CInt(rsCommon("Priority")) 'If the forums not locked check that the topics not locked either If blnForumLocked = False Then blnForumLocked = CBool(rsCommon("Locked")) 'Convert message back to forum codes and text strMessage = EditPostConvertion(strMessage) 'If the start topic date and the message date are the same then the user can edit the topic title If rsCommon("Start_date") = rsCommon("Message_date") Then strMode = "editTopic" 'Clean up rsCommon.Close 'Read in the forum name and forum permissions from the database 'Initalise the strSQL variable with an SQL statement to query the database If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "ForumsAllWhereForumIs @intForumID = " & intForumID Else strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Forum WHERE Forum_ID = " & intForumID & ";" End If 'Query the database rsCommon.Open strSQL, adoCon 'Read in wether the forum is locked or not If NOT rsCommon.EOF Then blnForumLocked = CBool(rsCommon("Locked")) 'Read in forum details from the database strForumName = rsCommon("Forum_name") 'Check the user is welcome in this forum Call forumPermisisons(intForumID, intGroupID, CInt(rsCommon("Read")), CInt(rsCommon("Post")), CInt(rsCommon("Reply_posts")), CInt(rsCommon("Edit_posts")), CInt(rsCommon("Delete_posts")), CInt(rsCommon("Priority_posts")), CInt(rsCommon("Poll_create")), CInt(rsCommon("Vote")), CInt(rsCommon("Attachments")), CInt(rsCommon("Image_upload"))) End If 'If the forum level for the user on this forum is read only set the forum to be locked If (blnRead = False AND blnModerator = False AND blnAdmin = False) Then blnForumLocked = True 'Reset Server Objects rsCommon.Close %> עריכת הודעה
<% = strTxtEditPost %>
 <% = strMainForumName %><% = strNavSpacer %><% Response.Write ("" & strForumName & "" & strNavSpacer) %><% = strTxtEditPost %>

<% 'Clean up Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing 'If the Post is by the logged in user or the adminstrator/moderator then display a form to edit the post If (lngLoggedInUserID = lngPostUserID OR blnAdmin OR blnModerator) AND (blnActiveMember) AND (blnForumLocked = False OR blnAdmin) AND (blnEdit OR blnAdmin) Then 'See if the users browser is RTE enabled If RTEenabled() <> "false" AND blnRTEEditor = True AND blnWYSIWYGEditor = True Then 'Open the message form for RTE enabled browsers %><% Else 'Open up the mesage form for non RTE enabled browsers %><% End If Response.Write(vbCrLf & "
") 'Else if the forum is locked display a message telling the user so ElseIf blnForumLocked = True Then Response.Write vbCrLf & "


" & strTxtForumLockedByAdmim & "




" 'Else the user is not the person who posted the message so display an error message Else Response.Write vbCrLf & "


" & strTxtNoPermissionToEditPost & "

" Response.Write vbCrLf & "" & strTxtReturnForumTopic & "



" End If Response.Write(vbCrLf & "
") '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then If blnTextLinks = True Then Response.Write("Hebrew Translate By Web Wiz Hebrew Forums
Hebrew Version " & strHebrewVersion & "

") Response.Write("Powered by Web Wiz Forums version " & strVersion & "") Else Response.Write("Hebrew Translate By Web Wiz Hebrew Forums
Hebrew Version " & strHebrewVersion & "

") Response.Write("") End If Response.Write("
Copyright ©2001-2003 Web Wiz Guide") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Display the process time If blnShowProcessTime Then Response.Write "

" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 4) & " " & strTxtSeconds & "
" %>