S J miniblogs

  • S J
    0

    $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
      0

      BUMP

      @Maadinsh halp

    • S J
      0

      Never mind. Ja kādam interesē tas, kā man izdevās salabot, tad šādi. smile_mini.gif  

      Tā kā man jau bija sagatavots $_GET[unban], atlika pielikt linku uz esošo lapu ar ?unban=' . $new->player_id '

Atpakaļ Uz augšu