<?php
//Form data
$Dispute = $_POST[Dispute];
$userid = $_POST[selectCharacter];
$sessionid = $_POST[selectEvent];
$raiddate = $_POST[txtDate];
$dateadded = date("m/d/y");
$class_points = $_POST[txtClassPoints];
$general_points = $_POST[txtGeneralPoints];
$description = $_POST[txtDescription];
$ipaddress = $_POST[ipAddress];
//Submit
if(isset($Dispute)) {
$sql = $db->query("INSERT INTO dkp_disputes (userid, sessionid, raiddate, dateadded, class_points, general_points, description, ipaddress) " .
" VALUES (\"$userid\", \"$sessionid\", \"$raiddate\", \"$dateadded\", \"$class_points\", \"$general_points\", \"$description\", \"$ipaddress\")");
if($sql) {
systemMessage("Disputes", "Your dispute has been sent.");
} else {
systemMessage("Database Error", mysql_error());
}
}
else {
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td bgcolor="#003366"><font color="#FFFFFF" size="2" face="Tahoma"><strong>Point Disputes</strong></font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form action="" method="post" name="formDispute" id="formDispute">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="2" bgcolor="#003366"><font color="#CCCCCC" size="1" face="Tahoma"><strong>Details</strong></font></td>
</tr>
<tr>
<td width="15%" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Character</font></strong></u></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<select name="selectCharacter" id="selectCharacter">
<option value="--">Character</option>
<option value="--">--</option>
<?php
$sql = $db->query("SELECT * FROM dkp_users ORDER BY name ASC");
if($db->count_rows($sql) > 0) {
while($row = mysql_fetch_array($sql)) {
echo "<option value=\"$row[id]\">$row[name]</option>\n";
}
}
else {
echo "There are currently no players in the database.";
}
?>
</select>
</font></strong></td>
</tr>
<tr>
<td bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Raid
Event</font></strong></u></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<select name="selectEvent" id="selectEvent">
<option value="--">Raid Event</option>
<option value="--">--</option>
<?php
$sql = $db->query("SELECT * FROM dkp_sessions ORDER BY raid ASC");
if($db->count_rows($sql) > 0) {
while($row = mysql_fetch_array($sql)) {
echo "<option value=\"$row[id]\">$row[raid]</option>\n";
}
}
else {
echo "There are currently no players in the database.";
}
?>
</select>
</font></strong></td>
</tr>
<tr>
<td bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Date</font></strong></u></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<input name="txtDate" type="text" id="txtDate" value="<?php echo date("m/d/y"); ?>" size="35">
</font></strong></td>
</tr>
<tr>
<td bgcolor="#999999"><u><font color="#000000" size="1" face="Tahoma"><strong>Class
Points</strong></font></u></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<input name="txtClassPoints" type="text" id="txtClassPoints" size="35">
</font></strong></td>
</tr>
<tr>
<td bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">General
Points</font></strong></u></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<input name="txtGeneralPoints" type="text" id="txtGeneralPoints" size="35">
</font></strong></td>
</tr>
<tr>
<td valign="top" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Description</font></strong></u></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<textarea name="txtDescription" cols="35" rows="5" id="txtDescription"></textarea>
</font></strong></td>
</tr>
<tr>
<td bgcolor="#999999"><font color="#000000"> </font></td>
<td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">
<input name="Dispute" type="submit" id="Dispute" value="Dispute">
<input name="ipAddress" type="hidden" id="ipAddress" value="<?php echo $REMOTE_ADDR; ?>">
</font></strong></td>
</tr>
<tr bgcolor="#003366">
<td colspan="2"><font color="#CCCCCC" size="1" face="Tahoma"><strong>Note:
<font color="#FFFFFF">Your IP address (<?php echo $REMOTE_ADDR; ?>)
is logged for security reasons.</font></strong></font></td>
</tr>
<tr bgcolor="#003366">
<td colspan="2"><font color="#CCCCCC" size="1" face="Tahoma"><strong>Beware:
<font color="#FFFFFF">If you abuse this system, I will set my server
at work to flood your IP address, and make WoW virtually, unplayable.</font></strong></font></td>
</tr>
</table>
</form></td>
</tr>
</table>
<?php
}
?>