-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteachers.asp
142 lines (127 loc) · 6.17 KB
/
teachers.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!-- #include file="Assets/inc/conn.asp" -->
<!-- #include file="Assets/inc/system.asp" -->
<!-- #include file="Assets/inc/userControl.asp" -->
<%if user("Yetki")<>0 then response.Redirect("default.asp")%>
<%
set teachers = server.createobject("adodb.recordset")
sql="Select * From de_User WHERE Yetki=1 order by userID DESC"
teachers.open sql,conn,1,3
'--
kota=0
do while not teachers.eof
kota = kota + teachers("kota")
teachers.movenext : loop
'--
if request.QueryString("Delete")="ok" and request.querystring("userID")<>"" Then
set Sil = conn.execute("DELETE from de_User WHERE userID="& request.querystring("userID") &"")
%>
<script language="javascript" type="text/javascript">
alert("Başarıyla silindi.");
location.href="teachers.asp";
</script>
<%end if%>
<!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-Type" content="text/html; charset=utf-8" />
<title>Değerler Eğitimi - Öğretmenler</title>
<link href="Assets/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<!-- #include file="Assets/inc/sidebar.asp" -->
<div id="panel">
<!-- #include file="Assets/inc/userbar.asp" -->
<div id="maincontent">
<!-- //ContentBox1 -->
<div class="contentpanel">
<div class="contenttitle">
<table width="698" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="349" align="left" valign="middle">Öğretmenler</td>
<td width="349" align="right" valign="middle"><a href="teachAdd.asp" class="addlink">Yeni Öğretmen</a></td>
</tr>
</table>
</div>
<div class="contentbox">
<table width="200" cellspacing="0" cellpadding="0" class="totaltablo">
<tr>
<td height="30" align="left" valign="middle" class="totaltitle" width="100"> Öğrenci</td>
<td height="30" align="center" valign="middle" width="100"><span style="font-size:14px;"><%=kota%></span></td>
</tr>
</table>
<table width="200" cellspacing="0" cellpadding="0" class="totaltablo">
<tr>
<td height="30" align="left" valign="middle" class="totaltitle" width="100"> Öğretmen</td>
<td height="30" align="center" valign="middle" width="100"><span style="font-size:14px;"><%=teachers.RecordCount%></span></td>
</tr>
</table>
<div class="cleartwo"></div>
<%if not teachers.eof or not teachers.bof then%>
<table width="696" border="0" cellspacing="1" cellpadding="0" class="geneltablo">
<tr class="tabletitle">
<td width="247" height="30" align="center" valign="middle">Ad Soyad</td>
<td width="224" height="30" align="center" valign="middle">Kullanıcı Adı</td>
<td width="100" height="30" align="center" valign="middle">Kota</td>
<td width="120" height="30" align="center" valign="middle">İşlemler</td>
</tr>
<%
function sayfalama(sayfa,sf,nm)
if sayfa > 6 and sf > 6 then Response.Write "<a class=""syf_Link"" href=?"&nm&"=1 >|<</a><a class=""syf_Link"" href=?"&nm&"="&sf-1&"><<</a>"
for g = sf-9 to sf+9
if g = cint(sf) then
response.write "<span class=""syf_Suan"" > "&g&" </span> "
elseif g < 1 or g > sayfa then response.Write ""
else
response.Write "<a class=""syf_Link"" href=?"&nm&"=" & g & ">" & g & "</a> "
end if
next
if not g > sayfa and sayfa > 6 then response.Write "<a class=""syf_Link"" href=?"&nm&"="&sf+1&" > >> </a><a class=""syf_Link"" href=?"&nm&"="&sayfa&" > >| </a>" end if
end function
if isnumeric(Request.QueryString("syf")) then
syf = Request.QueryString("syf")
else
syf = 1
end if
If syf="" Then syf="1"
teachers.pagesize = 30
teachers.absolutepage = syf
sayfa_sayisi = teachers.pagecount
bg=0
for a=1 to teachers.pagesize
if teachers.eof then exit for
%>
<tr <%if bg mod 2=0 then%>bgcolor="#DFF4FF"<%else%>bgcolor="#CAEDFF"<%end if%> class="tablerow">
<td height="30" align="left" valign="middle"> <%=teachers("Ad")%> <%=teachers("Soyad")%></td>
<td height="30" align="left" valign="middle"> <%=teachers("username")%></td>
<td height="30" align="center" valign="middle"><%=teachers("kota")%></td>
<td height="30" align="center" valign="middle"><a href="teachUpdate.asp?userID=<%=teachers("userID")%>" class="updatelink">Düzenle</a> <a href="?Delete=ok&userID=<%=teachers("userID")%>" class="deletelink">Sil</a></td>
</tr>
<%
bg=bg+1
teachers.movenext : next
%>
</table>
<%
if sayfa_sayisi>1 then%>
<table width="696" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" align="center" valign="middle"></td>
</tr>
<tr>
<td width="696" align="center" valign="middle"><%call sayfalama(sayfa_sayisi,syf,"syf")%></td>
</tr>
</table>
<%end if%>
<%end if%>
<%teachers.close%>
</div>
</div>
</div>
</div>
<div id="clear"></div>
<!-- #include file="Assets/inc/footer.asp" -->
</div>
</body>
</html>