File:  [LON-CAPA] / capa / capa51 / Discuss / capadiscuss_html
Revision 1.4: download - view: text, annotated - select for diffs
Sun Apr 5 09:57:29 2009 UTC (15 years, 7 months ago) by hauer
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_99_1, version_2_8_99_0, version_2_12_X, version_2_11_X, version_2_11_5_msu, version_2_11_5, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, bz6209-base, bz6209, HEAD, GCI_3, GCI_2, BZ4492-merge, BZ4492-feature_horizontal_radioresponse, BZ4492-feature_Support_horizontal_radioresponse, BZ4492-Support_horizontal_radioresponse
Correction of my last commit.

## CapaDiscuss HTML Subroutines
#  Copyright (C) 1992-2000 Michigan State University
#
#  The CAPA system is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License as
#  published by the Free Software Foundation; either version 2 of the
#  License, or (at your option) any later version.
#
#  The CAPA system is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  General Public License for more details.
#
#  You should have received a copy of the GNU General Public
#  License along with the CAPA system; see the file COPYING.  If not,
#  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
#  Boston, MA 02111-1307, USA.
#
#  As a special exception, you have permission to link this program
#  with the TtH/TtM library and distribute executables, as long as you
#  follow the requirements of the GNU GPL in regard to all of the
#  software in the executable aside from TtH/TtM.


sub NewSetHTML {
print <<NewSetHTML2;
<html>
<head>
  <title>
  </title>
</head>
<body bgcolor="#FFFFFF">
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
<tr bgcolor="#FFFFFF">
  <td>Class: <b>$class</b></td>
</tr></table>
</td></tr></table>

<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
  <td>
  Please enter your CapaID for <b>set $setid</b>
  </td>
  </tr>
  <tr>
  <td bgcolor="#DEDFDF">
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewset">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$setid">
  <input type=hidden name="SNUM" value="$snum">
  CapaID: <input type=password name="CAPAID" size=4 maxsize=4>
  &nbsp;&nbsp;<input type=submit value="Submit">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>
</html>
NewSetHTML2
}

sub ViewSetTitleHTML {
print <<ViewSetTitleHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=2 cellpadding=4>
  <tr valign=top>
  <td bgcolor="#FFFFFF" align=center>Class:<br><b> $class </b></td>
  <td bgcolor="#FFFFFF">
    <table width="100%" border=0 cellspacing=0 cellpadding=0><tr>
    <td>
    <form method=post action="$cgidirurl/$discussurl">
    <input type=submit value="Go">
    <b> to Set </b>
    <font size=+1>$pdset</font>
    <input type=hidden name="ACTION" value="newset">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=submit value="Go">
    </form>
    </td></tr></table>
  </td>
  </tr>
</table>
</td></tr></table>
<br>
<center>
<table><tr>
  <td>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewset">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=submit value="Refresh">
  </form>
  </td>
  <td>
  <form method=post action="$capasbin">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SNUM"  value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="M" value="2">
  <input type=submit value="Try current set">
  </form>
  </td>
  <td>
  $adminbutton
  </td>
  $infostring
</tr></table>
</center>
ViewSetTitleHTML2
}

sub ViewSetTopSmallHTML {
print <<ViewSetTopSmallHTML2;
<center>
<table><tr><td bgcolor="#000000">
<table border=0 cellspacing=1 cellpadding=4>
<tr bgcolor="#007F7F">
  <td>
  <font color="#FFFFFF">
  <b>Problem</b>
  </td>
  <td align=center>
  <font color="#FFFFFF">
  <b>Posts</b>
  </td>
  <td>
  <font color="#FFFFFF">
  <center>
  <b>Last Post</b>
  </td>
</tr>
ViewSetTopSmallHTML2
}

sub ViewSetTopBigHTML {
print <<ViewSetTopBigHTML2;
<center>
<table border=0 cellspacing=12 cellpadding=0><tr>
  <td valign=top>
ViewSetTopBigHTML2
&ViewSetTopSmallHTML;
}

sub ViewSetGutsHTML {
print <<ViewSetGutsHTML2;
<tr>
  <td bgcolor="#FFFFFF" align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=hidden name="FILE" value="$file">
  <input type=submit value=" $probnum ">
  </form>
  </td>
  <td bgcolor="#FFFFFF" align=center>
  $posts
  </td>
  <td bgcolor="#FFFFFF">
  $lastpost
  </td>
</tr>
ViewSetGutsHTML2
}

sub ViewSetEndColHTML {
print <<ViewSetEndColHTML2;
</table>
</td></tr></table>
</td><td valign=top>
ViewSetEndColHTML2
}

sub ViewSetBotHTML {
print <<ViewSetBotHTML2;
</table>
</td></tr></table>
</td></tr></table>
</body>
</html>
ViewSetBotHTML2
}

sub ViewProblemTopHTML {
print <<ViewProblemTopHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=2 cellpadding=4>
  <tr>
  <td bgcolor="#FFFFFF" valign=top align=center>Class:<br><b> $class </b></td>
  <td bgcolor="#FFFFFF" valign=top align=center>
    Set: <br><b>$setid</b>
    </td>
    <td bgcolor="#FFFFFF">
    <table width="100%" border=0 cellspacing=0 cellpadding=0><tr><td>
    <form method=post action="$cgidirurl/$discussurl">
    <font size=+1>
    <input type=submit value="Go"></font> <b>to Problem</b> </td>
    <td>
    <input type=hidden name="ACTION" value="viewproblem">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <font size=+1>$pdprob
    <input type=submit value="Go">
    </font>
    </td></tr></table>
    </form>
  </td>
  </tr>
</table>
</td></tr></table>

<br>
<center>
<table border=0 cellspacing=3 cellpadding=0>
<tr>
<td>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION"   value="$viewset">
  <input type=hidden name="CLASS"    value="$class">
  <input type=hidden name="SETID"    value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM"     value="$snum">
  <input type=hidden name="CAPAID"   value="$capaid">
  <input type=submit value="<-- Back">
  </form>
</td>
<td>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Refresh">
  </form>
</td>
<td>
  <form method=post action="$capasbin#P$probnum">
  <input type=hidden name="CLASS"    value="$class">
  <input type=hidden name="SNUM"     value="$snum">
  <input type=hidden name="CAPAID"   value="$capaid">
  <input type=hidden name="SETID"    value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="M"        value="2">
  <input type=submit value="Try this problem">
  </form>
</td>
<td>
  $postbutton
</td>
<td>
  $adminbutton
</td>
  $infostring
</tr></table>
ViewProblemTopHTML2
}

sub ViewProblemGutsHTML {
print <<ViewProblemGutsHTML2;
<table width="95%" align=center><tr bgcolor="#000000"><td>
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="$subjectbgcolor">
    <td>
    <font size=+1>$subject</b></font>
    </td>
    <td align=right width="54%" valign=top>
    <font size=-1>
    Posted by <a href="mailto:$email">$poster</a> on $date at $time
    </font>
    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td colspan=2>
    $message
    <table><tr>
      <td>$delbutton</td>
      <td>$hidebutton</td>
      <td>$topbutton</td>
      </tr></table>
      <font size=1>$messagenote</font></p>
    </td>
  </tr>
</table>
</td></tr></table>
ViewProblemGutsHTML2
}

sub ViewProblemBotHTML {
print <<ViewProblemBotHTML2;
</body></html>
ViewProblemBotHTML2
}


sub ViewProblemNoneHTML {
print <<ViewProblemNoneHTML2;
<br>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
  <td>
  No messages exist for this problem number.  Click on the above
  <b>"Post New Message"</b> button to post a new message.
  </td>
</tr></table>
</td></tr></table>
ViewProblemNoneHTML2
}

sub ReplyButtonHTML {
return <<ReplyButtonHTML2;
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="post">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=hidden name="REPLYNUM" value="$replynum">
  <input type=submit value="Post Reply">
  </form>
ReplyButtonHTML2
}

sub PostNewButtonHTML {
return <<PostNewButtonHTML2;
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="post">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=hidden name="FILE" value="none">
  <input type=submit value="Post New Message">
  </form>
PostNewButtonHTML2
}

sub AdminButtonHTML {
return <<AdminButtonHTML2;
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="admin">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Admin">
  </form>
AdminButtonHTML2
}

sub DelButtonHTML {
return <<DelButtonHTML2;
  <p align=right><font size=1>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="delmsgpre">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=hidden name="FILE" value="$file">
  <input type=submit value="Delete Message">
  </form>
  </font></p>
DelButtonHTML2
}

sub HideButtonHTML {
return <<HideButtonHTML2;
  <font size=1>
  <form method=post action="$cgidirurl/$discussurl">
    <input type=hidden name="ACTION" value="hidemsgpre">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="PROBNUM" value="$probnum">
    <input type=hidden name="FILE" value="$file">
    <input type=submit value="Hide Message">
    </form>
  </font>
HideButtonHTML2
}    

sub UnHideButtonHTML {
return <<UnHideButtonHTML2;
  <font size=1>
  <form method=post action="$cgidirurl/$discussurl">
    <input type=hidden name="ACTION" value="unhidemsgpre">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="PROBNUM" value="$probnum">
    <input type=hidden name="FILE" value="$file">
    <input type=submit value="Unhide Message">
    </form>
  </font>
UnHideButtonHTML2
}    

sub TopButtonHTML {
return <<TopButtonHTML2;
  <font size=1>
  <form method=post action="$cgidirurl/$discussurl">
    <input type=hidden name="ACTION" value="topmsg">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="PROBNUM" value="$probnum">
    <input type=hidden name="FILE" value="$file">
    <input type=submit value="Top Message">
    </form>
  </font>
TopButtonHTML2
}

sub UnTopButtonHTML {
return <<UnTopButtonHTML2;
  <font size=1>
  <form method=post action="$cgidirurl/$discussurl">
    <input type=hidden name="ACTION" value="untopmsg">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="PROBNUM" value="$probnum">
    <input type=hidden name="FILE" value="$file">
    <input type=submit value="UnTop Message">
    </form>
  </font>
UnTopButtonHTML2
}

sub InfoButtonHTML {
return <<InfoButtonHTML2;
  <td>
    <form method=post action="$cgidirurl/$discussurl">
    <input type=hidden name="ACTION" value="viewinfofile">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="PROBNUM" value="$probnum">
    <input type=hidden name="FILE" value="$infofile">
    <input type=hidden name="BACKFUNCTION" value="$backfunction">
    <input type=submit value="$infodesc">
    </form>
  </td>
InfoButtonHTML2
}

sub InfoBackButtonHTML {
print <<InfoBackButtonHTML2;
    <form method=post action="$cgidirurl/$discussurl">
    <input type=hidden name="ACTION" value="$backfunction">
    <input type=hidden name="CLASS" value="$class">
    <input type=hidden name="SNUM" value="$snum">
    <input type=hidden name="CAPAID" value="$capaid">
    <input type=hidden name="SETID" value="$setid">
    <input type=hidden name="PSETID" value="$psetid">
    <input type=hidden name="PROBNUM" value="$probnum">
    <input type=submit value="<-- Back">
    </form>
InfoBackButtonHTML2
}

sub PostHTML {
print <<PostHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=2 cellpadding=4>
  <tr bgcolor="#FFFFFF">
    <td bgcolor="#FFFFFF">Class: <b>$class</b></td>
    <td bgcolor="#FFFFFF">Set: <b>$setid</td>
    <td bgcolor="#FFFFFF">Problem: <b>$probnum</td>
  </tr>
</table>
</td></tr></table>
<table width=500 border=0 cellspacing=0 cellpadding=0><tr>
  <td>
  <h1>Post $PostType</h1>
  </td>
  <td align=right>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Cancel">
  </form>
  </td>
</tr></table>
<form method=post action="$cgidirurl/$discussurl">
<input type=hidden name="ACTION" value="postsubmit">
<input type=hidden name="CLASS" value="$class">
<input type=hidden name="SETID" value="$setid">
<input type=hidden name="PSETID" value="$psetid">
<input type=hidden name="SNUM" value="$snum">
<input type=hidden name="CAPAID" value="$capaid">
<input type=hidden name="PROBNUM" value="$probnum">
<input type=hidden name="REPLYNUM" value="$replynum">
<table width=500><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#92D1D0">
  <td colspan=2>
  <table width="100%">
  <tr>
    <td align=left>
    Click here <input type=checkbox name="ANONYMOUS" value="yes">
    to post anonymously<font size=-1>*</font>
    </td>
    <td align=right>
    <input type=submit value="Post">
    </td>
  </tr></table>
  </td>
  </tr>
  <tr bgcolor="#92D1D0">
  <td>
  <b>Subject</b>
  </td>
  <td>
  <input type=text name="subject" size=51>
  </td>
  </tr>
  <tr bgcolor="#FFFFFF">
  <td valign=top>
  <b>Message</b>
  </td>
  <td>
  <textarea cols=50 rows=12 name=message wrap=virtual></textarea>
  </td>
  </tr>
  <tr bgcolor="#FFFFFF">
  <td colspan=2>
  <font size=-1>
  *Name not displayed to other students
  </td>
  </tr>
</table>
</td></tr></table>
</form>
$inreplyto
PostHTML2
}

sub InReplyToHTML {
return <<InReplyToHTML2;
  <b>In reply to:
  <table width=500><tr><td bgcolor="#000000">
  <table width="100%" border=0 cellspacing=1 cellpadding=4>
    <tr bgcolor="#92D1D0">
    <td>
    <font size=+1>
    $subject
    </font>
    </td>
    <td width="54%">
    <font size=-1>
    Posted by <a href="mailto:$email">$poster</a> on $date at $time
    </font>
    </td>
    </tr>
    <tr bgcolor="#FFFFFF">
    <td colspan=2>
    $message
    </td>
    </tr>
  </table>
  </td></tr></table>
  </body>
  </html>
InReplyToHTML2
}

sub PostDoneHTML {
print <<PostDoneHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<br>
<center>
<table width=400><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr align=center bgcolor="#FFFFFF">
  <td>
  Your message has been successfully posted!
  </td>
  </tr>
  <tr align=center bgcolor="#DEDFDF">
  <td>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Back to Problem $probnum">
  </form>
  </td>
  </tr>
</table>
</td></tr></table>
</center>
</body>
</html>
PostDoneHTML2
}

sub DelMsgPreHTML {
print <<DelMsgPreHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table width="95%"><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
    <td>
    <font size=+1>$subject
    </td>
  </tr>
  <tr bgcolor="#DEDFDF">
    <td>
    <font size=-1>
    Posted by <a href="mailto:$email">$poster</a> on $date at $time
    </font>
    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>
    $message
    </td>
  </tr>
</table>
</td></tr></table>
</center>
<center>
<table><tr><td bgcolor="#000000">
<table border=0 cellspacing=1 cellpadding=3><tr bgcolor="#FFFFFF">
  <td colspan=2 align=center bgcolor="#DEDFDF">
  Delete this message?
  </td>
</tr>
<tr bgcolor="#FFFFFF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="delmsg">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="FILE" value="$file">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Yes">
  </form>
  </td>
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="No">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>
</html>
DelMsgPreHTML2
}

sub DelMsgDoneHTML {
print <<DelMsgDoneHTML2;
<html>
<head>
  <title>
  </title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
  <td>
  The selected message has been successfully deleted
  </td>
  </tr>
  <tr bgcolor="#DEDFDF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Back to Message List">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>
DelMsgDoneHTML2
}


sub HideMsgPreHTML {
print <<HideMsgPreHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table width="95%"><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
    <td>
    <font size=+1>$subject
    </td>
  </tr>
  <tr bgcolor="#DEDFDF">
    <td>
    <font size=-1>
    Posted by <a href="mailto:$email">$poster</a> on $date at $time
    </font>
    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>
    $message
    </td>
  </tr>
</table>
</td></tr></table>
</center>
<center>
<table><tr><td bgcolor="#000000">
<table border=0 cellspacing=1 cellpadding=3><tr bgcolor="#FFFFFF">
  <td colspan=2 align=center bgcolor="#DEDFDF">
  Hide this message?
  </td>
</tr>
<tr bgcolor="#FFFFFF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="hidemsg">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="FILE" value="$file">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Yes">
  </form>
  </td>
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="No">
  </form>
  </td>
</tr></table>
</td></tr></table>
<br>
<table width="40%" border=0 cellspacing=0 cellpadding=0>
  <tr><td bgcolor="#000000">
  <table width="100%" border=0 cellspacing=1 cellpadding=0>
    <tr><td bgcolor="#FFFFFF">
       <font size=2>
        Hiding this message will make it visible to users with
        administrator access only.
    </td></tr>
  </table>
</td></tr></table>
</body>
</html>
HideMsgPreHTML2
}

sub HideMsgDoneHTML {
print <<HideMsgDoneHTML2;
<html>
<head>
  <title>
  </title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
  <td>
  The selected message has been successfully hidden
  </td>
  </tr>
  <tr bgcolor="#DEDFDF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Back to Message List">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>

HideMsgDoneHTML2
}


sub UnHideMsgPreHTML {
print <<UnHideMsgPreHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table width="95%"><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
    <td>
    <font size=+1>$subject
    </td>
  </tr>
  <tr bgcolor="#DEDFDF">
    <td>
    <font size=-1>
    Posted by <a href="mailto:$email">$poster</a> on $date at $time
    </font>
    </td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>
    $message
    </td>
  </tr>
</table>
</td></tr></table>
</center>
<center>
<table><tr><td bgcolor="#000000">
<table border=0 cellspacing=1 cellpadding=3><tr bgcolor="#FFFFFF">
  <td colspan=2 align=center bgcolor="#DEDFDF">
  Unhide this message?
  </td>
</tr>
<tr bgcolor="#FFFFFF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="unhidemsg">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="FILE" value="$file">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Yes">
  </form>
  </td>
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="No">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>
</html>
UnHideMsgPreHTML2
}


sub UnHideMsgDoneHTML {
print <<UnHideMsgDoneHTML2;
<html>
<head>
  <title>
  </title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
  <td>
  The selected message has been successfully unhidden
  </td>
  </tr>
  <tr bgcolor="#DEDFDF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Back to Message List">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>
UnHideMsgDoneHTML2
}

sub TopMsgDoneHTML {
print <<TopMsgDoneHTML2;
<html>
<head>
  <title>
  </title>
</head>
<body bgcolor="#FFFFFF">
<center>
<table><tr><td bgcolor="#000000">
<table width="100%" border=0 cellspacing=1 cellpadding=4>
  <tr bgcolor="#FFFFFF">
  <td>
  The selected message has been successfully $function
  </td>
  </tr>
  <tr bgcolor="#DEDFDF">
  <td align=center>
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="viewproblem">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="Back to Message List">
  </form>
  </td>
</tr></table>
</td></tr></table>
</body>
TopMsgDoneHTML2
}

## Admin HTML Subroutines

sub AdminMainHTML {
print <<AdminMainHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<table width="400" border=0 cellspacing=0 cellpadding=0>
  <tr><td bgcolor="#000000">
  <table width="100%" border=0 cellspacing=1 cellpadding=0>
    <tr>
      <td bgcolor="blue" align=center>
      <font size=2 color="#ffffff"><b>Administrator Functions</font>
      </td>
    </tr>
    <tr>
    <td bgcolor="#ffffff">
      <form method=post action="$cgidirurl/$discussurl">
      <input type=hidden name="ACTION" value="adminusersearch">
      <input type=hidden name="CLASS" value="$class">
      <input type=hidden name="SETID" value="$setid">
      <input type=hidden name="PSETID" value="$psetid">
      <input type=hidden name="SNUM" value="$snum">
      <input type=hidden name="CAPAID" value="$capaid">
      <input type=hidden name="PROBNUM" value="$probnum">
      <input type=submit value="User Search">
      </form>
    </td>
    </tr>
    <tr>
      <td bgcolor="blue" align=right>
        <form method=post action="$cgidirurl/$discussurl">
        <input type=hidden name="ACTION"   value="$viewset">
        <input type=hidden name="CLASS"    value="$class">
        <input type=hidden name="SETID"    value="$setid">
        <input type=hidden name="PSETID" value="$psetid">
        <input type=hidden name="SNUM"     value="$snum">
        <input type=hidden name="CAPAID"   value="$capaid">
        <input type=submit value="Exit">
        </form>
      </td>
      </tr>
  </table>
  </td></tr></table>
  </body>
  </html>
AdminMainHTML2
}


sub AdminUserSearchHTML {
print <<AdminUserSearchHTML2;
<html>
  <head>
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="admin">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <input type=submit value="<--Back">
  </form>

  <form method=post action="$cgidirurl/$discussurl">
  <input type=hidden name="ACTION" value="adminusersearchsubmit">
  <input type=hidden name="CLASS" value="$class">
  <input type=hidden name="SETID" value="$setid">
  <input type=hidden name="PSETID" value="$psetid">
  <input type=hidden name="SNUM" value="$snum">
  <input type=hidden name="CAPAID" value="$capaid">
  <input type=hidden name="PROBNUM" value="$probnum">
  <table width="400" border=0 cellspacing=0 cellpadding=0>
    <tr><td bgcolor="#000000">
    <table width="100%" border=0 cellspacing=1 cellpadding=0>
      <tr><td bgcolor="blue" colspan=2>
        <font size=2 color="#ffffff"><b>User Search</b>
        </td>
        </tr>
      <tr><td bgcolor="#ffffff" colspan=2>
        <font size=2>Username: <input type=text size=45 name="usersearch">
        </td>
        </tr>
      <tr><td bgcolor="#ffffff">
        <font size=1>User searching allows administrators to search the
        message bases for a specified username and display summary
        information.
        </td>
        <td bgcolor="#FFFFFF"><input type=submit value="Search!"></form></td>
        </tr>
      </table>
    </td></tr>
  </table>
  </body>
  </html>
AdminUserSearchHTML2
}

sub MFNewPostHTML {
print <<MFNewPostHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
You have not filled in all of the appropriate message information.  Please
go back and fill in the <b>subject</b> and <b>message</b> fields.
<br><br>
<center>
<form method=post action="$cgidirurl/$discussurl">
<input type=hidden name="ACTION" value="post">
<input type=hidden name="CLASS" value="$class">
<input type=hidden name="SETID" value="$setid">
<input type=hidden name="PSETID" value="$psetid">
<input type=hidden name="SNUM" value="$snum">
<input type=hidden name="CAPAID" value="$capaid">
<input type=hidden name="PROBNUM" value="$probnum">
<input type=submit value="<-- Back">
</form>
</center>
</body>
</html>
MFNewPostHTML2
exit;
}

sub MFPostReplyHTML {
print <<MFPostReplyHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
You have not filled in all of the appropriate message information.  Please
go back and fill in the <b>subject</b> and <b>message</b> fields.
<br><br>
<center>
<form method=post action="$cgidirurl/$discussurl">
<input type=hidden name="ACTION" value="post">
<input type=hidden name="CLASS" value="$class">
<input type=hidden name="SETID" value="$setid">
<input type=hidden name="PSETID" value="$psetid">
<input type=hidden name="SNUM" value="$snum">
<input type=hidden name="CAPAID" value="$capaid">
<input type=hidden name="PROBNUM" value="$probnum">
<input type=hidden name="REPLYNUM" value="$replynum">
<input type=submit value="<-- Back">
</form>
</center>
</body>
</html>
MFPostReplyHTML2
exit;
}


sub InvalidVarsHTML {
print <<InvalidVarsHTML2;
<html>
<head>
  <title></title>
</head>
<body bgcolor="#FFFFFF">
you have entered one or more invalid variables.
</body>
</html>
InvalidVarsHTML2
exit;
}

sub BannedMessageHTML {
print <<BannedMessageHTML2;
<html>
<head>
  <title> Access Denied</title>
</head>
<body bgcolor="#FFFFFF">
Your access to the forum has been disabled. Please contact your instructor.
</body>
</html>
BannedMessageHTML2
exit;
}

sub BadPassHTML {
print <<BadPassHTML2;
<html>
<head>
</head>
<body bgcolor="#FFFFFF">
You have entered an <b>incorrect</b> CAPA ID for this set
</body>
</html>
BadPassHTML2
exit;
}

sub NotAdminHTML {
print <<NotAdminHTML2;
<html>
<head>
</head>
<body bgcolor="#FFFFFF">
You are not an administrator
<br>
This operation is not available
</body>
</html>
NotAdminHTML2
exit;
}

1;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>