$message = $db->query("SELECT
`player_ban`.`until`,
`player_ban`.`admin`,
`player_ban`.`reason`,
`player_ban`.`player_id`,
`player`.`player`,
`ip`.`ip`
FROM
`player_ban`,
`player`,
`ip`
WHERE
`player`.`player_id` = `player_ban`.`player_id` AND `ip`.`player_id` = `player_ban`.`player_id`
ORDER BY
`player_ban`.`until` ASC");
if (isset($_POST['unban'])) {
$db->query("DELETE FROM player_ban WHERE player_id = '$message->fetch_object()->player id'");
}
while ($new = $message->fetch_object()) {
echo '<tr><th>' .$new->ip. '</th><th>' . $new->player . '</th><th>' . $new->player_id . '</th><th>' . $new->admin . '</th><th>' . $new->until . '</th><th>' . $new->reason . '</th><th><form action="" name="unban" method="post"><input type="submit" value="Unban" /></th></tr>';
}
Un kas tagad ir īsti nepareizi? :/
Ir vel šāds variants, kas arī nestrādā. :/ echo '<tr><th>' .$new->ip. '</th><th>' . $new->player . '</th><th>' . $new->player_id . '</th><th>' . $new->admin . '</th><th>' . $new->until . '</th><th>' . $new->reason . '</th><th><form action="/admin/bans?unban=$new->player_id" name="unban" method="post"><input type="submit" value="Unban" /></th></tr>';
S J miniblogs
- 0
S J 04.11.2012. 12:51
Ielogojies vai izveido profilu, lai komentētu!