<!--#include file="bag.asp"-->
<html>
<head>
<!-- #include file="headic.asp" -->
<title><%=siteadi%> | Anketler </title>
<link href="tema/<%=sitetema%>/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="<%=sitegenislik%>" border="0" align="<%=sitekonum%>" cellpadding="0" cellspacing="0"> 
  <tr>
    <td height="70" colspan="3"><!--#include file="top.asp"-->
    </td>
  </tr>
  <tr>
    <td width="23%" valign="top"><!--#include file="sol_menu.asp"--></td>
    <td valign="top" width="54%" >

<table width="100%" border="0" cellpadding="0" cellspacing="0" id="Table_01">
  <tr>
    <td colspan="2"><img src="tema/<%=sitetema%>/tablosol.jpg" width="56" height="30" alt=""></td>
    <td width="1112" background="tema/<%=sitetema%>/base_02.jpg" class="Menu"><div align="center">Tüm Anketler</div></td>
    <td colspan="2"><img src="tema/<%=sitetema%>/base_03.jpg" width="56" height="30" alt=""></td>
  </tr>
  
  <tr>
    <td width="17" background="tema/<%=sitetema%>/base_04.jpg"><img src="tema/<%=sitetema%>/base_04.jpg" width="17" height="10" alt=""></td>
    <td colspan="3" bgcolor="#FFFFFF">
    
    
    
    <table border="0" width="100%" id="table1" cellpadding="0" style="border-collapse: collapse">
	<tr>
		<td align="center" bgcolor="#000000"><font class="menu"><b>Eski Anketlere Oy Verilemez !</b></font></td>
	</tr>
	<tr>
		<td>
<%
set ab = Server.CreateObject("ADODB.RecordSet")
SQL = "select * from ankets order by id desc"
ab.open SQL,data,1,3
Do While not ab.eof
%>
<table width="100%" border="0" cellpadding="2" cellspacing="2" id="table1" style="border-collapse: collapse">
	<tr>
		<td	align="center"><b><font class="orta"><%=ab("soru")%></font></b></td>
	</tr>
<!--Anket Şıkları-->
<%
        Set tAnc = Server.CreateObject("ADODB.RecordSet") 
        tAnc.Open "anket Where a_id="&ab("id")&"",data,1,3
        Vote = 0
        Do While Not tAnc.EOF
        Vote = Vote + tAnc("deger")
        tAnc.MoveNext
        Loop
        tAnc.Close
        Set tAnc = NoThing

        Set tAnc = Server.CreateObject("ADODB.RecordSet")
        tAnc.Open "anket Where a_id="&ab("id")&"",data,1,3
Do While Not tAnc.EOF

                strOy = tAnc("deger")
                If strOy = "0" Then
                tOy = "0"
                Else
                tOy = (strOy /Vote) * 100
                End If
%>
		<tr>
			<td width="100%"><font class="blok"><%=tAnc("cevap")%> [ <%=strOy%> Oy - % <%=Left(tOy,4)%>]</font></td>
		</tr>
		<tr>
			<td width="100%">
<div style="width: 500px; height: 5px; border: 1px solid #000000">
<img src="tema/<%=sitetema%>/tablo_bg.jpg" height="6" width="<%=Int(tOy)*5%>"></div>			</td>
		</tr>
<% 
tAnc.MoveNext
Loop 
set toy = Server.CreateObject("ADODB.RecordSet")
SQL = "select SUM(deger) as oy_say from anket where a_id="&ab("id")&""
toy.open SQL,data,1,3
%>

		<tr>
			<td>
			<p align="center"><font class="orta">Toplam Oy : <%=toy("oy_say")%></font></p>			</td>
		</tr>
		<tr>
		  <td height="11" background="tema/<%=sitetema%>/bg_cizgi.gif"></td>
		  </tr>
<!--/Anket Şıkları-->
<%
toy.close
set toy = Nothing
ab.movenext : loop
%>
</table>
</table>
    
   
    </td>
    <td width="26" background="tema/<%=sitetema%>/base_08.jpg"><img src="tema/<%=sitetema%>/base_08.jpg" width="19" height="10" alt=""></td>
  </tr>
  <tr>
    <td><img src="tema/<%=sitetema%>/base_09.jpg" width="17" height="21" alt=""></td>
    <td width="39" background="tema/<%=sitetema%>/base_10.jpg">&nbsp;</td>
    <td background="tema/<%=sitetema%>/base_11.jpg">&nbsp;</td>
    <td width="37"><img src="tema/<%=sitetema%>/base_12.jpg" width="37" height="21" alt=""></td>
    <td width="26"><img src="tema/<%=sitetema%>/base_13.jpg" width="19" height="21" alt=""></td>
  </tr>
</table>

    </td>
    <td width="23%" valign="top"><!--#include file="sag_menu.asp" --></td>
  </tr>
  <tr>
    <td colspan="3"><div align="center"><!--#include file="alt.asp"--> </div></td>
  </tr>
</table>

</body> 
</html>
