%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%>
<%@ include file="Connections/Connessione.jsp" %>
<%
String m1__MMColParam = "1";
if (request.getParameter("MM_EmptyValue") !=null) {m1__MMColParam = (String)request.getParameter("MM_EmptyValue");}
%>
<%
Driver Driverm1 = (Driver)Class.forName(MM_Connessione_DRIVER).newInstance();
Connection Connm1 = DriverManager.getConnection(MM_Connessione_STRING,MM_Connessione_USERNAME,MM_Connessione_PASSWORD);
PreparedStatement Statementm1 = Connm1.prepareStatement("SELECT * FROM menu WHERE Livello = " + m1__MMColParam + " AND Agregato <> 'Home' ORDER BY Posizione ASC");
ResultSet m1 = Statementm1.executeQuery();
boolean m1_isEmpty = !m1.next();
boolean m1_hasData = !m1_isEmpty;
Object m1_data;
int m1_numRows = 0;
%>
<%
Driver DriverPagine = (Driver)Class.forName(MM_Connessione_DRIVER).newInstance();
Connection ConnPagine = DriverManager.getConnection(MM_Connessione_STRING,MM_Connessione_USERNAME,MM_Connessione_PASSWORD);
PreparedStatement StatementPagine = ConnPagine.prepareStatement("SELECT * FROM paginetipo1");
ResultSet Pagine = StatementPagine.executeQuery();
boolean Pagine_isEmpty = !Pagine.next();
boolean Pagine_hasData = !Pagine_isEmpty;
Object Pagine_data;
int Pagine_numRows = 0;
%>
<%
String m2__MMColParam = "1";
if (request.getParameter("Agregato") !=null) {m2__MMColParam = (String)request.getParameter("Agregato") ;}
%>
<%
Driver Driverm2 = (Driver)Class.forName(MM_Connessione_DRIVER).newInstance();
Connection Connm2 = DriverManager.getConnection(MM_Connessione_STRING,MM_Connessione_USERNAME,MM_Connessione_PASSWORD);
PreparedStatement Statementm2 = Connm2.prepareStatement("SELECT * FROM menu WHERE Agregato = '" + m2__MMColParam + "' AND Livello = '2' ORDER BY Posizione ASC");
ResultSet m2 = Statementm2.executeQuery();
boolean m2_isEmpty = !m2.next();
boolean m2_hasData = !m2_isEmpty;
Object m2_data;
int m2_numRows = 0;
%>
<%
int Repeat2__numRows = -1;
int Repeat2__index = 0;
m1_numRows += Repeat2__numRows;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
m2_numRows += Repeat1__numRows;
%>
<% String MM_paramName = ""; %>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
String MM_keepBoth,MM_keepURL="",MM_keepForm="",MM_keepNone="";
String[] MM_removeList = { "index", MM_paramName };
// create the MM_keepURL string
if (request.getQueryString() != null) {
MM_keepURL = '&' + request.getQueryString();
for (int i=0; i < MM_removeList.length && MM_removeList[i].length() != 0; i++) {
int start = MM_keepURL.indexOf(MM_removeList[i]) - 1;
if (start >= 0 && MM_keepURL.charAt(start) == '&' &&
MM_keepURL.charAt(start + MM_removeList[i].length() + 1) == '=') {
int stop = MM_keepURL.indexOf('&', start + 1);
if (stop == -1) stop = MM_keepURL.length();
MM_keepURL = MM_keepURL.substring(0,start) + MM_keepURL.substring(stop);
}
}
}
// add the Form variables to the MM_keepForm string
if (request.getParameterNames().hasMoreElements()) {
java.util.Enumeration items = request.getParameterNames();
while (items.hasMoreElements()) {
String nextItem = (String)items.nextElement();
boolean found = false;
for (int i=0; !found && i < MM_removeList.length; i++) {
if (MM_removeList[i].equals(nextItem)) found = true;
}
if (!found && MM_keepURL.indexOf('&' + nextItem + '=') == -1) {
MM_keepForm = MM_keepForm + '&' + nextItem + '=' + java.net.URLEncoder.encode(request.getParameter(nextItem));
}
}
}
// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length() > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length() > 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length() > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<%!
public String DoDateTime(java.lang.Object aObject,int nNamedFormat,java.util.Locale aLocale) throws Exception{
if ((aObject != null) && (aObject instanceof java.util.Date)){
if (aLocale!=null){
java.text.DateFormat df = java.text.DateFormat.getDateInstance(nNamedFormat,aLocale);
return df.format(aObject);
}
else{
java.text.DateFormat df = java.text.DateFormat.getDateInstance(nNamedFormat);
return df.format(aObject);
}
}
return "";
}
%>
Autocertificazioni
|
<% while ((m1_hasData)&&(Repeat2__numRows-- != 0)) { %>
<%
Repeat2__index++;
m1_hasData = m1.next();
}
%>
|
|
Autocertificazione
Dichiarazione
sostitutiva di:
|
|
|
| Webmasters:
Johnny & Nino La Mesa |
|
<%
m1.close();
Connm1.close();
%>
<%
Pagine.close();
ConnPagine.close();
%>
<%
m2.close();
Connm2.close();
%>