2013-05-09 11:13:16 -04:00

41 lines
1.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" title="Default" href="main.css" type="text/css" />
</head>
<body>
<h2 align="center">Guild List</h2>
<hr/>
<div align="center">
<a href="guildcreate.html">Create Guild</a> -
<a href="guildsearch.html">Search Guilds</a>
</div>
<hr/>
<?
$q="select a.*,b.name as leader_name from guilds a left outer join character_ b on a.leader=b.id";
my $res=$EQDB->query($q);
if ($res) {
print <<"HTML";
<table border="1" cellspacing="2" cellpadding="3" class="zonelist">
<th scope="col" width="75">ID</th>
<th scope="col" width="150">Guild Name</th>
<th scope="col" width="150">Leader Name</th>
</tr>
HTML
while(my $row=$res->fetch_row_hash) {
printf "\t\t<td>%d</td>\n",$row->{id};
printf "\t\t<td><a href='guild.html?id=%d'>%s</a></td>\n",$row->{id},$row->{name};
printf "\t\t<td>%s</td>\n",$row->{leader_name};
print "\t</tr>\n";
}
}
?>
</body>
</html>