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
| <title>Service Informatique</title>
<HTA:APPLICATION
APPLICATIONNAME="Service Informatique"
BORDER="thin"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"></head>
<script language="VBScript">
Mdp = "toto"
Fichier_Log = "C:\Users\K-GEROLA\Desktop\Emprunt_Retour_Materiel.csv"
Sub Window_onLoad
Me.ResizeTo 400,360
Me.MoveTo ((Screen.Width / 2) - 200),((Screen.Height / 2) - 180)
End Sub
Sub Default_Buttons
If Window.Event.KeyCode = 13 Then
btn_Valider.Click
End If
End Sub
Sub Get_Valider
strEtat = LstEtat.value
strMdp = txt_mdp.value
strDate = txt_date.value
strUtil = txt_util.value
strMateriel = txt_materiel.value
if strEtat = "" or strMdp = "" or strDate="" or strUtil="" or strMateriel="" Then
msgbox "Informations manquantes"&vbCrLf&"Veuillez Completer",vbOKOnly,"Erreur"
Exit Sub
End If
if strMdp<>Mdp Then
msgbox "Mot de passe incorrect"&vbCrLf&"Reessayez",vbOKOnly,"Erreur"
Exit Sub
End If
Const ADS_SCOPE_SUBTREE = 2, ForReading = 1, ForWriting = 8
Dim oFSO, ecr, txt_entree
Set oFSO = CreateObject("Scripting.FileSystemObject")
if oFSO.FileExists(Fichier_Log) = False Then oFSO.CreateTextFile(Fichier_Log)
txt_entree = strEtat & ";" & strDate & ";" & strUtil & ";" & strMateriel & vbCrLf
set ecr = oFSO.OpenTextFile(Fichier_log, ForWriting) : ecr.Write(txt_entree) : ecr.Close
MsgBox "Entree Ajoutee", vbOKOnly
End sub
</script>
<body>
<p align="center">EMPRUNT RETOUR MATERIEL INFORMATIQUE</p></br>
<p align="center"> Selectionnez
<SELECT NAME="LstEtat" SIZE=1>
<OPTION VALUE="Emprunt">-- EMPRUNT --
<OPTION VALUE="Retour"">-- RETOUR --
</SELECT></p>
<p align="center">Mot de passe
<input type="text" value="" name="txt_mdp" maxlength='10' size='11'></p>
<p align="center">Date
<input type="text" value="" name="txt_date" maxlength='10' size='11'></p>
<p align="center">Utilisateur
<input type="text" value="" name="txt_util" maxlength='25' size='26'></p>
<p align="center">Materiel
<input type="text" value="" name="txt_materiel" maxlength='25' size='26'>
</p>
<tr height='30%'><p align='center'><input type="button" value="Valider" name="btn_Valider" onClick="Get_Valider"></p></tr></body> |
Partager