<% if Session("adminaccess") <> "available" then Response.Redirect("default.asp?msg=כניסה לא חוקית או שתם זמן השהייה במערכת.<br>יש להכנס שוב עם פרטי הגישה.") end if Session.LCID = 2057 dim arr(3) 'מכיל נתיבים לקבצים i = 0
Set Upload = Server.CreateObject("Persits.Upload") Upload.OverwriteFiles = False Upload.IgnoreNoPost = True Count = Upload.SaveVirtual("/yp/images_libary") For Each File in Upload.Files arr(i) = File.FileName i = i + 1 Next name_He = Upload.Form("name_He") name_En = Upload.Form("name_En") location_He = Upload.Form("location_He") location_En = Upload.Form("location_En") type_He = Upload.Form("type_He") type_En = Upload.Form("type_En") pop_He = Upload.Form("pop_He") pop_En = Upload.Form("pop_En") about_He = Upload.Form("about_He") about_En = Upload.Form("about_En") hasUrl = Upload.Form("hasUrl") url = Upload.Form("url") smallPic = arr(0) largePic = arr(1) typ = Upload.Form("typ") name_He = Replace("name_He","'","'") name_En = Replace("name_En","'","'") location_He = Replace("location_He","'","'") location_En = Replace("location_En","'","'") type_He = Replace("type_He","'","'") type_En = Replace("type_En","'","'") pop_He = Replace("pop_He","'","'") pop_En = Replace("pop_En","'","'") about_He = Replace("about_He","'","'") about_En = Replace("about_En","'","'") hasUrl = Replace("hasUrl","'","'") url = Replace("url","'","'") smallPic = Replace("smallPic","'","'") largePic = Replace("largePic","'","'") typ = Replace("typ","'","'")
about_He = Replace("about_He",vbcrlf,"<br>") about_En = Replace("about_En",vbcrlf,"<br>") e = "" if name_He = "" then e = e & "לא הזנת שם בעברית" & "<BR>" end if if name_En = "" then e = e & "לא הזנת שם באנגלית" & "<BR>" end if if location_He = "" then e = e & "לא הזנת מיקום בעברית" & "<BR>" end if if location_En = "" then e = e & "לא הזנת מיקום באנגלית" & "<BR>" end if if type_He = "" then e = e & "לא הזנת את סוג הנכס בעברית" & "<BR>" end if if type_En = "" then e = e & "לא הזנת את סוג הנכס באנגלית" & "<BR>" end if if pop_He = "" then e = e & "לא הזנת איכלוס משוער בעברית" & "<BR>" end if if pop_En = "" then e = e & "לא הזנת איכלוס משוער באנגלית" & "<BR>" end if if about_He = "" then e = e & "לא הזנת את תיאור הפרוייקט בעברית" & "<BR>" end if if about_En = "" then e = e & "לא הזנת את תיאור הפרוייקט באנגלית" & "<BR>" end if if e <> "" then Session("name_He") = name_He Session("name_En") = name_En Session("location_He") = location_He Session("location_En") = location_En Session("type_He") = type_He Session("type_En") = type_En Session("pop_He") = pop_He Session("pop_En") = pop_En Session("about_He") = about_He Session("about_En") = about_En Session("url") = url Session("hasUrl") = hasUrl Response.Redirect ("newProject.asp?typ=" & typ & "&msg=" & e) else %> <!--#include file="dbcon.asp"--> <% if Left(url,7) = "http://" then urll = url elseif Left(url,8) = "https://" then urll = url elseif Left(url,6) = "ftps://" then urll = url else urll = "http://" & url end if con.execute("insert into projects (name_He, name_En, location_He, location_En, type_He, type_En, pop_He, pop_En, about_He, about_En, hasUrl, url, smallPic, largePic, typ) VALUES ('" & name_He & "','" & name_En & "','" & location_He & "','" & location_En & "','" & type_He & "','" & type_En & "','" & pop_He & "','" & pop_En & "','" & about_He & "','" & about_En & "'," & hasUrl & ",'" & urll & "','" & arr(0) & "','" & arr(1) & "'," & typ & ")") response.Redirect ("projects.asp?typ=" & typ) end if %>
|