get_comment();
    //Par défaut on affiche la gestion des commentaires
}
if (isset($_REQUEST['m']) && isset($_REQUEST['id'])) {
    modify_artist($_REQUEST['m'], $_REQUEST['id']);
}
if (isset($_REQUEST['modifierChamp']) && isset($_REQUEST['type'])) {
    modify_artist_db($_REQUEST['type'], $_REQUEST[$_REQUEST['type']], $_REQUEST['id']);
    header('Location: administration.php');
    exit;
}
/*
 * On vérifie que le paramètre passé dans l'url est bien un entier car l'identifiant est un entier
 */
if (isset($_REQUEST['promote']) && is_numeric($_REQUEST['promote'])) {
    promote_user($_REQUEST['promote']);
}
if (isset($_REQUEST['delete']) && is_numeric($_REQUEST['delete'])) {
    delete_user($_REQUEST['delete']);
}
if (isset($_REQUEST['validComment']) && is_numeric($_REQUEST['validComment'])) {
    accept_comment($_REQUEST['validComment']);
}
if (isset($_REQUEST['deleteComment']) && is_numeric($_REQUEST['deleteComment'])) {
    delete_comment($_REQUEST['deleteComment']);
}
?>
<html lang="fr">
    <head>
        <meta charset="utf8" />
        <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
Exemple #2
0
<?php

$cid = isset($_POST['cid']) ? $_POST['cid'] : '';
$coor_uid = isset($_POST['coor_uid']) ? $_POST['coor_uid'] : '';
$course = course_load($cid);
if (isset($_POST['submit'])) {
    promote_user($coor_uid, $cid);
    sleep(1);
    header('location: ' . currentURL() . '?p=course');
}
?>
<form id="form" method="post" action="">
	<input type="hidden" name="cid" value="<?php 
print $cid;
?>
"/>
	<table style="width: 600px;">
		<tr>
			<td><label for="coor_uid">Select a coordinator from course's lecturers:</label></td>
			<td><?php 
print select_coor_uid('coor_uid', $cid);
?>
</td>
		</tr>
		<tr>
			<td><input type="submit" name="submit" value="Promote" /></td>
			<td><a class="button" href="?p=course">Cancel</a></td>
		</tr>
	</table>
</form>