<!--#include file="sifre.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="tr">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<title>Admin Paneli</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="db.asp"-->
<table width="95%" border="0" align="center" cellpadding="0" id="table1" style="border-collapse: collapse">
	<tr>
		<td height="22" background="../tema/<%=sitetema%>/tablo_bg.jpg">		  <center>
		  <font class="Menu">Albümler Listeleniyor</font>
	    </center></td>
	</tr>
</table>
<table border="0" width="95%" id="table2" style="border-collapse: collapse" class="tablo" align="center">
	<tr>
		<td height="24" width="38" class="ust"><div align="center"><font class="metinkalin">ID</font></div></td>
		<td height="24" width="736" class="ust"><font class="metinkalin">İsim</font></td>
		<td height="24" class="ust" width="216"><font class="metinkalin">Video Sayısı</font></td>
		<td height="24" width="175" class="ust"><div align="center"><font class="metinkalin">İşlemler</font></div></td>
	</tr>
<%
if (Request.QueryString("kat"))="sil" then
id=request.querystring("id")
data.Execute("DELETE FROM video_kat where id like '"&id&"'")
Response.Redirect Request.ServerVariables("HTTP_REFERER")
End if

set zd_msg = Server.CreateObject("Adodb.Recordset")
SQL = "Select * from video_kat order by id DESC"
zd_msg.open SQL,data,1,3
kayitsayisi="0"
mode = 2
Do While Not zd_msg.eof
	if mode=1 then
	stil="tablo1"
	else
	stil=""
	end if
kayitsayisi=kayitsayisi + 1
%>
	<tr>
		<td width="38" class="<%=stil%>" height="20"><div align="center"><font class="yazi"><%=zd_msg("id")%></font></div></td>
		<td width="736" class="<%=stil%>" height="20"><a href="v_kategori_duz.asp?kat=duzenle&id=<%=zd_msg("id")%>"><%=zd_msg("isim")%></a></td>
		<td width="216" height="24" class="<%=stil%>"><%
set blog = Server.CreateObject("ADODB.RecordSet")
SQL = "select count(id) as blog_say from video where kat_id= "&zd_msg("id")&""
blog.open SQL,data,1,3
%>
		  <a href="videolar.asp?id=<%=zd_msg("id")%>"><b><%=blog("blog_say")%></b></a><%
blog.close
set blog = Nothing
%></td>
		<td width="175" class="<%=stil%>" height="20"><div align="center"><a href="?kat=sil&id=<%=zd_msg("id")%>" onclick="return confirm('Silmek İstediğinizden Emin Misiniz?');">Sil</a>
		&nbsp;&nbsp;<a href="v_kategori_duz.asp?kat=duzenle&id=<%=zd_msg("id")%>">Düzenle</a>
		</div></td>
	</tr>
<%
zd_msg.movenext
	if mode=2 then
	mode=1
	else
	mode=2
	end if
loop
%>
</table>
<div align="center">
	<table width="95%" height="24" border="0" align="center" cellpadding="0" class="tablo" id="table3" style="border-collapse: collapse">
		<tr>
			<td align="center"><font class="yazi">Toplam Kategori : <%=kayitsayisi%></font></td>
		</tr>
  </table>
</div>