switch ($paym) { case "0": $mem_dec = "Compra"; $cost = get_field("compra", $object_id); break; case "1": $mem_dec = "Renta por día"; $cost = get_field("renta", $object_id); break; case "2": $mem_dec = "Compra por membresia"; $cost = get_field("membresia", $object_id); break; } get_header(); $userdata = get_info_user(is_login()); ?> <div class="well well-lg" align="center"> <div id="login_well_inside" align="left"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Descripción</h3> </div> <div class="panel-body"> Hola <strong><?php echo $userdata[1] . " " . $userdata[2]; ?> </strong> esta apunto de adquirir el Objeto <strong><?php echo get_the_title($object_id); ?>
*/ require "../lib/footer.inc.php"; die; } echo " | <a href='" . $_SERVER['PHP_SELF'] . "'>Extraire les engagements pour d'autres classes</a></p>\n</div>\n"; //debug_var(); // Afficher les personnes extraites // Pouvoir générer un CSV... // Pouvoir envoyer un mail... $cpt = 0; echo "<form enctype='multipart/form-data' action='" . $_SERVER['PHP_SELF'] . "' method='post' name='formulaire' target='_blank'>\n\t<fieldset class='fieldset_opacite50'>\n\t\t" . add_token_field() . "\n\t\t<table class='boireaus boireaus_alt sortable resizable'>\n\t\t\t<tr>\n\t\t\t\t<th class='nosort'>\n\t\t\t\t\t<a href='javascript:modif_case(true)'><img src='../images/enabled.png' width='15' height='15' alt='Tout cocher' /></a>/\n\t\t\t\t\t<a href='javascript:modif_case(false)'><img src='../images/disabled.png' width='15' height='15' alt='Tout décocher' /></a>\n\t\t\t\t</th>\n\t\t\t\t<th class='text'>Nom</th>\n\t\t\t\t<th class='text'>Prénom</th>\n\t\t\t\t<th class='text'>Statut</th>\n\t\t\t\t<th class='text'>Classe</th>\n\t\t\t\t<th class='text'>Engagements</th>\n\t\t\t</tr>"; for ($loop = 0; $loop < count($id_classe); $loop++) { $tab = get_tab_engagements_user("", $id_classe[$loop]); $nom_classe = get_nom_classe($id_classe[$loop]); foreach ($tab['login_user'] as $current_login => $tab_engagement_current_user) { $tab_user = get_info_user($current_login); $chaine_tr = "\n\t\t\t<tr id='texte_login_user_{$cpt}'>\n\t\t\t\t<td><input type='checkbox' name='login_user[]' id='login_user_{$cpt}' value=\"{$current_login}\" onchange=\"checkbox_change('login_user_{$cpt}')\" /></td>\n\t\t\t\t<td><label for='login_user_{$cpt}'>" . $tab_user['nom'] . "</label>"; /* echo "<pre>"; echo print_r($tab_user); echo "</pre>"; */ $chaine_tr .= "</td>\n\t\t\t\t<td><label for='login_user_{$cpt}'>" . $tab_user['prenom'] . "</label></td>\n\t\t\t\t<td>" . $tab_user['statut'] . "</td>\n\t\t\t\t<td>" . $nom_classe . "</td>\n\t\t\t\t<td>"; $temoin_engagement_recherche = "n"; for ($loop2 = 0; $loop2 < count($tab_engagement_current_user); $loop2++) { if ($tab_user['statut'] == "eleve" && in_array($tab['indice'][$tab_engagement_current_user[$loop2]]['id_engagement'], $engagement_ele) || $tab_user['statut'] == "responsable" && in_array($tab['indice'][$tab_engagement_current_user[$loop2]]['id_engagement'], $engagement_resp)) { /* echo " <pre>"; print_r($tab); echo "
<?php /* Template name: Profile */ get_header(); $info_user = array(); $info_user = get_info_user(is_login()); $cP = 0; $cD = 0; $cPass = 0; $cData = 0; $addCard = 0; $addTarjeta = 0; $editCard = 0; if (isset($_GET["cP"])) { if ($_GET["cP"] == 1) { $cP = 1; } else { if ($_GET["cP"] == 'ok') { $cPass = 100; $cP = 0; } } } else { if (isset($_GET["cD"])) { if ($_GET["cD"] == 1) { $cD = 1; } else { if ($_GET["cD"] == 'ok') { $cData = 100;
/** * Retourne le login de l'utilisateur */ function aff_login($param, $parser) { $info_user = get_info_user($param, $parser); return $info_user['empr_login']; }
echo "\$id_absence=".$id_absence."<br />"; */ if (isset($tab_id_absence) && count($tab_id_absence) > 1) { echo "<p>Faire une proposition de remplacement ou un appel à remplacement pour l'absence de :</p>\n\t<ul>"; for ($loop = 0; $loop < count($tab_id_absence); $loop++) { echo "\n\t\t<li><a href='proposer_remplacement.php?id_absence=" . $tab_id_absence[$loop]['id_absence'] . "'>" . civ_nom_prenom($tab_id_absence[$loop]['login_user']) . "</a></li>"; } echo "\n\t</ul>"; echo "<p>Ou contrôler/modifier la saisie pour l'absence de :</p>\n\t<ul>"; for ($loop = 0; $loop < count($tab_id_absence); $loop++) { echo "\n\t\t<li><a href='saisir_absence.php?id_absence=" . $tab_id_absence[$loop]['id_absence'] . "&login_user[]=" . $tab_id_absence[$loop]['login_user'] . "'>" . civ_nom_prenom($tab_id_absence[$loop]['login_user']) . "</a></li>"; } echo "\n\t</ul>"; require "../lib/footer.inc.php"; die; } echo "\n<form action=\"" . $_SERVER['PHP_SELF'] . "#debut_de_page\" method=\"post\" style=\"width: 100%;\" name=\"formulaire_saisie_details\">\n\t<fieldset class='fieldset_opacite50'>\n\n\t\t" . (isset($id_absence) ? "<div style='float:right; width:10em;text-align:center;'><p><a href='proposer_remplacement.php?id_absence={$id_absence}'>Faire une proposition de remplacement ou un appel à remplacement</a>.</p><p style='color:red'>A FAIRE: Indiquer le nombre de créneaux déjà remplacés sur le nombre de créneaux libérés.</p></div>" : "") . "\n\n\t\t" . add_token_field() . "\n\t\t" . (isset($id_absence) ? "<input type='hidden' name='id_absence' value='" . $id_absence . "' />" : "") . "\n\n\t\t<p>Vous souhaitez saisir une absence pour le ou les professeurs suivants :<br /><span class='bold'>"; $tab_prof = array(); for ($loop = 0; $loop < count($login_user); $loop++) { $tab_prof[$loop] = get_info_user($login_user[$loop]); if ($loop > 0) { echo ", "; } echo "<input type='hidden' name='login_user[]' value='" . $login_user[$loop] . "' />"; echo $tab_prof[$loop]['denomination']; } echo "</span></p>\n\n\t\t<p>Veuillez préciser les dates/heures de début et de fin de l'" . (isset($id_absence) ? "<span class='bold'>absence n°{$id_absence}</span>" : "absence") . " :</p>\n\n\t\t<table class='boireaus boireaus_alt'>\n\t\t\t<tr>\n\t\t\t\t<th>Date de début</th>\n\t\t\t\t<td style='text-align:left;'>\n\t\t\t\t\t<input type='text' name='display_date_debut' id='display_date_debut' size='10' value=\"" . (isset($display_date_debut) ? $display_date_debut : "") . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />\n\t\t" . img_calendrier_js("display_date_debut", "img_bouton_display_date_debut") . "\n\t\t\t\t\t à/en \n\t\t\t\t\t<input type='text' name = 'display_heure_debut' id= 'display_heure_debut' size='5' value = \"" . (isset($display_heure_debut) ? $display_heure_debut : "") . "\" onKeyDown=\"clavier_heure(this.id,event);\" AutoComplete=\"off\" />\n\t\t\t\t\t" . choix_heure('display_heure_debut', 'div_choix_heure_debut', 'return') . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th>Date de fin</th>\n\t\t\t\t<td style='text-align:left;'>\n\t\t\t\t\t<input type='text' name='display_date_fin' id='display_date_fin' size='10' value=\"" . (isset($display_date_fin) ? $display_date_fin : "") . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />\n\t\t" . img_calendrier_js("display_date_fin", "img_bouton_display_date_fin") . "\n\t\t\t\t\t à/en \n\t\t\t\t\t<input type='text' name = 'display_heure_fin' id= 'display_heure_fin' size='5' value = \"" . (isset($display_heure_fin) ? $display_heure_fin : "") . "\" onKeyDown=\"clavier_heure(this.id,event);\" AutoComplete=\"off\" />\n\t\t\t\t\t" . choix_heure('display_heure_fin', 'div_choix_heure_fin', 'return') . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th>Titre/motif</th>\n\t\t\t\t<td style='text-align:left;'>\n\t\t\t\t\t<input type='text' name='titre' id='titre' size='50' value=\"" . (isset($titre) ? $titre : "") . "\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th>Description/détails</th>\n\t\t\t\t<td>"; $oCKeditor = new CKeditor('../ckeditor/'); $oCKeditor->editor('description', preg_replace("/\\\\n/", "", $description)); echo "\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t</table>\n\n\t\t<input type='hidden' name='enregistrer_dates' value='y' />\n\n\t\t<p style='color:red'><input type='checkbox' name='info_ele_parents' id='info_ele_parents' value='y' /><label for='info_ele_parents'> Informer sans attendre les parents en page d'accueil.</label><br />\n\t\t<span style='color:red'>Cette option n'est pas encore implémentée...</span></p>\n\n\t\t<p><input type='submit' value='Valider' /></p>\n\n\t</fieldset>\n</form>"; require "../lib/footer.inc.php";
} else { if (isset($tab_engagements_classe['id_engagement_user'][$tab_engagements['indice'][$loop]['id']]) && in_array($lig_resp->login, $tab_engagements_classe['id_engagement_user'][$tab_engagements['indice'][$loop]['id']])) { echo "<img src='../images/enabled.png' class='icone20' />"; } } echo "</td>\n"; } echo "</tr>\n"; $cpt++; } echo "</table>\n"; //$last_ele[$id_classe[$i]]=$cpt; } $chaine_engagements_hors_classe = ""; foreach ($tab_engagements_classe['login_user'] as $current_login => $tab_id_engagement) { $tmp_info_user = get_info_user($current_login); if (!in_array($current_login, $tab_resp) && $tmp_info_user['statut'] == 'responsable') { $chaine_engagements_hors_classe .= "\n\t\t<tr>\n\t\t\t<td><a href='saisie_engagements_user.php?login_user="******"' title=\"Saisir les engagements de cet utilisateur, même hors de la classe.\" onclick=\"return confirm_abandon (this, change, '{$themessage}')\">" . civ_nom_prenom($current_login) . "</a></td>"; for ($loop = 0; $loop < $nb_tous_engagements; $loop++) { $chaine_engagements_hors_classe .= "\n\t\t\t<td>\n"; if ($_SESSION['statut'] == 'administrateur' || $_SESSION['statut'] == 'cpe' && $tab_engagements['indice'][$loop]['SaisieCpe'] == 'yes' || $_SESSION['statut'] == 'scolarite' && $tab_engagements['indice'][$loop]['SaisieScol'] == 'yes') { $checked = ""; if (isset($tab_engagements_classe['id_engagement_user'][$tab_engagements['indice'][$loop]['id']]) && in_array($current_login, $tab_engagements_classe['id_engagement_user'][$tab_engagements['indice'][$loop]['id']])) { $checked = " checked"; } $chaine_engagements_hors_classe .= "<input type='checkbox' name='engagement[]' id='engagement_" . $loop . "_" . $cpt . "' value=\"" . $id_classe[$i] . "|" . $current_login . "|" . $tab_engagements['indice'][$loop]['id'] . "\"{$checked} onchange='changement()' />"; } else { if (isset($tab_engagements_classe['id_engagement_user'][$tab_engagements['indice'][$loop]['id']]) && in_array($current_login, $tab_engagements_classe['id_engagement_user'][$tab_engagements['indice'][$loop]['id']])) { $chaine_engagements_hors_classe .= "<img src='../images/enabled.png' class='icone20' />"; } }
function affiche_infos_adresse_et_tel($login_user, $tab_user = array()) { $retour = ""; if ($login_user != "") { $tab_user = get_info_user($login_user); } $retour .= "<table class='boireaus boireaus_alt2'>\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Téléphone</th>\n\t\t\t<th>Mail</th>\n\t\t\t<th>Adresse</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t" . (isset($tab_user['tel_pers']) && $tab_user['tel_pers'] != "" ? "Tel.pers :" . $tab_user['tel_pers'] . "<br />" : "") . "\n\t\t\t\t" . (isset($tab_user['tel_port']) && $tab_user['tel_port'] != "" ? "Tel.port :" . $tab_user['tel_port'] . "<br />" : "") . "\n\t\t\t\t" . (isset($tab_user['tel_pers']) && $tab_user['tel_prof'] != "" ? "Tel.prof :" . $tab_user['tel_prof'] : "") . "\n\t\t\t</td>\n\t\t\t<td>" . (isset($tab_user['email']) ? "<a href='mailto:" . $tab_user['email'] . "?" . urlencode("subject=" . getSettingValue('gepiPrefixeSujetMail') . "[GEPI]") . "' title='Envoyer un mail'>" . $tab_user['email'] . "</a>" : "") . "</td>\n\t\t\t<td>" . (isset($tab_user['adresse']['en_ligne']) ? $tab_user['adresse']['en_ligne'] : "") . "</td>\n\t\t</tr>\n\t</tbody>\n</table>"; return $retour; }
$checked = " checked"; } $ts = mysql_date_to_unix_timestamp($dates_conseils[$id_classe[$i]][$j]); echo "\n\t\t<input type='radio' name='date_conseil[" . $id_classe[$i] . "]' id='date_conseil_" . $id_classe[$i] . "_" . $ts . "' value='" . $dates_conseils[$id_classe[$i]][$j] . "'{$checked} /><label for='date_conseil_" . $id_classe[$i] . "_" . $ts . "' id='texte_date_conseil_" . $id_classe[$i] . "_" . $ts . "'>" . formate_date($dates_conseils[$id_classe[$i]][$j], "y", "complet") . "</label><br />"; } } echo "</p>"; for ($j = 0; $j < count($tab_engagements['indice']); $j++) { if ($tab_engagements['indice'][$j]['conseil_de_classe'] == 'yes') { $current_id_engagement = $tab_engagements['indice'][$j]['id']; if (!isset($tab_engagements_classe['id_engagement_user'][$current_id_engagement]) || count($tab_engagements_classe['id_engagement_user'][$current_id_engagement]) == 0) { echo "\n\t\t<p><strong>" . $tab_engagements['indice'][$j]['nom'] . " :</strong> Aucun n'est choisi.<br />"; } else { echo "\n\t\t<table class='boireaus boireaus_alt'>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>" . $tab_engagements['indice'][$j]['nom'] . "</th>\n\t\t\t\t\t<th>Convocation</th>\n\t\t\t\t\t<th>Mail</th>\n\t\t\t\t\t<th>Listes élèves pour prise de notes</th>\n\t\t\t\t\t<th>Informations</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>"; foreach ($tab_engagements_classe['id_engagement_user'][$current_id_engagement] as $key => $value) { $current_user = get_info_user($value); echo "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . $current_user['civ_denomination'] . "</td>\n\t\t\t\t\t<td>"; if (count($dates_conseils[$id_classe[$i]]) > 0) { if ($acces_imprimerConvocationConseilClasse) { echo "<input type='checkbox' name='convocation_" . $id_classe[$i] . "[]' id='convocation_{$cpt1}' value=\"{$value}\" />"; } else { echo "<img src='../images/disabled.png' class='icone20' alt='Non autorisé' title=\"Les comptes '" . $_SESSION['statut'] . "s' ne sont pas autorisés à imprimer les convocations.\" >"; } } else { echo "<img src='../images/disabled.png' class='icone20' alt='Pas de date' title=\"Aucune date de conseil de classe n'est saisie.\" >"; } echo "</td>\n\t\t\t\t\t<td>"; if (count($dates_conseils[$id_classe[$i]]) > 0) { $current_mail = get_mail_user($value); if ($acces_imprimerConvocationConseilClasse) { if (check_mail($current_mail)) {
$test = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($test) == 0) { $sql = "INSERT INTO droits SET id='/mod_engagements/saisie_engagements_user.php',\nadministrateur='V',\nprofesseur='F',\ncpe='V',\nscolarite='V',\neleve='F',\nresponsable='F',\nsecours='F',\nautre='F',\ndescription='Saisie des engagements pour un utilisateur',\nstatut='';"; $insert = mysqli_query($GLOBALS["mysqli"], $sql); } if (!checkAccess()) { header("Location: ../logout.php?auto=2"); die; } //$id_classe=isset($_POST['id_classe']) ? $_POST['id_classe'] : (isset($_GET['id_classe']) ? $_GET['id_classe'] : NULL); $login_user = isset($_POST['login_user']) ? $_POST['login_user'] : (isset($_GET['login_user']) ? $_GET['login_user'] : NULL); if (!isset($login_user)) { header("Location: ../accueil.php?msg=Utilisateur non choisi."); die; } $info_user = get_info_user($login_user); if (count($info_user) == 0) { header("Location: ../accueil.php?msg=Utilisateur '{$login_user}' inconnu."); die; } $engagement_statut = $info_user['statut']; if ($engagement_statut != 'eleve' && $engagement_statut != 'responsable') { header("Location: ../accueil.php?msg=Les engagements ne sont gérés que pour les élèves et responsables."); die; } //echo "\$engagement_statut=$engagement_statut<br />"; $tab_tous_engagements = get_tab_engagements($engagement_statut); if ($_SESSION['statut'] == 'administrateur') { $tab_engagements = $tab_tous_engagements; } elseif ($_SESSION['statut'] == 'cpe') { $tab_engagements = get_tab_engagements($engagement_statut, "cpe");