<% if request.QueryString("islem")="2" then if request.querystring("ogrenci")<>"" then if isnumeric(request.QueryString("ogrenci")) then set fgor = Server.CreateObject("ADODB.Recordset") fgor.open "SELECT* FROM ogrenciler where idogrenci="&request.QueryString("ogrenci")&" ",erdc,1,3 if not fgor.eof then %>
Adı : " />" />
Soyadı: " />
Öğrenci Numarası " />
Kimlik Numarası " />
Sınıf <%end if%>
Devamsız checked="checked"<%end if%> />

<%end if fgor.close set fgor=nothing end if end if end if %> <% if request.QueryString("ogrenci")="" then%>
Adı :
Soyadı:
Öğrenci Numarası
Kimlik Numarası
Sınıf <% set k_bul = Server.CreateObject("ADODB.Recordset") k_bul.open "SELECT* FROM siniflar order by sinif asc",erdc,1,3 if not k_bul.eof then%> <%end if%>
   

<%end if%>

<% set fogr = Server.CreateObject("ADODB.Recordset") fogr.open "SELECT* FROM ogrenciler order by sinif asc",erdc,1,3 if not fogr.eof then %> <% sira=1 do while not fogr.eof if fogr("devamsiz")=0 then %> <%end if if fogr("devamsiz")=1 then %> <%end if%> <% sira=sira+1 fogr.movenext loop fogr.close %>
Sıra Adı Soyadı Numara Sınıf Düzenle Sil
 <%=sira%>  <%=fogr("ogradi")%> <%=fogr("ogrsoyadi")%> <%=fogr("ogrnumara")%> <%=fogr("sinif")%> "> );">
<%end if%>
 
<% if islem="1" then adi=request.form("adi") soyadi=request.form("soyadi") ogrnumara=request.form("ogrno") kimlikno=request.form("kimlikno") sinif=request.form("sinif") if adi<>"" and soyadi<>"" and ogrnumara<>"" and sinif<>"0" then set f_ekle = Server.CreateObject("ADODB.Recordset") f_ekle.open "SELECT* FROM ogrenciler where ogrnumara="&ogrnumara&" and ogradi='"&adi&"' and ogrsoyadi='"&soyadi&"' ",erdc,1,3 if f_ekle.eof then f_ekle.addnew f_ekle("ogrnumara")=ogrnumara f_ekle("ogradi")=adi f_ekle("ogrsoyadi")=soyadi f_ekle("sinif")=sinif f_ekle("kimlikno")=kimlikno f_ekle.update response.Redirect("ogrenciler.asp") else response.Redirect("ogrenciler.asp") f_ekle.close set f_ekle=Nothing end if end if end if if islem="3" then adi=request.form("adi") soyadi=request.form("soyadi") ogrnumara=request.form("ogrno") kimlikno=request.form("kimlikno") sinif=request.form("sinif") idogrenci=request.form("idogrenci") devamsiz=request.form("devamsiz") if devamsiz="" then devamsiz=0 end if if adi<>"" and soyadi<>"" and ogrnumara<>"" and sinif<>"" and idogrenci<>"" then set f_gunc = Server.CreateObject("ADODB.Recordset") f_gunc.open "SELECT* FROM ogrenciler where idogrenci="&idogrenci&"",erdc,1,3 if not f_gunc.eof then f_gunc("ogrnumara")=ogrnumara f_gunc("ogradi")=adi f_gunc("ogrsoyadi")=soyadi f_gunc("sinif")=sinif f_gunc("kimlikno")=kimlikno f_gunc("devamsiz")=devamsiz f_gunc.update response.Redirect("ogrenciler.asp?islem=2&ogrenci="&idogrenci&"") else response.Redirect("ogrenciler.asp") f_gunc.close set f_gunc=Nothing end if end if end if if islem="4" then if request.QueryString("ogrenci")<>"" then set f_sil = Server.CreateObject("ADODB.Recordset") f_sil.open "SELECT* FROM ogrenciler where idogrenci="&request.QueryString("ogrenci")&"",erdc,1,3 if not f_sil.eof then f_sil.delete f_sil.update f_sil.close set f_sil=Nothing end if set o_sil1 = Server.CreateObject("ADODB.Recordset") o_sil1.open "SELECT* FROM puanlar where idogrenci="&request.QueryString("ogrenci")&"",erdc,1,3 if not o_sil1.eof then do while not o_sil1.eof set o_sil = Server.CreateObject("ADODB.Recordset") o_sil.open "SELECT* FROM puanlar where idpuan="&o_sil1("idpuan")&"",erdc,1,3 if not o_sil.eof then o_sil.delete o_sil.update end if o_sil.close o_sil1.movenext loop o_sil1.close end if response.Redirect("ogrenciler.asp") end if end if %>
 
<%erdc.close %>