예제 #1
0
function get_artist()
{
    global $html;
    $html = "<table><tr><th>Nom de l'artiste</th><th>Biographie</th><th>Identifiant de vidéo Youtube</th><th>Supression de l'artiste</th>";
    $array_result = get_array_all_artist();
    foreach ($array_result as $value) {
        $html .= "<tr>";
        $html .= "<td>" . $value['nameArtist'] . "<br/><a href=\"./administration.php?m=a&id=" . $value['idArtist'] . "\">Modifier</a></td>";
        $html .= "<td>" . $value['bio'] . "<br/><a href=\"./administration.php?m=b&id=" . $value['idArtist'] . "\">Modifier</a></td>";
        $html .= "<td>" . $value['magicCookieYoutube'] . "<br/><a href=\"./administration.php?m=mgcy&id=" . $value['idArtist'] . "\">Modifier</a></td>";
        $html .= '<td><form method="post"><button class="btn btn-danger" name="SupressionArtist">Supression</button><input type="hidden" name="id" value="' . $value['idArtist'] . '"/></from></td>';
        $html .= "</tr>";
    }
    $html .= "</table>";
}
예제 #2
0
                                  <input type="hidden" name="type" value="a">
                                  <input type="hidden" name="id" value="' . get_idArtist_by_name($_REQUEST['name'])['idArtist'] . '">
                                  <input type="hidden" name="idUser" value="' . $_SESSION['idUser'] . '">
                                  <button type="submit" class="btn btn-success" name="AjoutCommentaire">Ajouter</button>
                              </div>
                          </form>';
        } else {
            $commentaire = "<h2>Pour commenter veuillez vous connecter</h2>";
        }
    } else {
        $html = "<h1>Pas d'artiste sous ce nom là.</h1>";
    }
} else {
    global $html;
    $html = "<table><tr><th>Nom de l'artiste</th><th>Biographie</th>";
    $array_result = get_array_all_artist();
    foreach ($array_result as $value) {
        $html .= "<tr>";
        $html .= '<td><a href="artists.php?name=' . $value['nameArtist'] . '">' . $value['nameArtist'] . '</a></td>';
        $html .= "<td>" . $value['bio'] . "</td>";
        $html .= "</tr>";
    }
    $html .= "</table>";
}
if (isset($_REQUEST['AjoutCommentaire'])) {
    add_comment($_REQUEST['contenu'], $_REQUEST['id'], $_REQUEST['idUser'], 'a');
}
?>
 <html lang="fr">
     <head>
         <meta charset="utf8" />