<% ' Fruibile - L'elemento CMS Open Source che mancava ' Copyright (C) 2002-2006 Roberto Scano ' ' Licensed under the terms of the GNU Lesser General Public License: ' http://www.opensource.org/licenses/lgpl-license.php ' ' For further information visit: ' http://www.fruibile.it/ ' ' File Author: ' Roberto Scano (mail@robertoscano.info) %> <% 'controllo sicurezza -------------- if Session("WEBGODLogin") <> "W3C_VALIDATOR" then If session("contenuti")<> 1 Then response.Redirect "/backoffice/noentry.asp" end if end if '---------------------------------- 'Prevent your website from cross website attacks --------- refererUrl = Cstr(Request.ServerVariables("HTTP_REFERER")) serverName = Cstr(Request.ServerVariables("SERVER_NAME")) refererName = mid(refererUrl,8,len(serverName)) if refererName <> serverName then response.Redirect "/backoffice/noentry.asp" response.end end if '--------------------------------------------------------- %> <% percorso = " " & DICLanguage(79) & "" percorso = percorso & " / " & DICLanguage(104) lastpage = Request.ServerVariables("HTTP_REFERER") %>

<%=DICLanguage(79)%>

<% if Session("supervisor") = true then aggiunta_sql = "" aggiunta_where_sql = "" else aggiunta_sql = " and office_id=" & Session("Office_ID") aggiunta_where_sql = " where office_id=" & Session("Office_ID") end if lingua = split(Session("editlanguage"),",") if Request("Back") <> "" then response.redirect request("lastpage") end if if Request("action") = "save" then if Request("Title_" & Session("Language")) <> "" or Session("translator") = true then intDocumentID = replace(Request("txtdocumentid"),"'","''") if Session("supervisor") = true or Session("reviewer") = true or Session("poweruser") = true then if request("proprietario") <> "" then rs_proprietario = request("proprietario") else rs_proprietario = 1 end if else rs_proprietario = Session("ID_UTENTE") end if 'ASSEGNAZIONE OFFICE_ID if rs_proprietario <> 0 then sql = "Select struttura from " & application("prefix") & "utenti where id=" & rs_proprietario SET RS2 = conn.execute(sql) rs_office_id = rs2("struttura") rs2.close set rs2 = nothing else rs_office_id = 0 end if if rs_office_id = "" then rs_office_id = 0 end if if request("modello") <> "" then rs_modello = request("modello") else rs_modello = 1 end if rs_argomento = 0 rs_catid = request("catid") rs_posizione = request("posizione") rs_modificato = strDataOra rs_sm_changefreq = "'" & request("sm_changefreq") & "'" rs_sm_priority = "'" & request("sm_priority") & "'" if request("catid") > 0 then sql = "Select areaid from " & application("prefix") & "documenti where id=" & replace(trim(Request("catid")),"'","''") SET RS2 = conn.execute(sql) If rs2.EOF AND rs2.BOF Then rs_areaid = 0 else rs_areaid = rs2("areaid") end if rs2.close set rs2 = nothing else rs_areaid= 0 end if upddescrizioni = "" for j=LBound(lingua) to UBound(lingua) if Session("supervisor") = true or Session("reviewer") = true or Session("poweruser") = true then If lcase(Request("visibile_" & lingua(j))) = "on" Then rs_visibile = 1 else rs_visibile = 0 End If upddescrizioni = upddescrizioni & "visibile_" & lingua(j) & "=" & rs_visibile & "," end if contenuto = null if len (Request("content_" & lingua(j))) > 0 then contenuto = FixMySQL((Request("content_" & lingua(j)))) else contenuto = Request("content_" & lingua(j) & "_alt") if len(contenuto) > 0 then Set Tidy = Server.CreateObject("TidyCOM.TidyObject.2") Tidy.Options.Item("output-xhtml") = "yes" Tidy.Options.Item("xhtml-version") = "1.1" Tidy.Options.Item("show-body-only") = "yes" contenuto = Tidy.TidyMemToMem(contenuto) set Tidy = nothing end if end if upddescrizioni = upddescrizioni & "title_" & lingua(j) & "='" & FixMySQL((Request("title_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "tagtitle_" & lingua(j) & "='" & FixMySQL((Request("tagtitle_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "descrizione_" & lingua(j) & "='" & FixMySQL((Request("descrizione_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "keywords_" & lingua(j) & "='" & FixMySQL((Request("keywords_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "url_" & lingua(j) & "='" & FixMySQL((Request("url_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "rss_url_" & lingua(j) & "='" & FixMySQL((Request("rss_url_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "rss_title_" & lingua(j) & "='" & FixMySQL((Request("rss_title_" & lingua(j)))) & "'," upddescrizioni = upddescrizioni & "content_" & lingua(j) & "='" & FixMySQL(contenuto) & "'," next rs_lastuserid = "'" & Session("WEBGODLogin") & "'" rs_lastlogin = strDataOra rs_lastIP = "'" & Request.ServerVariables("REMOTE_ADDR") & "'" if Session("supervisor") = true then strSQL = "UPDATE " & application("prefix") & "documenti set " & upddescrizioni & "proprietario=" & rs_proprietario & ",modello=" & rs_modello & ",argomento=" & rs_argomento & ",areaid=" & rs_areaid & ",catid=" & rs_catid & ",posizione=" & rs_posizione & ",modificato=" & rs_modificato & ",lastrevid=" & rs_lastuserid & ",lastrevlogin=" & rs_lastlogin & ",lastrevip=" & rs_lastip & ", office_id=" & rs_office_id & ",sm_changefreq=" & rs_sm_changefreq & ",sm_priority=" & rs_sm_priority & " where id=" & intDocumentID & aggiunta_sql elseif Session("reviewer") = true then strSQL = "UPDATE " & application("prefix") & "documenti set " & upddescrizioni & "proprietario=" & rs_proprietario & ",modello=" & rs_modello & ",argomento=" & rs_argomento & ",areaid=" & rs_areaid & ",catid=" & rs_catid & ",posizione=" & rs_posizione & ",modificato=" & rs_modificato & ",lastrevid=" & rs_lastuserid & ",lastrevlogin=" & rs_lastlogin & ",lastrevip=" & rs_lastip & ", office_id=" & rs_office_id & ",sm_changefreq=" & rs_sm_changefreq & ",sm_priority=" & rs_sm_priority & " where id=" & intDocumentID & aggiunta_sql else strSQL = "UPDATE " & application("prefix") & "documenti set " & upddescrizioni & "proprietario=" & rs_proprietario & ",modello=" & rs_modello & ",argomento=" & rs_argomento & ",areaid=" & rs_areaid & ",catid=" & rs_catid & ",posizione=" & rs_posizione & ",modificato=" & rs_modificato & ",lastuserid=" & rs_lastuserid & ",lastlogin=" & rs_lastlogin & ",lastip=" & rs_lastip & ", office_id=" & rs_office_id & ",sm_changefreq=" & rs_sm_changefreq & ",sm_priority=" & rs_sm_priority & " where id=" & intDocumentID & aggiunta_sql end if 'response.write strSQL set rs = Conn.execute(strSQL) set rs = nothing Response.Redirect replace(request("lastpage"),"&","&") '"contenuti.asp?cat=" & request("cat") & "&mnu=" & request("mnu") & "&submnu=" & request("submnu") else response.write "

" & DICLanguage(96) & DICLanguage(0) & "

" end if else intDocumentID = replace(Request.QueryString("id"),"'","''") set Rs = Server.CreateObject("ADODB.Recordset") strSQL = "Select * From " & application("prefix") & "documenti where id=" & intDocumentID & aggiunta_sql set Rs = conn.Execute(strSQL) If not Rs.EOF then if rs("catid") > 0 then sql = "Select areaid from " & application("prefix") & "documenti where id=" & trim(RS("catid")) SET RS2 = conn.execute(sql) If rs2.EOF AND rs2.BOF Then rs_areaid = 0 else rs_areaid = rs2("areaid") end if set rs2 = nothing else rs_areaid= 0 end if %>
<%=DICLanguage(104)%>: <%if Session("supervisor") = true then%> <%end if%>
<% conta = 0 for j=LBound(lingua) to UBound(lingua) conta = conta + 1 SQL = "SELECT * FROM " & application("prefix") & "configurazione_lingue where codice='" & lingua(j) & "'" SET lng = conn.execute(sql) CODLINGUA = trim(lng("codice")) if lcase(codlingua) = Session("language") then NOMELINGUA = fixstring(lng("lingua"),"d") else NOMELINGUA = "" & fixstring(lng("lingua_int"),"d") & "" end if set lng = nothing %>

<%=nomelingua%>

<%=replace(DICLanguage(317),"[LINGUA]", NOMELINGUA)%>:
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=DICLanguage(371)%>: <%=fixstring(rs("rss_title_" & Session("reflanguage")),"d")%>

<%end if%> ucase(Session("Language")) then%> <%=lac(lingua(j))%><%end if%> type="text" name="rss_title_<%=lingua(j)%>" class="input-lungo" id="rss_title_<%=lingua(j)%>" value="<%=fixstring(rs("rss_title_" & lingua(j)),"d")%>" />
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=fixstring(rs("rss_url_" & Session("reflanguage")),"d")%>

<%end if%> ucase(Session("Language")) then%> <%=lac(lingua(j))%><%end if%> type="text" name="rss_url_<%=lingua(j)%>" class="input-lungo" id="rss_url_<%=lingua(j)%>" value="<%=fixstring(rs("rss_url_" & lingua(j)),"d")%>" />
<%=replace(DICLanguage(49),"[LINGUA]", NOMELINGUA)%>: <%if Session("supervisor") = true or Session("reviewer") = true or Session("poweruser") = true then%> <%end if%>
checked="checked"<%end if%> /> <%=DICLanguage(48)%>
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=DICLanguage(371)%>: <%=fixstring(rs("title_" & Session("reflanguage")),"d")%>

<%end if%> ucase(Session("Language")) then%> <%=lac(lingua(j))%><%end if%> type="text" name="Title_<%=lingua(j)%>" class="input-lungo" id="Title_<%=lingua(j)%>" value="<%=fixstring(rs("title_" & lingua(j)),"d")%>" />
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=DICLanguage(371)%>: <%=fixstring(rs("tagtitle_" & Session("reflanguage")),"d")%>

<%end if%> ucase(Session("Language")) then%> <%=lac(lingua(j))%><%end if%> type="text" name="tagTitle_<%=lingua(j)%>" class="input-lungo" id="tagTitle_<%=lingua(j)%>" value="<%=fixstring(rs("tagtitle_" & lingua(j)),"d")%>"/>
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=DICLanguage(371)%>: <%=fixstring(rs("descrizione_" & Session("reflanguage")),"d")%>

<%end if%> ucase(Session("Language")) then%> <%=lac(lingua(j))%><%end if%> rows="2" cols="70" name="descrizione_<%=lingua(j)%>" id="descrizione_<%=lingua(j)%>"><%=fixstring(rs("descrizione_" & lingua(j)),"d")%>
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=DICLanguage(371)%>: <%=fixstring(rs("keywords_" & Session("reflanguage")),"d")%>

<%end if%> ucase(Session("Language")) then%> <%=lac(lingua(j))%><%end if%> rows="2" cols="70" name="Keywords_<%=lingua(j)%>" id="Keywords_<%=lingua(j)%>"><%=fixstring(rs("keywords_" & lingua(j)),"d")%>
<%if Session("translator") = true then%> ucase(Session("Language")) then%> <%=lac(Session("reflanguage"))%><%end if%>><%=fixstring(rs("url_" & Session("reflanguage")),"d")%>

<%end if%> "/>
<%if Session("translator") = true then%><%=DICLanguage(371)%>:
<% call XStandard("editor" & conta & Session("reflanguage"),"content_" & Session("reflanguage"),Session("reflanguage"),rs("content_" & Session("reflanguage")),2)%> <%end if%>
<% call XStandard("editor" & conta,"content_" & lingua(j),lingua(j),rs("content_" & lingua(j)),1)%>
<%next%>
<%=DICLanguage(20)%>

" class="bottone" /> " /> " /> " />

<% End If set Rs = nothing end if %>