<!--#include file ="../veriables.asp"-->
<%
Response.ContentType = "text/html" 
Response.Charset = "UTF-8" 
%>

<%


veri = SERVER.MAPPATH("../db/"&datayol&".mdb")
Baglan = "DBQ=" & veri &   ";Driver={Microsoft Access Driver (*.mdb)}"

page = Request.Querystring("page")
id = Request.Querystring("id")
if page="" and id<>"" then 
end if 
if page = "whats" then
%>
<!--#include file="head.asp"-->
<div class="block small left">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>Ne yap&#305;yorsun?</h2>	
				</div>		<!-- .block_head ends -->
				
				
				
				<div class="block_content">
				<%
				if request("error") = "true" then
				%><p><b>HATA! Textarea k&#305;sm&#305;n&#305; doldurunuz!
                </b></p>
                <%
				end if
				%>
	<form action="?page=add" method="post">
<p>
							<label>Durum:</label><br />
							<textarea name="mesaj" rows="5" cols="50"></textarea>
						</p>
						
						<p>* Örnek: Kayseri Yahyal&#305; &#351;elalelerinde</p>
						
			<input type="submit" name="submit"  class="submit mid" value="Olayi ekle">
		
</form><br />
					
				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
				
			</div>		<!-- .block.small.left ends -->
			
			
			<div class="block small right">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>Neler yapt&#305;m?</h2>
				</div>		<!-- .block_head ends -->
				
				
				
				<div class="block_content">
				
	
					<ul>
                    
<%
set baglanti = server.createobject("adodb.connection")
baglanti.open baglan

set rs = server.createobject("adodb.recordset")
sql = "select * from neyapiyor order by id desc"
rs.open sql, baglanti, 1, 3
do while not rs.eof 
%>
<li><a href="?page=del_confirm&id=<%=rs("id")%>" title="ip:<%= rs("ip")%>">Sil</a>&nbsp;&nbsp;<%=left(rs("tarih"),2)%>.<%=right(left(rs("tarih"),5),2)%>.<%=right(left(rs("tarih"),10),4)%>&nbsp;<%=right(rs("tarih"),8)%>&nbsp;&nbsp;<a><%
var = right(left(rs("tarih"),5),2)
if var = 01 then
response.Write "Ocak"
end if
if var = 02 then
response.Write "&#350;ubat"
end if
if var = 03 then
response.Write "Mart"
end if
if var = 04 then
response.Write "Nisan"
end if
if var = 05 then
response.Write "May&#305;s"
end if
if var = 06 then
response.Write "Haziran"
end if
if var = 07 then
response.Write "Temmuz"
end if
if var = 08 then
response.Write "A&#287;ustos"
end if
if var = 09 then
response.Write "Eyl&#252;l"
end if
if var = 10 then
response.Write "Ekim"
end if
if var = 11 then
response.Write "Kas&#305;m"
end if
if var = 12 then
response.Write "Aral&#305;k"
end if
%></a><br /><%=rs("mesaj")%></li> 
<%
rs.movenext
loop

rs.close
set rs = nothing

baglanti.close
set baglant = nothing
%>

					</ul>
				
				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
				
			</div>		<!-- .block.small.right ends -->
			
			
<% 
end if 
if page = "del_confirm" then
%>
<!--#include file="head.asp"-->
<div class="block">
<div class="block_head">
<div class="bheadl"></div>
<div class="bheadr"></div>
<h2>Olay sil</h2>
</div>		<!-- .block_head ends -->
<div class="block_content">
<div class="message warning"><p>Olay&#305; Silmek istediginizden Eminmisiniz?</p></div>
			<form action="whatsup.asp?page=del&id=<%=request("id")%>" method="post">
			<p>
			<a href="whatsup.asp?page=del&id=<%=request("id")%>"><INPUT TYPE="submit" VALUE=" Evet "  class="submit small"></a>
            <INPUT type="Button" VALUE=" iptal " OnClick='history.go( -1 );return true;'  class="submit mid">
			</p>
			</form>
</div>		<!-- .block_content ends -->
<div class="bendl"></div>
<div class="bendr"></div>
</div>		<!-- .block ends -->
<%
end if
if page = "del" then
set id = Request.QueryString("id")

set baglanti = server.createobject("adodb.connection")
baglanti.open baglan

SQL = "delete from neyapiyor where id="
SQL = SQL & id
set rs = server.createobject("adodb.recordset")
rs.open sql, baglanti, 1, 3

response.redirect "panel.asp?box=success&text=Olay%20basariyla%20silindi.&second=2&url=whatsup.asp?page=whats"

response.end
end if
if page = "add" then

mesaj=request.form("mesaj")
tarih = now()
ip = request.servervariables("remote_host")

set baglanti = server.createobject("adodb.connection")
baglanti.open baglan

set rs = server.createobject("adodb.recordset")
sql = "select * from neyapiyor"
rs.open sql, baglanti, 1, 3

if mesaj <>"" then
'kayit islemi basliyor

rs.addnew
rs("mesaj") = mesaj
rs("tarih") = tarih
rs("ip") = ip

rs.update
rs.close

response.redirect "panel.asp?box=success&text=Olay%20basariyla%20eklendi.&second=2&url=whatsup.asp?page=whats"

response.end

else

response.redirect "whatsup.asp?page=whats&error=true"
response.end
end if

end if
%>
<!--#include file="foot.asp"-->