Visualizzazione dei risultati da 1 a 7 su 7

Discussione: Componente CDONT

  1. #1

    Componente CDONT

    Ciao Ragazzi,
    io ho creato una pagina che tramite cdont mi invia un email riprendendo però alcuni parametri da un database.
    Questo è un esempio del codice che:

    codice:
    html=html & "</td>"
    			html=html & "<td style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C0C0C0; border-bottom-width: 1px"">"
    			html=html & "<font face=""Verdana"" size=""1"">"
    			html=html & "<" & chr(37) & "VarSelOperatore=""Select * from Tab_Operatori where ID_Operatore='""&oRSRapporti(""ID_operatore"")&"'"" & chr(37) & ">"
    			html=html & "<" & chr(37) & "Set oRSOperatore=CN.Execute(VarSelOperatore)" & chr(37) & ">"
    			html=html & "<" & chr(37) & "=response.write(oRSOperatore(""nome""))" & chr(37) & ">"
    			html=html & "</font>"
    			html=html & "</td>"
    ho dovuto sostituire i % di asp con chr(37) altrimenti chiudeva i % iniziali che comprendono tutto il codice per cdont.
    A questo punto non ho segnalazioni di errore, infatti l'email mi arriva tranquillamente soltanto che all'interno c'è scritto soltanto False, come se svolgesse un controllo che effettivamente non esiste.
    Il bello è che non compaiono nemmeno le righe normali in html, pratiamente all'interno della mail non visualizzo nemmeno le tabelle, ma soltanto questa scritta False.
    Ora io non so se va bene il fatto che abbia sostituito i % con chr(37) ed è proprio per questo che mi rivolgo a voi.
    Sapete darmi una soluzione a tutto questo?

    Grazie in anticipo
    Se hai un nemico siediti sulla riva del fiume e aspetta pazientemente.
    Prima o poi vedrai passare il suo cadavere!

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Non ho ben capito a cosa servano i chr(37) &

    Togli dal tuo script chr(37) & e riprova.

    Roby

  3. #3
    ma posso mettere <% ?
    Se hai un nemico siediti sulla riva del fiume e aspetta pazientemente.
    Prima o poi vedrai passare il suo cadavere!

  4. #4
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Ma ? a che ti serve?

    Roby

  5. #5
    ancora non va...
    Prova a guardare meglio tu...
    Questa è tutta larte che mi invia la mail:

    codice:
    <%
    mail=request.form("mail")
    cliente=request.form("id_cliente")
    dtdal=request.form("dal")
    dtal=request.form("al")		
    %>
    
    
    <%if mail<>"" then
    set OBJMail=CreateObject("CDO.message")
    			html="<html>"
    			html=html & "<div align=""center"">"
    			html=html & "<table border=""0"" cellpadding=""0"" style=""border-collapse: collapse"" bordercolor=""#111111"" width=""494"" id=""AutoNumber1"">"
    			html=html & "
    
    "          
    			html=html & "<tr>"
    			html=html & "<td width=""347""><font face=""Verdana"" size=""1"">"
    			Set oRSClienti=CN.Execute("Select * from tab_clienti where ID_cliente='"&cliente&"'" & "order by ragionesociale desc")
    			html=html & "CLIENTE: <font color=""#FF0000"">" 
    			rag=ORSClienti("ragionesociale")
    			response.write(rag)
    			html=html & "</font>
    "
    			html=html & "SEDE: <font color=""#FF0000"">" 
    			se=ORSClienti("sede")
    			response.write(se)
    			html=html & "</font></font><font face=""Verdana"" size=""1"">
    "
    			html=html & "</font></td>"
    			html=html & "</tr>"
    			html=html & "<tr>"
    			html=html & "<td width=""347""><font color=""#000000"" size=""1"" face=""Verdana"">"
    			html=html & "PERIODO DAL </font>"
    			html=html & "<font color=""#FF0000"" size=""1"" face=""Verdana"">"
    			html=html & "" & dtdal & ""
    			html=html & "</font><font color=""#000000"" size=""1"" face=""Verdana"">"
    			html=html & "AL </font><font color=""#FF0000"" size=""1"" face=""Verdana"">"
    			html=html & "" & dtal & ""
    			html=html & "</font><font color=""#000000"" size=""1"" face=""Verdana"">.
    "
    			html=html & "</font></td>"
    			html=html & "</tr>"
                html=html & "<tr>"
                html=html & "<td width=""347"">"
    			html=html & "<font face=""Verdana"" size=""1"" color=""#000000"">Posizionare il" 
    			html=html & "cursore sopra all'icona per visualizzare i dettagli</font></td>"
                html=html & "</tr>"
    			html=html & "</table>"
    			html=html & "</div>"
                html=html & "<table width=""430"" cellspacing=""0"" cellpadding=""0"" border=""0"" style=""border: 1px solid #C0C0C0; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px"">"
                html=html & "<tr>"
                html=html & "<td width=""102"" colspan=""2"">"
    			html=html & "<font face=""Verdana"" size=""2"">"
           		html=html & "<font face=""Verdana"" size=""1"">ID Rapporto"
    			html=html & "</font>"
                html=html & "</font>"
                html=html & "</td>"
                html=html & "<td width=""92"" style=""border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-top-width: 1px; border-bottom-width: 1px"">"
                html=html & "<font face=""Verdana"" size=""1"">Data"
                html=html & "</font>"
                html=html & "</td>"
                html=html & "<td>"
    	        html=html & "<font face=""Verdana"" size=""1"">Operatore"	
    	        html=html & "</font>"	
    	        html=html & "</td>"
                html=html & "</tr>"
                Set oRSRapporti=CN.Execute("Select * from TAB_RAPPORTI_PAGAMENTO where data>='"&dtdal&"'  AND data<='"&dtal&"' AND ID_Cliente='"&cliente&"'" & "order by data desc")
                dim interventi
                interventi=0      
                Do while NOT oRSRapporti.EOF
                html=html & "<tr>"
                html=html & "<td width=""11"" style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C0C0C0; border-bottom-width: 1px"">"                       
                html=html & "[img][/img]"></td>"
                html=html & "<td width=""91"" style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C0C0C0; border-bottom-width: 1px"">"                       
                html=html & "<font face=""Verdana"" size=""1"">"                       
                html=html & "<a href=""dettagliointervento.asp?ID=""<" & chr(37) & "=oRSRapporti(""ID"")" & chr(37) & ">"" alt=""<" & chr(37) & "=oRSRapporti(""note_intervento"")"" & chr(37) & ">"><" & chr(37) & "=oRSRapporti(""ID""))" & chr(37) & ">"
                html=html & "</a>"
    			html=html & "</font>"
    			html=html & "</td>"
    			html=html & "<td style=""border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; border-top: 1px solid #C0C0C0; border-bottom-width: 1px"">"
    			html=html & "<font face=""Verdana"" size=""1"">"
    			dtd=oRSRapporti("data")
    			response.write(dtd)
    			html=html & "</font>"
    			html=html & "</td>"
    			html=html & "<td style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C0C0C0; border-bottom-width: 1px"">"
    			html=html & "<font face=""Verdana"" size=""1"">"
    			VarSelOperatore="Select * from Tab_Operatori where ID_Operatore='"&oRSRapporti("ID_operatore")&"'"
    			Set oRSOperatore=CN.Execute(VarSelOperatore)
    			response.write(oRSOperatore("nome"))
    			html=html & "</font>"
    			html=html & "</td>"
                html=html & "</tr>"
                interventi=interventi+1
                oRSRapporti.movenext
                loop
                html=html & "<tr>"
                html=html & "<td style=""border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #C0C0C0; border-bottom-width: 1px"" colspan=""4"">"                       
                html=html & "<font size=""1"">TOTALE INTERVENTI"
    			html=html & "<font color=""#FF0000"">"
    			response.write(interventi)
    			html=html & "</font></font></td>"
                html=html & "</tr>"
                html=html & "</table>"
    			html=html & "</div>"
    			html=html & "</body>"
    			html=html & "</html>"
    			OBJMail.From="assistenza@carpediemweb.it"
    			OBJMail.To=(mail)&""
    			OBJMail.subject="Dettagli Rapporti di Intervento"
    			'OBJMail.bodyformat=0
    			'OBJMail.MailFormat=0
    			OBJMail.htmlbody=html
    			OBJMail.send
    			set OBJMail=Nothing
    end if
    %>
    Grazie ancora
    Se hai un nemico siediti sulla riva del fiume e aspetta pazientemente.
    Prima o poi vedrai passare il suo cadavere!

  6. #6
    E la mail che mi arriva è così:

    VeroTOTALE INTERVENTI
    Se hai un nemico siediti sulla riva del fiume e aspetta pazientemente.
    Prima o poi vedrai passare il suo cadavere!

  7. #7
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Ti perdi i pezzi. Ad esempio:

    codice:
    dtd=oRSRapporti("data")
    html = html & response.write(dtd)
    Roby

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.