# THIS FILE DISPLAYS GUTS OF: Control Panel, Graemlin Intro

&FormStart("$vars_config{CGIURL}/cp.cgi", "$Hiddens");

print "<p align='center'>";

print <<THEEND;
<table border="0" width="95%"><TR><TD colspan="6" align="left" bgcolor="white">
                <P><FONT SIZE="2" FACE="Verdana, Arial"> You can review or configure
                  your Graemlin$trademark assignments from within this page. You may
                  have up to 25 custom Graemlin$trademark assignments in addition to the original
                  11 Graemlin$trademark assignments provided by default.</font></p>
                <P><font face="Verdana, Arial" size="2">To add a new Graemlin$trademark assignment
                  <a href="$vars_config{CGIURL}/cp.cgi?ubb=graemlin_new">click here.</a></font>
	<img src="$vars_config{NonCGIURL}/smile.gif" width="15" height="15"></p>
</TD></TR></table>
THEEND

&TBT;    #Table Border Top in cp_common.pl

&HeaderRow("Default Graemlin$trademark Settings", "4", "#5d7790", "#FFFFFF", "center", "2");

print <<ORIGHEAD;
            <tr bgcolor="#FFFFFF">
              <td align="CENTER" width="10%"><font face="Verdana, Arial" size="2">Image</font></td>
              <td align="CENTER" width="35%"><font face="Verdana, Arial" size="2">Name</font></td>
              <td align="CENTER" width="20%"><font face="Verdana, Arial" size="2">Keystroke</font></td>
              <td align="CENTER" width="35%"><font face="Verdana, Arial" size="2">&nbsp;&nbsp;&nbsp;File Name</font></td>
            </tr>
ORIGHEAD



foreach my $item (sort keys %{$vars_graemlins->{'origs'}}) {
	my $short = %$vars_graemlins->{'origs'}->{$item};
	print <<THEENDOFITALL;
            <tr bgcolor="#FFFFFF">
              <td align="CENTER" width="10%"><img src="$vars_config{NonCGIURL}/$short->{'image'}"></td>
              <td align="CENTER" width="35%">
                <input type="TEXT" name="orig|!|$item|!|text" size="25" maxlength="25" value="$short->{'text'}">
              </td>
              <td align="CENTER" width="20%"><font face="Verdana, Arial" size="2">$short->{'trigger'}</font></td>
              <td align="CENTER" width="35%">
                <input type="TEXT" name="orig|!|$item|!|image" maxlength="25" size="20" value="$short->{'image'}">
              </td>
            </tr>
THEENDOFITALL
}


&TBB;

print "</p><p align='center'>";

&TBT;

&HeaderRow("Custom Graemlin$trademark Settings", "6", "#5d7790", "#FFFFFF", "center", "2");

print <<UGH;
            <tr bgcolor="#FFFFFF">
              <td align="CENTER" bgcolor="#FFFFFF" width="5%">&nbsp;</td>
              <td align="CENTER" bgcolor="#FFFFFF" width="5%"><font face="Verdana, Arial" size="2">Delete</font></td>
              <td align="CENTER" width="10%"><font face="Verdana, Arial" size="2">Image</font></td>
              <td align="CENTER" width="30%"><font face="Verdana, Arial" size="2">Name</font></td>
              <td align="CENTER" width="25%"><font face="Verdana, Arial" size="2">Keystroke</font></td>
              <td align="CENTER" width="25%"><font face="Verdana, Arial" size="2">&nbsp;&nbsp;&nbsp;File Name</font></td>
            </tr>
UGH

$counter = 1;

foreach my $item (sort keys %{$vars_graemlins->{'graems'}}) {
	my $short = %$vars_graemlins->{'graems'}->{$item};

	print <<THEENDOFITALL;
            <tr bgcolor="#FFFFFF">
              <td align="CENTER" bgcolor="#FFFFFF" width="5%"><font face="Verdana, Arial" size="2">
                $counter
              </td>
              <td align="CENTER" bgcolor="#FFFFFF" width="5%">
                <input type="checkbox" name="graem||$item||delete" value="checkbox">
              </td>
              <td align="CENTER" width="10%"><img src="$vars_config{NonCGIURL}/graemlins/$short->{'image'}"></td>
              <td align="CENTER" width="30%">
                <input type="TEXT" name="graem||$item||text" size="20" maxlength="25" value="$short->{'text'}">
              </td>
              <td align="CENTER" width="25%"><nobr> <b>:</b> <input type="TEXT" name="graem||$item||trigger" size="15" maxlength="25" value="$short->{'trigger'}"> <b>:</b> </nobr></td>
              <td align="CENTER" width="25%">
                <input type="TEXT" name="graem||$item||image" maxlength="25" size="15" value="$short->{'image'}">
              </td>
            </tr>
THEENDOFITALL
	$counter++;
}    #endforeach

if (scalar(keys %{$vars_graemlins->{'graems'}} == 0)) {
	print <<BOOM;
<tr bgcolor="#ffffff"><td colspan="6" align="center"><font face="Verdana, Arial" size="2">
<b>No custom Graemlin$trademark settings!  <br />To add a new Graemlin$trademark assignment
                  <a href="$vars_config{CGIURL}/cp.cgi?ubb=graemlin_new">click here.</a> <img src="$vars_config{NonCGIURL}/smile.gif" width="15" height="15"></b>
</font></td></tr>
BOOM
}

&TBB;    #Table Border Bottom in cp_common.pl

if (scalar(keys %{$vars_graemlins->{'graems'}} != 0)) {
	print <<AIIIEEEEEE;
<center><table border="0" width="95%"><TR><TD colspan="6" align="left" bgcolor="white">
                <P><FONT SIZE="2" FACE="Verdana, Arial">Note: Deleting a Graemlin$trademark
		may cause broken images in older posts!</p>
</TD></TR></table></center>
AIIIEEEEEE
}

print "</p>";

&Submit("Update Graemlin Settings");

# Nothing below this line should be changed.. and there is no more code!

# This entire program is copyright Infopop Corporation.
# For more info on the Ultimate Bulletin Board and other Infopop
# Products/Services, visit: http://www.infopop.com

# You may not distribute this program in any manner, modified or otherwise.

#You make modifications, but only for your own use and within the confines of the UBB License Agreement.

# DANGER: Do not remove the following line!
1;
