1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
| <%@ include file="traitementBdd.jsp"%>
<%@ page errorPage="pageErreur.jsp"%>
<%@ page import="java.util.Date" %>
<!doctype html>
<html>
<head>
<title>Outils Pilotage MySys</title>
<meta charset="ISO-8859-1" />
<link rel="stylesheet" href="../../../OPM/css/general.css"/>
<link rel="stylesheet" href="../../../OPM/css/accueilMsg.css"/>
<link rel="stylesheet" href="../../../OPM/javascript/jquery-ui/jquery-ui.css"/>
</head>
<body>
<section class="page">
<!--Import menu-->
<%@ include file="menu.jsp"%>
<h1>Bienvenue sur Outils Pilotage MySys</h1>
<a href="nouvMsg.jsp" id="ajouter"><img src="../../../OPM/image/plume.png" alt="Ajout" id="stylo" title="Créer un message de service"/>Ajouter un message</a>
<h2>Message de service</h2>
<%
try{
//Récupération de l'utilisateur
String user = gHabls.Utilisateur().getUserName().substring(1);
String caisse = gHabls.Utilisateur().getCaisse();
if (gHabls.estCTR())
{
//Attribution d'une caisse par défaut car les internes ITCE n'en ont pas
caisse="ce3";
}
int count = 0;
connexionOracle();
//REQUETE RECHERCHE MESSAGE POUR L'UTILISATEUR
String reqSelect = "SELECT DATDEB, DATFIN, MSG FROM DCTL0.DCTL_OPG_MSG WHERE SYSDATE <= DATDEB ORDER BY DATDEB ASC";
ResultSet resSelect = executeQuery(reqSelect);
count = resSelect.getFetchSize();
if (count == 0)
{
%><h2><marquee>aucun nouveau message</marquee></h2><%
}
else
{
%>
<table id="tableau" > <!-- Afficher la liste des messages dans un tableau-->
<thead>
<tr>
<th>A patrir du:
<th>Jusqu'au:
<th>Message:
<th colspan="2">Supprimer/Modifier
<%
for (int i=0; i<count; i++)
{
int index=1;
while (resSelect.next())
{
String dateDebut = resSelect.getString("DATDEB");
String dateFin = resSelect.getString("DATFIN");
String message = resSelect.getString("MSG");
%>
<tbody>
<tr id="<%=index%>">
<td class="tabEntete" width="10%"><%=dateDebut%>
<td class="tabEntete" width="10%"><%=dateFin%>
<td><%=message%>
<td class="tabEntete" width="7%"><a href="supprMsg.jsp" id="supprimer"><button type="button" id="boutonSuppr" title="Supprimer" onclick="supprimer();"><img src="../../../OPM/image/corbeille.png" alt="supprimer"></button>
<td class="tabEntete" width="7%"><a href="modMsg.jsp" id="modifier"><button type="button" id="boutonMod" title="Modifier" onclick="modifier();"><img src="../../../OPM/image/plume.png" alt="modifier"></button>
<%
index++;}
}
}
deconnexionOracle();
}
catch ( Exception e)
{
out.print(e.toString());
}%>
</table>
<!--Paragraphe pour l'alerte de suppresion d'un favori-->
<article id="confirm" style="display:none;" >
<p>Etes-vous sûr de vouloir supprimer ce message?</p>
</article>
</section>
<script src="../../../OPM/javascript/html5shiv.js"></script><!--Compatibilité IE8 et html5-->
<script src="../../../OPM/javascript/jquery-1.7.2.js"></script>
<script src="../../../OPM/javascript/jquery-ui/jquery-1.7.2.min.js"></script>
<script src="../../../OPM/javascript/jquery-ui/jquery-ui-1.8.20.custom.min.js"></script>
<script src="../../../OPM/javascript/jquery-ui/jquery.ui.dialog.js"></script>
<script>
//Couleur du lien du menu
$(document).ready( function () {
$('#msg').addClass("actif");
});
/*---suppresion d'un message---*/
function supprimer ('num')
{
$('#confirm').dialog(
{
resizable: false,
draggable:false,
width:480,
modal: true,
title:"Suppresion d'un message",
buttons:
{
"Oui": function()
{
$( this ).dialog( "close" );
location.href="supprMsg.jsp?num="+num;
},
Non: function()
{
$( this ).dialog( "close" );
}
}
});
}
</script>
</body>
</html> |
Partager