Problème installation BanList avec UltraBans

  • Auteur de la discussion Compte supprimé
  • Date de début
C

Compte supprimé

Invité
Bonjour,

J'ai essayé de créer une "banlist" avec le plugin ultrabans, déjà j'ai commencé par créer une base de donné Mysql sur laquel j'ai ajouté un utilisateur avec toutes les permissions, ensuite dans la configuration du plugin UltraBans j'ai rentré mes informations de base de donné (host, user, passeword et name), puis j'ai crée un nouveaux dossier dans le FTP de mon site web et j'ai crée un nouveau fichier : index.php et j'ai rentré le code suivant, bien-sûr j'ai rentré aussi mes informations de base de donné :

PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>Ultra Banlist</title>
</head>
<body>
<h1>Ultra Banlist</h1>
<?php
 
date_default_timezone_set("GMT"); //http://php.net/manual/en/timezones.php
 
    $host    = "localhost";
    $user    = "root";
    $password = "root";
    $name    = "minecraft";
 
$link = @mysqli_connect($host, $user, $password, $name);
 
if ($link) {
$result = mysqli_query($link, "SELECT * FROM `banlist`
                              ORDER BY `id` DESC");
 
echo <<<END
<table width=100% border=1 cellpadding=3 cellspacing=0>
<tr style="font-weight: bold">
    <td>Type</td>
    <td>Name</td>
    <td>Reason</td>
    <td>Admin/Mod</td>
    <td>Time</td>
    <td>TimeTempBan</td>
</tr>
END;
 
while ($row = mysqli_fetch_assoc($result)) {
 
echo "<tr bgcolor=#FFFFFF>";
 
 
switch ($row['type']) {
    case '0':
        echo "<td>Banned</td>";
        break;
 
    case '1':
        echo "<td>IP Banned</td>";
        break;
 
    case '2':
        echo "<td>Warn</td>";
        break;
 
    case '3':
        echo "<td>Kick</td>";
        break;
 
    case '4':
        echo "<td>Fine</td>";
        break;
 
    case '5':
        echo "<td>Unbanned</td>";
        break;
 
    case '6':
        echo "<td>Jailed</td>";
        break;
 
    case '9':
        echo "<td>Perma</td>";
        break;
 
    default:
        echo "<td>Unknown</td>";
        break;
}
 
echo <<<END
<td>{$row['name']}</td>
<td>{$row['reason']}</td>
<td>{$row['admin']}</td>
END;
 
echo "<td>", date("F j Y, g:i A", $row['time']), "</td>";
 
echo ($row['temptime'] == "0") ? "<td>None</td>" : "<td>" . date("F j Y, g:i A", $row['temptime']) . "</td>" , "</tr>";
 
}
 
echo "</table>";
 
} else {
    echo "Error on MySQL Connection! <br />";
}
?>
</div>
Ban database provided by UltraBans.
</body>
</html>

Enfin quand je vais sur ma banlist sa me retourne l'erreur suivante :

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /home/minelumi/public_html/banlist/index.php on line 35

Cordialement,
Maxime,