mhonarc-users

adding asp comments at top of MH files

2000-02-15 03:03:44
Hello all,

IMHO, the problem could be resolved as this : it works with my MH 2.4.4

add the asp code before the line where "commentize("MHonArc v$VERSION")" appears in mhamain.pl, mhthread.pl and mhindex.pl :

Example :

original :

print $msghandle


"<!-- ", commentize("MHonArc v$VERSION"), " -->\n",(...)

Modified :

print $msghandle
"<\% IF not session(\"login\")=\"vrai\" then \n",
"response.redirect \"default.asp\" \n",
"END IF \%>\n",
"<!-- ", commentize("MHonArc v$VERSION"), " -->\n", (...)


>>>> (MH archive 99-03 at http://www.xray.mpe.mpg.de/mailing-lists/mhonarc/1999-03/msg00053.html
>>>>
I am trying to remove the comments from the beginning of the converted
messages (before the <HTML> tag). I am using the converted messages on an NT
server and saving them as Active Server Pages . I have used a resource file
to add a bit of code to the top of each converted message that adds a
security check to make sure the user is logged into the website.
Unfortunately these comments conflict with my code and cause the page to
error. Is there a resource that will allow me to do this, or is this coded
into the Perl scripts? Thanks in advance!

Eric
<<<<
>>>>
The problem actually is that the comments are before a login check that is
also before the <HTML> tag, and I am saving the pages as Active Server
Pages. NT Server or FrontPage extensions don't like those comments with the
following conversion:

<!-- MHonArc v2.3.3 -->
<!--X-Subject: Fw: Test post with new Sendmail -->
<!--X-From: "Me" <mailer(_at_)mymailserver(_dot_)com> -->
<!--X-Date: Tue, 30 Mar 1999 17:47:33 &#45;0600 -->
<!--X-Message-Id: 002c01be7b08$00697a60$b66a1e81(_at_)user(_dot_)mymailserver(_dot_)com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<%@ LANGUAGE=VBSCRIPT %>
<%
If Not Session("LoginOK") Then Response.redirect "/default.htm"
%>
<HTML>

However this is OK:

<%@ LANGUAGE=VBSCRIPT %>
<%
If Not Session("LoginOK") Then Response.redirect "/default.htm"
%>
<!-- MHonArc v2.3.3 -->
<!--X-Subject: Fw: Test post with new Sendmail -->
<!--X-From: "Me" <sender(_at_)mymailserver(_dot_)com> -->
<!--X-Date: Tue, 30 Mar 1999 17:47:33 &#45;0600 -->
<!--X-Message-Id: 002c01be7b08$00697a60$b66a1e81(_at_)sender(_dot_)mymailserver(_dot_)com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<HTML>

If the comments are after my login check, everything is fine, but if the
they are before, the server kicks out an error. In any case, I found the
code in mhamain.pl where the comments are being added and took them out for
now. I would like to make it so I can place my login check first, and still
have the comments in place in case I have to recover the DB, but I don't
know if having the code before the comments will break the recovery
function. Other than that, MhonArc has been a great program and is extreemly
useful. Thanks!

<<<<


<Prev in Thread] Current Thread [Next in Thread>