<!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">Petition Management</h2>
<hr/>
<?
	$q = "SELECT accountname, charname, petitiontext, FROM_UNIXTIME(senttime, '%Y-%m-%d %h:%m %p') AS senttime FROM petitions";
	my $res = $EQDB->query($q);
	if ($res) {
		print "<table width=\"100%\" border=\"1\" cellspacing=\"2\" cellpadding=\"3\" class=\"zonelist\">\n";
		print "\t<tr>\n";
		print "\t\t<th width=1 nowrap>Account</th>\n";
		print "\t\t<th width=1 nowrap>Character</th>\n";
		print "\t\t<th>Text</th>\n";
		print "\t\t<th width=1 nowrap>Date/Time</th>\n";
		print "\t</tr>\n";
		while (my $row=$res->fetch_row_hash) {
			print "\t<tr>\n";
			print "\t\t<td><a href=\"account.html?name=$row->{accountname}\">$row->{accountname}</a></td>\n";
			print "\t\t<td>$row->{charname}</td>\n";
			print "\t\t<td align=\"left\">$row->{petitiontext}</td>\n";
			print "\t\t<td>$row->{senttime}</td>\n";
			print "\t</tr>\n";
		}
		print "</table>\n";
	} else {
		print "No petitions"
	}
?>
Delete petitions
</body>
</html>
