#!/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 "

$username\'s \"$teamname\" - $point_value points
\n"; @team = split(/\,/, $teamstring); foreach $unit (@team) { $Archenemy=""; &Determine_Expansion($unit); &$get_unit_sub($unit); &$print_unit_sub($unit); print "
If you are caught with this information, in any form, during a Tournament you can be eliminated from the Tournament.
\n"; &Clear_Arrays; } &Print_Footer; } sub Print_Team_Text { print << "HTML";

See Graphic View

HTML @team = split(/\,/, $teamstring); foreach $unit (@team) { &Determine_Expansion($unit); &$get_unit_sub($unit); if ($Rank eq "1") {$Rank = "Rookie";} elsif ($Rank eq "2") {$Rank = "Experienced";} elsif ($Rank eq "3") {$Rank = "Veteran";}; print << "HTML"; HTML } print << "HTML";
$username\'s \"$teamname\" - $point_value points
Collector's Number Rarity Unit's Name Rank Point Value
$expansion - $unit$Rarity$UnitName$Rank$Point_Value


© 2000, MKRealms.com HTML }