Bonjour
J'ai un formulaire dans lequel je dois renseigner un certain nombre de variables comme le nom du domain de server que je dois utiliser, identifier l'utilisateur en mettant le nom et le login, en choissant la tache qu'accomplira ledit utilisateur. Alors comme une tache que je souhaite qu'accomplisse mon utilisateur, et bien je souhaiterais qu'il aille recuperer une chaine de caractère dans un fichier de type texte et le fasse afficher dans un fichier de type asp. Pour cela je vous montre les scripts que j'ai écrit mais au finish j'ai rien qui ne s'affiche
1-Formulaire
Dans ce formulaire je dois renseigner toutes les variables que je dois executer
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<html>
 <head>
  <title>Ma page ASP</title>
 </head>
 <body>
  <div>
   <form method="post" name="formulaire" action="moteur.asp">
    <div>Domain : <INPUT TYPE="text" NAME="domain" SIZE="20" MAXLENGTH="30" VALUE=""></div>
    <div>User : <INPUT TYPE="text" NAME="user" SIZE="20" MAXLENGTH="30" VALUE=""></div>
    <div>Password: <INPUT TYPE="password" NAME="secret" SIZE="8" MAXLENGTH="8"></div>
    <div>Cluster : <INPUT TYPE="text" NAME="cluster" SIZE="10" MAXLENGTH="20" VALUE=""></div>
    <div>Application : <INPUT TYPE="text" NAME="application" SIZE="20" MAXLENGTH="30" VALUE=""></div>
    <div>Account: <INPUT TYPE="checkbox" NAME="account" VALUE=""></div>
    <div>Custom 1: <INPUT TYPE="checkbox" NAME="custom 1" VALUE="checkbox1"></div>
    <div>Custom 2: <INPUT TYPE="checkbox" NAME="custom 2" VALUE="checkbox2"></div>
    <div>Custum 3: <INPUT TYPE="checkbox" NAME="custom 3" VALUE="checkbox3"></div>
    <div>Custum 4: <INPUT TYPE="checkbox" NAME="custom 4" VALUE="checkbox4"></div>
    <div><input type="submit" value="Executer"></div>
    <div><input type="reset" value="Réinitialiser"></div>
   </form>
   </div>
 </body>
</html>
2- Moteur
Dans mon moteur je dois recuperer les variables demander mon formulaire, notament la chaine de caractère recuperer dans le fichier texte. Si j'execute par exemple le checkbox Account je veux recuperer toutes les chaines de caractères de types ReportLabel. Voici le script que j'ai écrit
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<% If Request.Form("domain")<>""then %>
 
 <b><%=Request.Form("domain")%></b>
 <br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if%>
 
  <% champ1=champ1 & "" & Request.Form("domain")
end if%>
 
<% If Request.Form("user")<>""then %>
 Votre champ contenait
 <b><%=Request.Form("user")%></b>
 <br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if
  champ1=champ1 & "" & Request.Form("user")
end if%>
 
<% If Request.Form("password")<>""then %>
 Votre champ contenait
 <b><%=Request.Form("password")%></b>
 <br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if
  champ1=champ1 & "" & Request.Form("password")
end if%>
 
<% If Request.Form("cluster")<>""then %>
 Votre champ contenait
 <b><%=Request.Form("cluster")%></b>
 <br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if
  champ1=champ1 & "" & Request.Form("cluster")
end if%>
 
<% If Request.Form("application")<>""then %>
 Votre champ contenait
 <b><%=Request.Form("application")%></b>
 <br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if
  champ1=champ1 & "" & Request.Form("application")
end if%>
 
<% If Request.Form("account")<>""then %>
 <b><%=Request.Form("account")%></b>
 <br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if
  champ1=champ1 & "" & Request.Form("account")
end if%>
 
<% If Request.Form("custom")<>""then %>
 
 <b>
 <%for i=1 to Request.Form("custom").count
 response.write Request.Form ("custom").item(i)
 response.write"-"
 next%>
 </b><br><br>
 
 <% champ1=Request.Form("champ1")
  if champ1<>""then%>
   <b><%=champ1%></b>
   <br><br>
  <% end if
  champ1=champ1 & "" & Request.Form("custom")
end if%>
 
<% Set FSO = Server.CreateObject("Scripting.FileSystemObject") %>
<% dir = Server.MapPath("carto/") %>
<% Fnm = dir & "C:\Inetpub\wwwroot\carto\chaine_de_carctère_hyperion.txt" %>
<%  if FSO.FileExists(Fnm) then %>
  <% set inF = FSO.OpenTextFile(Fnm,1,false) %>
  <% While not inF.atEndOfStream %>
           <% = inF.readLine %><br>
     Function fTexteInTexte(chaine_de_caractère_hyperion.txt, ReportLabel=)
 
     Dim i
 
     fTexteInTexte = FALSE
 
     i=1
     Do while(i+Len(ReportLabel=)<=(chaine_de_caractère_hyperion.txt)+1) And fTexteInTexte = FALSE
    If LCase(ReportLabel=) = LCase(Mid(chaine_de_caractère_hyperion.txt, i, Len(ReportLabel=))) Then
     fTexteInTexte = TRUE
    End If
   Loop
   End Function
  <% Wend %>
 
 <% End if %>
<% inF.close %>

Alors mon resultat ne m'affiche pas la chaine de caractères. Aidez moi svp sachant que je suis un debutant en asp