Example #1
0
			if($lieu_incident=="") {
				//$texte.="<br /><span style='font-size:x-small;'>Lieu&nbsp;: ".$lieu_incident."</span>";
				$lieu_incident="non précisé";
			}
			$texte.="<br /><span style='font-size:x-small;'>Lieu&nbsp;: ".$lieu_incident."</span>";

			if($lig->heure!="") {
				$texte.="<span style='font-size:x-small;'> à l'heure $lig->heure</span>";
			}

			$texte.="<br /><span style='font-size:x-small;'>".ucfirst($mod_disc_terme_incident)." signalé par ".u_p_nom($lig->declarant)."</span>";

			if(($lig->declarant==$_SESSION['login'])||($_SESSION['statut']!='professeur')) {$possibilite_prof_clore_incident='y';} else {$possibilite_prof_clore_incident='n';}

			$mesure_demandee_non_validee="n";
			$texte.=affiche_mesures_incident($lig->id_incident);

			$tabdiv_infobulle[]=creer_div_infobulle("incident_".$lig->id_incident,"".ucfirst($mod_disc_terme_incident)." n°$lig->id_incident","",$texte,"",30,0,'y','y','n','n');

			if(($lig->etat=='clos')||(($_SESSION['statut']=='professeur')&&($lig->declarant!=$_SESSION['login']))||(($_SESSION['statut']=='autre')&&($lig->declarant!=$_SESSION['login']))) {
				echo "<a href='#'";
				echo " onmouseover=\"cacher_toutes_les_infobulles();delais_afficher_div('incident_".$lig->id_incident."','y',20,20,$delais_affichage_infobulle,$largeur_survol_infobulle,$hauteur_survol_infobulle);\"";
				echo " onclick='return false;'";
				echo ">Détails</a>";
			}
			else {
				echo "<a href='";
				echo "saisie_incident.php?id_incident=$lig->id_incident&amp;step=2";
				echo "' onmouseover=\"cacher_toutes_les_infobulles(); delais_afficher_div('incident_".$lig->id_incident."','y',20,20,$delais_affichage_infobulle,$largeur_survol_infobulle,$hauteur_survol_infobulle);\"";
				echo ">Modifier</a>";
				//echo "><img src='../images/edit16b.png' class='icone16 title='Modifier' /></a>";
Example #2
0
                ?>
                    </table>
<?php 
            } else {
                ?>
                    <p>Aucun type de mesure n'est défini.</p>
<?php 
            }
            ?>
                </td>
<?php 
        } else {
            ?>
                <td style='text-align:left;'>
<?php 
            $texte = affiche_mesures_incident($id_incident);
            ?>
                    <?php 
            echo $texte;
            ?>
                </td>
<?php 
        }
        ?>
            </tr>
<?php 
    }
    //========================
    ?>
        </table>
<?php 
Example #3
0
function rappel_incident($id_incident, $mode_retour = 'echo')
{
    global $mod_disc_terme_incident;
    $retour = "";
    $retour .= "<p class='bold'>Rappel de l'" . $mod_disc_terme_incident;
    if (isset($id_incident)) {
        $retour .= " n°{$id_incident}";
        $sql = "SELECT declarant FROM s_incidents WHERE id_incident='{$id_incident}';";
        $res_dec = mysqli_query($GLOBALS["mysqli"], $sql);
        if (mysqli_num_rows($res_dec) > 0) {
            $lig_dec = mysqli_fetch_object($res_dec);
            $retour .= " (<span style='font-size:x-small; font-style:italic;'>signalé par " . u_p_nom($lig_dec->declarant) . "</span>)";
        }
    }
    $retour .= "&nbsp;:</p>\n";
    $retour .= "<blockquote>\n";
    $sql = "SELECT * FROM s_incidents WHERE id_incident='{$id_incident}';";
    //$retour.="$sql<br />\n";
    $res_incident = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res_incident) > 0) {
        $lig_incident = mysqli_fetch_object($res_incident);
        $retour .= "<table class='boireaus' border='1' summary='" . ucfirst($mod_disc_terme_incident) . "'>\n";
        $retour .= "<tr class='lig1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Date: </td><td style='text-align:left;'>" . formate_date($lig_incident->date) . "</td></tr>\n";
        $retour .= "<tr class='lig-1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Heure: </td><td style='text-align:left;'>{$lig_incident->heure}</td></tr>\n";
        $retour .= "<tr class='lig1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Lieu: </td><td style='text-align:left;'>";
        /*
        $sql="SELECT lieu FROM s_lieux_incidents WHERE id='$lig_incident->id_lieu';";
        $res_lieu_incident=mysql_query($sql);
        if(mysql_num_rows($res_lieu_incident)>0) {
        	$lig_lieu_incident=mysql_fetch_object($res_incident);
        	$retour.=$lig_lieu_incident->lieu;
        }
        */
        $retour .= get_lieu_from_id($lig_incident->id_lieu);
        $retour .= "</td></tr>\n";
        $retour .= "<tr class='lig-1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Nature: </td><td style='text-align:left;'>{$lig_incident->nature}</td></tr>\n";
        $retour .= "<tr class='lig1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Description: </td><td style='text-align:left;'>" . nl2br($lig_incident->description) . "</td></tr>\n";
        /*
        $sql="SELECT * FROM s_traitement_incident sti, s_mesures s WHERE sti.id_incident='$id_incident' AND sti.id_mesure=s.id;";
        $res_t_incident=mysql_query($sql);
        if(mysql_num_rows($res_t_incident)>0) {
        	$retour.="<tr class='lig-1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Mesures&nbsp;: </td>\n";
        	$retour.="<td style='text-align:left;'>";
        	while($lig_t_incident=mysql_fetch_object($res_t_incident)) {
        		$retour.="$lig_t_incident->mesure (<em style='color:green;'>mesure $lig_t_incident->type</em>)<br />";
        	}
        	$retour.="</td>\n";
        	$retour.="</tr>\n";
        }
        */
        $texte = affiche_mesures_incident($lig_incident->id_incident);
        if ($texte != '') {
            $retour .= "<tr class='lig-1'><td style='font-weight:bold;vertical-align:top;text-align:left;'>Mesures&nbsp;: </td>\n";
            $retour .= "<td style='text-align:left;'>";
            $retour .= $texte;
            $retour .= "</td>\n";
            $retour .= "</tr>\n";
        }
        $retour .= "</table>\n";
    } else {
        $retour .= "<p>L'" . $mod_disc_terme_incident . " n°{$id_incident} ne semble pas enregistré???</p>\n";
    }
    $retour .= "</blockquote>\n";
    if ($mode_retour == 'echo') {
        echo $retour;
    } else {
        return $retour;
    }
}