#!/usr/bin/perl
use DBI;
use CGI;
use Image::Size;
require 'cookie.lib';
require 'realms.lib';
&Initial_Var;
&Verify_Login;
print "Content-type: text/html\n\n";
my $cgi = new CGI;
$action = $cgi->param('action');
$username = $cgi->param('username');
$codedname = $cgi->param('teamname');
&Get_Username;
&Get_Data;
&Get_Tool_Tips;
&Get_Browser_Type;
&Print_Header;
if ($action eq "text")
{
&Print_Team_Text;
}
elsif ($action eq "graphic")
{
&Print_Team_Graphic;
}
else
{
&Print_Error;
}
exit;
sub Get_Username
{
$sth1 = $dbh->prepare("select userid from user where username='$username';");
$sth1->execute();
while($row = $sth1->fetchrow_hashref)
{
$userid = $row->{userid};
}
$sth1->finish;
}
sub Get_Data
{
$sth = $dbh->prepare("select * from userarmies where userid='$userid' and codedname='$codedname'");
$sth->execute();
while($row = $sth->fetchrow_hashref)
{
$teamname = $row->{teamname};
$teamstring = $row->{team};
$point_value = $row->{pointvalue};
}
}
sub Print_Team_Graphic
{
print << "HTML";
See Text View HTML print "
| Collector's Number | Rarity | Unit's Name | Rank | Point Value | |
| $expansion - $unit | $Rarity | $UnitName | $Rank | $Point_Value | |
© 2000, MKRealms.com