Esempio n. 1
0
    */
    if (empty($errors)) {
        $listeCheck = '';
        for ($i = 0; $i < count($STATGEOL); $i++) {
            if (isset($_POST['stat_zonegeo_' . $i])) {
                $listeCheck .= $i . ',';
            }
        }
        $stat = new Stat();
        $stat->SetParam(NULL, $idIncident, $_POST['refchangement'], $_POST['stat_publicationIR'], $_POST['stat_publicationPM'], $_POST['stat_typecause'], $_POST['stat_typecause_second'], $_POST['stat_typologiegts'], $_POST['stat_equipeResp'], $_POST['fournisseurResp'], $_POST['statPowerprod'], $_POST['statLegacy'], $_POST['stat_Composant'], $_POST['Composant_complement'], $listeCheck);
        $idStat = $stat->Creer();
        $_SESSION['flash']['success'] = "Le stat est Bien Ajouté !";
        header('Location:modifStat.php?idStat=' . $idStat . '&idIncident=' . $idIncident);
    }
}
$incident = new incidents();
$incident->_setUser($userConnected);
$incident->chargerIncident($idIncident);
$impacte = new Impact();
$impacte->chargerFirstIncident($idIncident);
$application = new Application();
$application->SelectAppliById($impacte->getApplicationId());
require_once '../inc/header.inc.php';
?>
<h1>Statistique</h1>
<form action="" method="POST">
	<div class="bloc">
	<?php 
$link = "Stat";
require_once '../inc/search.inc.php';
?>
Esempio n. 2
0
File: add.php Progetto: anisinfo/osi
	
		<?php 
    foreach ($errors as $error) {
        echo '<li>' . $error . '</li>';
    }
    ?>
		</ul>
	</div>

<?php 
}
?>
<form action="" method="POST">
<div class="bloc">
<?php 
$incident = new incidents();
$idIncident = isset($_GET['IdIncident']) ? $_GET['IdIncident'] : '';
if ($idIncident) {
    $incident->chargerIncident($idIncident);
}
require_once '../inc/search.inc.php';
?>
	<div class="width100 bcg">
	<div class="width100">

	<input type="submit" value="Sauvegarder" name="submit" />
</div>
		<div class=" width50 fl-left">
			<div class="width100">
				<div class=" width32 mr_9">
		    		<label  class="lib"  for="titreincident"> Incident *</label> 
Esempio n. 3
0
	<h5>Vous avez des erreurs dans le remplissage de votre formulaire</h5>
		<?php 
    foreach ($errors as $error) {
        echo '<li>' . $error . '</li>';
    }
    ?>
		</ul>
	</div>

<?php 
}
?>
<form action="" method="POST">
	<div class="bloc">
	<?php 
$incident = new incidents();
$incident->chargerIncident($numincident);
require_once '../inc/search.inc.php';
?>
	<?php 
$statLink = $incident->getIdStat() ? 'modifStat.php?idIncident=' . $numincident . '&idStat=' . $incident->getIdStat() : 'stat.php?idIncident=' . $numincident;
?>
	<div class="width100 input-group-addon">
	<span class="fl-left" style=" line-height:2.5;">
	      Ajout pour l'incident N°:<strong><?php 
echo $incident->getIncident();
?>
</strong>
	    </span>
		
		<span class="lib" style="float:left; margin-left:25px; line-height:2.5;"> Titre comm :
Esempio n. 4
0
    if (isset($res[0])) {
        header('Location:modif.php?id=' . $res[0][0] . '&NumeroIncidentF=' . $_GET['NumeroIncident']);
        die;
    } else {
        $_SESSION['flash']['danger'] = "Le numéro de l'incident <b>" . $idSearch . "</b> n'est pas dans la base!";
        header('Location:index.php');
        die;
    }
}
if (!$numero) {
    $_SESSION['flash']['danger'] = "Le numéro de l'incident est vide!";
    header('Location:index.php');
    die;
}
// Creation de l'objet incident
$incident = new incidents();
$impacte = new Impact();
$calendrier = new Calendrier();
$appli = new Application();
//Récupération de contenu du fichier Json
$contenu_fichier_json = file_get_contents('../inc/TraceFiche.json');
$tr = json_decode($contenu_fichier_json, true);
if (!empty($_POST)) {
    $errors = array();
    $_POST['Incident_risqueAggravation'] = isset($_POST['Incident_risqueAggravation']) ? 1 : 0;
    $_POST['Incident_dejaApparu'] = isset($_POST['Incident_dejaApparu']) ? 1 : 0;
    $_POST['Incident_previsible'] = isset($_POST['Incident_previsible']) ? 1 : 0;
    /*
    Contrôle des champs obligatoire
    */
    if (empty($_POST['debutincident'])) {
Esempio n. 5
0
$userConnected = $_SESSION['auth'][2] . ' ' . $_SESSION['auth'][1];
$IdImpact = isset($_GET['IdImpact']) ? $_GET['IdImpact'] : '';
if (!$IdImpact) {
    $_SESSION['flash']['erreur'] = "Pas de numéro d'incident passé !";
    header('Location:ListeImpact.php?idIncident=' . $impacte->getIncidentId());
    die;
}
define('TITLE', "Modification de l'impacte N°:' " . $IdImpact);
require_once '../classes/db.php';
require_once '../inc/config.inc.php';
require_once '../inc/fonctions.inc.php';
require_once '../classes/Impact.php';
require_once '../classes/Application.php';
require_once '../classes/incidents.php';
require_once '../classes/Calendrier.php';
$incident = new incidents();
$impacte = new Impact();
$appli = new Application();
$calendrier = new Calendrier();
if (isset($_GET['action'])) {
    $impacte->supprimer($IdImpact);
    $_SESSION['flash']['erreur'] = "Impacte supprimé!";
    header('Location:ListeImpact.php?idIncident=' . $_GET['IdIncident']);
}
$impacte->chargerImpact($IdImpact);
$incident->chargerIncident($impacte->getIncidentId());
$numero = $impacte->getIncidentId();
if (!empty($_POST)) {
    $errors = array();
    $_POST['Incident_risqueAggravation'] = isset($_POST['Incident_risqueAggravation']) ? 1 : 0;
    $_POST['Incident_dejaApparu'] = isset($_POST['Incident_dejaApparu']) ? 1 : 0;
Esempio n. 6
0
<?php

session_start();
define('TITLE', "Pas d'incidents");
require_once '../inc/config.inc.php';
require_once '../inc/fonctions.inc.php';
require_once '../classes/db.php';
require_once '../classes/incidents.php';
if (isset($_GET['supprimer'])) {
    $incidents = new incidents();
    $incidents->chargerIncident($_GET['id']);
    $incidents->Supprimer();
    $contenu_fichier_json = file_get_contents('../inc/TraceFiche.json');
    $tr = json_decode($contenu_fichier_json, true);
    unset($tr[$_GET['id']]);
    $json = json_encode($tr);
    file_put_contents('../inc/TraceFiche.json', $json);
    $_SESSION['flash']['success'] = "L'incident est bien supprimé!";
}
$req = "SELECT ID,INCIDENT FROM " . SCHEMA . ".INCIDENT";
$req .= " ORDER BY ID DESC";
$db = new db();
$db->db_connect();
$db->db_query($req);
$res = $db->db_fetch_array();
if (!isset($res[0][0])) {
    require_once '../inc/header.inc.php';
    ?>
<h1>Pas d'incidents</h1>
<a class="btn btn-success"  href="add.php">Ajouter Incident</a>
 	<?php 
Esempio n. 7
0
$numero = isset($_GET['idIncident']) ? $_GET['idIncident'] : '';
$userConnected = $_SESSION['auth'][2] . ' ' . $_SESSION['auth'][1];
if (!$numero) {
    $_SESSION['flash']['erreur'] = "Pas de numéro d'incident passé !";
    header('Location:index.php');
    die;
}
define('TITLE', 'Liste des impactes pour l\'incident :' . $numero);
require_once '../inc/config.inc.php';
require_once '../inc/fonctions.inc.php';
require_once '../classes/db.php';
require_once '../classes/incidents.php';
require_once '../classes/Impact.php';
require_once '../classes/Application.php';
require_once '../classes/Application.php';
$incident = new incidents();
$incident->chargerIncident($numero);
$impacte = new Impact();
$resultats = $impacte->chargerIncident($numero);
$appli = new Application();
require_once '../inc/header.inc.php';
?>
<h3>Liste d'impactes pour l'incident N°:<?php 
echo $incident->getIncident();
?>
</h3>
<br />
<br />
<div class="bloc">
<?php 
$link = "Impact";
Esempio n. 8
0
<?php

header('Content-Disposition: attachment; filename=' . basename('commachaud.vbs'));
$numero = isset($_GET['idIncident']) ? $_GET['idIncident'] : '';
if (!$numero) {
    $_SESSION['flash']['erreur'] = "Pas de numéro d'incident passé !";
    header('Location:index.php');
    die;
}
require_once '../inc/config.inc.php';
require_once '../inc/fonctions.inc.php';
require_once '../classes/db.php';
require_once '../classes/Impact.php';
require_once '../classes/incidents.php';
require_once '../classes/Application.php';
$incident = new incidents();
$impacte = new Impact();
$incident->chargerIncident($numero);
$resultats = $impacte->chargerIncident($numero);
$LDescription = "";
$LApplication = "";
for ($i = 0; $i < count($resultats); $i++) {
    $value = $resultats[$i];
    $application = new Application();
    $application->SelectAppliById($value[2]);
    $LDescription .= $value[11] . ', ';
    $LApplication .= $i == 0 ? '<b>' . $application->getName() . '</b>,' : $application->getName();
}
$listeBcci = $incident->chargerBcci();
$BccFinal = '';
foreach ($DESTINATAIREBCC as $key => $value) {