<%
 ' 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("aree")<> 1 Then 
		response.Redirect "/backoffice/noentry.asp"
	elseif Session("translator") = true 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="areemgrcmd.asp" method="post" id="SaveForm">

<fieldset><legend><%=DICLanguage(8)%>:</legend>

<table border="0" summary="<%=DICLanguage(37)%>"> 
  <tr>
    <td class="testotd"><label for="modello"><%=DICLanguage(43)%>:</label></td>
    <td><select name="modello" id="modello">
		  <%=ModelliContenuti(areaid,0)%>
		</select></td>
  </tr>
<%if Session("supervisor") = true then%>
  <tr>
    <td class="testotd"><label for="proprietario"><%=DICLanguage(44)%>:</label></td>
    <td><select name="proprietario" id="proprietario">
		<option value="0"><%=DICLanguage(18)%></option>
		<% 
		ExpSelectCond application("prefix") & "utenti", "referente_nome", "id", "order by referente_nome", null
		%>
		</select></td>
  </tr>
<%end if%>
  <tr>
    <td class="testotd"><label for="posizione"><%=DICLanguage(46)%>:</label></td>
    <td><select name="posizione" id="posizione">
			<option selected="selected" value="1">1</option>
			<%for ia = 2 to 100%><option value="<%=ia%>"><%=ia%></option>
			<%next%>
		</select>
	</td>
  </tr>
  <tr>
    <td class="testotd"><label for="sm_changefreq"><%=DICLanguage(373)%>:</label></td>
    <td><select name="sm_changefreq" id="sm_changefreq">
			<option value="always"><%=DICLanguage(374)%></option>
			<option value="hourly"><%=DICLanguage(375)%></option>
			<option value="daily"><%=DICLanguage(376)%></option>
			<option value="weekly"><%=DICLanguage(377)%></option>
			<option value="monthly" selected="selected"><%=DICLanguage(378)%></option>
			<option value="yearly"><%=DICLanguage(379)%></option>
			<option value="never"><%=DICLanguage(380)%></option>
		</select>
	</td>
  </tr>
  <tr>
    <td class="testotd"><label for="sm_priority"><%=DICLanguage(381)%>:</label></td>
    <td><select name="sm_priority" id="sm_priority">
			<option value="0.0">0.0</option>
			<option value="0.1">0.1</option>
			<option value="0.2">0.2</option>
			<option value="0.3">0.3</option>
			<option value="0.4">0.4</option>
			<option value="0.5">0.5</option>
			<option value="0.6">0.6</option>
			<option value="0.7" selected="selected">0.7</option>
			<option value="0.8">0.8</option>
			<option value="0.9">0.9</option>
			<option value="1.0">1.0</option>
		</select>
	</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(317),"[LINGUA]", NOMELINGUA)%>:</legend>
<table border="0" summary="<%=DICLanguage(37)%>"> 
  <tr>
    <td class="testotd"><label for="rss_title_<%=lingua(j)%>"><%=DICLanguage(318)%>:</label></td>
    <td><input <%if ucase(lingua(j)) <> ucase(Session("backofficelanguage")) then%> <%=lac(lingua(j))%>"<%end if%> type="text" name="rss_title_<%=lingua(j)%>" class="input-lungo" id="rss_title_<%=lingua(j)%>" /></td>
  </tr>
  <tr>
    <td class="testotd"><label for="rss_url_<%=lingua(j)%>"><%=DICLanguage(319)%>:</label></td>
    <td><input <%if ucase(lingua(j)) <> ucase(Session("backofficelanguage")) then%> <%=lac(lingua(j))%>"<%end if%> type="text" name="rss_url_<%=lingua(j)%>" class="input-lungo" id="rss_url_<%=lingua(j)%>" /></td>
  </tr>
</table>	
</fieldset>

<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"><%=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="url_<%=lingua(j)%>"><%=DICLanguage(234)%>:</label></td>
    <td><input type="text" name="url_<%=lingua(j)%>" class="input-lungo" id="url_<%=lingua(j)%>" /></td>
  </tr>
  <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="tagTitle_<%=lingua(j)%>"><%=DICLanguage(50)%>:</label></td>
    <td><input <%if ucase(lingua(j)) <> ucase(Session("backofficelanguage")) then%> <%=lac(lingua(j))%>"<%end if%> type="text" name="tagTitle_<%=lingua(j)%>" class="input-lungo" id="tagTitle_<%=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="Keywords_<%=lingua(j)%>"><%=DICLanguage(52)%>:</label></td>
    <td><textarea <%if ucase(lingua(j)) <> ucase(Session("backofficelanguage")) then%> <%=lac(lingua(j))%>"<%end if%> rows="2" cols="70" name="Keywords_<%=lingua(j)%>" id="Keywords_<%=lingua(j)%>"></textarea></td>
  </tr>  

  <tr>
    <td colspan="2"><label for="content_<%=lingua(j)%>"><%=DICLanguage(53)%>:</label><br />
    <% 
	call XStandard("editor" & conta ,"content_" & lingua(j),lingua(j),null,1)%></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="modello.focus()" onkeypress="modello.focus()"  class="bottone" />
	<input type="button" id="Back" name="Back" value="<%=DICLanguage(2)%>" onclick="history.back()" onkeypress="history.back()" class="bottone" />
 </p>
</fieldset>
</form>