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><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></code>
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>
<% 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 %></code>
Alors mon resultat ne m'affiche pas la chaine de caractères. Aidez moi svp sachant que je suis un debutant en asp