• 26-01-2014, 02:49:12
    #1
    <% @Language=VBScript %>
    <!--#include file="parola.asp" -->
    <%
    Set Sur = Server.CreateObject("ADODB.Connection")
    Sur.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/db/7773311.mdb")
    
    Set yeniasp = Server.CreateObject("ADODB.Recordset")
    sor = "Select * from download ORDER BY id DESC"
    yeniasp.Open sor,Sur,1,3
    
    git = Request.QueryString("git")
    if git="" then 
    git=1
    end if
    
    sil = Request.QueryString("sil")
    if sil = "delete" then
    call delete
    else
    end if
    
    islem=Request.QueryString("islem")
    if islem="ekle" then
    call ekle
    end if
    %>
    
    <%
    sub delete
    id = Request("id")
    Set mailsil = Server.CreateObject("ADODB.RecordSet")
    SQL_delete = "DELETE from download WHERE id="&id&""
    mailsil.open SQL_delete,Sur,1,3
    response.redirect Request.ServerVariables("HTTP_REFERER")
    end sub
    %>
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
    <meta http-equiv="Content-Language" content="tr">
    <link rel="stylesheet" type="text/css" href="../stil.css">
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>ADMINISTRATION</title>
    </head>
    
    <BODY SCROLL="auto" TOPMARGIN=0 LEFTMARGIN=0 onMouseOver="status='777.Com'; return true" BACKGROUND="../images/arkaplan.gif">
    
    </div>
    <div align="center">
      <center>
      <table border="0" cellpadding="1" cellspacing="1" width="600" bgcolor="#202020">
        <tr>
          <td width="500" bgcolor="#223f05" height="30">&nbsp;<b><font color=white>İçerik Adı</b></font></td>
          <td width="100" bgcolor="#223f05" height="30">
            <p align="center"><b><font color=white>İŞLEM</font></b></td>
        </tr>
    <%
    yeniasp.pagesize = 50
    yeniasp.absolutepage = git
    sayfa = yeniasp.pagecount
    for i=1 to yeniasp.pagesize
    if yeniasp.eof then exit for
    %>
        <tr>
          <td width="500" bgcolor="#f1f1f1">&nbsp;<%=yeniasp("script_adi")%></td>
          <td width="100" bgcolor="#f1f1f1">
            <p align="center"><a href="aspduzenle.asp?id=<%=yeniasp("id")%>"><font size="2">Düzenle</a></font> <b>-</b> <a href="aasp_adminn.asp?sil=delete&id=<%=yeniasp("id")%>"><font size="2">Sil</a></font></td>
        </tr>
    <%yeniasp.movenext%>
    <% next %>
      </table>
      </center>
    </div>
    
    <div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" width="500" height="20">
        <tr>
          <td>
            <p align="center"><font color=white size=2><b>Sayfa : <%
    for y=1 to sayfa 
    if git=y then
    response.write y
    else
    response.write "<b> <a href=""aasp_adminn.asp?git="&y&"""><font color=white size=2><b>"&y&"</a></b>"
    end if
    next
    %></td>
        </tr>
      </table>
      </center>
    </div>
    
    <div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" width="500" height="20">
        <tr>
          <td></td>
        </tr>
      </table>
      </center>
    </div>
    <div align="center">
      <center>
    <%
    Set yeniasp = Server.CreateObject("ADODB.Recordset")
    sor = "Select * from download ORDER BY id"
    yeniasp.Open sor,Sur,1,3
    %>
      <table border="0" cellpadding="0" cellspacing="0" width="600">
        <tr>
          <td>
            <form method="POST" enctype="multipart/form-data" action="aasp_adminn.asp?islem=ekle">
              <div align="center">
    		  <table border="0" cellpadding="0" cellspacing="1" width="600" bgcolor="#223f05">
                  <tr>
                <table border="0" cellpadding="0" cellspacing="1" width="600" bgcolor="#FFFFFF">
                  <tr>
                    <td bgcolor="#223f05" height="20">
                      <p align="center"><b><font color=white>YENİ OYUN EKLEME BÖLÜMÜ</font></b></td>
                  </tr>
                </table>
              </div>
              <div align="center">
                <table border="0" cellpadding="0" width="600" bgcolor="#F1F1F1" cellspacing="1">
                  <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>Oyun Adı :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<input type="text" name="script_adi" size="45" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand value="<%=yeniasp("script_adi")%>"></td>
                  </tr>
                  <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>Açıklaması :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<input type="text" name="tanim" size="45" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand value="<%=yeniasp("tanim")%>"></td>
                  </tr>
                  <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>URL :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<input type="text" name="url" size="45" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand" value="http://www.777.com/oyunx/"></td>
                  </tr>
                  <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>Resim :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<input type="file" name="resim" ></td>
                  </tr>
    			  <tr>
    			                <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>Boyut :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<input type="text" name="boyut" size="45" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand value="<%=yeniasp("boyut")%>"></td>
                  </tr>
    			  <tr>
    				              <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>Zaman :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<input type="text" name="time" size="45" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand value="<%=yeniasp("time")%>"></td>
                  </tr>
    			  <tr>
                  </tr>
                  <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"><b>Kategori :</b> </td>
                    <td width="450" height="20" bgcolor="#FFFFFF">&nbsp;<select size="1" name="kid" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand">
    <%
    Set yeniasp = Server.CreateObject("ADODB.Recordset")
    sor = "Select * from kategori ORDER BY ilk_harf"
    yeniasp.Open sor,Sur,1,3
    %>                
    				<option selected>Kategori Seç</option>
                      <% Do while not yeniasp.eof %><option value="<%=yeniasp("kid")%>"><%=yeniasp("kategori_adi")%></option><%yeniasp.movenext%><%Loop%>
                      &nbsp;&nbsp; </select></td>
                  </tr>
                  <tr>
                    <td width="250" align="right" height="20" bgcolor="#FFFFFF"></td>
                    <td width="450" height="20" bgcolor="#FFFFFF">
                      <p align="center"><input type="submit" value="Yolla" name="Submit" style="background-color: #F7F7F7; font-size: 10px; font-family: Verdana; border-style: dashed; border-width: 1;cursor:hand"></td>
                  </tr>
                </table>
              </div>
            </form>
          </td>
        </tr>
      </table>
      </center>
    </div>
    
    </body>
    
    </html>
    <%sub ekle
    Set Sur = Server.CreateObject("ADODB.Connection")
    Sur.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/db/7773311.mdb")
    
    Set Upload = Server.CreateObject("Persits.Upload" ) 
       Count = Upload.SaveVirtual("image" ) 
       Set yukle= Server.CreateObject("ADODB.Recordset" ) 
       sql="Select * FROM download order by resim" 
       yukle.open sql,baglanti,1,3 
    
       yukle.addnew 
       yukle("resim" ) = "image/"&upload.files("resim" ).filename&"" 
       yukle.update 
    Set yeniasp = Server.CreateObject("ADODB.Recordset")
    sor = "Select * from download"
    yeniasp.Open sor,Sur,1,3
    %>
    <% Dim script_adi, kid, tanim, resim, url, time, boyut
    script_adi = Request.Form("script_adi")
    kid = Request.Form("kid")
    tanim = Request.Form("tanim")
    resim = Request.Form("resim")
    url = Request.Form("url")
    time = Request.Form("time")
    boyut = Request.Form("boyut")
    
    yeniasp.addnew
    yeniasp("script_adi") = script_adi
    yeniasp("kid") = kid
    yeniasp("tanim") = tanim
    yeniasp("resim") = resim
    yeniasp("url") = url
    yeniasp("time") = time
    yeniasp("boyut") = boyut
    
    yeniasp.update
    
    response.write err
    
    Response.Write "<center><font face=verdana color=black size=1>İlanınız eklendi...<br><a href=aasp_adminn.asp>Buraya Tıklayarak Ana Sayfaya Geri Dönün</a></font></center>"
    Response.End
    end sub
    %>
    bu sayfada yapmak istediğim içeriği eklerken resmide yüklemek ancak yapamadım.
    Set Upload = Server.CreateObject("Persits.Upload" ) 
       Count = Upload.SaveVirtual("image" ) 
       Set yukle= Server.CreateObject("ADODB.Recordset" ) 
       sql="Select * FROM download order by resim" 
       yukle.open sql,baglanti,1,3 
    
       yukle.addnew 
       yukle("resim" ) = "image/"&upload.files("resim" ).filename&"" 
       yukle.update
    2. yazdığım kodu yerleştirmede ve form u düzenlemede yardımcı olabilecek arkadaşlara teşekkürler.
  • 27-01-2014, 01:41:11
    #2
    yaptım yala.
  • 28-01-2014, 16:26:48
    #3
    arkadaşlar formu kendime göre düzenledikten sonra bağlantıyı şu şekilde yaptım

    <%
    if request.QueryString("islem")="ekle" then
    
    Set Upload = Server.CreateObject("Persits.Upload" ) 
       Count = Upload.SaveVirtual("/image" ) 
    
       script_adi   = Upload.form("script_adi" ) 
       tanim   = Upload.form("tanim" ) 
       url   = Upload.form("url" ) 
       boyut   = Upload.form("boyut" ) 
    
       
    
       Set yukle= Server.CreateObject("ADODB.Recordset" ) 
       sql="Select * FROM download" 
       yukle.open sql,baglanti,1,3 
    
       yukle.addnew 
       yukle("script_adi" )   = script_adi 
       yukle("tanim" )   = tanim 
       yukle("url" )   = url
       yukle("boyut" )   = boyut
       yukle("resim" ) = ""&upload.files("resim" ).filename&"" 
       yukle.update 
    response.Write("<h1>Tamamlandı</h1><hr><br>")
    Response.Write "<meta http-equiv=refresh content=3;url=yuklemeyap.asp>"
    end if
    %>

       Count = Upload.SaveVirtual("/image" )
    ben dosya yolunu /image klasörüne verdim ancak ekle diyip kaydettiğimde resim yolu veritabanına resim.jpg diye kaydediliyor. ben bu yolu burada /image/resim.jpg diye nasıl kaydedebilirim.
  • 28-01-2014, 20:04:51
    #4
    saolun arkadaşlar çok yardımcı oldunuz aklımada gelmese hiç biri de demicek ki resmi göstereceğin sayfada resim eğer urlsini veritabanından çekeceksen şöyle yaz diye
    <img src="/image/<%=yukle("buyukresim")%>"
    artık kullanıma hazır bir sayfamız oldu. bu kodlardan yararlanarak asp resim upload scripti arayan arkadaşlar işlerini göreceklerdir.hadi kolay gelsin.
  • 29-01-2014, 17:47:03
    #5
    Böyle yardım isteyenler her zaman tercihimdir.
    Kendin pişir kendin ye