###############################################################################
# CP_Interfaces.src                                                           #
###############################################################################
# UltraBoard 2000 by UltraScripts.com                                         #
# Scripts written by Jacky W.W. Yung, WebMaster@UltraScripts.com              #
# Available from http://www.UltraBoard.org/                                   #
# =========================================================================== #
# COPYRIGHT NOTICE :                                                          #
#                                                                             #
# Copyright (c) 1999 Jacky Yung. All Rights Reserved.                         #
#                                                                             #
# This program is free software; you can change or modify it as you see fit.  #
# However, modified versions cannot be sold or distributed. You cannot alter  #
# the copyright and "powered by" notices throughout the scripts. These        #
# notices must be clearly visible to the end users.                           #
#                                                                             #
# WARRANTY DISCLAIMER:                                                        #
#                                                                             #
# THIS PROGRAM 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.                                           #
###############################################################################

package HTML;

use strict;

###############################################################################
# ControlPanel function
# - function of printing control panel frames
sub ControlPanel {
  &Standard::PrintHTMLHeader();
  print<<HTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>

<title>UltraBoard 2000 Control Panel</title>
</head>
<base target="UBBODY">
<!-- frames -->
<frameset rows="49,*" framespacing=1 frameborder=1 border=1>
  <frame name="UBCP" src="http://www.ultraboard.org/ultraboard/setup/remote.cgi" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize framespacing="0">
  <frameset cols="20%,*">
    <frame name="UBMENU" src="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=menu" marginwidth="0" marginheight="0" frameborder="1" framespacing="1">
    <frame name="UBBODY" src="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=body" marginwidth="0" scrolling="yes" marginheight="0" frameborder="1" framespacing="1">
  </frameset>
</frameset>
<!-- no frames -->
<noframes>
  <body topmargin=0 leftmargin=0 bgcolor="Silver" text="Black" link="Blue" vlink="Purple" alink="Red">
    <font face="Verdana" size="2">Sorry, you need a browser that supported frames to use "UltraBoard 2000 Control Panel"!</font>
  </body>
</noframes>
</html>
HTML
}

###############################################################################
# CPMenu function
# - function of printing menu of control panel
sub CPMenu {
  &Standard::PrintHTMLHeader();
  print<<HTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
  <!--
    TD           {
      font-size   : 8 pt;
      font-family : Verdana, Geneva, Helvetica, Sans-Serif;
    }

    a.menu       {
      text-decoration: none;
      color: Black;
    }
    a.menu:hover {
      color: #0033CC;
      text-decoration: underline;
    }
  // -->
</style>
</head>

<body bgcolor="White" text="Black" link="Blue" vlink="Purple" alink="Red" leftmargin="0" topmargin="0" rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>General Management</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CfgSystem" target="UBBODY" class="menu">configure system options</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CfgGeneral" target="UBBODY" class="menu">configure general options</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CfgStyle" target="UBBODY" class="menu">configure style options</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ModifyAdministrator" target="UBBODY" class="menu">administrator profile</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=DoLine" target="UBBODY" class="menu">online/offline</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=Logout" target="_top" class="menu">logout</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>Member Group Management</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CreateGroup" target="UBBODY" class="menu">create a new member group</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListGroups&For=ModifyGroup" target="UBBODY" class="menu">modify member group</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListGroups&For=RemoveGroups" target="UBBODY" class="menu">remove member groups</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>Members Accounts Management</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CreateAccount" target="UBBODY" class="menu">create a new member account</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ManageAccounts" target="UBBODY" class="menu">manage member accounts</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>Categories Management</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CreateCategory" target="UBBODY" class="menu">create a new category</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListCategories&For=ModifyCategory" target="UBBODY" class="menu">modify category</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListCategories&For=ReorderCategories" target="UBBODY" class="menu">reorder categories</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListCategories&For=RemoveCategories" target="UBBODY" class="menu">remove categories</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>Boards Management</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=CreateBoard" target="UBBODY" class="menu">create a new board</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListBoards&For=ModifyBoard" target="UBBODY" class="menu">modify board</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListBoards&For=ReorderBoards" target="UBBODY" class="menu">reorder boards</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ListBoards&For=RemoveBoards" target="UBBODY" class="menu">remove boards</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>Messages Management</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=ManageMessages" target="UBBODY" class="menu">manage messages</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>UltraBoard Utilities</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=Backup" target="UBBODY" class="menu">backup data</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=Restore" target="UBBODY" class="menu">restore data</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=Rebuild" target="UBBODY" class="menu">rebuild data</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=Compile" target="UBBODY" class="menu">compile theme</a></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="5">
  <tr><td nowrap><font color="Black"><b>UltraBoard Statistics</b></font></td></tr>
</table>
<table border="0" cellspacing="1" cellpadding="2">
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=HitsReport" target="UBBODY" class="menu">ultraboard visitors report</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=AccessReport" target="UBBODY" class="menu">ultraboard access report</a></td></tr>
    <tr><td width="5">&nbsp;</td><td nowrap><a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=AgentsReport" target="UBBODY" class="menu">agents / platforms report</a></td></tr>
</table>

</body>
</html>
HTML
}

###############################################################################
# CPBody function
# - function of printing body of control panel
sub CPBody {
  &Standard::PrintHTMLHeader();
  print<<HTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<style type="text/css">
  <!--
    TD {
      font-size : 9 pt;
      font-family : MS Sans Serif, Arial;
    }

    INPUT {
      font-size : 9 pt;
      font-family : Arial, MS Sans Serif;
    }
    TEXTAREA {
      font-size : 9 pt;
      font-family : Arial, MS Sans Serif;
    }
    SELECT {
      font-size : 9 pt;
      font-family : Arial, MS Sans Serif;
    }

    A.address       {
      text-decoration: none;
      color: White;
    }
    A.address:HOVER {
      color: White;
      text-decoration: underline;
    }
  // -->
</style>
</head>

<body bgcolor="Silver" text="Black" link="Blue" vlink="Purple" alink="Red" leftmargin="0" topmargin="0" rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0>

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr bgcolor="Gray">
    <td><font color="White"><b>
      Control Panel
    </b></font></td>
  </tr>
</table>

</body>
</html>
HTML
}

###############################################################################
# Header function
# - function of printing header of control panel body
sub Header {
  return <<HTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<style type="text/css">
  <!--
    TD {
      font-size : 9 pt;
      font-family : MS Sans Serif, Arial;
    }

    INPUT {
      font-size : 9 pt;
      font-family : Arial, MS Sans Serif;
    }
    TEXTAREA {
      font-size : 9 pt;
      font-family : Arial, MS Sans Serif;
    }
    SELECT {
      font-size : 9 pt;
      font-family : Arial, MS Sans Serif;
    }

    A.address       {
      text-decoration: none;
      color: White;
    }
    A.address:HOVER {
      color: White;
      text-decoration: underline;
    }
  // -->
</style>
</head>

<body bgcolor="Silver" text="Black" link="Blue" vlink="Purple" alink="Red" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
HTML
}

###############################################################################
# Error function
# - function of printing error message
sub Error {
  my ($address, $message) = @_;

  &Standard::PrintHTMLHeader();
  print &HTML::Header;
  print <<HTML;
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr bgcolor="Gray">
    <td><font color="White"><b>
      <a href="$SYSTEM::CP_URL/Panel.$SYSTEM::EXT?action=body" target="UBBODY" class="address">Control Panel</a> /
      $address
    </b></font></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td>
            <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolordark="White" bordercolorlight="Gray">
              <tr>
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td>$message</td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td align="right"><input type="button" value="Back" onclick="history.go(-1)"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
HTML

  exit;
}

###############################################################################
1; # end of CP_Interfaces.src file
###############################################################################