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
| <!--#INCLUDE FILE="fct_connexion.inc"-->
<html>
<head>
<title>Modification d'un materiel associé</title>
<link rel="stylesheet" type="text/css" href="../scripts/ssite.css">
</head>
<body background="../images/bkgGrisTach.gif" bgcolor="#FFFFFF">
<%
Connexion
if len(Request("sel_code")) <> 0 OR len(request("sel_trig")) <> 0 then
SQLQuery = " SELECT code,id_pers,fk_id_serv,id_serv, fk_id_site FROM rfi,collaborateur,service,site WHERE fk_id_pers = " & Request("sel_trig")
Set Result = OBJdbConnection.Execute(SQLQuery)
SQLQuery = " SELECT id_pers FROM collaborateur WHERE nom = 'aucun' AND fk_id_serv = " & result("id_serv")
Set rs = OBJdbConnection.Execute(SQLQuery)
SQLQuery ="UPDATE rfi SET fk_id_pers = " & RS("id_pers") & " WHERE code = " & result("code")
OBJdbConnection.Execute(SQLQuery)
SQLQuery = " UPDATE rfi SET fk_id_pers = " & request("sel_trig") & " where code = " & request(sel_code)
OBJdbConnection.Execute(SQLQuery)
'deconnexion de la base de données par la fonction Deconnexion() du fichier fct_connexion.inc
Deconnexion
Response.Redirect "mod_ok.htm"
End if
if Action = "Annuler" Then
'deconnexion de la base de données par la fonction Deconnexion() du fichier fct_connexion.inc
Deconnexion
Response.Redirect "welcome.htm"
End If
%>
<p align="left"><strong>Renseignez les champs ci-dessous. </strong><br><u>Les rubriques
indiquées en rouge sont obligatoires</u></p>
<form method="POST" name="Form3" action="collab&materiel.asp">
<div align="center"><center>
<table border="0" width="100%" cellspacing="1">
<tr>
<td colspan="2" class="petit"><font color="#008080"><em><strong>Informations</strong></em></font></td>
</tr>
<tr>
<td align="right" width="30%" class="petit"><font color="#BF0000"><strong>Code :</strong></font></td>
<td width="70%" class="petit">
<select name="sel_code" size="1" tabindex="1">
<option initial value="Services">Choissisez un identifiant</option>
<%
'connexion à la base de données par l'intermédiaire de la fonction Connexion() du fichier fct_connexion.inc
Connexion
'création du Recordset
SQLQuery = "SELECT DISTINCT code FROM rfi,categorie "
SQLQuery = SQLQuery & " order by code "
'SQLQuery = SQLQuery & " where fk_id_cat=id_cat "
Set RC = OBJdbConnection.Execute(SQLQuery)
'Remplissage de la liste
If Not estVide(RC) Then
Do Until RC.Eof
response.write("<option value='" & Replace(RC("code"),"'","&") & "'>") 'Replace(RC("code"),"'","''")
response.write(RC("code"))
response.write("</option>")
RC.MoveNext
Loop
End If
'Fermeture du Recordset par l'intermédiaire de la fonction Fermeture(...) du fichier fct_connexion.inc
Fermeture RC
%>
</select>
</td>
</tr>
<tr>
<td align="right" width="30%" class="petit"><font color="#BF0000"><strong>Collaborateur :</strong></font></td>
<td width="70%" class="petit">
<small>
<select name="sel_trig" size="1" tabindex="2">
<option initial value="Trigrammes">Choisissez un collaborateur</option>
<%
'connexion à la base de données par l'intermédiaire de la fonction Connexion() du fichier fct_connexion.inc
Connexion
'création du Recordset
SQLQuery = "SELECT id_pers,trigramme FROM collaborateur "
SQLQuery = SQLQuery & " order by trigramme "
Set trig = OBJdbConnection.Execute(SQLQuery)
'Remplissage de la liste
If Not estVide(trig) Then
Do Until trig.Eof
response.write("<option value='" & Replace(trig("id_pers"),"'","&") & "'>")
response.write(trig("trigramme"))
response.write("</option>")
trig.MoveNext
Loop
End If
'Fermeture du Recordset par l'intermédiaire de la fonction Fermeture(...) du fichier fct_connexion.inc
Fermeture trig
%>
</select>
</small>
</td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td colspan="2" align="center" class="petit" height="29"><small><input type="submit" value="Appliquer" name="Action"><input type="submit" value="Annuler" name="Action"></small>
</td>
</tr>
</table>
</center>
</form>
</body>
</html> |
Partager