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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
| <?include("verif_session_administration.php");?>
<!-- include en_tete -->
<?php
include ("../en_tete.php");
?>
<div class="partie_gauche">
<div id="partie_contenu">
<!-- --------------------------------- -->
<!-- La partie contenu -->
<!-- --------------------------------- -->
<div id="gros_titre_service_admin">
<h3><span>Administration plateforme.</span></h3>
</div>
<div id=titre_service>Gestion des synonymes des mots clefs</div>
<!--<div id=sous_titre_service>- Nous sommes le 2005/10/03</div>-->
<div id=texte_service>
<p class="p2"> Bienvenue sur l'interface de gestion des synonymes des mots clefs.</p>
</div>
<div id=texte_service>
<?php
include ("../fonctions.php");
if(isset($_REQUEST['ajouter']))
{
$erreur="";
if($_POST['synonyme']=="")
$erreur="Vous devez remplir le champs. Synonyme non créé.<br/>";
// On regarde si il n'y a pas deja ce mot clef sur ce numero/smsc
$sql="select * from short_numbers a, type_msg_recus b where a.numero=b.numeros_appel and a.smsc=b.smsc and b.type_msg='".addslashes($_POST['synonyme'])."'";
$res=mysql_query($sql);
if(mysql_num_rows($res)>0)
{
$data=mysql_fetch_array($res);
$erreur.="Le mot-clef " . $_POST['synonyme'] . " est déjà utilisé sur le numéro " .$data['numero']. " par le service \"".(($data['synonyme_de']!="")? $data['synonyme_de']:$data['type_msg'])."\".<br>";
}
if($erreur=="")
{
/* //$sql="select * from short_numbers where id_short_number IN (select numero from short_numbers where id_short_numbers='".$data['numeros_appel']."'";
$sql="select * from short_numbers where id_short_numbers='".$POST['id_short_numbers']."'";
$res=mysql_query($sql);
$data=mysql_fetch_array($res);
$smsc=$data['smsc'];
$numero=$data['numero'];
*/
$sql="select * from type_msg_recus where ref_type_msg='".$_POST['ref_type_msg']."'";
$res=mysql_query($sql);
$data=mysql_fetch_array($res);
$sql="select * from type_msg_recus where type_msg='".$data['type_msg']."' and synonyme_de=''";
$res=mysql_query($sql);
while($data=mysql_fetch_array($res))
{
$sql="insert into type_msg_recus(type_msg,numeros_appel,smsc,categorie_msg,id_categorie_service,statut,text_info,avec_code,synonyme_de) values('".addslashes($_POST['synonyme'])."','".$data['numeros_appel']."','".$data['smsc']."','".$data['categorie_msg']."','".$data['id_categorie_service']."','".$data['statut']."','".addslashes($data['text_info'])."','".$data['avec_code']."','".addslashes($data['type_msg'])."')";
mysql_query($sql);
}
print("<div id=grosse_surbrillance>Synonyme ajouté avec succès.</div>");
}
else
{
print("<div id=grosse_surbrillance>".$erreur."</div>");
}
}
if(isset($_REQUEST['supprimer']))
{
$sql="delete from type_msg_recus where ref_type_msg=".$_REQUEST['ref_type_msg'];
mysql_query($sql);
print("<div id=grosse_surbrillance>Synonyme supprimé avec succès.</div>");
}
?>
</div>
<div id=titre2_service>Les mots clefs et leurs synonymes</div>
<div id=texte_service>
<p class="p2">
<div id=stats>
<?php
$sql="select * from type_msg_recus where synonyme_de='' and type_msg<>'' group by type_msg";
$menu_nav="";
$menu_nav=menu_page($sql,$resultat,$_GET['page'],20,0);
if ($menu_nav!="")
{
?>
<table width='85%' border='0' align="center" cellpadding='0' cellspacing='0'>
<tr><td align="center"><? echo $menu_nav; ?></td></tr>
</table>
<?php
}
?>
<table>
<thead>
<tr>
<td>Mot Clef</td><td>Synonymes</td><td>Ajouter Synonyme</td></tr>
</tr>
</thead>
<?php
while($data=mysql_fetch_array($resultat))
{
print("<tr>");
print("<td valign=top><div id=grosse_surbrillance>".$data['type_msg']."</div>");
// $sql2="select * from type_msg_recus where type_msg='".$data['type_msg']."' and synonyme_de=''";
// $res2=mysql_query($sql2);
/*while($data2=mysql_fetch_array($res2))
{
print("<br>".$data2['numeros_appel']);
}*/
print("</td><td valign=top>");
$sql2="select * from type_msg_recus where synonyme_de='".$data['type_msg']."' group by type_msg";
$res2=mysql_query($sql2);
while($data2=mysql_fetch_array($res2))
{
print($data2['type_msg']." "."<a href=gestion_synonymes2.php?supprimer=yes&ref_type_msg=".$data2['ref_type_msg']."><img src=../images/icone_supprimer.png alt=Supprimer border=0></a><br>");
}
print("<td valign=top>");
print("<div id=formulaire>");
print("<form action='gestion_synonymes2.php' method='post'>");
print("<input type=text name=synonyme maxlength=20 size=15>");
/*print("<select name=numeros_appel>");
//print("<option value=''>---</option>");
$sql2="select * from short_numbers order by lib_operateur";
$res2=mysql_query($sql2);
while($data2=mysql_fetch_array($res2))
{
//print("<option value=".$data2['id_short_numbers'].">".$data2['numero']."</option>");
}*/
print("</select>");
print("<input type=hidden value=".$data['ref_type_msg']." name=ref_type_msg>");
print("<input type=submit value=Ok name=ajouter>");
print("</form>");
print("</div>");
print("</td>");
print("</tr>");
}
?>
</table>
</div>
</p>
</div>
<!-- --------------------------------- -->
<!-- Fin partie contenu -->
<!-- --------------------------------- -->
</div>
<hr />
</div>
<div class="partie_droite">
<!-- --------------------------------- -->
<!-- La partie menu -->
<!-- --------------------------------- -->
<div id="partie_menu">
<div id="titre_identification">
<h3><span>Identification.</span></h3>
<p class="p2">Vous vous etes identifié en utilisant le compte
<?php
if (isset($_SESSION['login']))
{
print("<b>".$_SESSION['login']."</b>.");
}
?>
Si vous souhaitez vous déconnecter, <a href="../killsession.php">cliquez ici</a>.
</p>
</div>
</div>
<?php
?>
<?php
include("menu_droite.php");
?>
<div id="partie_menu">
<div id="titre_navigation">
<h3><span> Navigation.</span></h3>
</div>
<div id="bouton_menu">
<ul>
<li>
<a href="../menu.php">- Retour a l'accueil</a>
</li>
</ul>
</div>
</div>
<!-- --------------------------------- -->
<!-- Fin partie menu -->
<!-- --------------------------------- -->
<hr />
</div>
<?php
include ("../pied_page.php");
?> |