siran Yeni Üye
Kayıt Tarihi: 31-Mart-2010 Gönderilenler: 12
|
Gönderen: 12-Haziran-2010 Saat 10:54 | Kayıtlı IP
|
|
|
Suan Calistigim Firmanin Eski Sitesinin Resim Galerisi xml flash kullanilarak Yapilmis Ve Admin Paneli Olusturmuslar GuzeLde olmus Fakat Artik Cok uzun Zamandir Ayni site kullanildigi icin sıkmış tabi bizde bunu Farkli bir site yapma Karari aldik ama Benim Pek Fazla Asp Xml flash Deneyimim olmadigi icin Cok Yerde Takildim Aspmania Arkadasim Saolsun Bir Kac Sorunumda Yardimci oldu Diger ArkadasLar isiminizi Hatirlarliyamadim Kusura Bakmayin SizLere Tesekkuru Bir Borc Bilirim
Simdi Sorunum Farkli Bir xml sayfasina bu admin panelinden gelen kodlari xml icerisindeki ornekdeki gibi nasil yazdira birilim
Yardimci Olursaniz Cok Sevinirim ArkadasLar
OrjiNal Resim.xml Kodu
Kod:
<res> <resim>3</resim> <referans>çilek mobilya</referans> <kategori>cephe uygulama</kategori> </res> |
|
|
Bu Sekilde Yazmasini icin Ne yapamam Lazim
Kod:
<image> <title>Image 1</title> <description>Image 1 description</description> <small>thumbs/1.jpg</small> <large>images/1.jpg</large> <largeWidth>425</largeWidth> <largeHeight>282</largeHeight> </image> |
|
|
Admin PaneL Kodlari
Kod:
<% dim id,title,details dim msg dim objXML set objXML = server.CreateObject("Microsoft.FreeThreadedXMLDOM") dim eobjXML set eobjXML = server.CreateObject("Microsoft.FreeThreadedXMLDOM") dim Upload Set Upload = Server.CreateObject("Persits.Upload.1") id = "AUTO" title = "Cephe Uygulama" etitle = "Facial Applications"
if request.QueryString("Submit") <> "" then Set File = Upload.Files("DOSYA") Set BFile = Upload.Files("BDOSYA") Upload.OverwriteFiles = True
Count = Upload.SaveToMemory
objXML.async = False eobjXML.async = False blnFileExist = objXML.load(xmlpath) eblnFileExist = eobjXML.load(exmlpath) if request.QueryString("id") = "" then
If blnFileExist = False Then objXML.appendChild(objXML.createProcessingInstruction("xml", "version=""1.0""")) intID = 1 Else if objXML.childnodes(0).childnodes(1).hasChildNodes then intID = objXML.childnodes(0).childnodes(1).childnodes(_ objXML.childnodes(0).childnodes(1).childnodes.length -1).childnodes(0).text + 1 else intID = 1 end if End If kd=intID
klasor = "../images/1/" bklasor = "../images/1/b/"
If Count = 2 Then Set File = Upload.Files(1) Path = Server.MapPath(klasor&kd&".jpg") File.SaveAs Path Set BFile = Upload.Files(2) Path = Server.MapPath(bklasor&kd&".jpg") BFile.SaveAs Path end if
Set objXMLv = objXML.createElement("res") objXMLv.appendChild(objXML.createElement("resim")) objXMLv.appendChild(objXML.createElement("referans")) objXMLv.appendChild(objXML.createElement("kategori")) objXMLv.appendChild(objXML.createElement("format")) objXMLv.childNodes(0).text = intID objXMLv.childNodes(1).text = Upload.form("details") objXMLv.childNodes(2).text = Upload.form("title") objXMLv.childNodes(2).text = Upload.form("format")
objXML.documentElement.childnodes(1).appendChild(objXMLv.clo neNode(true))
objXML.save(xmlpath) Set eobjXMLv = eobjXML.createElement("res") eobjXMLv.appendChild(eobjXML.createElement("resim")) eobjXMLv.appendChild(eobjXML.createElement("referans")) eobjXMLv.appendChild(eobjXML.createElement("kategori")) eobjXMLv.appendChild(eobjXML.createElement("format")) eobjXMLv.childNodes(0).text = intID eobjXMLv.childNodes(1).text = Upload.form("edetails") eobjXMLv.childNodes(2).text = Upload.form("etitle") eobjXMLv.childNodes(3).text = Upload.form("format")
eobjXML.documentElement.childnodes(1).appendChild(eobjXMLv.c loneNode(true))
eobjXML.save(exmlpath) else
Set objXMLv = objXML.createElement("res") objXMLv.appendChild(objXML.createElement("resim")) objXMLv.appendChild(objXML.createElement("referans")) objXMLv.appendChild(objXML.createElement("kategori")) objXMLv.appendChild(objXML.createElement("format")) objXMLv.childNodes(0).text = Upload.form("id") objXMLv.childNodes(1).text = Upload.form("details") objXMLv.childNodes(2).text = Upload.form("title") objXMLv.childNodes(3).text = Upload.form("format") set objXMLvOld = objXML.childnodes(0).childnodes(1).childnodes(request.QueryS tring("id")-1)
objXML.documentElement.childnodes(1).replaceChild objXMLv, objXMLvOld objXML.save(xmlpath) Set eobjXMLv = eobjXML.createElement("res") eobjXMLv.appendChild(eobjXML.createElement("resim")) eobjXMLv.appendChild(eobjXML.createElement("referans") ) eobjXMLv.appendChild(eobjXML.createElement("kategori") ) eobjXMLv.appendChild(eobjXML.createElement("format")) eobjXMLv.childNodes(0).text = Upload.form("id") eobjXMLv.childNodes(1).text = Upload.form("edetails") eobjXMLv.childNodes(2).text = Upload.form("etitle") eobjXMLv.childNodes(3).text = Upload.form("format")
set eobjXMLvOld = e objXML.childnodes(0).childnodes(1).childnodes(request.QueryS tring("id")-1)
eobjXML.documentElement.childnodes(1).replaceChild eobjXMLv, eobjXMLvOld eobjXML.save(exmlpath) end if
Set objXMLv = Nothing Set objXML = Nothing Set eobjXMLv = Nothing Set eobjXML = Nothing
msg = "Kayit Eklendi!"
response.Redirect("listcontents.asp")
end if
if request.QueryString("id") <> "" then objXML.Load(xmlpath) set xmlcontents = objXML.DocumentElement.selectSingleNode("resimler") set xmlcontent = xmlcontents.ChildNodes.item(request.QueryString("id")-1) id = xmlcontent.ChildNodes.item(0).text details = xmlcontent.ChildNodes.item(1).text title = xmlcontent.ChildNodes.item(2).text end if
if request.QueryString("id") <> "" then eobjXML.Load(exmlpath) set exmlcontents = eobjXML.DocumentElement.selectSingleNode("resimler") set exmlcontent = exmlcontents.ChildNodes.item(request.QueryString("id")-1) eid = exmlcontent.ChildNodes.item(0).text edetails = exmlcontent.ChildNodes.item(1).text etitle = exmlcontent.ChildNodes.item(2).text end if
%> |
|
|
Düzenleyen siran 12-Haziran-2010 Saat 10:55
|