% Response.buffer = True %>
Forum di discussione <% Function URLDecode(str) strInput =str If strInput = null Then strInput = "" strOutput = REPLACE(strInput, "+", " ") strSplit = Split(strOutput, "%") If ubound(strSplit) > 0 Then i = 0 strOutput = strSplit(i) Do While i < ubound(strSplit) HexCode = "&H" & Left(strSplit(i+1),2) Letter = CHR(HexCode) strOutput = strOutput & Letter & Right(strSplit(i+1),len(strSplit(i+1))-2) i = i + 1 Loop End If URLDecode = strOutput End Function color_strong = Application("design_color_strong") color_weak = Application("design_color_weak") FUNCTION IsEmail(sCheckEmail) Dim sEmail, nAtLoc IsEmail = True sEmail = Trim(sCheckEmail) nAtLoc = InStr(1, sEmail, "@") 'Location of "@" If Not (nAtLoc > 1 And (InStrRev(sEmail, ".") > nAtLoc + 1)) Then '"@" must exist, and last "." in string must follow the "@" IsEmail = False ElseIf InStr(nAtLoc + 1, sEmail, "@") > nAtLoc Then 'String can't have more than one "@" IsEmail = False ElseIf Mid(sEmail, nAtLoc + 1, 1) = "." Then 'String can't have "." immediately following "@" IsEmail = False ElseIf InStr(1, Right(sEmail, 2), ".") > 0 Then 'String must have at least a two-character top-level domain. IsEmail = False End If END FUNCTION Function SingleDoubleQuotesClean(str) IF NOT ISEMPTY(str) THEN SingleDoubleQuotesClean=Replace(Replace(str, "'", "''"), chr(34), chr(34)&chr(34)) ELSE SingleDoubleQuotesClean=str END IF End Function Function SingleQuotesClean(str) IF NOT ISEMPTY(str) THEN SingleQuotesClean=Replace(str, "'", "''") ELSE SingleQuotesClean=str END IF End Function article_id = Request.QueryString("a") title = URLDecode(Request.QueryString("t")) referring_url = URLDecode(Request.QueryString("r")) get_labels_dictionary language_id, 33, 0 IF Request.Form("message_text")<> "" THEN 'introduire le message title = Request.Form("t") referring_url = Request.Form("r") article_id = Request.Form("a") author_name = SingleQuotesClean(left(Request.Form("author_name"), 100)) author_email = Request.Form("author_email") IF NOT IsEmail(author_email) THEN author_email = "" END IF message_subject = SingleQuotesClean(left(Request.Form("message_subject"), 150)) author_ip_address = request.servervariables("REMOTE_ADDR") author_cookie = "" message_text = SingleQuotesClean(left(Request.Form("message_text"), 2500)) sql="proc_www_mb_add "&article_id&", "&language_id&" , '"&author_name&"'"&",'"&author_email&"'"&",'"&message_subject&"'"&",'"&author_ip_address&"'"&",'"&author_cookie&"'"&",'"&message_text&"'" db.Execute sql %> <%=label_dictionary(0).item("discussion_about")%> "<%=title%>" <%=label_dictionary(0).item("thanks")%><% ELSE %> <%=label_dictionary(0).item("discussion_about")%>"<%=title%>" <%=label_dictionary(0).item("tell_us")%><% END IF 'listing des messages sql_messages = "proc_www_mb_get " & article_id SET rs_messages = Server.CreateObject("ADODB.recordset") SET rs_messages = db.Execute(sql_messages) IF NOT rs_messages.EOF THEN messages = rs_messages.getrows numrows=ubound(messages,2) messages_exist = "yes" rs_messages.close set rs_messages = nothing FOR rowcounter= 0 TO numrows %>
|
© Micheloud & Cie 2013 Tel. ++41 21 331 48 48 info@switzerland.isyours.com. Nessuna parte di questo sito può essere riprodotta in alcuna forma o con alcun mezzo senza la nostra esplicita autorizzazione scritta. Stampato da http://Switzerland.isyours.com |