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

<% 
set baglanti = server.CreateObject("adodb.connection")
baglanti.open "Provider=Microsoft.Jet.oledb.4.0;Data Source=" & server.Mappath("../db/"&datayol&".mdb")
page = Request.Querystring("page")
durum = Request.Querystring("now")
id = Request.Querystring("id")
if page="" and id<>"" then 
end if 
if page = "add" then
%>
<!--#include file="head.asp"-->
<dIv class="block">
<dIv class="block_head">
<dIv class="bheadl"></dIv>
<dIv class="bheadr"></dIv>
<h2><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Yeni ekle<% 
					end if 
					if dil="en" then 
					%>Add new<% 
					end if 
					if dil="fr" then 
					%>AJOUTER UN NOUVEAU<% 
					end if 
					if dil="ru" then 
					%>ДОБАВИТЬ НОВУЮ<%
					end if 
					if dil="ar" then 
					%> إضافة جديدة<% 
					end if 
					%></h2>	
</dIv>
<dIv class="block_content">
<script type="text/javascript" src="upload/highslide/highslide-with-html.js"></script>
<link rel="stylesheet" type="text/css" href="upload/highslide/highslide.css" />
<script type="text/javascript">
hs.graphicsDir = 'upload/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
</script>
<form action="?page=cmd&now=add" method="post">
<input type="hidden" name="b_hit" value="0" />

			<p><label><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Resim yükle<% 
					end if 
					if dil="en" then 
					%>Upload a picture<% 
					end if 
					if dil="fr" then 
					%>Télécharger une photo<% 
					end if 
					if dil="ru" then 
					%>Загрузить фото<%
					end if 
					if dil="ar" then 
					%>رفع صورة<% 
					end if 
					%> :</label><br />
            <a onClick="return hs.htmlExpand(this, { objectType: 'iframe' } )" href="upload/galeri_up.asp?durum=resimsifir"><img src="images/add.png" /> <% dil=session("plang") 
					if dil="tr" then 
					%>Bilgisayarımdan yükle<% 
					end if 
					if dil="en" then 
					%>Upload my computer<% 
					end if 
					if dil="fr" then 
					%>Télécharger une photo<% 
					end if 
					if dil="ru" then 
					%>Загрузить фото<%
					end if 
					if dil="ar" then 
					%>رفع صورة<% 
					end if 
					%></a>
            </p>
            
            
            <p>
            <label><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Sıra<% 
					end if 
					if dil="en" then 
					%>Order<% 
					end if 
					if dil="fr" then 
					%>Ordre<% 
					end if 
					if dil="ru" then 
					%>заказ<%
					end if 
					if dil="ar" then 
					%>النظام<% 
					end if 
					%> :</label><br />
			<input class="text xsmall" type="text" name="sira" maxlength="3" />
            </p>  
  
			
            <input class="submit mid" type="submit" value=" <% 
					dil=session("plang") 
					if dil="tr" then 
					%>Ekle<% 
					end if 
					if dil="en" then 
					%>Add<% 
					end if 
					if dil="fr" then 
					%>Ajouter<% 
					end if 
					if dil="ru" then 
					%>добавлять<%
					end if 
					if dil="ar" then 
					%>إضافة<% 
					end if 
					%> " />
			<INPUT type="Button" VALUE=" <% 
					dil=session("plang") 
					if dil="tr" then 
					%>İptal<% 
					end if 
					if dil="en" then 
					%>Cancel<% 
					end if 
					if dil="fr" then 
					%>Résilier<% 
					end if 
					if dil="ru" then 
					%>отменить<%
					end if 
					if dil="ar" then 
					%>إلغاء<% 
					end if 
					%> " OnClick='history.go( -1 );return true;'  class="submit small">
			</form><BR />
	</div>		<!-- .block_content ends -->
				
<dIv class="bendl"></dIv>
<dIv class="bendr"></dIv>
</dIv>		<!-- .block.small.rIght ends -->
<% 
end if 
if page = "cmd" then
durum = request.querystring("now")
if durum = "" then
response.Write("")
elseif durum = "add" then
call yekle
elseif durum = "del" then
call ysil
end if
sub yekle
   Set hafzullah = Server.CreateObject("ADODB.Connection")
   hafzullah.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../db/"&datayol&".mdb")

   sira = Request.form("sira")
  
   resim = session("galeri")
   if sira="" then
   response.redirect "panel.asp?box=warning&text=Lutfen%20tum%20alanlari%20doldurunuz.&second=2&url=galeri.asp?page=add"
   Else 
   
    Set kaydet = Server.CreateObject("ADODB.Recordset")
    sql = "SELECT * from galeriler"
    kaydet.open sql, hafzullah, 1, 3
    kaydet.addnew
	kaydet("resim") = resim
	kaydet("sira") = sira
	
	kaydet.update
    kaydet.close
    set kaydet=nothing
    hafzullah.close
    set hafzullah=nothing
	session("galeri")=""
	response.redirect "panel.asp?box=success&text=galeri%20basariyla%20eklendi.&second=2&url=galeri.asp?page=add"
    end if
	
	end sub
	
sub ysil
id=Request.QueryString("id")
Set yazsil=Server.CreateObject("Adodb.Recordset")
yso="Delete * From galeriler where id="&id&""
yazsil.open yso,baglanti,1,3
response.redirect "panel.asp?box=success&text=galeri%20basariyla%20silindi.&second=2&url=galeri.asp?page=pages"
end sub
end if 
if page = "pages" then
%>
<!--#include file="head.asp"-->
<dIv class="block">
<dIv class="block_head">
<dIv class="bheadl"></dIv>
<dIv class="bheadr"></dIv>
<h2><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Galeri<% 
					end if 
					if dil="en" then 
					%>Gallery<% 
					end if 
					if dil="fr" then 
					%>Galerie<% 
					end if 
					if dil="ru" then 
					%>галерея<%
					end if 
					if dil="ar" then 
					%>رواق<% 
					end if 
					%></h2>	
					<ul class="tabs">
						<li><a href="?page=add"><img src="images/add.png" /> <% 
					dil=session("plang") 
					if dil="tr" then 
					%>Yeni ekle<% 
					end if 
					if dil="en" then 
					%>Add new<% 
					end if 
					if dil="fr" then 
					%>AJOUTER UN NOUVEAU<% 
					end if 
					if dil="ru" then 
					%>ДОБАВИТЬ НОВУЮ<%
					end if 
					if dil="ar" then 
					%> إضافة جديدة<% 
					end if 
					%></a></li>
					</ul>
</dIv>
<dIv class="block_content">
<%
Response.WrIte("<table wIdth=100% border=0 cellspacIng=3 cellpaddIng=0 alIgn=center>")
%>
<style type="text/css"> tr.menuon {background: url(images/); color: #666666; } tr.menuoff { background: url(images/bg-blog-tr-img.jpg); color: #191919; } </style>
<%
Set yazi=Server.CreateObject("Adodb.Recordset")
ysorgu="Select * From galeriler order by sira asc"
yazi.open ysorgu,baglanti,1,3
do while not yazi.eof %>
<tr class="menuoff" onMouseOver="className='menuon';"  onMouseOut="className='menuoff';">
<td class=bout width="90%" alIgn="center"><img src="resim.asp?path=<%=yazi("resim")%>&bx=50"/></td>
<td class=tIny width="5%" alIgn="center"><center><A tItle=duzenle href="galeri.asp?page=edit&id=<%=yazi("id")%>"><IMG src="Images/fIlemanager/edit.png" border=0></a></center></td> 
<td class=tIny width="5%" alIgn="center"><center><A tItle=sIl href="galeri.asp?page=del_onay&id=<%=yazi("id")%>" ><IMG src="Images/fIlemanager/del.png" border=0></a></center></td> 
</tr>
<% 
yazi.movenext
loop
yazi.close
Set yazi=Nothing
%>
</table>
</dIv>		<!-- .block_content ends -->
<dIv class="bendl"></dIv>
<dIv class="bendr"></dIv>
</dIv>		<!-- .block.small.rIght ends -->
<%
end if
if page = "edit" then
Set Bag = Server.CreateObject("ADODB.Connection")
Bag.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../db/"&datayol&".mdb")
Set Rs=Server.CreateObject("Adodb.Recordset")
id=request("id")
if request("update")<>"" then
  
   sira = Request.form("sira")
  
   if request.form("galeri")="" then 
   resim = session("galeri")
   else
   resim = request.form("galeri")
   end if
Rs.ActiveConnection = bag
Sorgu="SELECT * FROM galeriler WHERE id="& id &""
rs.open Sorgu,bag,3,2
	rs.update "resim",resim
	rs.update "sira",sira
	
rs.close
set rs=nothing 
response.redirect "panel.asp?box=success&text=galeri%20basariyla%20duzenlendi.&second=2&url=galeri.asp?page=pages"
else
end if 
Set Bag = Server.CreateObject("ADODB.Connection")
Bag.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../db/"&datayol&".mdb")
Set Rs=Server.CreateObject("Adodb.Recordset")
Rs.ActiveConnection = bag
Rs.Open="Select * from galeriler WHERE id =" & request("id")
%>
<!--#include file="head.asp"-->
<dIv class="block">
<dIv class="block_head">
<dIv class="bheadl"></dIv>
<dIv class="bheadr"></dIv>
<h2><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Düzenle<% 
					end if 
					if dil="en" then 
					%>Edit<% 
					end if 
					if dil="fr" then 
					%>Modifier<% 
					end if 
					if dil="ru" then 
					%>редактировать<%
					end if 
					if dil="ar" then 
					%>تعديل<% 
					end if 
					%></h2>	

</dIv>
<dIv class="block_content">
<script type="text/javascript" src="upload/highslide/highslide-with-html.js"></script>
<link rel="stylesheet" type="text/css" href="upload/highslide/highslide.css" />
<script type="text/javascript">
hs.graphicsDir = 'upload/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
</script>
<form action="?page=edit" method="post">
<input type="hidden" name="b_hit" value="0" />

			<p><label><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Resim yükle<% 
					end if 
					if dil="en" then 
					%>Upload a picture<% 
					end if 
					if dil="fr" then 
					%>Télécharger une photo<% 
					end if 
					if dil="ru" then 
					%>Загрузить фото<%
					end if 
					if dil="ar" then 
					%>رفع صورة<% 
					end if 
					%> :</label><br />
            <% if rs("resim")="" then %>Resim eklenmemis<% else %><img src="<%=rs("resim")%>" /><br /><% end if %>
			<input type="hidden" name="galeri" value="<%=rs("resim")%>" />
            <a onClick="return hs.htmlExpand(this, { objectType: 'iframe' } )" href="upload/galeri_up.asp?durum=resimsifir"><img src="images/add.png" /> <% dil=session("plang") 
					if dil="tr" then 
					%>Bilgisayarımdan yükle<% 
					end if 
					if dil="en" then 
					%>Upload my computer<% 
					end if 
					if dil="fr" then 
					%>Télécharger une photo<% 
					end if 
					if dil="ru" then 
					%>Загрузить фото<%
					end if 
					if dil="ar" then 
					%>رفع صورة<% 
					end if 
					%></a>
            </p>
			
            <p>
            <label><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Sıra<% 
					end if 
					if dil="en" then 
					%>Order<% 
					end if 
					if dil="fr" then 
					%>Ordre<% 
					end if 
					if dil="ru" then 
					%>заказ<%
					end if 
					if dil="ar" then 
					%>النظام<% 
					end if 
					%> :</label><br />
			<input class="text xsmall" type="text" name="sira" maxlength="3" value="<%=rs("sira")%>"/>
            </p>  
  
			<input type="hidden" name="id" value="<%Response.Write RS("id")%>" />
            <input type="hidden" name="update" value="1">
            <input class="submit long" type="submit" value=" <% 
					dil=session("plang") 
					if dil="tr" then 
					%>Düzenle<% 
					end if 
					if dil="en" then 
					%>Edit<% 
					end if 
					if dil="fr" then 
					%>Modifier<% 
					end if 
					if dil="ru" then 
					%>редактировать<%
					end if 
					if dil="ar" then 
					%>تعديل<% 
					end if 
					%> " />
			<INPUT type="Button" VALUE=" <% 
					dil=session("plang") 
					if dil="tr" then 
					%>İptal<% 
					end if 
					if dil="en" then 
					%>Cancel<% 
					end if 
					if dil="fr" then 
					%>Résilier<% 
					end if 
					if dil="ru" then 
					%>отменить<%
					end if 
					if dil="ar" then 
					%>إلغاء<% 
					end if 
					%> " OnClick='history.go( -1 );return true;'  class="submit mid">
			</form><BR />
	</div>		<!-- .block_content ends -->
	
			
<dIv class="bendl"></dIv>
<dIv class="bendr"></dIv>
</dIv>		<!-- .block.small.rIght ends -->
<%
end if
if page = "del_onay" then
%>
<!--#include file="head.asp"-->
<div class="block">
<div class="block_head">
<div class="bheadl"></div>
<div class="bheadr"></div>
<h2><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Galeri<% 
					end if 
					if dil="en" then 
					%>Gallery<% 
					end if 
					if dil="fr" then 
					%>Galerie<% 
					end if 
					if dil="ru" then 
					%>галерея<%
					end if 
					if dil="ar" then 
					%>رواق<% 
					end if 
					%></h2>
</div>		<!-- .block_head ends -->
<div class="block_content">
<div class="message warning"><p><% 
					dil=session("plang") 
					if dil="tr" then 
					%>Silmek istediginizden Eminmisiniz?<% 
					end if 
					if dil="en" then 
					%>Are you sure you want to delete?<% 
					end if 
					if dil="fr" then 
					%>Etes-vous sûr de vouloir supprimer?<% 
					end if 
					if dil="ru" then 
					%>Вы уверены, что хотите удалить?<%
					end if 
					if dil="ar" then 
					%>هل أنت متأكد أنك تريد حذف؟<% 
					end if 
					%></p></div>
                    
			<form action="galeri.asp?page=cmd&now=del&id=<%=request("id")%>" method="post">
			<p>
			<INPUT TYPE="submit" VALUE=" <% 
					dil=session("plang") 
					if dil="tr" then 
					%>Sil<% 
					end if 
					if dil="en" then 
					%>Delete<% 
					end if 
					if dil="fr" then 
					%>Effacer<% 
					end if 
					if dil="ru" then 
					%>Очистить<%
					end if 
					if dil="ar" then 
					%>سيل<% 
					end if 
					%> "  class="submit long">
            <INPUT type="Button" VALUE=" <% 
					dil=session("plang") 
					if dil="tr" then 
					%>İptal<% 
					end if 
					if dil="en" then 
					%>Cancel<% 
					end if 
					if dil="fr" then 
					%>Résilier<% 
					end if 
					if dil="ru" then 
					%>отменить<%
					end if 
					if dil="ar" then 
					%>إلغاء<% 
					end if 
					%> " OnClick='history.go( -1 );return true;'  class="submit mid">
			<input type="hidden" name="del" value="1">
			<input type="hidden" name="id" value="<%=request("id")%>">
			</p>
			</form>
</div>		<!-- .block_content ends -->
<div class="bendl"></div>
<div class="bendr"></div>
</div>		<!-- .block ends -->
<%
end if
%>
<!--#include file="foot.asp"-->