<%
 ' 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("manutenzione")<> 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
'---------------------------------------------------------
%>
<!--#include virtual="/backoffice/inc/misc.asp"-->

<%

lingua = split(Session("editlanguage"),",")

%>

<form action="templatemgrcmd.asp" method="post" id="SaveForm">

<fieldset><legend><%=DICLanguage(87)%>:</legend>

<table border="0" summary="<%=DICLanguage(37)%>"> 
  <tr>
    <td class="testotd"><label for="css_id"><%=DICLanguage(235)%>:</label></td>
    <td><select name="css_id" id="css_id">
		<option value="0"><%=DICLanguage(18)%></option>
		<% 
		ExpSelectCond application("prefix") & "modelli_css", "titolo", "id", "where validato=1 and visibile = 1 order by titolo", null
		%>
		</select></td>
  </tr>
  <tr>
    <td class="testotd"><%=DICLanguage(236)%>:</td>
    <td>
	<input type="checkbox" name="aree" id="aree" checked="checked" /> <%=DICLanguage(3)%><br />
	<input type="checkbox" name="argomenti" id="argomenti" checked="checked" /> <%=DICLanguage(22)%><br />
	<input type="checkbox" name="contenuti" id="contenuti"  checked="checked" /> <%=DICLanguage(79)%><br />
	<input type="checkbox" name="comunicati" id="comunicati"  checked="checked" /> <%=DICLanguage(64)%><br />
	<input type="checkbox" name="testi" id="testi"  checked="checked" /> <%=DICLanguage(182)%><br />
	<input type="checkbox" name="uffici" id="uffici" checked="checked" /> <%=DICLanguage(142)%></td>
  </tr>
</table>	
</fieldset>

<% 
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("backofficelanguage") then
	NOMELINGUA = fixstring(lng("lingua"),"d")
else
	NOMELINGUA = "<span" & LAC("en") & ">" & fixstring(lng("lingua_int"),"d") & "</span>"
end if
set lng = nothing
%>
<h2><%=nomelingua%></h2>
<fieldset><legend><%=replace(DICLanguage(49),"[LINGUA]", NOMELINGUA)%>:</legend>
<table border="0" summary="<%=DICLanguage(37)%>"> 
<%if Session("supervisor") = true or Session("reviewer") = true or Session("poweruser") = true then%>
  <tr>
    <td class="testotd"><label for="visibile_<%=lingua(j)%>"><%=DICLanguage(47)%>:</label></td>
    <td><input type="checkbox" name="visibile_<%=lingua(j)%>" id="visibile_<%=lingua(j)%>" checked="checked" /> <%=DICLanguage(48)%></td>
  </tr>
<%end if%>
  <tr>
    <td class="testotd"><label for="Title_<%=lingua(j)%>"><%=DICLanguage(40)%>:</label></td>
    <td><input <%if ucase(lingua(j)) <> ucase(Session("backofficelanguage")) then%> <%=lac(lingua(j))%>"<%end if%> type="text" name="Title_<%=lingua(j)%>" class="input-lungo" id="Title_<%=lingua(j)%>" /></td>
  </tr>
  <tr>
    <td class="testotd"><label for="descrizione_<%=lingua(j)%>"><%=DICLanguage(51)%>:</label></td>
    <td><textarea <%if ucase(lingua(j)) <> ucase(Session("backofficelanguage")) then%> <%=lac(lingua(j))%>"<%end if%> rows="2" cols="70" name="descrizione_<%=lingua(j)%>" id="descrizione_<%=lingua(j)%>"></textarea></td>
  </tr>  
  <tr>
    <td class="testotd"><label for="content_<%=lingua(j)%>"><%=DICLanguage(53)%>:</label></td>
    <td><textarea  rows="20" cols="70" name="content_<%=lingua(j)%>" id="content_<%=lingua(j)%>"></textarea></td>
  </tr>  
</table>
</fieldset>
<%next%>

<fieldset><legend><%=DICLanguage(20)%></legend>
 <p>
	<input type="hidden" id="LastPage" name="LastPage" value="<%=lastpage%>" class="bottone" />
	<input type="hidden" id="mnu" name="mnu" value="<%=request("mnu")%>" /> 
	<input type="hidden" id="submnu" name="submnu" value="<%=request("submnu")%>" />
	<input type="submit" id="Add" name="Add" value="<%=DICLanguage(21)%>"  class="bottone" />
	<input type="reset" id="Undo" name="Undo" value="<%=DICLanguage(77)%>" onclick="titolo.focus()" onkeypress="titolo.focus()"  class="bottone" />
	<input type="button" id="Back" name="Back" value="<%=DICLanguage(2)%>" onclick="history.back()" onkeypress="history.back()" class="bottone" />
 </p>
</fieldset>
</form>