<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="tr"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254" /> <script language="JavaScript" type="text/javascript" src="wyzz.js"></script> <title>Mesaj Kutusu</title> </head>
<body> <!--#include file="baglanti.asp"--> <% if Len(Session("uid"))= 0 then call xiNo else call xiYes end if sub xiYes if not request.querystring("xi")="send" then%> <% kime=Request.form("kutucuk") mesaj=Request.form("msjkutucugu")
if kime="Tüm" then
Set toplu = baglan.Execute("SELECT * From uyeler") Do while not toplu.eof
Set kayit = baglan.Execute("Insert into mesajtablosu (kime,mesaj) values ('"&toplu("id")&"','"&mesaj&"')") Set kayit = nothing
toplu.movenext:loop
Response.write "Tüm üyelere mesaj gönderildi."
end if %> <form action="write.asp?xi=send" method="post"> <table border="0" width="28%" style="border-collapse: collapse"> <tr> <td width="23%"><font style="font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;">Kime</font></td> <td width="76%"> <input type="text" name="kime" size="17" style="font-family: Lucida Sans Unicode; font-size: 12px"></td> </tr> <tr> <td width="23%"><font style="font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;">Konu</font></td> <td width="76%"> <input type="text" name="konu" size="17" style="font-family: Lucida Sans Unicode; font-size: 12px"></td> </tr> <tr> <td width="23%"><font style="font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;">Mesaj</font></td> <td width="76%"> </td> </tr> <tr> <td colspan="2"> <p align="center"> <textarea name="mesaj" id="mesaj" rows="7" cols="40"></textarea><br /> <script language="javascript1.2"> make_wyzz('mesaj'); </script> <input type="submit" value="Gönder" name="send" style="font-family: Lucida Sans Unicode; font-size: 12px; float: right"><font style="font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;"><a onclick="window.close()" href="#">Kapat</a></font></td> </tr> </table> </form> <%else%> <% kime = request.form("kime") konu = request.form("konu") mesaj = request.form("mesaj") kimden = session("kullaniciadi")
if kime="" or konu="" or mesaj ="" then response.write "<font style='font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;'>Boş alan bırakmayınız<br><a href=javascript:history.back(-1)>Geri Dön</a></font>" else
Set xiTo = Server.CreateObject("ADODB.RecordSet") toSQL = "Select * from uyeler WHERE kullaniciadi = '"&kime&"'" xiTo.open toSQL,bag,1,3 if xiTo.eof and xiTo.bof then response.write "<font style='font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;'>Böyle bir kullanıcı yok<br><a href=javascript:history.back(-1)>Geri Dön</a></font>" else
Set xiAdd = Server.CreateObject("ADODB.RecordSet") toSQL = "Select * from mesajlar" xiAdd.open toSQL,bag,1,3
xiAdd.addnew xiAdd("kimden")= kimden xiAdd("kime")= kime xiAdd("mesaj")= mesaj xiAdd("konu")= konu xiAdd("okundu")="0" xiAdd.update
response.write "<font style='font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;'>Mesaj gönderildi<br><a href=javascript:window.close()>Kapat</a></font>" end if end if %> <%end if end sub sub xiNo response.write "<font style='font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif; font-size:12px;color:#666666;'>Lütfen <a href=javascript:window.close()>giriş</a> yapın</font>" end sub %> </body> </html> __________________
|