Şimdi Ara

Asp ile resim dosyası silme

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
2 Misafir - 2 Masaüstü
5 sn
1
Cevap
0
Favori
528
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • Web sitemde aşağıdaki kodlar ile klasör içindeki yüklenen resimleri görüntülüyorum. Aşağıdaki kodlara istenen resimleri ftp den değilde kodlarla silmem mümkün mü ? Yani tıklayınca resmi sileceğiz.

    Not: Yüklenen Resimler herhangi bir veritabanına kayıt edilmiyor. Direkt resmi yüklüyor.


     Asp ile resim dosyası silme



    quote:

    <%
    yy=yol(request("path"))
    if yy ="/" then
    Response.Redirect "klasor.asp?path=upload"
    else
    x=yol(request("path"))
    end if
    if yy="\" then
    Response.Redirect "klasor.asp?path=upload"
    else
    x=yol(request("path"))
    end if
    if yy="\\" then
    Response.Redirect "klasor.asp?path=upload"
    else
    x=yol(request("path"))
    end if
    if yy="//" then
    Response.Redirect "klasor.asp?path=upload"
    else
    x=yol(request("path"))
    end if

    if not x="" then
    strListelenecekKlasor = request("path")
    else
    Response.Redirect "klasor.asp?path=upload"
    end if
    Set ObjFSO=Server.CreateObject("Scripting.FileSystemObject")
    Set strDosyalar=ObjFSO.GetFolder(Server.MapPath(strListelenecekKlasor))

    Private Function FileSize(ItemSize)
    If ItemSize >= 1073741824 Then
    ItemSize = FormatNumber((ItemSize/1073741824),2) &" GB"
    ElseIf ItemSize >= 1048576 Then
    ItemSize = FormatNumber((ItemSize/1048576),2) &" MB"
    ElseIf ItemSize >= 1024 Then
    ItemSize = FormatNumber((ItemSize/1024),2) &" KB"
    ElseIf ItemSize >= 0 Then
    ItemSize = ItemSize &" byte"
    Else
    ItemSize = "0 byte"
    End If

    FileSize = ItemSize
    End Function
    Function TR(strGelen)
    TR = Replace(strGelen, "İ", "İ")
    TR = Replace(TR, "ı", "ı")
    TR = Replace(TR, "ç", "ç")
    TR = Replace(TR, "Ç", "Ç")
    TR = Replace(TR, "ş", "ş")
    TR = Replace(TR, "Ş", "Ş")
    TR = Replace(TR, "ü", "ü")
    TR = Replace(TR, "Ü", "Ü")
    TR = Replace(TR, "ğ", "ğ")
    TR = Replace(TR, "Ğ", "Ğ")
    TR = Replace(TR, "ö", "ö")
    TR = Replace(TR, "Ö", "Ö")
    End Function
    %><center>
    <table width="931" cellpadding="0" cellspacing="0" border="0" bordercolor="gray">
    <td width="931">
    <table width="934" cellpadding="1" cellspacing="1" border="1" bordercolor="gray" height="62">
    <tr><td bgcolor="black" width="77%" height="16">
    <font size="2" face="Arial" color="white"> Root
    <b>Bölümü - <%=x%></b></td><td bgcolor="black" width="135" height="16">
    <p align="center"><b><a href="/in/dosyayukle.asp">
    <font face="Arial" size="2" color="#FFFFFF">
    <span style="text-decoration: none">Dosya Yükle</span></font></a></b></td></tr>
    <tr bgcolor="#dddddd">
    <td width="77%" height="16">
    <p align="center"><font size="2" face="Arial"> <b>Dosya</td>
    <td width="135" height="16">
    <p align="center"><font size="2" face="Arial"> <b>Dosya Detay</b></td>
    </tr>
    <%
    For each strBulunanDosya in strDosyalar.subfolders
    %>
    <tr onmouseover="this.style.backgroundColor='lightgreen';" onmouseout="this.style.backgroundColor='#FFFFFF';" onclick="return listim('<%=TR(strListelenecekKlasor)%>/<%=TR(strBulunanDosya.Name)%>')">
    <td width="77%" height="13"><font size="2" face="Arial"><a href="#" onclick="return listim('<%=TR(strListelenecekKlasor)%>/<%=TR(strBulunanDosya.Name)%>')">
    <span style="text-decoration: none"><%=TR(strBulunanDosya.Name)%></span></a></td>
    <td width="135" align="center" height="13"><font size="2" face="Arial"><%=strBulunanDosya.DateLastModified%></td>
    </tr>
    <%
    Next
    For each strBulunanDosya in strDosyalar.files
    dnam=strBulunanDosya.Name
    %>
    <tr onmouseover="this.style.backgroundColor='lightgreen';" onmouseout="this.style.backgroundColor='#FFFFFF';">
    <td width="77%" height="1" bordercolor="#800000">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="89%" id="AutoNumber1">
    <tr>
    <td width="15%" rowspan="3"><font size="2" face="Arial"><a href="<%=TR(strListelenecekKlasor)%>/<%=TR(strBulunanDosya.Name)%>" target="_blank">
    <span style="text-decoration: none">
    <img src="<%=TR(strListelenecekKlasor)%>/<%=TR(strBulunanDosya.Name)%>" width="143" height="123"></span></a></td>
    <td width="8%"><b><font size="2" face="Arial"> Link</font></b></td>
    <td width="65%"><font size="2" face="Courier">
    <font face="Arial">
    <input name="T1" size="75" value="http://www.xxx.com/<%=TR(strListelenecekKlasor)%>/<%=TR(strBulunanDosya.Name)%>"></font></td>
    </tr>
    <tr>
    <td width="8%"><b><font size="2" face="Arial"> Forum  </font></b></td>
    <td width="65%"><font size="2" face="Courier">
    <font face="Arial">
    <input name="T1" size="75" value="
     Asp ile resim dosyası silme
    "></font></td>
    </tr>
    <tr>
    <td width="8%"><b><font size="2" face="Arial"> Web</font></b></td>
    <td width="65%"><font size="2" face="Courier">
    <font face="Arial">
    <input name="T1" size="75" value="<img src="http://www.xxx.com/<%=TR(strListelenecekKlasor)%>/<%=TR(strBulunanDosya.Name)%>">"></font></td>
    </tr>
    </table>
    </td>
    <td width="135" align="center" height="1" bordercolor="#800000">
    <font size="2" face="Arial"><%=FileSize(strBulunanDosya.Size)%><br><%=strBulunanDosya.DateLastModified%></td>
    </tr>
    <%
    Next
    %>
    </table>
    </td>
    </table>
    <table width="416" cellpadding="0" cellspacing="0" border="0" bordercolor="gray">
    <td>
    <div id="list" name="list"></div>
    </td>
    </table>



    < Bu mesaj bu kişi tarafından değiştirildi crayzloveisankara -- 9 Aralık 2015; 15:58:07 >







  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.