|
-
Nov 18th, 2009, 03:04 PM
#4
Thread Starter
Lively Member
Re: HAND PLZ :Script timed out
thank you for interesting
<% If Session("project1_status") <> "login" Then Response.Redirect "admin.asp" %>
<!--#include file="header1.asp" -->
<div id="ContentHead"><b>Ajouter Actue:.</b></div>
<div id="Content"><center><br>
<!--#include file="connection.asp"-->
<!--#include file="dbnews.asp"-->
<%
add_dat=now()
section=request.form("section")
subject=request.form("subject")
subject= Replace(subject,"'","'")
subject= Replace(subject,"<","")
subject= Replace(subject,">","")
subject= Replace(subject,"é","é")
subject= Replace(subject,"è","è")
subject= Replace(subject,"â","â")
subject= Replace(subject,"û","û")
subject= Replace(subject,"î","î")
subject= Replace(subject,"ô","ô")
subject= Replace(subject,"à","à")
body=request.form("body")
body= Replace(body,"<img src='image url ici'width='550'></img><br>","")
body= Replace(body,"'","'")
body= Replace(body,"é","é")
body= Replace(body,"è","è")
body= Replace(body,"â","â")
body= Replace(body,"û","û")
body= Replace(body,"î","î")
body= Replace(body,"ô","ô")
body= Replace(body,"à","à")
photo=request.form("photo")
photo= Replace(photo,"'","'")
photo= Replace(photo,"é","é")
photo= Replace(photo,"è","è")
photo= Replace(photo,"â","â")
photo= Replace(photo,"û","û")
photo= Replace(photo,"î","î")
photo= Replace(photo,"ô","ô")
photo= Replace(photo,"à","à")
If subject="" or body="" or photo="" then
response.write "<font color=#ff8040>Please..vous devez remplir tous les champs</font><br>"
Else
addSQL= " insert into "§ion&" ([subject],[body],[add_dat],[photo]) values ('"&subject&"','"&body&"','"&add_dat&"','"&photo&"')"
ADO.execute(addSQL)
response.write "<center><b><font color=#ff8040>" & "THANK YOU... L'information est bien ajoutée</font>"
Set ADO = Server.CreateObject("ADODB.Connection")
ADO.Open xDb_Conn_Str
strsql = "SELECT * FROM [emails]"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, ADO
recActual = 0
Do While (NOT rs.EOF)
recCount = recCount + 1
on error resume next
Set oMail =CreateObject("CDO.Message")
oMail.From = "www.nkkin-web.co.cc"
oMail.To = rs("Email")
oMail.Subject = "Nkkin-web:" & subject
oMail.BodyPart.charset = "unicode-1-1-utf-8"
oMail.BodyPart.ContentTransferEncoding = "quoted-printable"
oMail.HTMLBody = "<html><body bgcolor='#000000'><a href=http://users1.jabry.com/nkkin3 target=_blank><img src=http://users1.jabry.com/nkkin3/Files/Images/90x940Header.jpg></img></a><br><font color=#800000 size=4><b><center>" & subject & "</b></font></center><br /><font color=#000000 size=2><center><b>" & body & "</b><br /></font></center><br></body></html>"
oMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]"
oMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxxxxxxxxxxxxxxxxxxx"
oMail.Configuration.Fields.Update
oMail.Send
set oMail=nothing
rs.MoveNext
Loop
End If
%>
<form method="POST" action="add_news.asp">
<table border="0"width="100%"color="#446677">
<tr><td width=20% bgcolor="#334466">
<p><b><center><font color="#800000"> TYPE:</font></center></td><td width=80%> <select size="1" name="section"class='tbox'>
<option value="news_news"> Actue générale </option>
<option value="amazigh_news"> Actue amazigh </option>
<option value="sport_news"> Actue sport </option>
</select></b></p></td></tr><tr><td width=20% bgcolor="#334466">
<p><b> <center><font color="#800000">subject:</font></center></td><td> <input type="text" name="subject"size="50"class='tbox'></b></p></td></tr><tr><td width=20% bgcolor="#334466">
<p><b><center><font color="#800000"> Photo url:</font> </center></td><td><input type="text" name="photo"size="50"class='tbox'></b></p></td></tr><tr><td width=20% bgcolor="#334466">
<p><b> <center><font color="#800000">body:</font></center></b></p></td><td><p><b> <textarea rows="6" name="body" cols="50"class='tbox'><img src='image url ici'width='550'></img><br></textarea></b></p></td></tr>
<tr><td> </span></td><td><p><input type="submit" value=" Add " name="add"class='button'><span lang="en-us"> <input type="reset" value=" Reset " name="reset"class='button'></p></span></td></tr></table></form><br>
</div>
<!--#include file="footer.asp" -->
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|