[opendebitdeboisson-commits] r364 - in branches/1.x: . data data/pgsql gen gen/dyn gen/dyn/custom gen/dyn/standard gen/inc gen/obj gen/sql gen/sql/mysql gen/sql/pgsql obj

0 views
Skip to first unread message

fray...@adullact.net

unread,
Apr 25, 2019, 8:45:01 AM4/25/19
to openmairie-ope...@googlegroups.com
Author: fraynaud
Date: 2019-04-25 14:44:59 +0200 (Thu, 25 Apr 2019)
New Revision: 364

Added:
branches/1.x/data/
branches/1.x/data/index.php
branches/1.x/data/pgsql/
branches/1.x/data/pgsql/index.php
branches/1.x/data/pgsql/init.sql
branches/1.x/data/pgsql/init_metier.sql
branches/1.x/data/pgsql/init_metier_data.sql
branches/1.x/data/pgsql/init_metier_sig.sql
branches/1.x/data/pgsql/ver1.0.1.sql
branches/1.x/data/pgsql/ver1.0.2.sql
branches/1.x/gen/
branches/1.x/gen/dyn/
branches/1.x/gen/dyn/custom/
branches/1.x/gen/dyn/custom/etat.inc
branches/1.x/gen/dyn/custom/form.inc
branches/1.x/gen/dyn/custom/index.php
branches/1.x/gen/dyn/index.php
branches/1.x/gen/dyn/standard/
branches/1.x/gen/dyn/standard/etat.inc
branches/1.x/gen/dyn/standard/form.inc
branches/1.x/gen/dyn/standard/index.php
branches/1.x/gen/dyn/standard/lettretype.inc
branches/1.x/gen/dyn/standard/option.inc
branches/1.x/gen/dyn/standard/pdf.inc
branches/1.x/gen/dyn/standard/sousetat.inc
branches/1.x/gen/inc/
branches/1.x/gen/inc/index.php
branches/1.x/gen/inc/recherche.inc
branches/1.x/gen/index.php
branches/1.x/gen/obj/
branches/1.x/gen/obj/adresse_postale.class.php
branches/1.x/gen/obj/courrier.class.php
branches/1.x/gen/obj/demande_licence.class.php
branches/1.x/gen/obj/dossier.class.php
branches/1.x/gen/obj/etablissement.class.php
branches/1.x/gen/obj/exploitant.class.php
branches/1.x/gen/obj/index.php
branches/1.x/gen/obj/om_collectivite.class.php
branches/1.x/gen/obj/om_droit.class.php
branches/1.x/gen/obj/om_etat.class.php
branches/1.x/gen/obj/om_lettretype.class.php
branches/1.x/gen/obj/om_parametre.class.php
branches/1.x/gen/obj/om_profil.class.php
branches/1.x/gen/obj/om_sig_point.class.php
branches/1.x/gen/obj/om_sousetat.class.php
branches/1.x/gen/obj/om_tdb.class.php
branches/1.x/gen/obj/om_utilisateur.class.php
branches/1.x/gen/obj/om_widget.class.php
branches/1.x/gen/obj/perimetre.class.php
branches/1.x/gen/obj/terme.class.php
branches/1.x/gen/obj/type_demande.class.php
branches/1.x/gen/obj/type_etablissement.class.php
branches/1.x/gen/obj/type_licence.class.php
branches/1.x/gen/sql/
branches/1.x/gen/sql/index.php
branches/1.x/gen/sql/mysql/
branches/1.x/gen/sql/mysql/index.php
branches/1.x/gen/sql/mysql/om_collectivite.form.inc.php
branches/1.x/gen/sql/mysql/om_collectivite.inc.php
branches/1.x/gen/sql/mysql/om_droit.form.inc.php
branches/1.x/gen/sql/mysql/om_droit.inc.php
branches/1.x/gen/sql/mysql/om_etat.form.inc.php
branches/1.x/gen/sql/mysql/om_etat.inc.php
branches/1.x/gen/sql/mysql/om_lettretype.form.inc.php
branches/1.x/gen/sql/mysql/om_lettretype.inc.php
branches/1.x/gen/sql/mysql/om_parametre.form.inc.php
branches/1.x/gen/sql/mysql/om_parametre.inc.php
branches/1.x/gen/sql/mysql/om_profil.form.inc.php
branches/1.x/gen/sql/mysql/om_profil.inc.php
branches/1.x/gen/sql/mysql/om_sousetat.form.inc.php
branches/1.x/gen/sql/mysql/om_sousetat.inc.php
branches/1.x/gen/sql/mysql/om_utilisateur.form.inc.php
branches/1.x/gen/sql/mysql/om_utilisateur.inc.php
branches/1.x/gen/sql/pgsql/
branches/1.x/gen/sql/pgsql/adresse_postale.form.inc.php
branches/1.x/gen/sql/pgsql/adresse_postale.inc.php
branches/1.x/gen/sql/pgsql/courrier.form.inc.php
branches/1.x/gen/sql/pgsql/courrier.inc.php
branches/1.x/gen/sql/pgsql/demande_licence.form.inc.php
branches/1.x/gen/sql/pgsql/demande_licence.inc.php
branches/1.x/gen/sql/pgsql/dossier.form.inc.php
branches/1.x/gen/sql/pgsql/dossier.inc.php
branches/1.x/gen/sql/pgsql/etablissement.form.inc.php
branches/1.x/gen/sql/pgsql/etablissement.inc.php
branches/1.x/gen/sql/pgsql/exploitant.form.inc.php
branches/1.x/gen/sql/pgsql/exploitant.inc.php
branches/1.x/gen/sql/pgsql/index.php
branches/1.x/gen/sql/pgsql/om_collectivite.form.inc.php
branches/1.x/gen/sql/pgsql/om_collectivite.inc.php
branches/1.x/gen/sql/pgsql/om_droit.form.inc.php
branches/1.x/gen/sql/pgsql/om_droit.inc.php
branches/1.x/gen/sql/pgsql/om_etat.form.inc.php
branches/1.x/gen/sql/pgsql/om_etat.inc.php
branches/1.x/gen/sql/pgsql/om_lettretype.form.inc.php
branches/1.x/gen/sql/pgsql/om_lettretype.inc.php
branches/1.x/gen/sql/pgsql/om_parametre.form.inc.php
branches/1.x/gen/sql/pgsql/om_parametre.inc.php
branches/1.x/gen/sql/pgsql/om_profil.form.inc.php
branches/1.x/gen/sql/pgsql/om_profil.inc.php
branches/1.x/gen/sql/pgsql/om_sig_point.form.inc.php
branches/1.x/gen/sql/pgsql/om_sig_point.inc.php
branches/1.x/gen/sql/pgsql/om_sousetat.form.inc.php
branches/1.x/gen/sql/pgsql/om_sousetat.inc.php
branches/1.x/gen/sql/pgsql/om_tdb.form.inc.php
branches/1.x/gen/sql/pgsql/om_tdb.inc.php
branches/1.x/gen/sql/pgsql/om_utilisateur.form.inc.php
branches/1.x/gen/sql/pgsql/om_utilisateur.inc.php
branches/1.x/gen/sql/pgsql/om_widget.form.inc.php
branches/1.x/gen/sql/pgsql/om_widget.inc.php
branches/1.x/gen/sql/pgsql/perimetre.form.inc.php
branches/1.x/gen/sql/pgsql/perimetre.inc.php
branches/1.x/gen/sql/pgsql/terme.form.inc.php
branches/1.x/gen/sql/pgsql/terme.inc.php
branches/1.x/gen/sql/pgsql/type_demande.form.inc.php
branches/1.x/gen/sql/pgsql/type_demande.inc.php
branches/1.x/gen/sql/pgsql/type_etablissement.form.inc.php
branches/1.x/gen/sql/pgsql/type_etablissement.inc.php
branches/1.x/gen/sql/pgsql/type_licence.form.inc.php
branches/1.x/gen/sql/pgsql/type_licence.inc.php
branches/1.x/obj/
branches/1.x/obj/courrier.class.php
branches/1.x/obj/demande_licence.class.php
branches/1.x/obj/demande_licence_temporaire.class.php
branches/1.x/obj/dossier.class.php
branches/1.x/obj/etablissement.class.php
branches/1.x/obj/etablissement_temporaire.class.php
branches/1.x/obj/exploitant.class.php
branches/1.x/obj/index.php
branches/1.x/obj/om_collectivite.class.php
branches/1.x/obj/om_droit.class.php
branches/1.x/obj/om_etat.class.php
branches/1.x/obj/om_lettretype.class.php
branches/1.x/obj/om_parametre.class.php
branches/1.x/obj/om_profil.class.php
branches/1.x/obj/om_sig_point.class.php
branches/1.x/obj/om_sousetat.class.php
branches/1.x/obj/om_tdb.class.php
branches/1.x/obj/om_utilisateur.class.php
branches/1.x/obj/om_widget.class.php
branches/1.x/obj/perimetre.class.php
branches/1.x/obj/terme.class.php
branches/1.x/obj/type_demande.class.php
branches/1.x/obj/type_licence.class.php
branches/1.x/obj/utils.class.php
Log:
data gen et obj


Added: branches/1.x/data/index.php
===================================================================
--- branches/1.x/data/index.php (rev 0)
+++ branches/1.x/data/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/data/pgsql/index.php
===================================================================
--- branches/1.x/data/pgsql/index.php (rev 0)
+++ branches/1.x/data/pgsql/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/data/pgsql/init.sql
===================================================================
--- branches/1.x/data/pgsql/init.sql (rev 0)
+++ branches/1.x/data/pgsql/init.sql 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,385 @@
+-- 29/03/2011 openMairie 4.0.0
+-- Base de donnees necessaire au framework openMairie
+-- CREATE DATABASE nom_de_la_base
+-- voir dyn/locales.inc.php pour configuration
+-- define('CHARSET', 'ISO-8859-1');
+-- ou define('CHARSET', 'UTF8');
+-- suivant le choix de caracteres dans postgresql
+-- base mono collectivite
+
+-- schema
+
+SET search_path = openboisson, pg_catalog;
+
+-- collectivite
+
+CREATE TABLE om_collectivite (
+ om_collectivite int8 NOT NULL,
+ libelle varchar(100) NOT NULL,
+ niveau varchar(1) NOT NULL,
+ PRIMARY KEY (om_collectivite)
+);
+
+CREATE TABLE om_parametre (
+ om_parametre int8 NOT NULL,
+ libelle varchar(20) NOT NULL,
+ valeur varchar(50) NOT NULL,
+ om_collectivite int8 NOT NULL,
+ PRIMARY KEY (om_parametre)
+);
+
+-- droit --
+
+CREATE TABLE om_profil (
+ om_profil varchar(2) NOT NULL default '0',
+ libelle varchar(30) NOT NULL,
+ PRIMARY KEY (om_profil)
+);
+
+CREATE TABLE om_droit (
+ om_droit varchar(30) NOT NULL,
+ om_profil varchar(2) NOT NULL default '0',
+ PRIMARY KEY (om_droit)
+);
+
+CREATE TABLE om_utilisateur (
+ om_utilisateur int8 NOT NULL default '0',
+ nom varchar(30) NOT NULL default '',
+ email varchar(40) NOT NULL default '',
+ Login varchar(30) NOT NULL default '',
+ Pwd varchar(100) NOT NULL default '',
+ om_profil varchar(2) NOT NULL default '',
+ om_collectivite int8 NOT NULL,
+ om_type varchar(20) NOT NULL,
+ PRIMARY KEY (om_utilisateur)
+);
+
+-- etat / sousetat / lettretype
+
+CREATE TABLE om_etat (
+ om_etat int8 NOT NULL,
+ om_collectivite int8 NOT NULL,
+ id varchar(50) NOT NULL,
+ libelle varchar(50) NOT NULL,
+ actif varchar(3) NOT NULL,
+ orientation varchar(2) NOT NULL,
+ format varchar(5) NOT NULL,
+ footerfont varchar(20) NOT NULL,
+ footerattribut varchar(20) NOT NULL,
+ footertaille int8 NOT NULL,
+ logo varchar(30) NOT NULL,
+ logoleft int8 NOT NULL,
+ logotop int8 NOT NULL,
+ titre text NOT NULL,
+ titreleft int8 NOT NULL,
+ titretop int8 NOT NULL,
+ titrelargeur int8 NOT NULL,
+ titrehauteur int8 NOT NULL,
+ titrefont varchar(20) NOT NULL,
+ titreattribut varchar(20) NOT NULL,
+ titretaille int8 NOT NULL,
+ titrebordure varchar(20) NOT NULL,
+ titrealign varchar(20) NOT NULL,
+ corps text NOT NULL,
+ corpsleft int8 NOT NULL,
+ corpstop int8 NOT NULL,
+ corpslargeur int8 NOT NULL,
+ corpshauteur int8 NOT NULL,
+ corpsfont varchar(20) NOT NULL,
+ corpsattribut varchar(20) NOT NULL,
+ corpstaille int8 NOT NULL,
+ corpsbordure varchar(20) NOT NULL,
+ corpsalign varchar(20) NOT NULL,
+ om_sql text NOT NULL,
+ sousetat text NOT NULL,
+ se_font varchar(20) NOT NULL,
+ se_margeleft int8 NOT NULL,
+ se_margetop int8 NOT NULL,
+ se_margeright int8 NOT NULL,
+ se_couleurtexte varchar(11) NOT NULL,
+ PRIMARY KEY (om_etat)
+);
+
+CREATE TABLE om_sig_point
+(
+ om_sig_point integer NOT NULL,
+ om_collectivite integer NOT NULL,
+ id varchar(50) NOT NULL,
+ libelle varchar(50) NOT NULL,
+ actif varchar(3),
+ zoom varchar(3) NOT NULL,
+ fond_osm varchar(3) NOT NULL,
+ fond_bing varchar(3) NOT NULL,
+ fond_sat varchar(3) NOT NULL,
+ layer_info varchar(3) NOT NULL,
+ etendue varchar(60) NOT NULL,
+ projection_externe varchar(60) NOT NULL,
+ url text NOT NULL,
+ om_sql text NOT NULL,
+ maj varchar(3) NOT NULL,
+ table_update varchar(30) NOT NULL,
+ champ varchar(30) NOT NULL,
+ retour varchar(50),
+ PRIMARY KEY (om_sig_point)
+);
+
+CREATE TABLE om_sousetat (
+ om_sousetat int8 NOT NULL,
+ om_collectivite int8 NOT NULL,
+ id varchar(50) NOT NULL,
+ libelle varchar(50) NOT NULL,
+ actif VARCHAR( 3 ) NOT NULL,
+ titre text NOT NULL,
+ titrehauteur int8 NOT NULL,
+ titrefont varchar(20) NOT NULL,
+ titreattribut varchar(20) NOT NULL,
+ titretaille int8 NOT NULL,
+ titrebordure varchar(20) NOT NULL,
+ titrealign varchar(20) NOT NULL,
+ titrefond varchar(20) NOT NULL,
+ titrefondcouleur varchar(11) NOT NULL,
+ titretextecouleur varchar(11) NOT NULL,
+ intervalle_debut int8 NOT NULL,
+ intervalle_fin int8 NOT NULL,
+ entete_flag varchar(20) NOT NULL,
+ entete_fond varchar(20) NOT NULL,
+ entete_orientation text NOT NULL,
+ entete_hauteur int8 NOT NULL,
+ entetecolone_bordure varchar(200) NOT NULL,
+ entetecolone_align varchar(100) NOT NULL,
+ entete_fondcouleur varchar(11) NOT NULL,
+ entete_textecouleur varchar(11) NOT NULL,
+ tableau_largeur int8 NOT NULL,
+ tableau_bordure varchar(20) NOT NULL,
+ tableau_fontaille int8 NOT NULL,
+ bordure_couleur varchar(11) NOT NULL,
+ se_fond1 varchar(11) NOT NULL,
+ se_fond2 varchar(11) NOT NULL,
+ cellule_fond varchar(20) NOT NULL,
+ cellule_hauteur int8 NOT NULL,
+ cellule_largeur varchar(200) NOT NULL,
+ cellule_bordure_un varchar(200) NOT NULL,
+ cellule_bordure varchar(200) NOT NULL,
+ cellule_align varchar(100) NOT NULL,
+ cellule_fond_total varchar(20) NOT NULL,
+ cellule_fontaille_total int8 NOT NULL,
+ cellule_hauteur_total int8 NOT NULL,
+ cellule_fondcouleur_total varchar(11) NOT NULL,
+ cellule_bordure_total varchar(200) NOT NULL,
+ cellule_align_total varchar(100) NOT NULL,
+ cellule_fond_moyenne varchar(20) NOT NULL,
+ cellule_fontaille_moyenne int8 NOT NULL,
+ cellule_hauteur_moyenne int8 NOT NULL,
+ cellule_fondcouleur_moyenne varchar(11) NOT NULL,
+ cellule_bordure_moyenne varchar(200) NOT NULL,
+ cellule_align_moyenne varchar(100) NOT NULL,
+ cellule_fond_nbr varchar(20) NOT NULL,
+ cellule_fontaille_nbr int8 NOT NULL,
+ cellule_hauteur_nbr int8 NOT NULL,
+ cellule_fondcouleur_nbr varchar(11) NOT NULL,
+ cellule_bordure_nbr varchar(200) NOT NULL,
+ cellule_align_nbr varchar(100) NOT NULL,
+ cellule_numerique varchar(200) NOT NULL,
+ cellule_total varchar(100) NOT NULL,
+ cellule_moyenne varchar(100) NOT NULL,
+ cellule_compteur varchar(100) NOT NULL,
+ om_sql text NOT NULL,
+ PRIMARY KEY (om_sousetat)
+);
+
+CREATE TABLE om_lettretype (
+ om_lettretype int8 NOT NULL,
+ om_collectivite int8 NOT NULL,
+ id varchar(50) NOT NULL,
+ libelle varchar(50) NOT NULL,
+ actif varchar(3) NOT NULL,
+ orientation varchar(2) NOT NULL,
+ format varchar(5) NOT NULL,
+ logo varchar(30) NOT NULL,
+ logoleft int8 NOT NULL,
+ logotop int8 NOT NULL,
+ titre text NOT NULL,
+ titreleft int8 NOT NULL,
+ titretop int8 NOT NULL,
+ titrelargeur int8 NOT NULL,
+ titrehauteur int8 NOT NULL,
+ titrefont varchar(20) NOT NULL,
+ titreattribut varchar(20) NOT NULL,
+ titretaille int8 NOT NULL,
+ titrebordure varchar(20) NOT NULL,
+ titrealign varchar(20) NOT NULL,
+ corps text NOT NULL,
+ corpsleft int8 NOT NULL,
+ corpstop int8 NOT NULL,
+ corpslargeur int8 NOT NULL,
+ corpshauteur int8 NOT NULL,
+ corpsfont varchar(20) NOT NULL,
+ corpsattribut varchar(20) NOT NULL,
+ corpstaille int8 NOT NULL,
+ corpsbordure varchar(20) NOT NULL,
+ corpsalign varchar(20) NOT NULL,
+ om_sql text NOT NULL,
+ PRIMARY KEY (om_lettretype)
+);
+
+
+CREATE TABLE om_widget (
+ om_widget integer NOT NULL,
+ om_collectivite integer NOT NULL,
+ libelle varchar(40) NOT NULL,
+ lien varchar(80) NOT NULL,
+ texte text NOT NULL,
+ om_profil varchar(2),
+ PRIMARY KEY (om_widget)
+) ;
+
+--
+-- Structure de la table 'tdb'
+--
+
+CREATE TABLE om_tdb (
+ om_tdb integer NOT NULL,
+ login varchar(40) NOT NULL,
+ bloc varchar(10) NOT NULL,
+ position integer,
+ om_widget integer NOT NULL,
+ PRIMARY KEY (om_tdb)
+) ;
+
+-- foreign key
+
+ALTER TABLE ONLY om_utilisateur
+ ADD CONSTRAINT om_utilisateur_om_profil_fkey FOREIGN KEY (om_profil) REFERENCES om_profil(om_profil);
+ALTER TABLE ONLY om_utilisateur
+ ADD CONSTRAINT om_utilisateur_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_droit
+ ADD CONSTRAINT om_droit_om_profil_fkey FOREIGN KEY (om_profil) REFERENCES om_profil(om_profil);
+ALTER TABLE ONLY om_parametre
+ ADD CONSTRAINT om_parametre_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_etat
+ ADD CONSTRAINT om_etat_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_sousetat
+ ADD CONSTRAINT om_sousetat_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_lettretype
+ ADD CONSTRAINT om_lettretype_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_widget
+ ADD CONSTRAINT om_widget_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_sig_point
+ ADD CONSTRAINT om_sig_point_om_collectivite_fkey FOREIGN KEY (om_collectivite) REFERENCES om_collectivite(om_collectivite);
+ALTER TABLE ONLY om_tdb
+ ADD CONSTRAINT om_tdb_om_widget_fkey FOREIGN KEY (om_widget) REFERENCES om_widget(om_widget);
+
+
+
+
+
+-- sequences (postgresql <= 8.3) sinon a partir de 8.4; création automatique par postgre
+
+CREATE SEQUENCE om_collectivite_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 2
+ CACHE 1;
+
+CREATE SEQUENCE om_parametre_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+
+CREATE SEQUENCE om_utilisateur_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+
+CREATE SEQUENCE om_etat_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 2
+ CACHE 1;
+
+CREATE SEQUENCE om_sousetat_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+
+CREATE SEQUENCE om_lettretype_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 2
+ CACHE 1;
+
+CREATE SEQUENCE om_sig_point_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 10
+ CACHE 1;
+
+
+CREATE SEQUENCE om_widget_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 10
+ CACHE 1;
+
+CREATE SEQUENCE om_tdb_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 3
+ CACHE 1;
+-- data --
+
+-- collectivite
+INSERT INTO om_collectivite (om_collectivite, libelle, niveau) VALUES
+(1, 'ARLES', '1'),
+(2, 'ACCM', '2');
+INSERT INTO om_parametre (om_parametre, libelle, valeur, om_collectivite) VALUES
+(1, 'maire', 'OPENMAIRIE', 1),
+(2, 'ville', 'Ville d''ARLES', 1);
+
+-- droit
+
+INSERT INTO om_profil VALUES (5, 'ADMINISTRATEUR');
+INSERT INTO om_profil VALUES (4, 'SUPER UTILISATEUR');
+INSERT INTO om_profil VALUES (3, 'UTILISATEUR');
+INSERT INTO om_profil VALUES (2, 'UTILISATEUR LIMITE');
+INSERT INTO om_profil VALUES (1, 'CONSULTATION');
+
+INSERT INTO om_droit VALUES ('om_utilisateur', 5);
+INSERT INTO om_droit VALUES ('om_droit', 5);
+INSERT INTO om_droit VALUES ('om_profil', 5);
+INSERT INTO om_droit VALUES ('om_collectivite', 5);
+INSERT INTO om_droit VALUES ('om_parametre', 4);
+INSERT INTO om_droit VALUES ('om_etat', 4);
+INSERT INTO om_droit VALUES ('om_sousetat', 4);
+INSERT INTO om_droit VALUES ('om_lettretype', 4);
+INSERT INTO om_droit VALUES ('gen', 5);
+INSERT INTO om_droit VALUES ('password', 4);
+
+INSERT INTO om_utilisateur (om_utilisateur, nom, Login, Pwd, om_profil, email, om_collectivite,om_type) VALUES
+(1, 'ADMINISTRATEUR', 'admin', '21232f297a57a5a743894a0e4a801fc3', '5', 'con...@openmairie.org', 1,''),
+(2, 'demo', 'demo', 'fe01ce2a7fbac8fafaed7c982a04e229', '5', 'con...@openmairie.org', 1,''),
+(3, 'util', 'util', '05c7e24700502a079cdd88012b5a76d3', '3', '', 1,'');
+
+-- login : demo / pwd : demo
+-- login : admin / pwd : admin
+
+INSERT INTO om_etat (om_etat, om_collectivite, id, libelle, actif, orientation, format, footerfont, footerattribut, footertaille, logo, logoleft, logotop, titre, titreleft, titretop, titrelargeur, titrehauteur, titrefont, titreattribut, titretaille, titrebordure, titrealign, corps, corpsleft, corpstop, corpslargeur, corpshauteur, corpsfont, corpsattribut, corpstaille, corpsbordure, corpsalign, om_sql, sousetat, se_font, se_margeleft, se_margetop, se_margeright, se_couleurtexte) VALUES (1, 1, 'om_collectivite', 'pas de libelle', 'Oui', 'P', 'A4', 'arial', '', 3, 'logo_arles.gif', 15, 4, 'DIRECTION GENERALE DES SERVICES
+ Service des Affaire Generales <b>Tel.: 04 90 49 38 92
+ Fax. : 04 90 49 38 16</b>
+', 6, 31, 200, 4, 'helvetica', '', 10, '1', 'L', '[om_collectivite]
+[libelle]
+[niveau]', 58, 87, 195, 5, 'helvetica', '', 10, '0', 'J', 'select om_collectivite.om_collectivite as om_collectivite,om_collectivite.libelle as libelle,om_collectivite.niveau as niveau from &DB_PREFIXEom_collectivite where om_collectivite.om_collectivite=''&idx''', 'om_parametre.om_collectivite', 'helvetica', 8, 5, 5, '0-0-0');
+
+INSERT INTO om_sousetat VALUES (1, 1, 'om_parametre.om_collectivite', 'gen le 12/11/2010', 'Oui', 'liste om_parametre', 10, 'helvetica', 'B', 10, '0', 'L', '0', '255-255-255', '0-0-0', 0, 5, '1', '1', '0|0|0', 7, 'TLB|TLB|LTBR', 'C|C|C', '255-255-255', '0-0-0', 195, '1', 10, '0-0-0', '243-246-246', '255-255-255', '1', 7, '65|65|65', 'TLB|TLB|LTBR', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 15, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 5, '212-219-220', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 7, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '999|999|999', '0|0|0', '0|0|0', '0|0|0', 'select om_parametre.om_parametre as om_parametre,om_parametre.libelle as libelle,om_parametre.valeur as valeur from om_parametre where om_parametre.om_collectivite=''&idx''');

Added: branches/1.x/data/pgsql/init_metier.sql
===================================================================
--- branches/1.x/data/pgsql/init_metier.sql (rev 0)
+++ branches/1.x/data/pgsql/init_metier.sql 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,487 @@
+-- metier debit de boisson
+
+-- schema
+
+SET search_path = openboisson, pg_catalog;
+
+CREATE SEQUENCE adresse_postale_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+CREATE TABLE adresse_postale (
+ adresse_postale integer,
+ rivoli varchar(10),
+ numero integer,
+ complement varchar(10),
+ libelle text
+);
+
+
+CREATE TABLE rivoli (
+ rivoli character varying(4) NOT NULL,
+ libelle character varying(80)
+);
+
+
+CREATE TABLE type_licence(
+ type_licence INTEGER NOT NULL,
+ libelle varchar(50) NOT NULL,
+ PRIMARY KEY (type_licence)
+);
+
+CREATE TABLE terme(
+ terme INTEGER NOT NULL,
+ libelle varchar(30),
+ PRIMARY KEY (terme)
+);
+
+CREATE TABLE demande_licence(
+ demande_licence int NOT NULL,
+ type_licence INTEGER,
+ type_demande INTEGER,
+ terme INTEGER,
+ date_debut_validite DATE,
+ date_fin_validite DATE,
+ etablissement integer,
+ heure_debut TIME,
+ heure_fin TIME,
+ occasion VARCHAR(50),
+ particularite TEXT,
+ date_ancienne_demande DATE,
+ date_demande_licence DATE,
+ PRIMARY KEY (demande_licence)
+ );
+
+CREATE TABLE exploitant(
+ exploitant INTEGER NOT NULL,
+ libelle VARCHAR(30) ,
+ PRIMARY KEY (exploitant)
+ );
+
+
+CREATE TABLE etablissement(
+ etablissement INTEGER NOT NULL,
+ raison_sociale VARCHAR(30),
+ enseigne VARCHAR(30),
+ no_siret VARCHAR(14),
+ forme_juridique VARCHAR(20),
+ numero_voie INTEGER,
+ complement VARCHAR(10),
+ voie VARCHAR(5),
+ libelle_voie VARCHAR(40),
+ complement_voie VARCHAR(40),
+ civilite_exploitant VARCHAR(15),
+ nom_exploitant VARCHAR(20),
+ nom_marital_exploitant VARCHAR(20),
+ date_naissance_exploitant DATE,
+ ville_naissance_exploitant VARCHAR(20),
+ cp_naissance_exploitant CHARACTER(5),
+ prenom_exploitant VARCHAR(20),
+ adresse1_exploitant VARCHAR(40),
+ adresse2_exploitant VARCHAR(40),
+ cp_exploitant CHARACTER(5),
+ ville_exploitant VARCHAR(40),
+ exploitant integer,
+ nationalite_exploitant VARCHAR(20),
+ civilite_proprietaire VARCHAR(15),
+ nom_proprietaire VARCHAR(20),
+ prenom_proprietaire VARCHAR(20),
+ adresse1_proprietaire VARCHAR(40),
+ adresse2_proprietaire VARCHAR(40),
+ cp_proprietaire CHARACTER(5),
+ ville_proprietaire VARCHAR(40),
+ permis_exploitation VARCHAR(3),
+ date_permis_exploitation DATE,
+ date_liquidation DATE,
+ date_fermeture DATE,
+ cp_etablissement VARCHAR(5),
+ ville_etablissement VARCHAR(40),
+ particularite_exploitant TEXT,
+ nature VARCHAR(15),
+ permis_exploitation_nuit VARCHAR(3),
+ date_permis_exploitation_nuit DATE,
+ profession_proprietaire VARCHAR(30),
+ PRIMARY KEY (etablissement)
+ );
+
+
+CREATE TABLE perimetre(
+ perimetre INTEGER NOT NULL,
+ longueur_exclusion_metre INTEGER,
+ libelle VARCHAR(70),
+ numero_voie INTEGER,
+ complement VARCHAR(10),
+ voie VARCHAR(5),
+ libelle_voie VARCHAR(40),
+ complement_voie VARCHAR(40),
+ PRIMARY KEY (perimetre)
+ );
+
+ CREATE TABLE dossier(
+ dossier INTEGER,
+ date_piece DATE,
+ nom VARCHAR(50),
+ observation VARCHAR(200),
+ etablissement INTEGER,
+ ancien_nom VARCHAR(50),
+ PRIMARY KEY (dossier)
+ );
+
+ CREATE TABLE type_demande(
+ type_demande INTEGER,
+ libelle VARCHAR(20),
+ PRIMARY KEY (type_demande)
+ );
+
+ CREATE TABLE courrier(
+ courrier INTEGER NOT NULL,
+ date_courrier DATE,
+ type_courrier VARCHAR(80),
+ zone_texte TEXT,
+ etablissement INTEGER,
+ PRIMARY KEY(courrier)
+ );
+
+
+
+
+-- sequences
+CREATE SEQUENCE courrier_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+
+CREATE SEQUENCE type_demande_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+CREATE SEQUENCE dossier_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+CREATE SEQUENCE type_licence_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+
+CREATE SEQUENCE terme_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+
+CREATE SEQUENCE demande_licence_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+
+CREATE SEQUENCE exploitant_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+
+
+CREATE SEQUENCE perimetre_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+CREATE SEQUENCE etablissement_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 1
+ CACHE 1;
+
+-- references
+
+ ALTER TABLE ONLY courrier
+ ADD CONSTRAINT courrier_etablissement
+ FOREIGN KEY (etablissement) REFERENCES etablissement(etablissement);
+ ALTER TABLE ONLY dossier
+ ADD CONSTRAINT dossier_etablissement
+ FOREIGN KEY (etablissement) REFERENCES etablissement(etablissement);
+ ALTER TABLE ONLY etablissement
+ ADD CONSTRAINT etablissement_exploitant
+ FOREIGN KEY (exploitant) REFERENCES exploitant(exploitant);
+ ALTER TABLE ONLY demande_licence
+ ADD CONSTRAINT demande_licence_etablissement
+ FOREIGN KEY (etablissement) REFERENCES etablissement(etablissement);
+ ALTER TABLE ONLY demande_licence
+ ADD CONSTRAINT demande_licence_type_licence
+ FOREIGN KEY (type_licence) REFERENCES type_licence(type_licence);
+ ALTER TABLE ONLY demande_licence
+ ADD CONSTRAINT demande_licence_terme
+ FOREIGN KEY (terme) REFERENCES terme(terme);
+
+--
+-- insertions dans les tables
+--
+
+INSERT INTO om_etat VALUES (2, 1, 'recepisse', 'Ouverture Licence', 'Oui', 'P', 'A4', 'helvetica', 'I', 8, 'logoRF.png', 75, 10, '<b>RECEPISSE DE LA DECLARATION - [libelle_type_demande]</b>Departement : Bouches-du-Rhone
+Arrondissement : Arles
+Commune : Arles
+
+<b> D''UN DEBIT DE BOISSON A CONSOMMER SUR PLACE</b>(Art. L. 3332-3, L. 3332-4, L. 3332-4-1 du Code de la Santé Publique)
+
+<b>Concernant le débit de boisson de [libelle_type_licence].</b>', 20, 45, 170, 5, 'arial', '', 10, '0', 'C', '
+Sis à n° [numero_voie] [libelle_voie]
+Code Postal : 13200 ARLES
+Raison Sociale : [raison_sociale]
+No D''immatriculation : [no_siret]
+Proprietaire : [nom_proprietaire] [prenom_proprietaire]
+Profession proprietaire : [profession_proprietaire]
+Adresse proprietaire : [adresse1_proprietaire] [adresse2_proprietaire]
+ [cp_proprietaire] [ville_proprietaire]
+
+Nom Prénom : [nom_exploitant] [prenom_exploitant] (Epoux (se)) [nom_marital_exploitant]
+Né (e) le [date_naissance_exploitant] à [ville_naissance_exploitant] ([cp_naissance_exploitant])
+Nationalité : [nationalite_exploitant]
+Domicilié (e) à [adresse1_exploitant] [adresse2_exploitant], [cp_exploitant] [ville_exploitant]
+Date permis exploitation : [date_permis_exploitation]
+Date permis exploitation de nuit : [date_permis_exploitation_nuit]
+Agissant en qualité de : [libelle_exploitant]
+
+
+S''est présenté ce jour déclarant vouloir effectuer :
+<b> [libelle_type_demande]</b> de débit de boisson susvisé à partir de [date_debut_validite]
+
+<b>Il (elle) a certifié :</b>
+
+1 - ne pas être justifiable des articles L. 3336-1, L. 3336-2 et L. 3336-3 de Code de la Santé Publique.
+2 - que le débit en question répond aux dispositions législatives et réglementaires relatives aux zones protégées.
+
+De laquelle déclaration le présent récépissé lui est délivré conformément à la loi.
+
+ Fait à ARLES, le &aujourdhui
+
+Pour le Maire, l''adjoint délégué
+\\p <b>
+
+
+
+ OBSERVATIONS IMPORTANTES</b>
+
+
+
+I. Les déclarations doivent être effectuées :
+
+ Pour les mutations dans la personne du propriétaire ou du gérant, 15 jours au moins avant la date prévue pour la prise de possession ou l''entrée en fonction du nouveau gérant;
+
+ En cas de mutation ou de décès, un mois au plus après la date du décès;
+
+II. Les titulaires d''une licence de débit de boissons à consommer sur place de 1ère catégorie ne peuvent vendre que des boissons du premier groupe,
+
+A SAVOIR
+
+ Boissons sans alcool; eaux minérales ou gazéifiées, jus de fruits ou de légumes non fermentés ou ne comportant pas à la suite d''un début de fermentation, de traces d''alcools supérieurs à un degrès d''alcool, limonades, sirops, infusions, lait, café, thé, chocolat, etc.', 20, 95, 170, 5, 'times', '', 10, '0', 'L', ' select
+etablissement.numero_voie as numero_voie,
+etablissement.libelle_voie as libelle_voie,
+etablissement.cp_etablissement as cp_etablissement,
+etablissement.ville_etablissement as ville_etablissement,
+etablissement.raison_sociale as raison_sociale,
+etablissement.enseigne as enseigne,
+etablissement.no_siret as no_siret,
+etablissement.forme_juridique as forme_juridique,
+to_char(etablissement.date_permis_exploitation ,''DD/MM/YYYY'') as date_permis_exploitation,
+to_char(etablissement.date_permis_exploitation_nuit ,''DD/MM/YYYY'') as date_permis_exploitation_nuit,
+etablissement.nom_exploitant as nom_exploitant,
+etablissement.prenom_exploitant as prenom_exploitant,
+etablissement.nom_proprietaire as nom_proprietaire,
+etablissement.prenom_proprietaire as prenom_proprietaire,
+etablissement.nom_marital_exploitant as nom_marital_exploitant,
+to_char(etablissement.date_naissance_exploitant ,''DD/MM/YYYY'') as date_naissance_exploitant,
+etablissement.ville_naissance_exploitant as ville_naissance_exploitant,
+etablissement.cp_naissance_exploitant as cp_naissance_exploitant,
+exploitant.libelle as libelle_exploitant,
+etablissement.nationalite_exploitant as nationalite_exploitant,
+etablissement.cp_exploitant as cp_exploitant,
+etablissement.ville_exploitant as ville_exploitant,
+etablissement.adresse1_exploitant as adresse1_exploitant,
+etablissement.adresse2_exploitant as adresse2_exploitant,
+etablissement.adresse1_proprietaire as adresse1_proprietaire ,
+etablissement.adresse2_proprietaire as adresse2_proprietaire ,
+etablissement.cp_proprietaire as cp_proprietaire ,
+etablissement.ville_proprietaire as ville_proprietaire ,
+etablissement.profession_proprietaire as profession_proprietaire ,
+to_char(demande_licence.date_debut_validite ,''DD/MM/YYYY'') as date_debut_validite,
+type_licence.libelle as libelle_type_licence,
+type_demande.libelle as libelle_type_demande,
+demande_licence.particularite as particularite,
+to_char(demande_licence.date_ancienne_demande ,''DD/MM/YYYY'') as date_ancienne_demande
+
+ from &DB_PREFIXEdemande_licence
+left join &DB_PREFIXEetablissement on etablissement.etablissement = demande_licence.etablissement
+left join &DB_PREFIXEexploitant on exploitant.exploitant = etablissement.exploitant
+left join &DB_PREFIXEtype_licence on demande_licence.type_licence = type_licence.type_licence
+left join &DB_PREFIXEtype_demande on demande_licence.type_demande = type_demande.type_demande
+where demande_licence = ''&idx''', '', 'helvetica', 8, 5, 5, '0-0-0');
+
+INSERT INTO om_etat VALUES (3, 1, 'observation', 'observation', 'Oui', 'P', 'A4', 'helvetica', '', 8, 'logo_arles.png', 10, 10, 'OBSERVATIONS IMPORTANTES', 20, 70, 170, 5, 'arial', 'B', 16, '0', 'C', 'I. Les déclaration doivent être effectuées :
+
+ Pour les mutation dans la personne du propriétaire ou du gérant, 15 jours au moins avant la date prévues pour la prise de possessio ou l''entrée en fonctions du nouveau gérant ;
+
+
+ En cas de mutation par décès, un mois au plus après la date du décès ;
+
+
+II. Les titulaires d''une licence de débit de boissons à consommer sur place de 1 ère catégorie ne peuvent vendre que des boissons du premier groupe,
+
+
+
+A SAVOIR
+
+ Boissons sans alcool ; eaux minérales ou gazéifiées, jus de fruits ou de légumes non fermentés ou ne comportant pas à la suite d''un début de fermentation, de traces d’alcool supérieures à un degré, limonades, sirops, infusions, lait, café, thé, chocolat, etc .', 20, 80, 170, 5, 'times', '', 14, '0', 'J', ' select * from &DB_PREFIXEetablissement where etablissement=6', '', 'helvetica', 8, 5, 5, '0-0-0');
+
+
+INSERT INTO om_etat VALUES (4, 1, 'temporaire', 'temporaire', 'Oui', 'P', 'A4', 'arial', '', 8, 'logo_arles.png', 12, 10, 'DEMANDE DOUVERTURE D''UN DEBIT DE BOISSONS TEMPORAIRE
+
+de [libelle_type_licence]', 20, 70, 170, 5, 'arial', 'B', 14, '0', 'C', 'Je soussigné [nom_exploitant] [prenom_exploitant],
+
+agissant en qualité de [libelle_exploitant] de [enseigne]
+
+ai l''honneur de solliciter de Monsieur le Maire d''ARLES, dans le cadre de l''article L.3324-2 du Code de la Santé Publique, l''autorisation d''établir un débit temporaire de boissons
+
+au n° [numero_voie] [libelle_voie]
+
+à l''occasion de [occasion]
+
+et pour toute sa durée : du [date_debut_validite] au [date_fin_validite]
+ Fait à ARLES le date &aujourdhui Signature :
+
+_______________________________________________________________________________________________
+
+AUTORISATION DU MAIRE
+
+Le Maire de la Commune d''ARLES (Bouches-du-Rhône)
+
+Vu la demande ci-dessus,
+
+Vu le Code de la Santé Publique et notamment ses articles L3321-1 ( 2°) et L3334-2
+
+Autorise [civilite_exploitant] [nom_exploitant] [prenom_exploitant],
+à ouvrir au n° [numero_voie] [libelle_voie] un débit de boissons de [libelle_type_licence] à consommer sur place du [date_debut_validite] au [date_fin_validite]
+
+à charge par le demandeur de se conformer à toutes les prescriptions des lois et règlements sur la tenue et la police des débits de boissons.
+ ARLES, le &aujourdhui
+
+Pour le Maire,
+L''Adjoint Délégué,', 20, 95, 170, 5, 'arial', '', 9, '0', 'L', ' select
+etablissement.numero_voie as numero_voie,
+etablissement.libelle_voie as libelle_voie,
+etablissement.raison_sociale as raison_sociale,
+etablissement.enseigne as enseigne,
+etablissement.no_siret as no_siret,
+etablissement.forme_juridique as forme_juridique,
+to_char(etablissement.date_permis_exploitation ,''DD/MM/YYYY'') as date_permis_exploitation,
+etablissement.civilite_exploitant as civilite_exploitant,
+etablissement.nom_exploitant as nom_exploitant,
+etablissement.prenom_exploitant as prenom_exploitant,
+etablissement.nom_marital_exploitant as nom_marital_exploitant,
+to_char(etablissement.date_naissance_exploitant ,''DD/MM/YYYY'') as date_naissance_exploitant,
+etablissement.ville_naissance_exploitant as ville_naissance_exploitant,
+etablissement.cp_naissance_exploitant as cp_naissance_exploitant,
+exploitant.libelle as libelle_exploitant,
+demande_licence.occasion as occasion,
+etablissement.nationalite_exploitant as nationalite_exploitant,
+etablissement.cp_exploitant as cp_exploitant,
+etablissement.ville_exploitant as ville_exploitant,
+etablissement.adresse1_exploitant as adresse1_exploitant,
+etablissement.adresse2_exploitant as adresse2_exploitant,
+to_char(demande_licence.date_debut_validite ,''DD/MM/YYYY'') as date_debut_validite,
+to_char(demande_licence.date_fin_validite ,''DD/MM/YYYY'') as date_fin_validite,
+type_licence.libelle as libelle_type_licence,
+type_demande.libelle as libelle_type_demande
+
+ from &DB_PREFIXEdemande_licence
+left join &DB_PREFIXEetablissement on etablissement.etablissement = demande_licence.etablissement
+left join &DB_PREFIXEexploitant on exploitant.exploitant = etablissement.exploitant
+left join &DB_PREFIXEtype_licence on demande_licence.type_licence = type_licence.type_licence
+left join &DB_PREFIXEtype_demande on demande_licence.type_demande = type_demande.type_demande
+where demande_licence = ''&idx''', '', 'helvetica', 8, 5, 5, '0-0-0');
+
+INSERT INTO om_etat VALUES (5, 1, 'courrier', 'courrier', 'Oui', 'P', 'A4', 'helvetica', 'I', 8, 'logo_arles.png', 10, 10, 'Le [date_courrier]
+[civilite_exploitant] [nom_exploitant] [prenom_exploitant]
+[adresse1_exploitant] [adresse2_exploitant]
+[cp_exploitant] [ville_exploitant]', 109, 16, 80, 5, 'arial', 'B', 12, '0', 'R', 'Objet : [type_courrier]
+
+ [zone_texte]', 20, 80, 170, 5, 'times', '', 12, '0', 'J', ' select
+nom_exploitant,
+civilite_exploitant,
+prenom_exploitant,
+adresse1_exploitant,
+adresse2_exploitant,
+cp_exploitant,
+ville_exploitant,
+to_char(date_courrier ,''DD/MM/YYYY'') as date_courrier,
+zone_texte,
+type_courrier
+ from &DB_PREFIXEcourrier
+inner join &DB_PREFIXEetablissement on etablissement.etablissement= courrier.etablissement where courrier = &idx;', '', 'helvetica', 8, 5, 5, '0-0-0');
+
+
+ALTER SEQUENCE om_etat_seq RESTART WITH 5;
+
+-- exploitant
+
+INSERT INTO exploitant (exploitant, libelle) VALUES (1, 'Gérant');
+INSERT INTO exploitant (exploitant, libelle) VALUES (2, 'Employé');
+INSERT INTO exploitant (exploitant, libelle) VALUES (3, 'Propriétaire');
+
+ALTER SEQUENCE exploitant_seq RESTART WITH 4;
+
+-- terme
+
+
+INSERT INTO terme (terme, libelle) VALUES (1, 'Permanente');
+INSERT INTO terme (terme, libelle) VALUES (2, 'Temporaire');
+INSERT INTO terme (terme, libelle) VALUES (3, 'Liee a un terrain de sport');
+
+ALTER SEQUENCE terme_seq RESTART WITH 4;
+
+-- type_licence
+
+INSERT INTO type_licence (type_licence, libelle) VALUES (1, 'première catégorie');
+INSERT INTO type_licence (type_licence, libelle) VALUES (2, 'deuxième catégorie');
+INSERT INTO type_licence (type_licence, libelle) VALUES (3, 'troisième catégorie');
+INSERT INTO type_licence (type_licence, libelle) VALUES (4, 'quatrième catégorie');
+INSERT INTO type_licence (type_licence, libelle) VALUES (5, 'Petite a emportee');
+INSERT INTO type_licence (type_licence, libelle) VALUES (6, 'Grande a emportee');
+INSERT INTO type_licence (type_licence, libelle) VALUES (7, 'Petite Restauration');
+INSERT INTO type_licence (type_licence, libelle) VALUES (8, 'Grande restauration');
+
+ALTER SEQUENCE type_licence_seq RESTART WITH 9;
+
+--type_demande
+
+INSERT INTO type_demande (type_demande, libelle) VALUES (1, 'D''OUVERTURE');
+INSERT INTO type_demande (type_demande, libelle) VALUES (2, 'DE TRANSFERT');
+INSERT INTO type_demande (type_demande, libelle) VALUES (3, 'DE MUTATION');
+
+ALTER SEQUENCE type_demande_seq RESTART WITH 4;
+

Added: branches/1.x/data/pgsql/init_metier_data.sql
===================================================================
--- branches/1.x/data/pgsql/init_metier_data.sql (rev 0)
+++ branches/1.x/data/pgsql/init_metier_data.sql 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,123 @@
+-- schema
+
+SET search_path = openboisson, pg_catalog;
+
+-- seq
+SELECT pg_catalog.setval('om_widget_seq', 2, true);
+SELECT pg_catalog.setval('om_sig_point_seq', 4, true);
+SELECT pg_catalog.setval('adresse_postale_seq', 101, true);
+-- om_sig_point
+INSERT INTO om_sig_point VALUES (3, 1, 'etab', 'etablissement', 'Oui', '8', 'Oui', '', '', 'Oui', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/etablissement.php?idx=', 'select astext(geom) as geom, (numero_voie||'' ''||libelle_voie) as titre, raison_sociale as description,etablissement as idx from &DB_PREFIXEetablissement order by geom,etablissement', 'Oui', 'etablissement', 'geom', '../scr/tab.php?obj=etablissement');
+INSERT INTO om_sig_point VALUES (1, 1, 'etab_perim', 'etab_perim', 'Oui', '8', 'Oui', '', '', 'Oui', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/etab_perim.php?id=', 'select astext(geom) as geom, (numero_voie||'' ''||libelle_voie) as titre,libelle as description, ''perimetre'' as class, longueur_exclusion_metre as rayon,perimetre as idx, ''./img/new.gif'' as img, ''./img/intero.gif'' as img_hover from ²DB_PREFIXEperimetre UNION select astext(geom) as geom, (numero_voie||'' ''||libelle_voie) as titre,raison_sociale as description, ''etablissement'' as class,''0'' as rayon,etablissement as idx, ''./img/punaise.png'' as img, ''./img/punaise_hover.png'' as img_hover from &DB_PREFIXEetablissement', 'Oui', 'etablissement', 'geom', '');
+INSERT INTO om_sig_point VALUES (4, 1, 'perimetre', 'perimetre', 'Oui', '8', 'Oui', 'Oui', 'Oui', 'Oui', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/perimetre.php?idx=', 'select astext(geom) as geom, (numero_voie||'' ''||libelle_voie) as titre, libelle as description, longueur_exclusion_metre as rayon,perimetre as idx from &DB_PREFIXEperimetre order by geom', 'Oui', 'perimetre', 'geom', '../scr/tab.php?obj=perimetre');
+INSERT INTO om_sig_point VALUES (2, 1, 'salin', 'salin de giraud sat', '', '8', '', '', 'Oui', 'Oui', '4.701,43.3966,4.7636,43.4298', 'EPSG:2154', '../app/perimetre.php?idx=', 'select astext(geom) as geom, (numero_voie||'' ''||libelle_voie) as titre, perimetre as description, longueur_exclusion_metre as rayon,perimetre as idx from &DB_PREFIXEperimetre order by geom', '', 'perimetre', 'geom', '');
+-- widgets
+INSERT INTO om_widget VALUES (1, 1, 'salin sat', '../scr/tab_sig.php?obj=salin&type=zone&zoom=5', 'stellite de salin', '3');
+INSERT INTO om_widget VALUES (2, 1, 'carte totale', '../sig/tab_sig_point_db.php?obj=etab_perim&type=zone&zoom=15', '', '5');
+-- rivoli
+INSERT INTO rivoli VALUES (4010, 'RUE DE LA REPUBLIQUE');
+INSERT INTO rivoli VALUES (1255, 'RUE DULAU');
+INSERT INTO rivoli VALUES (1760, 'RUE GAMBETTA');
+
+-- adresse postale et reglement
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (1, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000713D0A57675C29410AD7A3C070FC5741', 5);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (2, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000B81E856B185E294114AE476154FC5741', 66);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (3, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000D7A370BD575C2941EC51B87E72FC5741', 1);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (4, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800001F85EBD10E5E2941A4703D1A56FC5741', 53);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (5, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000B81E856B065E29411F85EB6156FC5741', 51);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (6, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000B81E85EBFC5D29415C8FC2B556FC5741', 49);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (7, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000E17A14AE0E5E2941A4703DAA54FC5741', 64);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (8, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800007B14AE47E85D2941E17A14FE55FC5741', 60);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (9, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000052B81E05015E29413333332355FC5741', 62);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (10, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000066666666DF5D2941295C8F3256FC5741', 58);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (11, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000085EB51B8F45D2941A4703DFA56FC5741', 47);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (12, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000666666660B5D2941C3F528DC62FC5741', 23);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (13, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800005C8FC275EB5D2941AE47E14A57FC5741', 45);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (14, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000052B81E85E25D294185EB519857FC5741', 43);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (15, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800003D0AD723D75D2941B81E857B56FC5741', 56);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (16, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000C3F528DCCF5D2941295C8FC256FC5741', 54);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (17, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000066666666C45D29413333333357FC5741', 52);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (18, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000014AE47E1CF5D29418FC2F53858FC5741', 41);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (19, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800007B14AE47C95D294114AE477158FC5741', 39);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (20, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000713D0A57BF5D2941713D0AC758FC5741', 37);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (21, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800007B14AE47B65D294114AE47E159FC5741', 35);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (22, '4010', 'BIS', 'RUE DE LA REPUBLIQUE', '01010000206A0800001F85EBD1BE5C29415C8FC26566FC5741', 14);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (23, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000D7A370BDB75D294148E17A3457FC5741', 50);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (24, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000052B81E85AC5D29419A99999957FC5741', 48);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (25, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000048E17A949F5D2941713D0AA758FC5741', 46);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (26, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800009A999919935D294152B81E2559FC5741', 44);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (27, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000014AE47617D5D294114AE47D159FC5741', 42);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (28, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000E17A142EAB5D29415C8FC2455AFC5741', 33);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (29, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800005C8FC275865D2941B81E853B5BFC5741', 31);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (30, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800003D0AD7A3585D2941C3F528CC5DFC5741', 29);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (31, '4010', 'BIS', 'RUE DE LA REPUBLIQUE', '01010000206A080000B81E85EB9B5D294185EB51085AFC5741', 31);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (32, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000048E17A14495D29411F85EB815CFC5741', 40);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (33, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000AE47E17A385D2941E17A146E5DFC5741', 38);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (34, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800001F85EBD1305D2941B81E85DB5DFC5741', 36);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (35, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000A4703D8A285D29418FC2F5585EFC5741', 34);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (36, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000052B81E051F5D29417B14AE075FFC5741', 32);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (37, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000D7A370BD205D29416666664661FC5741', 25);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (38, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800008FC2F5280F5D2941CDCCCC3C60FC5741', 30);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (39, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000295C8FC2005D29415C8FC25561FC5741', 28);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (40, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000B81E85EBE95C29417B14AE1763FC5741', 22);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (41, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800003D0AD723CA5C2941D7A3705D62FC5741', 20);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (42, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800008FC2F528C25C294148E17A4462FC5741', 18);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (43, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000000000080F35C294152B81EA564FC5741', 21);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (44, '4010', 'BIS', 'RUE DE LA REPUBLIQUE', '01010000206A0800005C8FC275EA5C2941295C8F6265FC5741', 19);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (45, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000EC51B81ECE5C2941713D0AB767FC5741', 19);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (46, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000048E17A14C85C294185EB51A865FC5741', 16);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (47, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000048E17A14B75C294148E17A0467FC5741', 14);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (48, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800007B14AE47A65C2941CDCCCC5C68FC5741', 12);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (49, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000EC51B89EAF5C2941D7A3701D6AFC5741', 17);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (50, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000014AE47E1965C294185EB51E86BFC5741', 15);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (51, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000666666669A5C29410000005069FC5741', 10);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (52, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800003D0AD723865C29417B14AE676DFC5741', 13);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (53, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000C3F5285C7F5C29413D0AD7236EFC5741', 11);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (54, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000000000000765C2941713D0A276FFC5741', 9);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (55, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A08000014AE47E16D5C294185EB510870FC5741', 7);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (56, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A080000D7A3703D605C2941B81E858B71FC5741', 3);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (57, '4010', 'BIS', 'RUE DE LA REPUBLIQUE', '01010000206A08000085EB5138265D2941000000E060FC5741', 25);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (58, '4010', NULL, 'RUE DE LA REPUBLIQUE', '01010000206A0800005C8FC2F52C5D2941EC51B85E60FC5741', 27);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (59, '4010', 'BIS', 'RUE DE LA REPUBLIQUE', '01010000206A0800003D0AD7A3C25C2941F6285C9F63FC5741', 16);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (60, '4010', 'BIS', 'RUE DE LA REPUBLIQUE', '01010000206A080000EC51B81E315D29411F85EB1160FC5741', 27);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (61, '1255', NULL, 'RUE DULAU', '01010000206A08000048E17A14EE5C2941D7A3700D5BFC5741', 5);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (62, '1255', NULL, 'RUE DULAU', '01010000206A08000052B81E85CE5C29411F85EB5155FC5741', 10);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (63, '1255', NULL, 'RUE DULAU', '01010000206A0800009A999919EB5C2941CDCCCC7C59FC5741', 7);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (64, '1255', NULL, 'RUE DULAU', '01010000206A080000AE47E17ADC5C29413333337358FC5741', 6);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (65, '1255', NULL, 'RUE DULAU', '01010000206A080000333333B3F15C294148E17AF45CFC5741', 3);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (66, '1255', NULL, 'RUE DULAU', '01010000206A080000A4703D0AE85C29411F85EBE157FC5741', 9);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (67, '1255', NULL, 'RUE DULAU', '01010000206A08000048E17A14D95C294114AE47E156FC5741', 8);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (68, '1255', NULL, 'RUE DULAU', '01010000206A080000295C8FC2E35C2941EC51B89E55FC5741', 11);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (69, '1255', NULL, 'RUE DULAU', '01010000206A0800001F85EBD1F55C2941E17A141E5FFC5741', 1);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (70, '1255', NULL, 'RUE DULAU', '01010000206A080000EC51B81EEA5C294185EB51785FFC5741', 2);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (71, '1255', NULL, 'RUE DULAU', '01010000206A0800005C8FC275C55C29413D0AD74356FC5741', 12);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (72, '1255', NULL, 'RUE DULAU', '01010000206A080000A4703D0AE55C2941C3F528DC5CFC5741', 4);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (73, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800003D0AD723BD5C2941666666463DFC5741', 21);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (74, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000A4703D0A965C294185EB51984FFC5741', 32);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (75, '1760', NULL, 'RUE GAMBETTA', '01010000206A08000052B81E85925C294148E17AE452FC5741', 30);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (76, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000AE47E1FA805C29410000006063FC5741', 4);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (77, '1760', 'BIS', 'RUE GAMBETTA', '01010000206A080000AE47E1FA7E5C294148E17A7465FC5741', 2);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (78, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800005C8FC2756E5C294148E17A6459FC5741', 24);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (79, '1760', NULL, 'RUE GAMBETTA', '01010000206A08000000000080895C2941CDCCCC7C5AFC5741', 26);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (80, '1760', 'BIS', 'RUE GAMBETTA', '01010000206A0800005C8FC2F59A5C2941F6285C6F5DFC5741', 7);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (81, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800005C8FC2F5855C294185EB51185EFC5741', 12);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (82, '1760', NULL, 'RUE GAMBETTA', '01010000206A08000085EB5138835C29411F85EB0161FC5741', 8);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (83, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000F6285C0F845C2941D7A3701D60FC5741', 10);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (84, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800005C8FC2F5875C294185EB51F85BFC5741', 14);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (85, '1760', NULL, 'RUE GAMBETTA', '01010000206A08000048E17A94995C29411F85EBD15EFC5741', 7);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (86, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000D7A370BD955C2941EC51B8BE62FC5741', 5);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (87, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000B81E856B955C2941EC51B8FE62FC5741', 3);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (88, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000713D0A57655C2941D7A3703D5AFC5741', 22);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (89, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000713D0AD7625C2941713D0A875BFC5741', 20);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (90, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000295C8F42825C29413D0AD70362FC5741', 6);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (91, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000AE47E17AA15C294114AE47E156FC5741', 13);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (92, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000A4703D8A8B5C294185EB517858FC5741', 28);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (93, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800005C8FC2759D5C2941E17A14EE5AFC5741', 9);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (94, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800000AD7A3F0A95C2941A4703D1A4FFC5741', 17);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (95, '1760', NULL, 'RUE GAMBETTA', '01010000206A08000000000000A05C294148E17A6458FC5741', 11);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (96, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800003D0AD723A65C29413D0AD7A352FC5741', 15);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (97, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800008FC2F5289A5C29419A9999B94BFC5741', 34);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (98, '1760', NULL, 'RUE GAMBETTA', '01010000206A080000AE47E1FA9D5C2941713D0A2748FC5741', 38);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (99, '1760', NULL, 'RUE GAMBETTA', '01010000206A08000000000080AD5C2941666666364CFC5741', 19);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (100, '1760', 'BIS', 'RUE GAMBETTA', '01010000206A0800003D0AD723945C29416666668651FC5741', 32);
+INSERT INTO adresse_postale (adresse_postale, rivoli, complement, libelle, geom, numero) VALUES (101, '1760', NULL, 'RUE GAMBETTA', '01010000206A0800008FC2F5A89C5C2941D7A3706D49FC5741', 36);
\ No newline at end of file

Added: branches/1.x/data/pgsql/init_metier_sig.sql
===================================================================
--- branches/1.x/data/pgsql/init_metier_sig.sql (rev 0)
+++ branches/1.x/data/pgsql/init_metier_sig.sql 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,12 @@
+-- $Id$
+-- application metier sig
+-- mise a jour sig avec commande addGeometryColumns
+-- si pas de shema, remplacer openboisson par public
+
+SELECT AddGeometryColumn ( 'openboisson', 'adresse_postale', 'geom', 2154 , 'POINT', 2 );
+
+-- geo localisation odp
+
+SELECT AddGeometryColumn ('openboisson', 'etablissement', 'geom', 2154 , 'POINT', 2 );
+SELECT AddGeometryColumn ('openboisson', 'perimetre', 'geom',2154 , 'POINT', 2 );
+

Added: branches/1.x/data/pgsql/ver1.0.1.sql
===================================================================
--- branches/1.x/data/pgsql/ver1.0.1.sql (rev 0)
+++ branches/1.x/data/pgsql/ver1.0.1.sql 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,3 @@
+ALTER TABLE etablissement ADD COLUMN permis_exploitation_nuit VARCHAR(3);
+ALTER TABLE etablissement ADD COLUMN date_permis_exploitation_nuit DATE;
+ALTER TABLE etablissement ADD COLUMN profession_proprietaire VARCHAR(30);
\ No newline at end of file

Added: branches/1.x/data/pgsql/ver1.0.2.sql
===================================================================
--- branches/1.x/data/pgsql/ver1.0.2.sql (rev 0)
+++ branches/1.x/data/pgsql/ver1.0.2.sql 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,2 @@
+INSERT INTO om_sousetat VALUES
+(1, 1, 'om_parametre.om_collectivite', 'gen le 12/11/2010', 'Oui', 'liste om_parametre', 10, 'helvetica', 'B', 10, '0', 'L', '0', '255-255-255', '0-0-0', 0, 5, '1', '1', '0|0|0', 7, 'TLB|TLB|LTBR', 'C|C|C', '255-255-255', '0-0-0', 195, '1', 10, '0-0-0', '243-246-246', '255-255-255', '1', 7, '65|65|65', 'TLB|TLB|LTBR', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 15, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 5, '212-219-220', 'TLB|TLB|LTBR', 'C|C|C', '1', 10, 7, '255-255-255', 'TLB|TLB|LTBR', 'C|C|C', '999|999|999', '0|0|0', '0|0|0', '0|0|0','select om_parametre.om_parametre as om_parametre,om_parametre.libelle as libelle,om_parametre.valeur as valeur from om_parametre where om_parametre.om_collectivite=''&idx''');
\ No newline at end of file

Added: branches/1.x/gen/dyn/custom/etat.inc
===================================================================
--- branches/1.x/gen/dyn/custom/etat.inc (rev 0)
+++ branches/1.x/gen/dyn/custom/etat.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,7 @@
+ <?php
+// $Id: etat.inc,v 1.1 2009-09-02 10:19:21 fraynaud Exp $
+// parametre etat
+ // logo
+ $logoleft='80';
+ $logotop='20';
+?>

Added: branches/1.x/gen/dyn/custom/form.inc
===================================================================
--- branches/1.x/gen/dyn/custom/form.inc (rev 0)
+++ branches/1.x/gen/dyn/custom/form.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,5 @@
+ <?php
+// $Id: form.inc,v 1.1 2009-09-02 10:19:21 fraynaud Exp $
+// parametre de sql/ .../nomtable.inc et nomtable.form.inc
+ $serie = 30; // nombre d'enregistrement par page'
+?>

Added: branches/1.x/gen/dyn/custom/index.php
===================================================================
--- branches/1.x/gen/dyn/custom/index.php (rev 0)
+++ branches/1.x/gen/dyn/custom/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../../../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/index.php
===================================================================
--- branches/1.x/gen/dyn/index.php (rev 0)
+++ branches/1.x/gen/dyn/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/standard/etat.inc
===================================================================
--- branches/1.x/gen/dyn/standard/etat.inc (rev 0)
+++ branches/1.x/gen/dyn/standard/etat.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,44 @@
+ <?php
+// $Id: etat.inc,v 1.1 2009-09-02 10:19:21 fraynaud Exp $
+// parametre etat
+ // general
+ $variable='&'; // nouveau
+ // $variable=chr(163); // compatibilite openmairie <4
+ // parametres
+ $etat['orientation']='P';
+ $etat['format']='A4';
+ // footer
+ $etat['footerfont']='helvetica';
+ $etat['footerattribut']='I';
+ $etat['footertaille']='8';
+ // logo
+ $etat['logo']='logopdf.png';
+ $etat['logoleft']='58';
+ $etat['logotop']='7';
+ // titre
+ $etat['titreleft']='41';
+ $etat['titretop']='36';
+ $etat['titrelargeur']='130';
+ $etat['titrehauteur']='10';
+ $etat['titrefont']='helvetica';
+ $etat['titreattribut']='B';
+ $etat['titretaille']='15';
+ $etat['titrebordure']='0';
+ $etat['titrealign']='C';
+ // corps
+ $etat['corpsleft']='7';
+ $etat['corpstop']='57';
+ $etat['corpslargeur']='195';
+ $etat['corpshauteur']='5';
+ $etat['corpsfont']='helvetica';
+ $etat['corpsattribut']='';
+ $etat['corpstaille']='10';
+ $etat['corpsbordure']='0';
+ $etat['corpsalign']='J';
+ // sous etat
+ $etat['se_font']='helvetica';
+ $etat['se_margeleft']='8';
+ $etat['se_margetop']='5';
+ $etat['se_margeright']='5';
+ $etat['se_couleurtexte']="0-0-0";
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/standard/form.inc
===================================================================
--- branches/1.x/gen/dyn/standard/form.inc (rev 0)
+++ branches/1.x/gen/dyn/standard/form.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,16 @@
+ <?php
+// $Id: form.inc,v 1.4 2009-09-10 14:25:34 fraynaud Exp $
+// parametre de sql/ .../nomtable.inc et nomtable.form.inc
+ $serie = 15; // nombre d'enregistrement par page'
+ $ico = "../img/ico_application.png"; // icone de l'application
+ // blob
+ $max=6; // nb de ligne blob
+ $taille=80; // taille du blob
+ // pgsql
+ $pgsql_taille_defaut = 20; // taille du champ par defaut si retour pg_field_prtlen =0
+ $pgsql_taille_minimum = 10; // taille minimum d affichage d un champ
+ $pgsql_longueur_date=12; // taille d'affichage de la date '
+ // methode vérifier sur le 2eme champ
+ $verifier=1;
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/standard/index.php
===================================================================
--- branches/1.x/gen/dyn/standard/index.php (rev 0)
+++ branches/1.x/gen/dyn/standard/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../../../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/standard/lettretype.inc
===================================================================
--- branches/1.x/gen/dyn/standard/lettretype.inc (rev 0)
+++ branches/1.x/gen/dyn/standard/lettretype.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,34 @@
+ <?php
+// $Id: etat.inc,v 1.1 2009-09-02 10:19:21 fraynaud Exp $
+// parametre etat
+ // general
+ $variable='&'; // nouveau
+ // $variable=chr(163); // compatibilite openmairie <4
+ // parametres
+ $lettretype['orientation']='P';
+ $lettretype['format']='A4';
+ // logo
+ $lettretype['logo']='logopdf.png';
+ $lettretype['logoleft']='58';
+ $lettretype['logotop']='7';
+ // titre
+ $lettretype['titreleft']='41';
+ $lettretype['titretop']='36';
+ $lettretype['titrelargeur']='130';
+ $lettretype['titrehauteur']='10';
+ $lettretype['titrefont']='helvetica';
+ $lettretype['titreattribut']='B';
+ $lettretype['titretaille']='15';
+ $lettretype['titrebordure']='0';
+ $lettretype['titrealign']='C';
+ // corps
+ $lettretype['corpsleft']='7';
+ $lettretype['corpstop']='57';
+ $lettretype['corpslargeur']='195';
+ $lettretype['corpshauteur']='5';
+ $lettretype['corpsfont']='helvetica';
+ $lettretype['corpsattribut']='';
+ $lettretype['corpstaille']='10';
+ $lettretype['corpsbordure']='0';
+ $lettretype['corpsalign']='J';
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/standard/option.inc
===================================================================
--- branches/1.x/gen/dyn/standard/option.inc (rev 0)
+++ branches/1.x/gen/dyn/standard/option.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,20 @@
+<?php
+// $Id: option.inc,v 1.1 2009-09-02 10:19:21 fraynaud Exp $
+// insertion de texte dans les divers menu
+// auto.php
+
+$modif_edition="echo \"<br><a class='lien' href='../pdf/pdf.php?obj=".$table.
+ "' target='_blank'><img src='../img/ico_pdf.png' align='top' hspace='35' border='0'>".
+ $table." </a><br>\";";
+$modif_menu = "echo \"<li><a href='../scr/tab.php?obj=".$table.
+ "'>&nbsp;\".\_(\"".$table."\").\"&nbsp;</a></li>\";";
+$modif_tdb="echo \"\t<div><a href='../scr/tab.php?obj=".$table.
+ "'><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/>&nbsp;\".\_(\"".$table."\").\"&nbsp;</a></div>\";";
+$modif_import="echo \"<br><a class='lien' href='../rec/import_script.php?obj=".$table.
+ "' target='_blank'><img src='../img/ico_import.png' align='top' hspace='35' border='0'>".
+ $table." </a><br>\";";
+$modif_documentation_menu= "echo \"<li><a href=javascript:doc('\".\$langue.\"/".$table.".html',650,500)>&nbsp;\"._('".$table."').\"&nbsp;</a></li>\";";
+$modif_documentation_tdb= "echo \"<div id='bouton_tactile'><a href=javascript:doc('\".\$langue.\"/".$table.
+ ".html',650,500)><img src='../img/tb_fleche.png' vspace='2' alt='' title='' style='vertical-align:middle'/>&nbsp;\"._('".$table.
+ "').\"</a></div>\";";
+?>

Added: branches/1.x/gen/dyn/standard/pdf.inc
===================================================================
--- branches/1.x/gen/dyn/standard/pdf.inc (rev 0)
+++ branches/1.x/gen/dyn/standard/pdf.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,55 @@
+<?php
+//$Id: pdf.inc,v 1.1 2009-09-02 10:19:21 fraynaud Exp $
+// parametrage pdf standard
+$longueurtableau= 280;
+$orientation='L';// orientation P-> portrait L->paysage";
+$format='A4';// format A3 A4 A5;
+$police='arial';
+$margeleft=10;// marge gauche;
+$margetop=5;// marge haut;
+$margeright=5;// marge droite;
+$border=1; // 1 -> bordure 0 -> pas de bordure";
+$C1=0;// couleur texte R";
+$C2=0;// couleur texte V";
+$C3=0;// couleur texte B";
+$size=10; //taille POLICE";
+$height=4.6; // hauteur ligne tableau ";
+$align='L';
+// fond 2 couleurs
+$fond=1;// 0- > FOND transparent 1 -> fond";
+$C1fond1=234;// couleur fond R ";
+$C2fond1=240;// couleur fond V ";
+$C3fond1=245;// couleur fond B ";
+$C1fond2=255;// couleur fond R";
+$C2fond2=255;// couleur fond V";
+$C3fond2=255;// couleur fond B";
+// spe openelec
+$flagsessionliste=0;// 1 - > affichage session liste ou 0 -> pas d'affichage";
+// titre
+$bordertitre=0; // 1 -> bordure 0 -> pas de bordure";
+$aligntitre='L'; // L,C,R";
+$heightitre=10;// hauteur ligne titre";
+$grastitre='B';//\$gras='B' -> BOLD OU \$gras=''";
+$fondtitre=0; //0- > FOND transparent 1 -> fond";
+$C1titrefond=181;// couleur fond R";
+$C2titrefond=182;// couleur fond V";
+$C3titrefond=188;// couleur fond B";
+$C1titre=75;// couleur texte R";
+$C2titre=79;// couleur texte V";
+$C3titre=81;// couleur texte B";
+$sizetitre=15;
+// entete colonne
+$flag_entete=1;//entete colonne : 0 -> non affichage , 1 -> affichage";
+$fondentete=1;// 0- > FOND transparent 1 -> fond";
+$heightentete=10;//hauteur ligne entete colonne";
+$C1fondentete=210;// couleur fond R";
+$C2fondentete=216;// couleur fond V";
+$C3fondentete=249;// couleur fond B";
+$C1entetetxt=0;// couleur texte R";
+$C2entetetxt=0;// couleur texte V";
+$C3entetetxt=0;// couleur texte B";
+$C1border=159;// couleur texte R";
+$C2border=160;// couleur texte V";
+$C3border=167;// couleur texte B";
+$bt=1;// border 1ere et derniere ligne du tableau par page->0 ou 1";
+?>
\ No newline at end of file

Added: branches/1.x/gen/dyn/standard/sousetat.inc
===================================================================
--- branches/1.x/gen/dyn/standard/sousetat.inc (rev 0)
+++ branches/1.x/gen/dyn/standard/sousetat.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,55 @@
+<?php
+//$Id: sousetat.inc,v 1.2 2009-12-26 16:27:18 fraynaud Exp $
+//sousetat standard
+$longueurtableau= 195;
+$variable='&'; // nouveau
+// $variable=chr(163); // compatibilite openmairie <4
+
+// parametres
+
+//titre
+$sousetat['titrehauteur']=10;
+$sousetat['titrefont']='helvetica';
+$sousetat['titreattribut']='B';
+$sousetat['titretaille']=10;
+$sousetat['titrebordure']=0;
+$sousetat['titrealign']='L';
+$sousetat['titrefond']=0;
+$sousetat['titrefondcouleur']="255-255-255";
+$sousetat['titretextecouleur']="0-0-0";
+// intervalle
+$sousetat['intervalle_debut']=0;
+$sousetat['intervalle_fin']=5;
+// entete
+$sousetat['entete_flag']=1;
+$sousetat['entete_fond']=1;
+$sousetat['entete_hauteur']=7;
+$sousetat['entete_fondcouleur']="255-255-255";
+$sousetat['entete_textecouleur']="0-0-0";
+// tableau
+$sousetat['tableau_bordure']=1;
+$sousetat['tableau_fontaille']=10;
+// bordure
+$sousetat['bordure_couleur']="0-0-0";
+// sous etat fond
+$sousetat['se_fond1']="243-246-246";
+$sousetat['se_fond2']="255-255-255";
+// cellule
+$sousetat['cellule_fond']=1;
+$sousetat['cellule_hauteur']=7;
+// total
+$sousetat['cellule_fond_total']=1;
+$sousetat['cellule_fontaille_total']=10;
+$sousetat['cellule_hauteur_total']=15;
+$sousetat['cellule_fondcouleur_total']="255-255-255";
+// moyenne
+$sousetat['cellule_fond_moyenne']=1;
+$sousetat['cellule_fontaille_moyenne']=10;
+$sousetat['cellule_hauteur_moyenne']=5;
+$sousetat['cellule_fondcouleur_moyenne']="212-219-220";
+// nombre d enregistrement
+$sousetat['cellule_fond_nbr']=1;
+$sousetat['cellule_fontaille_nbr']=10;
+$sousetat['cellule_hauteur_nbr']=7;
+$sousetat['cellule_fondcouleur_nbr']="255-255-255";
+?>
\ No newline at end of file

Added: branches/1.x/gen/inc/index.php
===================================================================
--- branches/1.x/gen/inc/index.php (rev 0)
+++ branches/1.x/gen/inc/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/inc/recherche.inc
===================================================================
--- branches/1.x/gen/inc/recherche.inc (rev 0)
+++ branches/1.x/gen/inc/recherche.inc 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,6 @@
+<?php
+//$Id$
+//gen openMairie le 15/10/2010 23:52
+$soustableau=array('om_collectivite','om_droit','om_etat','om_parametre','om_profil','om_utilisateur',);
+$sousnature=array('tab','tab','tab','tab','tab','tab');
+?>
\ No newline at end of file

Added: branches/1.x/gen/index.php
===================================================================
--- branches/1.x/gen/index.php (rev 0)
+++ branches/1.x/gen/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/adresse_postale.class.php
===================================================================
--- branches/1.x/gen/obj/adresse_postale.class.php (rev 0)
+++ branches/1.x/gen/obj/adresse_postale.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,251 @@
+<?php
+//$Id$
+//gen openMairie le 07/04/2011 14:26
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class adresse_postale_gen extends dbForm {
+ var $table="adresse_postale";
+ var $clePrimaire="adresse_postale";
+ var $typeCle="";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['gid'] = $val['gid'];
+ $this->valF['objectid'] = $val['objectid'];
+ $this->valF['angle'] = $val['angle'];
+ $this->valF['codcomm'] = $val['codcomm'];
+ $this->valF['id_refp'] = $val['id_refp'];
+ $this->valF['notes'] = $val['notes'];
+ $this->valF['num_voi'] = $val['num_voi'];
+ $this->valF['rivoli'] = $val['rivoli'];
+ $this->valF['symbol'] = $val['symbol'];
+ $this->valF['suf_voi'] = $val['suf_voi'];
+ $this->valF['date_supp'] = $val['date_supp'];
+ $this->valF['statut_adr'] = $val['statut_adr'];
+ $this->valF['num_arr'] = $val['num_arr'];
+ $this->valF['num_permis'] = $val['num_permis'];
+ if($val['date_arr']!=""){
+ $this->valF['date_arr'] = $this->dateDB($val['date_arr']);
+ }
+ $this->valF['lien'] = $val['lien'];
+ $this->valF['adresse'] = $val['adresse'];
+ $this->valF['complement'] = $val['complement'];
+ $this->valF['localisati'] = $val['localisati'];
+ $this->valF['typevoie'] = $val['typevoie'];
+ $this->valF['nomvoie'] = $val['nomvoie'];
+ $this->valF['id_parc'] = $val['id_parc'];
+ $this->valF['the_geom'] = $val['the_geom'];
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['objectid']==""){
+ $this->msg= $this->msg.$imgv._('objectid')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('adresse_postale','text');
+ $form->setType('objectid','text');
+ $form->setType('angle','text');
+ $form->setType('codcomm','text');
+ $form->setType('id_refp','text');
+ $form->setType('notes','text');
+ $form->setType('num_voi','text');
+ $form->setType('rivoli','text');
+ $form->setType('symbol','text');
+ $form->setType('suf_voi','text');
+ $form->setType('date_supp','text');
+ $form->setType('statut_adr','text');
+ $form->setType('num_arr','text');
+ $form->setType('num_permis','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_arr','date');
+ else
+ $form->setType('date_arr','date2');
+ $form->setType('lien','text');
+ $form->setType('adresse','text');
+ $form->setType('complement','text');
+ $form->setType('localisati','text');
+ $form->setType('typevoie','text');
+ $form->setType('nomvoie','text');
+ $form->setType('id_parc','text');
+ $form->setType('the_geom','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('adresse_postale','hiddenstatic');
+ $form->setType('objectid','text');
+ $form->setType('angle','text');
+ $form->setType('codcomm','text');
+ $form->setType('id_refp','text');
+ $form->setType('notes','text');
+ $form->setType('num_voi','text');
+ $form->setType('rivoli','text');
+ $form->setType('symbol','text');
+ $form->setType('suf_voi','text');
+ $form->setType('date_supp','text');
+ $form->setType('statut_adr','text');
+ $form->setType('num_arr','text');
+ $form->setType('num_permis','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_arr','date');
+ else
+ $form->setType('date_arr','date2');
+ $form->setType('lien','text');
+ $form->setType('adresse','text');
+ $form->setType('complement','text');
+ $form->setType('localisati','text');
+ $form->setType('typevoie','text');
+ $form->setType('nomvoie','text');
+ $form->setType('id_parc','text');
+ $form->setType('the_geom','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('gid','hiddenstatic');
+ $form->setType('objectid','hiddenstatic');
+ $form->setType('angle','hiddenstatic');
+ $form->setType('codcomm','hiddenstatic');
+ $form->setType('id_refp','hiddenstatic');
+ $form->setType('notes','hiddenstatic');
+ $form->setType('num_voi','hiddenstatic');
+ $form->setType('rivoli','hiddenstatic');
+ $form->setType('symbol','hiddenstatic');
+ $form->setType('suf_voi','hiddenstatic');
+ $form->setType('date_supp','hiddenstatic');
+ $form->setType('statut_adr','hiddenstatic');
+ $form->setType('num_arr','hiddenstatic');
+ $form->setType('num_permis','hiddenstatic');
+ $form->setType('date_arr','hiddenstatic');
+ $form->setType('lien','hiddenstatic');
+ $form->setType('adresse','hiddenstatic');
+ $form->setType('complement','hiddenstatic');
+ $form->setType('localisati','hiddenstatic');
+ $form->setType('typevoie','hiddenstatic');
+ $form->setType('nomvoie','hiddenstatic');
+ $form->setType('id_parc','hiddenstatic');
+ $form->setType('the_geom','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('gid','VerifNum(this)');
+ $form->setOnchange('objectid','VerifNum(this)');
+ $form->setOnchange('angle','VerifNum(this)');
+ $form->setOnchange('id_refp','VerifNum(this)');
+ $form->setOnchange('num_voi','VerifNum(this)');
+ $form->setOnchange('symbol','VerifNum(this)');
+ $form->setOnchange('date_arr','fdate(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('gid',4);
+ $form->setTaille('objectid',4);
+ $form->setTaille('angle',13);
+ $form->setTaille('codcomm',20);
+ $form->setTaille('id_refp',4);
+ $form->setTaille('notes',20);
+ $form->setTaille('num_voi',4);
+ $form->setTaille('rivoli',20);
+ $form->setTaille('symbol',4);
+ $form->setTaille('suf_voi',20);
+ $form->setTaille('date_supp',20);
+ $form->setTaille('statut_adr',20);
+ $form->setTaille('num_arr',20);
+ $form->setTaille('num_permis',20);
+ $form->setTaille('date_arr',12);
+ $form->setTaille('lien',33);
+ $form->setTaille('adresse',33);
+ $form->setTaille('complement',20);
+ $form->setTaille('localisati',20);
+ $form->setTaille('typevoie',20);
+ $form->setTaille('nomvoie',22);
+ $form->setTaille('id_parc',20);
+ $form->setTaille('the_geom',50);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('gid',4);
+ $form->setMax('objectid',4);
+ $form->setMax('angle',13);
+ $form->setMax('codcomm',20);
+ $form->setMax('id_refp',4);
+ $form->setMax('notes',20);
+ $form->setMax('num_voi',4);
+ $form->setMax('rivoli',20);
+ $form->setMax('symbol',4);
+ $form->setMax('suf_voi',20);
+ $form->setMax('date_supp',20);
+ $form->setMax('statut_adr',20);
+ $form->setMax('num_arr',20);
+ $form->setMax('num_permis',20);
+ $form->setMax('date_arr',12);
+ $form->setMax('lien',33);
+ $form->setMax('adresse',33);
+ $form->setMax('complement',20);
+ $form->setMax('localisati',20);
+ $form->setMax('typevoie',20);
+ $form->setMax('nomvoie',22);
+ $form->setMax('id_parc',20);
+ $form->setMax('the_geom',50);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('gid',_('gid'));
+ $form->setLib('objectid',_('objectid'));
+ $form->setLib('angle',_('angle'));
+ $form->setLib('codcomm',_('codcomm'));
+ $form->setLib('id_refp',_('id_refp'));
+ $form->setLib('notes',_('notes'));
+ $form->setLib('num_voi',_('num_voi'));
+ $form->setLib('rivoli',_('rivoli'));
+ $form->setLib('symbol',_('symbol'));
+ $form->setLib('suf_voi',_('suf_voi'));
+ $form->setLib('date_supp',_('date_supp'));
+ $form->setLib('statut_adr',_('statut_adr'));
+ $form->setLib('num_arr',_('num_arr'));
+ $form->setLib('num_permis',_('num_permis'));
+ $form->setLib('date_arr',_('date_arr'));
+ $form->setLib('lien',_('lien'));
+ $form->setLib('adresse',_('adresse'));
+ $form->setLib('complement',_('complement'));
+ $form->setLib('localisati',_('localisati'));
+ $form->setLib('typevoie',_('typevoie'));
+ $form->setLib('nomvoie',_('nomvoie'));
+ $form->setLib('id_parc',_('id_parc'));
+ $form->setLib('the_geom',_('the_geom'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/courrier.class.php
===================================================================
--- branches/1.x/gen/obj/courrier.class.php (rev 0)
+++ branches/1.x/gen/obj/courrier.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,173 @@
+<?php
+//$Id$
+//gen openMairie le 01/06/2011 11:01
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class courrier_gen extends dbForm {
+ var $table="courrier";
+ var $clePrimaire="courrier";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['courrier'] = $val['courrier'];
+ $this->valF['type_courrier'] = $val['type_courrier'];
+ $this->valF['zone_texte'] = $val['zone_texte'];
+ $this->valF['etablissement'] = $val['etablissement'];
+ if($val['date_courrier']!=""){
+ $this->valF['date_courrier'] = $this->dateDB($val['date_courrier']);
+ }
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['type_courrier']==""){
+ $this->msg= $this->msg.$imgv._('type_courrier')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('courrier','hidden');// cle automatique
+ $form->setType('type_courrier','text');
+ $form->setType('zone_texte','textarea');
+ if($this->retourformulaire=='etablissement')
+ $form->setType('etablissement','hiddenstatic');
+ else
+ $form->setType('etablissement','select');
+ if($this->retourformulaire=='')
+ $form->setType('date_courrier','date');
+ else
+ $form->setType('date_courrier','date2');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('courrier','hiddenstatic');
+ $form->setType('type_courrier','text');
+ $form->setType('zone_texte','textarea');
+ if($this->retourformulaire=='etablissement')
+ $form->setType('etablissement','hiddenstatic');
+ else
+ $form->setType('etablissement','select');
+ if($this->retourformulaire=='')
+ $form->setType('date_courrier','date');
+ else
+ $form->setType('date_courrier','date2');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('courrier','hiddenstatic');
+ $form->setType('type_courrier','hiddenstatic');
+ $form->setType('zone_texte','hiddenstatic');
+ $form->setType('etablissement','hiddenstatic');
+ $form->setType('date_courrier','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('courrier','VerifNum(this)');
+ $form->setOnchange('etablissement','VerifNum(this)');
+ $form->setOnchange('date_courrier','fdate(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('courrier',4);
+ $form->setTaille('type_courrier',20);
+ $form->setTaille('zone_texte',80);
+ $form->setTaille('etablissement',4);
+ $form->setTaille('date_courrier',12);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('courrier',4);
+ $form->setMax('type_courrier',20);
+ $form->setMax('zone_texte',6);
+ $form->setMax('etablissement',4);
+ $form->setMax('date_courrier',12);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('courrier',_('courrier'));
+ $form->setLib('type_courrier',_('type_courrier'));
+ $form->setLib('zone_texte',_('zone_texte'));
+ $form->setLib('etablissement',_('etablissement'));
+ $form->setLib('date_courrier',_('date_courrier'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // etablissement
+ $contenu=array();
+ $res = $db->query($sql_etablissement);
+ if (database::isError($res))
+ die($res->getMessage().$sql_etablissement);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_etablissement." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('etablissement');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('etablissement',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='etablissement')
+ $form->setVal('etablissement', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/demande_licence.class.php
===================================================================
--- branches/1.x/gen/obj/demande_licence.class.php (rev 0)
+++ branches/1.x/gen/obj/demande_licence.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,337 @@
+<?php
+//$Id$
+//gen openMairie le 01/06/2011 14:31
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class demande_licence_gen extends dbForm {
+ var $table="demande_licence";
+ var $clePrimaire="demande_licence";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['demande_licence'] = $val['demande_licence'];
+ $this->valF['type_licence'] = $val['type_licence'];
+ $this->valF['type_demande'] = $val['type_demande'];
+ $this->valF['terme'] = $val['terme'];
+ if($val['date_debut_validite']!=""){
+ $this->valF['date_debut_validite'] = $this->dateDB($val['date_debut_validite']);
+ }
+ if($val['date_fin_validite']!=""){
+ $this->valF['date_fin_validite'] = $this->dateDB($val['date_fin_validite']);
+ }
+ $this->valF['etablissement'] = $val['etablissement'];
+ $this->valF['heure_debut'] = $val['heure_debut'];
+ $this->valF['heure_fin'] = $val['heure_fin'];
+ $this->valF['occasion'] = $val['occasion'];
+ $this->valF['particularite'] = $val['particularite'];
+ if($val['date_ancienne_demande']!=""){
+ $this->valF['date_ancienne_demande'] = $this->dateDB($val['date_ancienne_demande']);
+ }
+ if($val['date_demande_licence']!=""){
+ $this->valF['date_demande_licence'] = $this->dateDB($val['date_demande_licence']);
+ }
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['type_licence']==""){
+ $this->msg= $this->msg.$imgv._('type_licence')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('demande_licence','hidden');// cle automatique
+ if($this->retourformulaire=='type_licence')
+ $form->setType('type_licence','hiddenstatic');
+ else
+ $form->setType('type_licence','select');
+ if($this->retourformulaire=='type_demande')
+ $form->setType('type_demande','hiddenstatic');
+ else
+ $form->setType('type_demande','select');
+ if($this->retourformulaire=='terme')
+ $form->setType('terme','hiddenstatic');
+ else
+ $form->setType('terme','select');
+ if($this->retourformulaire=='')
+ $form->setType('date_debut_validite','date');
+ else
+ $form->setType('date_debut_validite','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_fin_validite','date');
+ else
+ $form->setType('date_fin_validite','date2');
+ if($this->retourformulaire=='etablissement')
+ $form->setType('etablissement','hiddenstatic');
+ else
+ $form->setType('etablissement','select');
+ $form->setType('heure_debut','text');
+ $form->setType('heure_fin','text');
+ $form->setType('occasion','text');
+ $form->setType('particularite','textarea');
+ if($this->retourformulaire=='')
+ $form->setType('date_ancienne_demande','date');
+ else
+ $form->setType('date_ancienne_demande','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_demande_licence','date');
+ else
+ $form->setType('date_demande_licence','date2');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('demande_licence','hiddenstatic');
+ if($this->retourformulaire=='type_licence')
+ $form->setType('type_licence','hiddenstatic');
+ else
+ $form->setType('type_licence','select');
+ if($this->retourformulaire=='type_demande')
+ $form->setType('type_demande','hiddenstatic');
+ else
+ $form->setType('type_demande','select');
+ if($this->retourformulaire=='terme')
+ $form->setType('terme','hiddenstatic');
+ else
+ $form->setType('terme','select');
+ if($this->retourformulaire=='')
+ $form->setType('date_debut_validite','date');
+ else
+ $form->setType('date_debut_validite','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_fin_validite','date');
+ else
+ $form->setType('date_fin_validite','date2');
+ if($this->retourformulaire=='etablissement')
+ $form->setType('etablissement','hiddenstatic');
+ else
+ $form->setType('etablissement','select');
+ $form->setType('heure_debut','text');
+ $form->setType('heure_fin','text');
+ $form->setType('occasion','text');
+ $form->setType('particularite','textarea');
+ if($this->retourformulaire=='')
+ $form->setType('date_ancienne_demande','date');
+ else
+ $form->setType('date_ancienne_demande','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_demande_licence','date');
+ else
+ $form->setType('date_demande_licence','date2');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('demande_licence','hiddenstatic');
+ $form->setType('type_licence','hiddenstatic');
+ $form->setType('type_demande','hiddenstatic');
+ $form->setType('terme','hiddenstatic');
+ $form->setType('date_debut_validite','hiddenstatic');
+ $form->setType('date_fin_validite','hiddenstatic');
+ $form->setType('etablissement','hiddenstatic');
+ $form->setType('heure_debut','hiddenstatic');
+ $form->setType('heure_fin','hiddenstatic');
+ $form->setType('occasion','hiddenstatic');
+ $form->setType('particularite','hiddenstatic');
+ $form->setType('date_ancienne_demande','hiddenstatic');
+ $form->setType('date_demande_licence','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('demande_licence','VerifNum(this)');
+ $form->setOnchange('type_licence','VerifNum(this)');
+ $form->setOnchange('type_demande','VerifNum(this)');
+ $form->setOnchange('terme','VerifNum(this)');
+ $form->setOnchange('date_debut_validite','fdate(this)');
+ $form->setOnchange('date_fin_validite','fdate(this)');
+ $form->setOnchange('etablissement','VerifNum(this)');
+ $form->setOnchange('date_ancienne_demande','fdate(this)');
+ $form->setOnchange('date_demande_licence','fdate(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('demande_licence',4);
+ $form->setTaille('type_licence',4);
+ $form->setTaille('type_demande',4);
+ $form->setTaille('terme',4);
+ $form->setTaille('date_debut_validite',12);
+ $form->setTaille('date_fin_validite',12);
+ $form->setTaille('etablissement',4);
+ $form->setTaille('heure_debut',8);
+ $form->setTaille('heure_fin',8);
+ $form->setTaille('occasion',20);
+ $form->setTaille('particularite',80);
+ $form->setTaille('date_ancienne_demande',12);
+ $form->setTaille('date_demande_licence',12);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('demande_licence',4);
+ $form->setMax('type_licence',4);
+ $form->setMax('type_demande',4);
+ $form->setMax('terme',4);
+ $form->setMax('date_debut_validite',12);
+ $form->setMax('date_fin_validite',12);
+ $form->setMax('etablissement',4);
+ $form->setMax('heure_debut',8);
+ $form->setMax('heure_fin',8);
+ $form->setMax('occasion',20);
+ $form->setMax('particularite',6);
+ $form->setMax('date_ancienne_demande',12);
+ $form->setMax('date_demande_licence',12);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('demande_licence',_('demande_licence'));
+ $form->setLib('type_licence',_('type_licence'));
+ $form->setLib('type_demande',_('type_demande'));
+ $form->setLib('terme',_('terme'));
+ $form->setLib('date_debut_validite',_('date_debut_validite'));
+ $form->setLib('date_fin_validite',_('date_fin_validite'));
+ $form->setLib('etablissement',_('etablissement'));
+ $form->setLib('heure_debut',_('heure_debut'));
+ $form->setLib('heure_fin',_('heure_fin'));
+ $form->setLib('occasion',_('occasion'));
+ $form->setLib('particularite',_('particularite'));
+ $form->setLib('date_ancienne_demande',_('date_ancienne_demande'));
+ $form->setLib('date_demande_licence',_('date_demande_licence'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // type_licence
+ $contenu=array();
+ $res = $db->query($sql_type_licence);
+ if (database::isError($res))
+ die($res->getMessage().$sql_type_licence);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_type_licence." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('type_licence');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('type_licence',$contenu);
+ }// fin error db
+ // type_demande
+ $contenu=array();
+ $res = $db->query($sql_type_demande);
+ if (database::isError($res))
+ die($res->getMessage().$sql_type_demande);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_type_demande." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('type_demande');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('type_demande',$contenu);
+ }// fin error db
+ // terme
+ $contenu=array();
+ $res = $db->query($sql_terme);
+ if (database::isError($res))
+ die($res->getMessage().$sql_terme);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_terme." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('terme');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('terme',$contenu);
+ }// fin error db
+ // etablissement
+ $contenu=array();
+ $res = $db->query($sql_etablissement);
+ if (database::isError($res))
+ die($res->getMessage().$sql_etablissement);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_etablissement." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('etablissement');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('etablissement',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='type_licence')
+ $form->setVal('type_licence', $idxformulaire);
+ if($retourformulaire =='type_demande')
+ $form->setVal('type_demande', $idxformulaire);
+ if($retourformulaire =='terme')
+ $form->setVal('terme', $idxformulaire);
+ if($retourformulaire =='etablissement')
+ $form->setVal('etablissement', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/dossier.class.php
===================================================================
--- branches/1.x/gen/obj/dossier.class.php (rev 0)
+++ branches/1.x/gen/obj/dossier.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,180 @@
+<?php
+//$Id$
+//gen openMairie le 18/05/2011 12:19
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class dossier_gen extends dbForm {
+ var $table="dossier";
+ var $clePrimaire="dossier";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['dossier'] = $val['dossier'];
+ if($val['date_piece']!=""){
+ $this->valF['date_piece'] = $this->dateDB($val['date_piece']);
+ }
+ $this->valF['nom'] = $val['nom'];
+ $this->valF['observation'] = $val['observation'];
+ $this->valF['etablissement'] = $val['etablissement'];
+ $this->valF['ancien_nom'] = $val['ancien_nom'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['date_piece']==""){
+ $this->msg= $this->msg.$imgv._('date_piece')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('dossier','hidden');// cle automatique
+ if($this->retourformulaire=='')
+ $form->setType('date_piece','date');
+ else
+ $form->setType('date_piece','date2');
+ $form->setType('nom','text');
+ $form->setType('observation','text');
+ if($this->retourformulaire=='etablissement')
+ $form->setType('etablissement','hiddenstatic');
+ else
+ $form->setType('etablissement','select');
+ $form->setType('ancien_nom','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('dossier','hiddenstatic');
+ if($this->retourformulaire=='')
+ $form->setType('date_piece','date');
+ else
+ $form->setType('date_piece','date2');
+ $form->setType('nom','text');
+ $form->setType('observation','text');
+ if($this->retourformulaire=='etablissement')
+ $form->setType('etablissement','hiddenstatic');
+ else
+ $form->setType('etablissement','select');
+ $form->setType('ancien_nom','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('dossier','hiddenstatic');
+ $form->setType('date_piece','hiddenstatic');
+ $form->setType('nom','hiddenstatic');
+ $form->setType('observation','hiddenstatic');
+ $form->setType('etablissement','hiddenstatic');
+ $form->setType('ancien_nom','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('dossier','VerifNum(this)');
+ $form->setOnchange('date_piece','fdate(this)');
+ $form->setOnchange('etablissement','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('dossier',4);
+ $form->setTaille('date_piece',12);
+ $form->setTaille('nom',20);
+ $form->setTaille('observation',20);
+ $form->setTaille('etablissement',4);
+ $form->setTaille('ancien_nom',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('dossier',4);
+ $form->setMax('date_piece',12);
+ $form->setMax('nom',20);
+ $form->setMax('observation',20);
+ $form->setMax('etablissement',4);
+ $form->setMax('ancien_nom',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('dossier',_('dossier'));
+ $form->setLib('date_piece',_('date_piece'));
+ $form->setLib('nom',_('nom'));
+ $form->setLib('observation',_('observation'));
+ $form->setLib('etablissement',_('etablissement'));
+ $form->setLib('ancien_nom',_('ancien_nom'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // etablissement
+ $contenu=array();
+ $res = $db->query($sql_etablissement);
+ if (database::isError($res))
+ die($res->getMessage().$sql_etablissement);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_etablissement." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('etablissement');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('etablissement',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='etablissement')
+ $form->setVal('etablissement', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/etablissement.class.php
===================================================================
--- branches/1.x/gen/obj/etablissement.class.php (rev 0)
+++ branches/1.x/gen/obj/etablissement.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,623 @@
+<?php
+//$Id$
+//gen openMairie le 13/03/2013 08:43
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class etablissement_gen extends dbForm {
+ var $table="etablissement";
+ var $clePrimaire="etablissement";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['etablissement'] = $val['etablissement'];
+ $this->valF['raison_sociale'] = $val['raison_sociale'];
+ $this->valF['enseigne'] = $val['enseigne'];
+ $this->valF['no_siret'] = $val['no_siret'];
+ $this->valF['forme_juridique'] = $val['forme_juridique'];
+ $this->valF['numero_voie'] = $val['numero_voie'];
+ $this->valF['complement'] = $val['complement'];
+ $this->valF['voie'] = $val['voie'];
+ $this->valF['libelle_voie'] = $val['libelle_voie'];
+ $this->valF['complement_voie'] = $val['complement_voie'];
+ $this->valF['civilite_exploitant'] = $val['civilite_exploitant'];
+ $this->valF['nom_exploitant'] = $val['nom_exploitant'];
+ $this->valF['nom_marital_exploitant'] = $val['nom_marital_exploitant'];
+ if($val['date_naissance_exploitant']!=""){
+ $this->valF['date_naissance_exploitant'] = $this->dateDB($val['date_naissance_exploitant']);
+ }
+ $this->valF['ville_naissance_exploitant'] = $val['ville_naissance_exploitant'];
+ $this->valF['cp_naissance_exploitant'] = $val['cp_naissance_exploitant'];
+ $this->valF['prenom_exploitant'] = $val['prenom_exploitant'];
+ $this->valF['adresse1_exploitant'] = $val['adresse1_exploitant'];
+ $this->valF['adresse2_exploitant'] = $val['adresse2_exploitant'];
+ $this->valF['cp_exploitant'] = $val['cp_exploitant'];
+ $this->valF['ville_exploitant'] = $val['ville_exploitant'];
+ $this->valF['exploitant'] = $val['exploitant'];
+ $this->valF['nationalite_exploitant'] = $val['nationalite_exploitant'];
+ $this->valF['civilite_proprietaire'] = $val['civilite_proprietaire'];
+ $this->valF['nom_proprietaire'] = $val['nom_proprietaire'];
+ $this->valF['prenom_proprietaire'] = $val['prenom_proprietaire'];
+ $this->valF['adresse1_proprietaire'] = $val['adresse1_proprietaire'];
+ $this->valF['adresse2_proprietaire'] = $val['adresse2_proprietaire'];
+ $this->valF['cp_proprietaire'] = $val['cp_proprietaire'];
+ $this->valF['ville_proprietaire'] = $val['ville_proprietaire'];
+ $this->valF['permis_exploitation'] = $val['permis_exploitation'];
+ if($val['date_permis_exploitation']!=""){
+ $this->valF['date_permis_exploitation'] = $this->dateDB($val['date_permis_exploitation']);
+ }
+ if($val['date_liquidation']!=""){
+ $this->valF['date_liquidation'] = $this->dateDB($val['date_liquidation']);
+ }
+ if($val['date_fermeture']!=""){
+ $this->valF['date_fermeture'] = $this->dateDB($val['date_fermeture']);
+ }
+ $this->valF['nature'] = $val['nature'];
+ $this->valF['geom'] = $val['geom'];
+ $this->valF['cp_etablissement'] = $val['cp_etablissement'];
+ $this->valF['ville_etablissement'] = $val['ville_etablissement'];
+ $this->valF['particularite_exploitant'] = $val['particularite_exploitant'];
+ $this->valF['ancien_proprietaire'] = $val['ancien_proprietaire'];
+ $this->valF['permis_exploitation_nuit'] = $val['permis_exploitation_nuit'];
+ if($val['date_permis_exploitation_nuit']!=""){
+ $this->valF['date_permis_exploitation_nuit'] = $this->dateDB($val['date_permis_exploitation_nuit']);
+ }
+ $this->valF['profession_proprietaire'] = $val['profession_proprietaire'];
+ $this->valF['civilite_co_exploitant'] = $val['civilite_co_exploitant'];
+ $this->valF['nom_co_exploitant'] = $val['nom_co_exploitant'];
+ $this->valF['nom_marital_co_exploitant'] = $val['nom_marital_co_exploitant'];
+ $this->valF['prenom_co_exploitant'] = $val['prenom_co_exploitant'];
+ if($val['date_naissance_co_exploitant']!=""){
+ $this->valF['date_naissance_co_exploitant'] = $this->dateDB($val['date_naissance_co_exploitant']);
+ }
+ $this->valF['ville_naissance_co_exploitant'] = $val['ville_naissance_co_exploitant'];
+ $this->valF['cp_naissance_co_exploitant'] = $val['cp_naissance_co_exploitant'];
+ $this->valF['adresse1_co_exploitant'] = $val['adresse1_co_exploitant'];
+ $this->valF['adresse2_co_exploitant'] = $val['adresse2_co_exploitant'];
+ $this->valF['cp_co_exploitant'] = $val['cp_co_exploitant'];
+ $this->valF['ville_co_exploitant'] = $val['ville_co_exploitant'];
+ $this->valF['nationalite_co_exploitant'] = $val['nationalite_co_exploitant'];
+ $this->valF['co_exploitant'] = $val['co_exploitant'];
+ $this->valF['particularite_co_exploitant'] = $val['particularite_co_exploitant'];
+ $this->valF['nom_ancien_exploitant'] = $val['nom_ancien_exploitant'];
+ $this->valF['prenom_ancien_exploitant'] = $val['prenom_ancien_exploitant'];
+ $this->valF['ancien_exploitant'] = $val['ancien_exploitant'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+ /**
+ * Methode verifier
+ */
+ function verifier($val = array(), &$db = NULL, $DEBUG = false) {
+ // On appelle la methode de la classe parent
+ parent::verifier($val, $db, $DEBUG);
+ // On verifie si le champ n'est pas vide
+ if ($this->valF['raison_sociale'] == "") {
+ $this->correct = false;
+ $this->addToMessage(_("Le champ")." "._("raison_sociale")." "._("est obligatoire"));
+ }
+ }
+
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('etablissement','hidden');// cle automatique
+ $form->setType('raison_sociale','text');
+ $form->setType('enseigne','text');
+ $form->setType('no_siret','text');
+ $form->setType('forme_juridique','text');
+ $form->setType('numero_voie','text');
+ $form->setType('complement','text');
+ $form->setType('voie','text');
+ $form->setType('libelle_voie','text');
+ $form->setType('complement_voie','text');
+ $form->setType('civilite_exploitant','text');
+ $form->setType('nom_exploitant','text');
+ $form->setType('nom_marital_exploitant','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_naissance_exploitant','date');
+ else
+ $form->setType('date_naissance_exploitant','date2');
+ $form->setType('ville_naissance_exploitant','text');
+ $form->setType('cp_naissance_exploitant','text');
+ $form->setType('prenom_exploitant','text');
+ $form->setType('adresse1_exploitant','text');
+ $form->setType('adresse2_exploitant','text');
+ $form->setType('cp_exploitant','text');
+ $form->setType('ville_exploitant','text');
+ if($this->retourformulaire=='exploitant')
+ $form->setType('exploitant','hiddenstatic');
+ else
+ $form->setType('exploitant','select');
+ $form->setType('nationalite_exploitant','text');
+ $form->setType('civilite_proprietaire','text');
+ $form->setType('nom_proprietaire','text');
+ $form->setType('prenom_proprietaire','text');
+ $form->setType('adresse1_proprietaire','text');
+ $form->setType('adresse2_proprietaire','text');
+ $form->setType('cp_proprietaire','text');
+ $form->setType('ville_proprietaire','text');
+ $form->setType('permis_exploitation','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_permis_exploitation','date');
+ else
+ $form->setType('date_permis_exploitation','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_liquidation','date');
+ else
+ $form->setType('date_liquidation','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_fermeture','date');
+ else
+ $form->setType('date_fermeture','date2');
+ $form->setType('nature','text');
+ $form->setType('geom','text');
+ $form->setType('cp_etablissement','text');
+ $form->setType('ville_etablissement','text');
+ $form->setType('particularite_exploitant','textarea');
+ $form->setType('ancien_proprietaire','textarea');
+ $form->setType('permis_exploitation_nuit','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_permis_exploitation_nuit','date');
+ else
+ $form->setType('date_permis_exploitation_nuit','date2');
+ $form->setType('profession_proprietaire','text');
+ $form->setType('civilite_co_exploitant','text');
+ $form->setType('nom_co_exploitant','text');
+ $form->setType('nom_marital_co_exploitant','text');
+ $form->setType('prenom_co_exploitant','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_naissance_co_exploitant','date');
+ else
+ $form->setType('date_naissance_co_exploitant','date2');
+ $form->setType('ville_naissance_co_exploitant','text');
+ $form->setType('cp_naissance_co_exploitant','text');
+ $form->setType('adresse1_co_exploitant','text');
+ $form->setType('adresse2_co_exploitant','text');
+ $form->setType('cp_co_exploitant','text');
+ $form->setType('ville_co_exploitant','text');
+ $form->setType('nationalite_co_exploitant','text');
+ $form->setType('co_exploitant','text');
+ $form->setType('particularite_co_exploitant','textarea');
+ $form->setType('nom_ancien_exploitant','text');
+ $form->setType('prenom_ancien_exploitant','text');
+ $form->setType('ancien_exploitant','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('etablissement','hiddenstatic');
+ $form->setType('raison_sociale','text');
+ $form->setType('enseigne','text');
+ $form->setType('no_siret','text');
+ $form->setType('forme_juridique','text');
+ $form->setType('numero_voie','text');
+ $form->setType('complement','text');
+ $form->setType('voie','text');
+ $form->setType('libelle_voie','text');
+ $form->setType('complement_voie','text');
+ $form->setType('civilite_exploitant','text');
+ $form->setType('nom_exploitant','text');
+ $form->setType('nom_marital_exploitant','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_naissance_exploitant','date');
+ else
+ $form->setType('date_naissance_exploitant','date2');
+ $form->setType('ville_naissance_exploitant','text');
+ $form->setType('cp_naissance_exploitant','text');
+ $form->setType('prenom_exploitant','text');
+ $form->setType('adresse1_exploitant','text');
+ $form->setType('adresse2_exploitant','text');
+ $form->setType('cp_exploitant','text');
+ $form->setType('ville_exploitant','text');
+ if($this->retourformulaire=='exploitant')
+ $form->setType('exploitant','hiddenstatic');
+ else
+ $form->setType('exploitant','select');
+ $form->setType('nationalite_exploitant','text');
+ $form->setType('civilite_proprietaire','text');
+ $form->setType('nom_proprietaire','text');
+ $form->setType('prenom_proprietaire','text');
+ $form->setType('adresse1_proprietaire','text');
+ $form->setType('adresse2_proprietaire','text');
+ $form->setType('cp_proprietaire','text');
+ $form->setType('ville_proprietaire','text');
+ $form->setType('permis_exploitation','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_permis_exploitation','date');
+ else
+ $form->setType('date_permis_exploitation','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_liquidation','date');
+ else
+ $form->setType('date_liquidation','date2');
+ if($this->retourformulaire=='')
+ $form->setType('date_fermeture','date');
+ else
+ $form->setType('date_fermeture','date2');
+ $form->setType('nature','text');
+ $form->setType('geom','text');
+ $form->setType('cp_etablissement','text');
+ $form->setType('ville_etablissement','text');
+ $form->setType('particularite_exploitant','textarea');
+ $form->setType('ancien_proprietaire','textarea');
+ $form->setType('permis_exploitation_nuit','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_permis_exploitation_nuit','date');
+ else
+ $form->setType('date_permis_exploitation_nuit','date2');
+ $form->setType('profession_proprietaire','text');
+ $form->setType('civilite_co_exploitant','text');
+ $form->setType('nom_co_exploitant','text');
+ $form->setType('nom_marital_co_exploitant','text');
+ $form->setType('prenom_co_exploitant','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_naissance_co_exploitant','date');
+ else
+ $form->setType('date_naissance_co_exploitant','date2');
+ $form->setType('ville_naissance_co_exploitant','text');
+ $form->setType('cp_naissance_co_exploitant','text');
+ $form->setType('adresse1_co_exploitant','text');
+ $form->setType('adresse2_co_exploitant','text');
+ $form->setType('cp_co_exploitant','text');
+ $form->setType('ville_co_exploitant','text');
+ $form->setType('nationalite_co_exploitant','text');
+ $form->setType('co_exploitant','text');
+ $form->setType('particularite_co_exploitant','textarea');
+ $form->setType('nom_ancien_exploitant','text');
+ $form->setType('prenom_ancien_exploitant','text');
+ $form->setType('ancien_exploitant','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('etablissement','hiddenstatic');
+ $form->setType('raison_sociale','hiddenstatic');
+ $form->setType('enseigne','hiddenstatic');
+ $form->setType('no_siret','hiddenstatic');
+ $form->setType('forme_juridique','hiddenstatic');
+ $form->setType('numero_voie','hiddenstatic');
+ $form->setType('complement','hiddenstatic');
+ $form->setType('voie','hiddenstatic');
+ $form->setType('libelle_voie','hiddenstatic');
+ $form->setType('complement_voie','hiddenstatic');
+ $form->setType('civilite_exploitant','hiddenstatic');
+ $form->setType('nom_exploitant','hiddenstatic');
+ $form->setType('nom_marital_exploitant','hiddenstatic');
+ $form->setType('date_naissance_exploitant','hiddenstatic');
+ $form->setType('ville_naissance_exploitant','hiddenstatic');
+ $form->setType('cp_naissance_exploitant','hiddenstatic');
+ $form->setType('prenom_exploitant','hiddenstatic');
+ $form->setType('adresse1_exploitant','hiddenstatic');
+ $form->setType('adresse2_exploitant','hiddenstatic');
+ $form->setType('cp_exploitant','hiddenstatic');
+ $form->setType('ville_exploitant','hiddenstatic');
+ $form->setType('exploitant','hiddenstatic');
+ $form->setType('nationalite_exploitant','hiddenstatic');
+ $form->setType('civilite_proprietaire','hiddenstatic');
+ $form->setType('nom_proprietaire','hiddenstatic');
+ $form->setType('prenom_proprietaire','hiddenstatic');
+ $form->setType('adresse1_proprietaire','hiddenstatic');
+ $form->setType('adresse2_proprietaire','hiddenstatic');
+ $form->setType('cp_proprietaire','hiddenstatic');
+ $form->setType('ville_proprietaire','hiddenstatic');
+ $form->setType('permis_exploitation','hiddenstatic');
+ $form->setType('date_permis_exploitation','hiddenstatic');
+ $form->setType('date_liquidation','hiddenstatic');
+ $form->setType('date_fermeture','hiddenstatic');
+ $form->setType('nature','hiddenstatic');
+ $form->setType('geom','hiddenstatic');
+ $form->setType('cp_etablissement','hiddenstatic');
+ $form->setType('ville_etablissement','hiddenstatic');
+ $form->setType('particularite_exploitant','hiddenstatic');
+ $form->setType('ancien_proprietaire','hiddenstatic');
+ $form->setType('permis_exploitation_nuit','hiddenstatic');
+ $form->setType('date_permis_exploitation_nuit','hiddenstatic');
+ $form->setType('profession_proprietaire','hiddenstatic');
+ $form->setType('civilite_co_exploitant','hiddenstatic');
+ $form->setType('nom_co_exploitant','hiddenstatic');
+ $form->setType('nom_marital_co_exploitant','hiddenstatic');
+ $form->setType('prenom_co_exploitant','hiddenstatic');
+ $form->setType('date_naissance_co_exploitant','hiddenstatic');
+ $form->setType('ville_naissance_co_exploitant','hiddenstatic');
+ $form->setType('cp_naissance_co_exploitant','hiddenstatic');
+ $form->setType('adresse1_co_exploitant','hiddenstatic');
+ $form->setType('adresse2_co_exploitant','hiddenstatic');
+ $form->setType('cp_co_exploitant','hiddenstatic');
+ $form->setType('ville_co_exploitant','hiddenstatic');
+ $form->setType('nationalite_co_exploitant','hiddenstatic');
+ $form->setType('co_exploitant','hiddenstatic');
+ $form->setType('particularite_co_exploitant','hiddenstatic');
+ $form->setType('nom_ancien_exploitant','hiddenstatic');
+ $form->setType('prenom_ancien_exploitant','hiddenstatic');
+ $form->setType('ancien_exploitant','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('etablissement','VerifNum(this)');
+ $form->setOnchange('numero_voie','VerifNum(this)');
+ $form->setOnchange('date_naissance_exploitant','fdate(this)');
+ $form->setOnchange('exploitant','VerifNum(this)');
+ $form->setOnchange('date_permis_exploitation','fdate(this)');
+ $form->setOnchange('date_liquidation','fdate(this)');
+ $form->setOnchange('date_fermeture','fdate(this)');
+ $form->setOnchange('date_permis_exploitation_nuit','fdate(this)');
+ $form->setOnchange('date_naissance_co_exploitant','fdate(this)');
+ $form->setOnchange('co_exploitant','VerifNum(this)');
+ $form->setOnchange('ancien_exploitant','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('etablissement',4);
+ $form->setTaille('raison_sociale',15);
+ $form->setTaille('enseigne',15);
+ $form->setTaille('no_siret',20);
+ $form->setTaille('forme_juridique',20);
+ $form->setTaille('numero_voie',4);
+ $form->setTaille('complement',20);
+ $form->setTaille('voie',20);
+ $form->setTaille('libelle_voie',20);
+ $form->setTaille('complement_voie',20);
+ $form->setTaille('civilite_exploitant',20);
+ $form->setTaille('nom_exploitant',20);
+ $form->setTaille('nom_marital_exploitant',20);
+ $form->setTaille('date_naissance_exploitant',12);
+ $form->setTaille('ville_naissance_exploitant',20);
+ $form->setTaille('cp_naissance_exploitant',20);
+ $form->setTaille('prenom_exploitant',20);
+ $form->setTaille('adresse1_exploitant',20);
+ $form->setTaille('adresse2_exploitant',20);
+ $form->setTaille('cp_exploitant',20);
+ $form->setTaille('ville_exploitant',20);
+ $form->setTaille('exploitant',4);
+ $form->setTaille('nationalite_exploitant',20);
+ $form->setTaille('civilite_proprietaire',20);
+ $form->setTaille('nom_proprietaire',20);
+ $form->setTaille('prenom_proprietaire',20);
+ $form->setTaille('adresse1_proprietaire',20);
+ $form->setTaille('adresse2_proprietaire',20);
+ $form->setTaille('cp_proprietaire',20);
+ $form->setTaille('ville_proprietaire',20);
+ $form->setTaille('permis_exploitation',20);
+ $form->setTaille('date_permis_exploitation',12);
+ $form->setTaille('date_liquidation',12);
+ $form->setTaille('date_fermeture',12);
+ $form->setTaille('nature',10);
+ $form->setTaille('geom',20);
+ $form->setTaille('cp_etablissement',20);
+ $form->setTaille('ville_etablissement',20);
+ $form->setTaille('particularite_exploitant',80);
+ $form->setTaille('ancien_proprietaire',80);
+ $form->setTaille('permis_exploitation_nuit',20);
+ $form->setTaille('date_permis_exploitation_nuit',12);
+ $form->setTaille('profession_proprietaire',20);
+ $form->setTaille('civilite_co_exploitant',20);
+ $form->setTaille('nom_co_exploitant',20);
+ $form->setTaille('nom_marital_co_exploitant',20);
+ $form->setTaille('prenom_co_exploitant',20);
+ $form->setTaille('date_naissance_co_exploitant',12);
+ $form->setTaille('ville_naissance_co_exploitant',20);
+ $form->setTaille('cp_naissance_co_exploitant',20);
+ $form->setTaille('adresse1_co_exploitant',20);
+ $form->setTaille('adresse2_co_exploitant',20);
+ $form->setTaille('cp_co_exploitant',20);
+ $form->setTaille('ville_co_exploitant',20);
+ $form->setTaille('nationalite_co_exploitant',20);
+ $form->setTaille('co_exploitant',4);
+ $form->setTaille('particularite_co_exploitant',80);
+ $form->setTaille('nom_ancien_exploitant',20);
+ $form->setTaille('prenom_ancien_exploitant',20);
+ $form->setTaille('ancien_exploitant',4);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('etablissement',4);
+ $form->setMax('raison_sociale',15);
+ $form->setMax('enseigne',15);
+ $form->setMax('no_siret',20);
+ $form->setMax('forme_juridique',20);
+ $form->setMax('numero_voie',4);
+ $form->setMax('complement',20);
+ $form->setMax('voie',20);
+ $form->setMax('libelle_voie',20);
+ $form->setMax('complement_voie',20);
+ $form->setMax('civilite_exploitant',20);
+ $form->setMax('nom_exploitant',20);
+ $form->setMax('nom_marital_exploitant',20);
+ $form->setMax('date_naissance_exploitant',12);
+ $form->setMax('ville_naissance_exploitant',20);
+ $form->setMax('cp_naissance_exploitant',20);
+ $form->setMax('prenom_exploitant',20);
+ $form->setMax('adresse1_exploitant',20);
+ $form->setMax('adresse2_exploitant',20);
+ $form->setMax('cp_exploitant',20);
+ $form->setMax('ville_exploitant',20);
+ $form->setMax('exploitant',4);
+ $form->setMax('nationalite_exploitant',20);
+ $form->setMax('civilite_proprietaire',20);
+ $form->setMax('nom_proprietaire',20);
+ $form->setMax('prenom_proprietaire',20);
+ $form->setMax('adresse1_proprietaire',20);
+ $form->setMax('adresse2_proprietaire',20);
+ $form->setMax('cp_proprietaire',20);
+ $form->setMax('ville_proprietaire',20);
+ $form->setMax('permis_exploitation',20);
+ $form->setMax('date_permis_exploitation',12);
+ $form->setMax('date_liquidation',12);
+ $form->setMax('date_fermeture',12);
+ $form->setMax('nature',10);
+ $form->setMax('geom',20);
+ $form->setMax('cp_etablissement',20);
+ $form->setMax('ville_etablissement',20);
+ $form->setMax('particularite_exploitant',6);
+ $form->setMax('ancien_proprietaire',6);
+ $form->setMax('permis_exploitation_nuit',20);
+ $form->setMax('date_permis_exploitation_nuit',12);
+ $form->setMax('profession_proprietaire',20);
+ $form->setMax('civilite_co_exploitant',20);
+ $form->setMax('nom_co_exploitant',20);
+ $form->setMax('nom_marital_co_exploitant',20);
+ $form->setMax('prenom_co_exploitant',20);
+ $form->setMax('date_naissance_co_exploitant',12);
+ $form->setMax('ville_naissance_co_exploitant',20);
+ $form->setMax('cp_naissance_co_exploitant',20);
+ $form->setMax('adresse1_co_exploitant',20);
+ $form->setMax('adresse2_co_exploitant',20);
+ $form->setMax('cp_co_exploitant',20);
+ $form->setMax('ville_co_exploitant',20);
+ $form->setMax('nationalite_co_exploitant',20);
+ $form->setMax('co_exploitant',4);
+ $form->setMax('particularite_co_exploitant',6);
+ $form->setMax('nom_ancien_exploitant',20);
+ $form->setMax('prenom_ancien_exploitant',20);
+ $form->setMax('ancien_exploitant',4);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('etablissement',_('etablissement'));
+ $form->setLib('raison_sociale',_('raison_sociale'));
+ $form->setLib('enseigne',_('enseigne'));
+ $form->setLib('no_siret',_('no_siret'));
+ $form->setLib('forme_juridique',_('forme_juridique'));
+ $form->setLib('numero_voie',_('numero_voie'));
+ $form->setLib('complement',_('complement'));
+ $form->setLib('voie',_('voie'));
+ $form->setLib('libelle_voie',_('libelle_voie'));
+ $form->setLib('complement_voie',_('complement_voie'));
+ $form->setLib('civilite_exploitant',_('civilite_exploitant'));
+ $form->setLib('nom_exploitant',_('nom_exploitant'));
+ $form->setLib('nom_marital_exploitant',_('nom_marital_exploitant'));
+ $form->setLib('date_naissance_exploitant',_('date_naissance_exploitant'));
+ $form->setLib('ville_naissance_exploitant',_('ville_naissance_exploitant'));
+ $form->setLib('cp_naissance_exploitant',_('cp_naissance_exploitant'));
+ $form->setLib('prenom_exploitant',_('prenom_exploitant'));
+ $form->setLib('adresse1_exploitant',_('adresse1_exploitant'));
+ $form->setLib('adresse2_exploitant',_('adresse2_exploitant'));
+ $form->setLib('cp_exploitant',_('cp_exploitant'));
+ $form->setLib('ville_exploitant',_('ville_exploitant'));
+ $form->setLib('exploitant',_('exploitant'));
+ $form->setLib('nationalite_exploitant',_('nationalite_exploitant'));
+ $form->setLib('civilite_proprietaire',_('civilite_proprietaire'));
+ $form->setLib('nom_proprietaire',_('nom_proprietaire'));
+ $form->setLib('prenom_proprietaire',_('prenom_proprietaire'));
+ $form->setLib('adresse1_proprietaire',_('adresse1_proprietaire'));
+ $form->setLib('adresse2_proprietaire',_('adresse2_proprietaire'));
+ $form->setLib('cp_proprietaire',_('cp_proprietaire'));
+ $form->setLib('ville_proprietaire',_('ville_proprietaire'));
+ $form->setLib('permis_exploitation',_('permis_exploitation'));
+ $form->setLib('date_permis_exploitation',_('date_permis_exploitation'));
+ $form->setLib('date_liquidation',_('date_liquidation'));
+ $form->setLib('date_fermeture',_('date_fermeture'));
+ $form->setLib('nature',_('nature'));
+ $form->setLib('geom',_('geom'));
+ $form->setLib('cp_etablissement',_('cp_etablissement'));
+ $form->setLib('ville_etablissement',_('ville_etablissement'));
+ $form->setLib('particularite_exploitant',_('particularite_exploitant'));
+ $form->setLib('ancien_proprietaire',_('ancien_proprietaire'));
+ $form->setLib('permis_exploitation_nuit',_('permis_exploitation_nuit'));
+ $form->setLib('date_permis_exploitation_nuit',_('date_permis_exploitation_nuit'));
+ $form->setLib('profession_proprietaire',_('profession_proprietaire'));
+ $form->setLib('civilite_co_exploitant',_('civilite_co_exploitant'));
+ $form->setLib('nom_co_exploitant',_('nom_co_exploitant'));
+ $form->setLib('nom_marital_co_exploitant',_('nom_marital_co_exploitant'));
+ $form->setLib('prenom_co_exploitant',_('prenom_co_exploitant'));
+ $form->setLib('date_naissance_co_exploitant',_('date_naissance_co_exploitant'));
+ $form->setLib('ville_naissance_co_exploitant',_('ville_naissance_co_exploitant'));
+ $form->setLib('cp_naissance_co_exploitant',_('cp_naissance_co_exploitant'));
+ $form->setLib('adresse1_co_exploitant',_('adresse1_co_exploitant'));
+ $form->setLib('adresse2_co_exploitant',_('adresse2_co_exploitant'));
+ $form->setLib('cp_co_exploitant',_('cp_co_exploitant'));
+ $form->setLib('ville_co_exploitant',_('ville_co_exploitant'));
+ $form->setLib('nationalite_co_exploitant',_('nationalite_co_exploitant'));
+ $form->setLib('co_exploitant',_('co_exploitant'));
+ $form->setLib('particularite_co_exploitant',_('particularite_co_exploitant'));
+ $form->setLib('nom_ancien_exploitant',_('nom_ancien_exploitant'));
+ $form->setLib('prenom_ancien_exploitant',_('prenom_ancien_exploitant'));
+ $form->setLib('ancien_exploitant',_('ancien_exploitant'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // exploitant
+ $contenu=array();
+ $res = $db->query($sql_exploitant);
+ // Logger
+ $this->addToLog("setSelect()[gen/obj]: db->query(\"".$sql_exploitant."\");", VERBOSE_MODE);
+ if (database::isError($res))
+ die($res->getMessage().$sql_exploitant);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_exploitant." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('exploitant');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('exploitant',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='exploitant')
+ $form->setVal('exploitant', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+ /**
+ * Methode clesecondaire
+ */
+ function cleSecondaire($id, &$db = NULL, $val = array(), $DEBUG = false) {
+ // On appelle la methode de la classe parent
+ parent::cleSecondaire($id, $db, $val, $DEBUG);
+ // Verification de la cle secondaire : courrier
+ $this->rechercheTable($db, "courrier", "etablissement", $id);
+ // Verification de la cle secondaire : demande_licence
+ $this->rechercheTable($db, "demande_licence", "etablissement", $id);
+ // Verification de la cle secondaire : dossier
+ $this->rechercheTable($db, "dossier", "etablissement", $id);
+ }
+
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/exploitant.class.php
===================================================================
--- branches/1.x/gen/obj/exploitant.class.php (rev 0)
+++ branches/1.x/gen/obj/exploitant.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,125 @@
+<?php
+//$Id$
+//gen openMairie le 29/04/2011 08:46
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class exploitant_gen extends dbForm {
+ var $table="exploitant";
+ var $clePrimaire="exploitant";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['exploitant'] = $val['exploitant'];
+ $this->valF['libelle'] = $val['libelle'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('exploitant','hidden');// cle automatique
+ $form->setType('libelle','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('exploitant','hiddenstatic');
+ $form->setType('libelle','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('exploitant','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('exploitant','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('exploitant',4);
+ $form->setTaille('libelle',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('exploitant',4);
+ $form->setMax('libelle',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('exploitant',_('exploitant'));
+ $form->setLib('libelle',_('libelle'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire etablissement
+ $sql = "select * from public.etablissement where exploitant ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('etablissement')." "._('pour')." "._('exploitant')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/index.php
===================================================================
--- branches/1.x/gen/obj/index.php (rev 0)
+++ branches/1.x/gen/obj/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_collectivite.class.php
===================================================================
--- branches/1.x/gen/obj/om_collectivite.class.php (rev 0)
+++ branches/1.x/gen/obj/om_collectivite.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,186 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_collectivite_gen extends dbForm {
+ var $table="om_collectivite";
+ var $clePrimaire="om_collectivite";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['niveau'] = $val['niveau'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_collectivite','hidden');// cle automatique
+ $form->setType('libelle','text');
+ $form->setType('niveau','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('libelle','text');
+ $form->setType('niveau','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('niveau','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_collectivite',11);
+ $form->setTaille('libelle',100);
+ $form->setTaille('niveau',1);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_collectivite',11);
+ $form->setMax('libelle',100);
+ $form->setMax('niveau',1);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('niveau',_('niveau'));
+ }
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire om_etat
+ $sql = "select * from om_etat where om_collectivite ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_etat')." "._('pour')." "._('om_collectivite')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ // cle secondaire om_lettretype
+ $sql = "select * from om_lettretype where om_collectivite ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_lettretype')." "._('pour')." "._('om_collectivite')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ // cle secondaire om_parametre
+ $sql = "select * from om_parametre where om_collectivite ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_parametre')." "._('pour')." "._('om_collectivite')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ // cle secondaire om_sousetat
+ $sql = "select * from om_sousetat where om_collectivite ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_sousetat')." "._('pour')." "._('om_collectivite')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ // cle secondaire om_utilisateur
+ $sql = "select * from om_utilisateur where om_collectivite ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_utilisateur')." "._('pour')." "._('om_collectivite')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_droit.class.php
===================================================================
--- branches/1.x/gen/obj/om_droit.class.php (rev 0)
+++ branches/1.x/gen/obj/om_droit.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,124 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_droit_gen extends dbForm {
+ var $table="om_droit";
+ var $clePrimaire="om_droit";
+ var $typeCle="A";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_droit'] = $val['om_droit'];
+ $this->valF['om_profil'] = $val['om_profil'];
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['om_profil']==""){
+ $this->msg= $this->msg.$imgv._('om_profil')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_droit','text');
+ if($this->retourformulaire=='om_profil')
+ $form->setType('om_profil','hiddenstatic');
+ else
+ $form->setType('om_profil','select');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_droit','hiddenstatic');
+ if($this->retourformulaire=='om_profil')
+ $form->setType('om_profil','hiddenstatic');
+ else
+ $form->setType('om_profil','select');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_droit','hiddenstatic');
+ $form->setType('om_profil','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_droit',30);
+ $form->setTaille('om_profil',2);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_droit',30);
+ $form->setMax('om_profil',2);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_droit',_('om_droit'));
+ $form->setLib('om_profil',_('om_profil'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_profil
+ $contenu=array();
+ $res = $db->query($sql_om_profil);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_profil);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_profil." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_profil');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_profil',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_profil')
+ $form->setVal('om_profil', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_etat.class.php
===================================================================
--- branches/1.x/gen/obj/om_etat.class.php (rev 0)
+++ branches/1.x/gen/obj/om_etat.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,437 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_etat_gen extends dbForm {
+ var $table="om_etat";
+ var $clePrimaire="om_etat";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_etat'] = $val['om_etat'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['id'] = $val['id'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['actif'] = $val['actif'];
+ $this->valF['orientation'] = $val['orientation'];
+ $this->valF['format'] = $val['format'];
+ $this->valF['footerfont'] = $val['footerfont'];
+ $this->valF['footerattribut'] = $val['footerattribut'];
+ $this->valF['footertaille'] = $val['footertaille'];
+ $this->valF['logo'] = $val['logo'];
+ $this->valF['logoleft'] = $val['logoleft'];
+ $this->valF['logotop'] = $val['logotop'];
+ $this->valF['titre'] = $val['titre'];
+ $this->valF['titreleft'] = $val['titreleft'];
+ $this->valF['titretop'] = $val['titretop'];
+ $this->valF['titrelargeur'] = $val['titrelargeur'];
+ $this->valF['titrehauteur'] = $val['titrehauteur'];
+ $this->valF['titrefont'] = $val['titrefont'];
+ $this->valF['titreattribut'] = $val['titreattribut'];
+ $this->valF['titretaille'] = $val['titretaille'];
+ $this->valF['titrebordure'] = $val['titrebordure'];
+ $this->valF['titrealign'] = $val['titrealign'];
+ $this->valF['corps'] = $val['corps'];
+ $this->valF['corpsleft'] = $val['corpsleft'];
+ $this->valF['corpstop'] = $val['corpstop'];
+ $this->valF['corpslargeur'] = $val['corpslargeur'];
+ $this->valF['corpshauteur'] = $val['corpshauteur'];
+ $this->valF['corpsfont'] = $val['corpsfont'];
+ $this->valF['corpsattribut'] = $val['corpsattribut'];
+ $this->valF['corpstaille'] = $val['corpstaille'];
+ $this->valF['corpsbordure'] = $val['corpsbordure'];
+ $this->valF['corpsalign'] = $val['corpsalign'];
+ $this->valF['om_sql'] = $val['om_sql'];
+ $this->valF['sousetat'] = $val['sousetat'];
+ $this->valF['se_font'] = $val['se_font'];
+ $this->valF['se_margeleft'] = $val['se_margeleft'];
+ $this->valF['se_margetop'] = $val['se_margetop'];
+ $this->valF['se_margeright'] = $val['se_margeright'];
+ $this->valF['se_couleurtexte'] = $val['se_couleurtexte'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['om_collectivite']==""){
+ $this->msg= $this->msg.$imgv._('om_collectivite')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_etat','hidden');// cle automatique
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('orientation','text');
+ $form->setType('format','text');
+ $form->setType('footerfont','text');
+ $form->setType('footerattribut','text');
+ $form->setType('footertaille','text');
+ $form->setType('logo','text');
+ $form->setType('logoleft','text');
+ $form->setType('logotop','text');
+ $form->setType('titre','textarea');
+ $form->setType('titreleft','text');
+ $form->setType('titretop','text');
+ $form->setType('titrelargeur','text');
+ $form->setType('titrehauteur','text');
+ $form->setType('titrefont','text');
+ $form->setType('titreattribut','text');
+ $form->setType('titretaille','text');
+ $form->setType('titrebordure','text');
+ $form->setType('titrealign','text');
+ $form->setType('corps','textarea');
+ $form->setType('corpsleft','text');
+ $form->setType('corpstop','text');
+ $form->setType('corpslargeur','text');
+ $form->setType('corpshauteur','text');
+ $form->setType('corpsfont','text');
+ $form->setType('corpsattribut','text');
+ $form->setType('corpstaille','text');
+ $form->setType('corpsbordure','text');
+ $form->setType('corpsalign','text');
+ $form->setType('om_sql','textarea');
+ $form->setType('sousetat','textarea');
+ $form->setType('se_font','text');
+ $form->setType('se_margeleft','text');
+ $form->setType('se_margetop','text');
+ $form->setType('se_margeright','text');
+ $form->setType('se_couleurtexte','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_etat','hiddenstatic');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('orientation','text');
+ $form->setType('format','text');
+ $form->setType('footerfont','text');
+ $form->setType('footerattribut','text');
+ $form->setType('footertaille','text');
+ $form->setType('logo','text');
+ $form->setType('logoleft','text');
+ $form->setType('logotop','text');
+ $form->setType('titre','textarea');
+ $form->setType('titreleft','text');
+ $form->setType('titretop','text');
+ $form->setType('titrelargeur','text');
+ $form->setType('titrehauteur','text');
+ $form->setType('titrefont','text');
+ $form->setType('titreattribut','text');
+ $form->setType('titretaille','text');
+ $form->setType('titrebordure','text');
+ $form->setType('titrealign','text');
+ $form->setType('corps','textarea');
+ $form->setType('corpsleft','text');
+ $form->setType('corpstop','text');
+ $form->setType('corpslargeur','text');
+ $form->setType('corpshauteur','text');
+ $form->setType('corpsfont','text');
+ $form->setType('corpsattribut','text');
+ $form->setType('corpstaille','text');
+ $form->setType('corpsbordure','text');
+ $form->setType('corpsalign','text');
+ $form->setType('om_sql','textarea');
+ $form->setType('sousetat','textarea');
+ $form->setType('se_font','text');
+ $form->setType('se_margeleft','text');
+ $form->setType('se_margetop','text');
+ $form->setType('se_margeright','text');
+ $form->setType('se_couleurtexte','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_etat','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('actif','hiddenstatic');
+ $form->setType('orientation','hiddenstatic');
+ $form->setType('format','hiddenstatic');
+ $form->setType('footerfont','hiddenstatic');
+ $form->setType('footerattribut','hiddenstatic');
+ $form->setType('footertaille','hiddenstatic');
+ $form->setType('logo','hiddenstatic');
+ $form->setType('logoleft','hiddenstatic');
+ $form->setType('logotop','hiddenstatic');
+ $form->setType('titre','hiddenstatic');
+ $form->setType('titreleft','hiddenstatic');
+ $form->setType('titretop','hiddenstatic');
+ $form->setType('titrelargeur','hiddenstatic');
+ $form->setType('titrehauteur','hiddenstatic');
+ $form->setType('titrefont','hiddenstatic');
+ $form->setType('titreattribut','hiddenstatic');
+ $form->setType('titretaille','hiddenstatic');
+ $form->setType('titrebordure','hiddenstatic');
+ $form->setType('titrealign','hiddenstatic');
+ $form->setType('corps','hiddenstatic');
+ $form->setType('corpsleft','hiddenstatic');
+ $form->setType('corpstop','hiddenstatic');
+ $form->setType('corpslargeur','hiddenstatic');
+ $form->setType('corpshauteur','hiddenstatic');
+ $form->setType('corpsfont','hiddenstatic');
+ $form->setType('corpsattribut','hiddenstatic');
+ $form->setType('corpstaille','hiddenstatic');
+ $form->setType('corpsbordure','hiddenstatic');
+ $form->setType('corpsalign','hiddenstatic');
+ $form->setType('om_sql','hiddenstatic');
+ $form->setType('sousetat','hiddenstatic');
+ $form->setType('se_font','hiddenstatic');
+ $form->setType('se_margeleft','hiddenstatic');
+ $form->setType('se_margetop','hiddenstatic');
+ $form->setType('se_margeright','hiddenstatic');
+ $form->setType('se_couleurtexte','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_etat','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ $form->setOnchange('footertaille','VerifNum(this)');
+ $form->setOnchange('logoleft','VerifNum(this)');
+ $form->setOnchange('logotop','VerifNum(this)');
+ $form->setOnchange('titreleft','VerifNum(this)');
+ $form->setOnchange('titretop','VerifNum(this)');
+ $form->setOnchange('titrelargeur','VerifNum(this)');
+ $form->setOnchange('titrehauteur','VerifNum(this)');
+ $form->setOnchange('titretaille','VerifNum(this)');
+ $form->setOnchange('corpsleft','VerifNum(this)');
+ $form->setOnchange('corpstop','VerifNum(this)');
+ $form->setOnchange('corpslargeur','VerifNum(this)');
+ $form->setOnchange('corpshauteur','VerifNum(this)');
+ $form->setOnchange('corpstaille','VerifNum(this)');
+ $form->setOnchange('se_margeleft','VerifNum(this)');
+ $form->setOnchange('se_margetop','VerifNum(this)');
+ $form->setOnchange('se_margeright','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_etat',11);
+ $form->setTaille('om_collectivite',11);
+ $form->setTaille('id',50);
+ $form->setTaille('libelle',50);
+ $form->setTaille('actif',3);
+ $form->setTaille('orientation',2);
+ $form->setTaille('format',5);
+ $form->setTaille('footerfont',20);
+ $form->setTaille('footerattribut',20);
+ $form->setTaille('footertaille',8);
+ $form->setTaille('logo',30);
+ $form->setTaille('logoleft',8);
+ $form->setTaille('logotop',8);
+ $form->setTaille('titre',80);
+ $form->setTaille('titreleft',8);
+ $form->setTaille('titretop',8);
+ $form->setTaille('titrelargeur',20);
+ $form->setTaille('titrehauteur',8);
+ $form->setTaille('titrefont',20);
+ $form->setTaille('titreattribut',20);
+ $form->setTaille('titretaille',8);
+ $form->setTaille('titrebordure',20);
+ $form->setTaille('titrealign',20);
+ $form->setTaille('corps',80);
+ $form->setTaille('corpsleft',8);
+ $form->setTaille('corpstop',8);
+ $form->setTaille('corpslargeur',8);
+ $form->setTaille('corpshauteur',8);
+ $form->setTaille('corpsfont',20);
+ $form->setTaille('corpsattribut',20);
+ $form->setTaille('corpstaille',8);
+ $form->setTaille('corpsbordure',20);
+ $form->setTaille('corpsalign',20);
+ $form->setTaille('om_sql',80);
+ $form->setTaille('sousetat',80);
+ $form->setTaille('se_font',20);
+ $form->setTaille('se_margeleft',8);
+ $form->setTaille('se_margetop',8);
+ $form->setTaille('se_margeright',8);
+ $form->setTaille('se_couleurtexte',11);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_etat',11);
+ $form->setMax('om_collectivite',11);
+ $form->setMax('id',50);
+ $form->setMax('libelle',50);
+ $form->setMax('actif',3);
+ $form->setMax('orientation',2);
+ $form->setMax('format',5);
+ $form->setMax('footerfont',20);
+ $form->setMax('footerattribut',20);
+ $form->setMax('footertaille',8);
+ $form->setMax('logo',30);
+ $form->setMax('logoleft',8);
+ $form->setMax('logotop',8);
+ $form->setMax('titre',6);
+ $form->setMax('titreleft',8);
+ $form->setMax('titretop',8);
+ $form->setMax('titrelargeur',20);
+ $form->setMax('titrehauteur',8);
+ $form->setMax('titrefont',20);
+ $form->setMax('titreattribut',20);
+ $form->setMax('titretaille',8);
+ $form->setMax('titrebordure',20);
+ $form->setMax('titrealign',20);
+ $form->setMax('corps',6);
+ $form->setMax('corpsleft',8);
+ $form->setMax('corpstop',8);
+ $form->setMax('corpslargeur',8);
+ $form->setMax('corpshauteur',8);
+ $form->setMax('corpsfont',20);
+ $form->setMax('corpsattribut',20);
+ $form->setMax('corpstaille',8);
+ $form->setMax('corpsbordure',20);
+ $form->setMax('corpsalign',20);
+ $form->setMax('om_sql',6);
+ $form->setMax('sousetat',6);
+ $form->setMax('se_font',20);
+ $form->setMax('se_margeleft',8);
+ $form->setMax('se_margetop',8);
+ $form->setMax('se_margeright',8);
+ $form->setMax('se_couleurtexte',11);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_etat',_('om_etat'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('id',_('id'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('actif',_('actif'));
+ $form->setLib('orientation',_('orientation'));
+ $form->setLib('format',_('format'));
+ $form->setLib('footerfont',_('footerfont'));
+ $form->setLib('footerattribut',_('footerattribut'));
+ $form->setLib('footertaille',_('footertaille'));
+ $form->setLib('logo',_('logo'));
+ $form->setLib('logoleft',_('logoleft'));
+ $form->setLib('logotop',_('logotop'));
+ $form->setLib('titre',_('titre'));
+ $form->setLib('titreleft',_('titreleft'));
+ $form->setLib('titretop',_('titretop'));
+ $form->setLib('titrelargeur',_('titrelargeur'));
+ $form->setLib('titrehauteur',_('titrehauteur'));
+ $form->setLib('titrefont',_('titrefont'));
+ $form->setLib('titreattribut',_('titreattribut'));
+ $form->setLib('titretaille',_('titretaille'));
+ $form->setLib('titrebordure',_('titrebordure'));
+ $form->setLib('titrealign',_('titrealign'));
+ $form->setLib('corps',_('corps'));
+ $form->setLib('corpsleft',_('corpsleft'));
+ $form->setLib('corpstop',_('corpstop'));
+ $form->setLib('corpslargeur',_('corpslargeur'));
+ $form->setLib('corpshauteur',_('corpshauteur'));
+ $form->setLib('corpsfont',_('corpsfont'));
+ $form->setLib('corpsattribut',_('corpsattribut'));
+ $form->setLib('corpstaille',_('corpstaille'));
+ $form->setLib('corpsbordure',_('corpsbordure'));
+ $form->setLib('corpsalign',_('corpsalign'));
+ $form->setLib('om_sql',_('om_sql'));
+ $form->setLib('sousetat',_('sousetat'));
+ $form->setLib('se_font',_('se_font'));
+ $form->setLib('se_margeleft',_('se_margeleft'));
+ $form->setLib('se_margetop',_('se_margetop'));
+ $form->setLib('se_margeright',_('se_margeright'));
+ $form->setLib('se_couleurtexte',_('se_couleurtexte'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_lettretype.class.php
===================================================================
--- branches/1.x/gen/obj/om_lettretype.class.php (rev 0)
+++ branches/1.x/gen/obj/om_lettretype.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,370 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_lettretype_gen extends dbForm {
+ var $table="om_lettretype";
+ var $clePrimaire="om_lettretype";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_lettretype'] = $val['om_lettretype'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['id'] = $val['id'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['actif'] = $val['actif'];
+ $this->valF['orientation'] = $val['orientation'];
+ $this->valF['format'] = $val['format'];
+ $this->valF['logo'] = $val['logo'];
+ $this->valF['logoleft'] = $val['logoleft'];
+ $this->valF['logotop'] = $val['logotop'];
+ $this->valF['titre'] = $val['titre'];
+ $this->valF['titreleft'] = $val['titreleft'];
+ $this->valF['titretop'] = $val['titretop'];
+ $this->valF['titrelargeur'] = $val['titrelargeur'];
+ $this->valF['titrehauteur'] = $val['titrehauteur'];
+ $this->valF['titrefont'] = $val['titrefont'];
+ $this->valF['titreattribut'] = $val['titreattribut'];
+ $this->valF['titretaille'] = $val['titretaille'];
+ $this->valF['titrebordure'] = $val['titrebordure'];
+ $this->valF['titrealign'] = $val['titrealign'];
+ $this->valF['corps'] = $val['corps'];
+ $this->valF['corpsleft'] = $val['corpsleft'];
+ $this->valF['corpstop'] = $val['corpstop'];
+ $this->valF['corpslargeur'] = $val['corpslargeur'];
+ $this->valF['corpshauteur'] = $val['corpshauteur'];
+ $this->valF['corpsfont'] = $val['corpsfont'];
+ $this->valF['corpsattribut'] = $val['corpsattribut'];
+ $this->valF['corpstaille'] = $val['corpstaille'];
+ $this->valF['corpsbordure'] = $val['corpsbordure'];
+ $this->valF['corpsalign'] = $val['corpsalign'];
+ $this->valF['om_sql'] = $val['om_sql'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['om_collectivite']==""){
+ $this->msg= $this->msg.$imgv._('om_collectivite')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_lettretype','hidden');// cle automatique
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('orientation','text');
+ $form->setType('format','text');
+ $form->setType('logo','text');
+ $form->setType('logoleft','text');
+ $form->setType('logotop','text');
+ $form->setType('titre','textarea');
+ $form->setType('titreleft','text');
+ $form->setType('titretop','text');
+ $form->setType('titrelargeur','text');
+ $form->setType('titrehauteur','text');
+ $form->setType('titrefont','text');
+ $form->setType('titreattribut','text');
+ $form->setType('titretaille','text');
+ $form->setType('titrebordure','text');
+ $form->setType('titrealign','text');
+ $form->setType('corps','textarea');
+ $form->setType('corpsleft','text');
+ $form->setType('corpstop','text');
+ $form->setType('corpslargeur','text');
+ $form->setType('corpshauteur','text');
+ $form->setType('corpsfont','text');
+ $form->setType('corpsattribut','text');
+ $form->setType('corpstaille','text');
+ $form->setType('corpsbordure','text');
+ $form->setType('corpsalign','text');
+ $form->setType('om_sql','textarea');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_lettretype','hiddenstatic');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('orientation','text');
+ $form->setType('format','text');
+ $form->setType('logo','text');
+ $form->setType('logoleft','text');
+ $form->setType('logotop','text');
+ $form->setType('titre','textarea');
+ $form->setType('titreleft','text');
+ $form->setType('titretop','text');
+ $form->setType('titrelargeur','text');
+ $form->setType('titrehauteur','text');
+ $form->setType('titrefont','text');
+ $form->setType('titreattribut','text');
+ $form->setType('titretaille','text');
+ $form->setType('titrebordure','text');
+ $form->setType('titrealign','text');
+ $form->setType('corps','textarea');
+ $form->setType('corpsleft','text');
+ $form->setType('corpstop','text');
+ $form->setType('corpslargeur','text');
+ $form->setType('corpshauteur','text');
+ $form->setType('corpsfont','text');
+ $form->setType('corpsattribut','text');
+ $form->setType('corpstaille','text');
+ $form->setType('corpsbordure','text');
+ $form->setType('corpsalign','text');
+ $form->setType('om_sql','textarea');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_lettretype','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('actif','hiddenstatic');
+ $form->setType('orientation','hiddenstatic');
+ $form->setType('format','hiddenstatic');
+ $form->setType('logo','hiddenstatic');
+ $form->setType('logoleft','hiddenstatic');
+ $form->setType('logotop','hiddenstatic');
+ $form->setType('titre','hiddenstatic');
+ $form->setType('titreleft','hiddenstatic');
+ $form->setType('titretop','hiddenstatic');
+ $form->setType('titrelargeur','hiddenstatic');
+ $form->setType('titrehauteur','hiddenstatic');
+ $form->setType('titrefont','hiddenstatic');
+ $form->setType('titreattribut','hiddenstatic');
+ $form->setType('titretaille','hiddenstatic');
+ $form->setType('titrebordure','hiddenstatic');
+ $form->setType('titrealign','hiddenstatic');
+ $form->setType('corps','hiddenstatic');
+ $form->setType('corpsleft','hiddenstatic');
+ $form->setType('corpstop','hiddenstatic');
+ $form->setType('corpslargeur','hiddenstatic');
+ $form->setType('corpshauteur','hiddenstatic');
+ $form->setType('corpsfont','hiddenstatic');
+ $form->setType('corpsattribut','hiddenstatic');
+ $form->setType('corpstaille','hiddenstatic');
+ $form->setType('corpsbordure','hiddenstatic');
+ $form->setType('corpsalign','hiddenstatic');
+ $form->setType('om_sql','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_lettretype','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ $form->setOnchange('logoleft','VerifNum(this)');
+ $form->setOnchange('logotop','VerifNum(this)');
+ $form->setOnchange('titreleft','VerifNum(this)');
+ $form->setOnchange('titretop','VerifNum(this)');
+ $form->setOnchange('titrelargeur','VerifNum(this)');
+ $form->setOnchange('titrehauteur','VerifNum(this)');
+ $form->setOnchange('titretaille','VerifNum(this)');
+ $form->setOnchange('corpsleft','VerifNum(this)');
+ $form->setOnchange('corpstop','VerifNum(this)');
+ $form->setOnchange('corpslargeur','VerifNum(this)');
+ $form->setOnchange('corpshauteur','VerifNum(this)');
+ $form->setOnchange('corpstaille','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_lettretype',11);
+ $form->setTaille('om_collectivite',11);
+ $form->setTaille('id',50);
+ $form->setTaille('libelle',50);
+ $form->setTaille('actif',3);
+ $form->setTaille('orientation',2);
+ $form->setTaille('format',5);
+ $form->setTaille('logo',30);
+ $form->setTaille('logoleft',8);
+ $form->setTaille('logotop',8);
+ $form->setTaille('titre',80);
+ $form->setTaille('titreleft',8);
+ $form->setTaille('titretop',8);
+ $form->setTaille('titrelargeur',8);
+ $form->setTaille('titrehauteur',8);
+ $form->setTaille('titrefont',20);
+ $form->setTaille('titreattribut',20);
+ $form->setTaille('titretaille',8);
+ $form->setTaille('titrebordure',20);
+ $form->setTaille('titrealign',20);
+ $form->setTaille('corps',80);
+ $form->setTaille('corpsleft',8);
+ $form->setTaille('corpstop',8);
+ $form->setTaille('corpslargeur',8);
+ $form->setTaille('corpshauteur',8);
+ $form->setTaille('corpsfont',20);
+ $form->setTaille('corpsattribut',20);
+ $form->setTaille('corpstaille',8);
+ $form->setTaille('corpsbordure',20);
+ $form->setTaille('corpsalign',20);
+ $form->setTaille('om_sql',80);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_lettretype',11);
+ $form->setMax('om_collectivite',11);
+ $form->setMax('id',50);
+ $form->setMax('libelle',50);
+ $form->setMax('actif',3);
+ $form->setMax('orientation',2);
+ $form->setMax('format',5);
+ $form->setMax('logo',30);
+ $form->setMax('logoleft',8);
+ $form->setMax('logotop',8);
+ $form->setMax('titre',6);
+ $form->setMax('titreleft',8);
+ $form->setMax('titretop',8);
+ $form->setMax('titrelargeur',8);
+ $form->setMax('titrehauteur',8);
+ $form->setMax('titrefont',20);
+ $form->setMax('titreattribut',20);
+ $form->setMax('titretaille',8);
+ $form->setMax('titrebordure',20);
+ $form->setMax('titrealign',20);
+ $form->setMax('corps',6);
+ $form->setMax('corpsleft',8);
+ $form->setMax('corpstop',8);
+ $form->setMax('corpslargeur',8);
+ $form->setMax('corpshauteur',8);
+ $form->setMax('corpsfont',20);
+ $form->setMax('corpsattribut',20);
+ $form->setMax('corpstaille',8);
+ $form->setMax('corpsbordure',20);
+ $form->setMax('corpsalign',20);
+ $form->setMax('om_sql',6);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_lettretype',_('om_lettretype'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('id',_('id'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('actif',_('actif'));
+ $form->setLib('orientation',_('orientation'));
+ $form->setLib('format',_('format'));
+ $form->setLib('logo',_('logo'));
+ $form->setLib('logoleft',_('logoleft'));
+ $form->setLib('logotop',_('logotop'));
+ $form->setLib('titre',_('titre'));
+ $form->setLib('titreleft',_('titreleft'));
+ $form->setLib('titretop',_('titretop'));
+ $form->setLib('titrelargeur',_('titrelargeur'));
+ $form->setLib('titrehauteur',_('titrehauteur'));
+ $form->setLib('titrefont',_('titrefont'));
+ $form->setLib('titreattribut',_('titreattribut'));
+ $form->setLib('titretaille',_('titretaille'));
+ $form->setLib('titrebordure',_('titrebordure'));
+ $form->setLib('titrealign',_('titrealign'));
+ $form->setLib('corps',_('corps'));
+ $form->setLib('corpsleft',_('corpsleft'));
+ $form->setLib('corpstop',_('corpstop'));
+ $form->setLib('corpslargeur',_('corpslargeur'));
+ $form->setLib('corpshauteur',_('corpshauteur'));
+ $form->setLib('corpsfont',_('corpsfont'));
+ $form->setLib('corpsattribut',_('corpsattribut'));
+ $form->setLib('corpstaille',_('corpstaille'));
+ $form->setLib('corpsbordure',_('corpsbordure'));
+ $form->setLib('corpsalign',_('corpsalign'));
+ $form->setLib('om_sql',_('om_sql'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_parametre.class.php
===================================================================
--- branches/1.x/gen/obj/om_parametre.class.php (rev 0)
+++ branches/1.x/gen/obj/om_parametre.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,169 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_parametre_gen extends dbForm {
+ var $table="om_parametre";
+ var $clePrimaire="om_parametre";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_parametre'] = $val['om_parametre'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['valeur'] = $val['valeur'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_parametre','hidden');// cle automatique
+ $form->setType('libelle','text');
+ $form->setType('valeur','text');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_parametre','hiddenstatic');
+ $form->setType('libelle','text');
+ $form->setType('valeur','text');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_parametre','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('valeur','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_parametre','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_parametre',11);
+ $form->setTaille('libelle',20);
+ $form->setTaille('valeur',50);
+ $form->setTaille('om_collectivite',11);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_parametre',11);
+ $form->setMax('libelle',20);
+ $form->setMax('valeur',50);
+ $form->setMax('om_collectivite',11);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_parametre',_('om_parametre'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('valeur',_('valeur'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_profil.class.php
===================================================================
--- branches/1.x/gen/obj/om_profil.class.php (rev 0)
+++ branches/1.x/gen/obj/om_profil.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,119 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_profil_gen extends dbForm {
+ var $table="om_profil";
+ var $clePrimaire="om_profil";
+ var $typeCle="A";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_profil'] = $val['om_profil'];
+ $this->valF['libelle'] = $val['libelle'];
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_profil','text');
+ $form->setType('libelle','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_profil','hiddenstatic');
+ $form->setType('libelle','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_profil','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_profil',2);
+ $form->setTaille('libelle',30);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_profil',2);
+ $form->setMax('libelle',30);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_profil',_('om_profil'));
+ $form->setLib('libelle',_('libelle'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire om_droit
+ $sql = "select * from om_droit where om_profil ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_droit')." "._('pour')." "._('om_profil')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ // cle secondaire om_utilisateur
+ $sql = "select * from om_utilisateur where om_profil ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_utilisateur')." "._('pour')." "._('om_profil')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_sig_point.class.php
===================================================================
--- branches/1.x/gen/obj/om_sig_point.class.php (rev 0)
+++ branches/1.x/gen/obj/om_sig_point.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,267 @@
+<?php
+//$Id$
+//gen openMairie le 12/04/2011 16:10
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_sig_point_gen extends dbForm {
+ var $table="om_sig_point";
+ var $clePrimaire="om_sig_point";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_sig_point'] = $val['om_sig_point'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['id'] = $val['id'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['actif'] = $val['actif'];
+ $this->valF['zoom'] = $val['zoom'];
+ $this->valF['fond_osm'] = $val['fond_osm'];
+ $this->valF['fond_bing'] = $val['fond_bing'];
+ $this->valF['fond_sat'] = $val['fond_sat'];
+ $this->valF['layer_info'] = $val['layer_info'];
+ $this->valF['etendue'] = $val['etendue'];
+ $this->valF['projection_externe'] = $val['projection_externe'];
+ $this->valF['url'] = $val['url'];
+ $this->valF['om_sql'] = $val['om_sql'];
+ $this->valF['maj'] = $val['maj'];
+ $this->valF['table_update'] = $val['table_update'];
+ $this->valF['champ'] = $val['champ'];
+ $this->valF['retour'] = $val['retour'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['om_collectivite']==""){
+ $this->msg= $this->msg.$imgv._('om_collectivite')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_sig_point','hidden');// cle automatique
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('zoom','text');
+ $form->setType('fond_osm','text');
+ $form->setType('fond_bing','text');
+ $form->setType('fond_sat','text');
+ $form->setType('layer_info','text');
+ $form->setType('etendue','text');
+ $form->setType('projection_externe','text');
+ $form->setType('url','textarea');
+ $form->setType('om_sql','textarea');
+ $form->setType('maj','text');
+ $form->setType('table_update','text');
+ $form->setType('champ','text');
+ $form->setType('retour','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_sig_point','hiddenstatic');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('zoom','text');
+ $form->setType('fond_osm','text');
+ $form->setType('fond_bing','text');
+ $form->setType('fond_sat','text');
+ $form->setType('layer_info','text');
+ $form->setType('etendue','text');
+ $form->setType('projection_externe','text');
+ $form->setType('url','textarea');
+ $form->setType('om_sql','textarea');
+ $form->setType('maj','text');
+ $form->setType('table_update','text');
+ $form->setType('champ','text');
+ $form->setType('retour','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_sig_point','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('actif','hiddenstatic');
+ $form->setType('zoom','hiddenstatic');
+ $form->setType('fond_osm','hiddenstatic');
+ $form->setType('fond_bing','hiddenstatic');
+ $form->setType('fond_sat','hiddenstatic');
+ $form->setType('layer_info','hiddenstatic');
+ $form->setType('etendue','hiddenstatic');
+ $form->setType('projection_externe','hiddenstatic');
+ $form->setType('url','hiddenstatic');
+ $form->setType('om_sql','hiddenstatic');
+ $form->setType('maj','hiddenstatic');
+ $form->setType('table_update','hiddenstatic');
+ $form->setType('champ','hiddenstatic');
+ $form->setType('retour','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_sig_point','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_sig_point',4);
+ $form->setTaille('om_collectivite',4);
+ $form->setTaille('id',20);
+ $form->setTaille('libelle',19);
+ $form->setTaille('actif',20);
+ $form->setTaille('zoom',20);
+ $form->setTaille('fond_osm',20);
+ $form->setTaille('fond_bing',20);
+ $form->setTaille('fond_sat',20);
+ $form->setTaille('layer_info',20);
+ $form->setTaille('etendue',29);
+ $form->setTaille('projection_externe',10);
+ $form->setTaille('url',80);
+ $form->setTaille('om_sql',80);
+ $form->setTaille('maj',20);
+ $form->setTaille('table_update',20);
+ $form->setTaille('champ',20);
+ $form->setTaille('retour',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_sig_point',4);
+ $form->setMax('om_collectivite',4);
+ $form->setMax('id',20);
+ $form->setMax('libelle',19);
+ $form->setMax('actif',20);
+ $form->setMax('zoom',20);
+ $form->setMax('fond_osm',20);
+ $form->setMax('fond_bing',20);
+ $form->setMax('fond_sat',20);
+ $form->setMax('layer_info',20);
+ $form->setMax('etendue',29);
+ $form->setMax('projection_externe',10);
+ $form->setMax('url',6);
+ $form->setMax('om_sql',6);
+ $form->setMax('maj',20);
+ $form->setMax('table_update',20);
+ $form->setMax('champ',20);
+ $form->setMax('retour',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_sig_point',_('om_sig_point'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('id',_('id'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('actif',_('actif'));
+ $form->setLib('zoom',_('zoom'));
+ $form->setLib('fond_osm',_('fond_osm'));
+ $form->setLib('fond_bing',_('fond_bing'));
+ $form->setLib('fond_sat',_('fond_sat'));
+ $form->setLib('layer_info',_('layer_info'));
+ $form->setLib('etendue',_('etendue'));
+ $form->setLib('projection_externe',_('projection_externe'));
+ $form->setLib('url',_('url'));
+ $form->setLib('om_sql',_('om_sql'));
+ $form->setLib('maj',_('maj'));
+ $form->setLib('table_update',_('table_update'));
+ $form->setLib('champ',_('champ'));
+ $form->setLib('retour',_('retour'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_sousetat.class.php
===================================================================
--- branches/1.x/gen/obj/om_sousetat.class.php (rev 0)
+++ branches/1.x/gen/obj/om_sousetat.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,578 @@
+<?php
+//$Id$
+//gen openMairie le 20/09/2011 09:16
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_sousetat_gen extends dbForm {
+ var $table="om_sousetat";
+ var $clePrimaire="om_sousetat";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_sousetat'] = $val['om_sousetat'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['id'] = $val['id'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['actif'] = $val['actif'];
+ $this->valF['titre'] = $val['titre'];
+ $this->valF['titrehauteur'] = $val['titrehauteur'];
+ $this->valF['titrefont'] = $val['titrefont'];
+ $this->valF['titreattribut'] = $val['titreattribut'];
+ $this->valF['titretaille'] = $val['titretaille'];
+ $this->valF['titrebordure'] = $val['titrebordure'];
+ $this->valF['titrealign'] = $val['titrealign'];
+ $this->valF['titrefond'] = $val['titrefond'];
+ $this->valF['titrefondcouleur'] = $val['titrefondcouleur'];
+ $this->valF['titretextecouleur'] = $val['titretextecouleur'];
+ $this->valF['intervalle_debut'] = $val['intervalle_debut'];
+ $this->valF['intervalle_fin'] = $val['intervalle_fin'];
+ $this->valF['entete_flag'] = $val['entete_flag'];
+ $this->valF['entete_fond'] = $val['entete_fond'];
+ $this->valF['entete_orientation'] = $val['entete_orientation'];
+ $this->valF['entete_hauteur'] = $val['entete_hauteur'];
+ $this->valF['entetecolone_bordure'] = $val['entetecolone_bordure'];
+ $this->valF['entetecolone_align'] = $val['entetecolone_align'];
+ $this->valF['entete_fondcouleur'] = $val['entete_fondcouleur'];
+ $this->valF['entete_textecouleur'] = $val['entete_textecouleur'];
+ $this->valF['tableau_largeur'] = $val['tableau_largeur'];
+ $this->valF['tableau_bordure'] = $val['tableau_bordure'];
+ $this->valF['tableau_fontaille'] = $val['tableau_fontaille'];
+ $this->valF['bordure_couleur'] = $val['bordure_couleur'];
+ $this->valF['se_fond1'] = $val['se_fond1'];
+ $this->valF['se_fond2'] = $val['se_fond2'];
+ $this->valF['cellule_fond'] = $val['cellule_fond'];
+ $this->valF['cellule_hauteur'] = $val['cellule_hauteur'];
+ $this->valF['cellule_largeur'] = $val['cellule_largeur'];
+ $this->valF['cellule_bordure_un'] = $val['cellule_bordure_un'];
+ $this->valF['cellule_bordure'] = $val['cellule_bordure'];
+ $this->valF['cellule_align'] = $val['cellule_align'];
+ $this->valF['cellule_fond_total'] = $val['cellule_fond_total'];
+ $this->valF['cellule_fontaille_total'] = $val['cellule_fontaille_total'];
+ $this->valF['cellule_hauteur_total'] = $val['cellule_hauteur_total'];
+ $this->valF['cellule_fondcouleur_total'] = $val['cellule_fondcouleur_total'];
+ $this->valF['cellule_bordure_total'] = $val['cellule_bordure_total'];
+ $this->valF['cellule_align_total'] = $val['cellule_align_total'];
+ $this->valF['cellule_fond_moyenne'] = $val['cellule_fond_moyenne'];
+ $this->valF['cellule_fontaille_moyenne'] = $val['cellule_fontaille_moyenne'];
+ $this->valF['cellule_hauteur_moyenne'] = $val['cellule_hauteur_moyenne'];
+ $this->valF['cellule_fondcouleur_moyenne'] = $val['cellule_fondcouleur_moyenne'];
+ $this->valF['cellule_bordure_moyenne'] = $val['cellule_bordure_moyenne'];
+ $this->valF['cellule_align_moyenne'] = $val['cellule_align_moyenne'];
+ $this->valF['cellule_fond_nbr'] = $val['cellule_fond_nbr'];
+ $this->valF['cellule_fontaille_nbr'] = $val['cellule_fontaille_nbr'];
+ $this->valF['cellule_hauteur_nbr'] = $val['cellule_hauteur_nbr'];
+ $this->valF['cellule_fondcouleur_nbr'] = $val['cellule_fondcouleur_nbr'];
+ $this->valF['cellule_bordure_nbr'] = $val['cellule_bordure_nbr'];
+ $this->valF['cellule_align_nbr'] = $val['cellule_align_nbr'];
+ $this->valF['cellule_numerique'] = $val['cellule_numerique'];
+ $this->valF['cellule_total'] = $val['cellule_total'];
+ $this->valF['cellule_moyenne'] = $val['cellule_moyenne'];
+ $this->valF['cellule_compteur'] = $val['cellule_compteur'];
+ $this->valF['om_sql'] = $val['om_sql'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+ /**
+ * Methode verifier
+ */
+ function verifier($val = array(), &$db = NULL, $DEBUG = false) {
+ // On appelle la methode de la classe parent
+ parent::verifier($val, $db, $DEBUG);
+ // On verifie si le champ n'est pas vide
+ if ($this->valF['om_collectivite'] == "") {
+ $this->correct = false;
+ $this->addToMessage(_("Le champ")." "._("om_collectivite")." "._("est obligatoire"));
+ }
+ }
+
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_sousetat','hidden');// cle automatique
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('titre','textarea');
+ $form->setType('titrehauteur','text');
+ $form->setType('titrefont','text');
+ $form->setType('titreattribut','text');
+ $form->setType('titretaille','text');
+ $form->setType('titrebordure','text');
+ $form->setType('titrealign','text');
+ $form->setType('titrefond','text');
+ $form->setType('titrefondcouleur','text');
+ $form->setType('titretextecouleur','text');
+ $form->setType('intervalle_debut','text');
+ $form->setType('intervalle_fin','text');
+ $form->setType('entete_flag','text');
+ $form->setType('entete_fond','text');
+ $form->setType('entete_orientation','textarea');
+ $form->setType('entete_hauteur','text');
+ $form->setType('entetecolone_bordure','text');
+ $form->setType('entetecolone_align','text');
+ $form->setType('entete_fondcouleur','text');
+ $form->setType('entete_textecouleur','text');
+ $form->setType('tableau_largeur','text');
+ $form->setType('tableau_bordure','text');
+ $form->setType('tableau_fontaille','text');
+ $form->setType('bordure_couleur','text');
+ $form->setType('se_fond1','text');
+ $form->setType('se_fond2','text');
+ $form->setType('cellule_fond','text');
+ $form->setType('cellule_hauteur','text');
+ $form->setType('cellule_largeur','text');
+ $form->setType('cellule_bordure_un','text');
+ $form->setType('cellule_bordure','text');
+ $form->setType('cellule_align','text');
+ $form->setType('cellule_fond_total','text');
+ $form->setType('cellule_fontaille_total','text');
+ $form->setType('cellule_hauteur_total','text');
+ $form->setType('cellule_fondcouleur_total','text');
+ $form->setType('cellule_bordure_total','text');
+ $form->setType('cellule_align_total','text');
+ $form->setType('cellule_fond_moyenne','text');
+ $form->setType('cellule_fontaille_moyenne','text');
+ $form->setType('cellule_hauteur_moyenne','text');
+ $form->setType('cellule_fondcouleur_moyenne','text');
+ $form->setType('cellule_bordure_moyenne','text');
+ $form->setType('cellule_align_moyenne','text');
+ $form->setType('cellule_fond_nbr','text');
+ $form->setType('cellule_fontaille_nbr','text');
+ $form->setType('cellule_hauteur_nbr','text');
+ $form->setType('cellule_fondcouleur_nbr','text');
+ $form->setType('cellule_bordure_nbr','text');
+ $form->setType('cellule_align_nbr','text');
+ $form->setType('cellule_numerique','text');
+ $form->setType('cellule_total','text');
+ $form->setType('cellule_moyenne','text');
+ $form->setType('cellule_compteur','text');
+ $form->setType('om_sql','textarea');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_sousetat','hiddenstatic');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','text');
+ $form->setType('libelle','text');
+ $form->setType('actif','text');
+ $form->setType('titre','textarea');
+ $form->setType('titrehauteur','text');
+ $form->setType('titrefont','text');
+ $form->setType('titreattribut','text');
+ $form->setType('titretaille','text');
+ $form->setType('titrebordure','text');
+ $form->setType('titrealign','text');
+ $form->setType('titrefond','text');
+ $form->setType('titrefondcouleur','text');
+ $form->setType('titretextecouleur','text');
+ $form->setType('intervalle_debut','text');
+ $form->setType('intervalle_fin','text');
+ $form->setType('entete_flag','text');
+ $form->setType('entete_fond','text');
+ $form->setType('entete_orientation','textarea');
+ $form->setType('entete_hauteur','text');
+ $form->setType('entetecolone_bordure','text');
+ $form->setType('entetecolone_align','text');
+ $form->setType('entete_fondcouleur','text');
+ $form->setType('entete_textecouleur','text');
+ $form->setType('tableau_largeur','text');
+ $form->setType('tableau_bordure','text');
+ $form->setType('tableau_fontaille','text');
+ $form->setType('bordure_couleur','text');
+ $form->setType('se_fond1','text');
+ $form->setType('se_fond2','text');
+ $form->setType('cellule_fond','text');
+ $form->setType('cellule_hauteur','text');
+ $form->setType('cellule_largeur','text');
+ $form->setType('cellule_bordure_un','text');
+ $form->setType('cellule_bordure','text');
+ $form->setType('cellule_align','text');
+ $form->setType('cellule_fond_total','text');
+ $form->setType('cellule_fontaille_total','text');
+ $form->setType('cellule_hauteur_total','text');
+ $form->setType('cellule_fondcouleur_total','text');
+ $form->setType('cellule_bordure_total','text');
+ $form->setType('cellule_align_total','text');
+ $form->setType('cellule_fond_moyenne','text');
+ $form->setType('cellule_fontaille_moyenne','text');
+ $form->setType('cellule_hauteur_moyenne','text');
+ $form->setType('cellule_fondcouleur_moyenne','text');
+ $form->setType('cellule_bordure_moyenne','text');
+ $form->setType('cellule_align_moyenne','text');
+ $form->setType('cellule_fond_nbr','text');
+ $form->setType('cellule_fontaille_nbr','text');
+ $form->setType('cellule_hauteur_nbr','text');
+ $form->setType('cellule_fondcouleur_nbr','text');
+ $form->setType('cellule_bordure_nbr','text');
+ $form->setType('cellule_align_nbr','text');
+ $form->setType('cellule_numerique','text');
+ $form->setType('cellule_total','text');
+ $form->setType('cellule_moyenne','text');
+ $form->setType('cellule_compteur','text');
+ $form->setType('om_sql','textarea');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_sousetat','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('id','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('actif','hiddenstatic');
+ $form->setType('titre','hiddenstatic');
+ $form->setType('titrehauteur','hiddenstatic');
+ $form->setType('titrefont','hiddenstatic');
+ $form->setType('titreattribut','hiddenstatic');
+ $form->setType('titretaille','hiddenstatic');
+ $form->setType('titrebordure','hiddenstatic');
+ $form->setType('titrealign','hiddenstatic');
+ $form->setType('titrefond','hiddenstatic');
+ $form->setType('titrefondcouleur','hiddenstatic');
+ $form->setType('titretextecouleur','hiddenstatic');
+ $form->setType('intervalle_debut','hiddenstatic');
+ $form->setType('intervalle_fin','hiddenstatic');
+ $form->setType('entete_flag','hiddenstatic');
+ $form->setType('entete_fond','hiddenstatic');
+ $form->setType('entete_orientation','hiddenstatic');
+ $form->setType('entete_hauteur','hiddenstatic');
+ $form->setType('entetecolone_bordure','hiddenstatic');
+ $form->setType('entetecolone_align','hiddenstatic');
+ $form->setType('entete_fondcouleur','hiddenstatic');
+ $form->setType('entete_textecouleur','hiddenstatic');
+ $form->setType('tableau_largeur','hiddenstatic');
+ $form->setType('tableau_bordure','hiddenstatic');
+ $form->setType('tableau_fontaille','hiddenstatic');
+ $form->setType('bordure_couleur','hiddenstatic');
+ $form->setType('se_fond1','hiddenstatic');
+ $form->setType('se_fond2','hiddenstatic');
+ $form->setType('cellule_fond','hiddenstatic');
+ $form->setType('cellule_hauteur','hiddenstatic');
+ $form->setType('cellule_largeur','hiddenstatic');
+ $form->setType('cellule_bordure_un','hiddenstatic');
+ $form->setType('cellule_bordure','hiddenstatic');
+ $form->setType('cellule_align','hiddenstatic');
+ $form->setType('cellule_fond_total','hiddenstatic');
+ $form->setType('cellule_fontaille_total','hiddenstatic');
+ $form->setType('cellule_hauteur_total','hiddenstatic');
+ $form->setType('cellule_fondcouleur_total','hiddenstatic');
+ $form->setType('cellule_bordure_total','hiddenstatic');
+ $form->setType('cellule_align_total','hiddenstatic');
+ $form->setType('cellule_fond_moyenne','hiddenstatic');
+ $form->setType('cellule_fontaille_moyenne','hiddenstatic');
+ $form->setType('cellule_hauteur_moyenne','hiddenstatic');
+ $form->setType('cellule_fondcouleur_moyenne','hiddenstatic');
+ $form->setType('cellule_bordure_moyenne','hiddenstatic');
+ $form->setType('cellule_align_moyenne','hiddenstatic');
+ $form->setType('cellule_fond_nbr','hiddenstatic');
+ $form->setType('cellule_fontaille_nbr','hiddenstatic');
+ $form->setType('cellule_hauteur_nbr','hiddenstatic');
+ $form->setType('cellule_fondcouleur_nbr','hiddenstatic');
+ $form->setType('cellule_bordure_nbr','hiddenstatic');
+ $form->setType('cellule_align_nbr','hiddenstatic');
+ $form->setType('cellule_numerique','hiddenstatic');
+ $form->setType('cellule_total','hiddenstatic');
+ $form->setType('cellule_moyenne','hiddenstatic');
+ $form->setType('cellule_compteur','hiddenstatic');
+ $form->setType('om_sql','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_sousetat','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ $form->setOnchange('titrehauteur','VerifNum(this)');
+ $form->setOnchange('titretaille','VerifNum(this)');
+ $form->setOnchange('intervalle_debut','VerifNum(this)');
+ $form->setOnchange('intervalle_fin','VerifNum(this)');
+ $form->setOnchange('entete_hauteur','VerifNum(this)');
+ $form->setOnchange('tableau_largeur','VerifNum(this)');
+ $form->setOnchange('tableau_fontaille','VerifNum(this)');
+ $form->setOnchange('cellule_hauteur','VerifNum(this)');
+ $form->setOnchange('cellule_fontaille_total','VerifNum(this)');
+ $form->setOnchange('cellule_hauteur_total','VerifNum(this)');
+ $form->setOnchange('cellule_fontaille_moyenne','VerifNum(this)');
+ $form->setOnchange('cellule_hauteur_moyenne','VerifNum(this)');
+ $form->setOnchange('cellule_fontaille_nbr','VerifNum(this)');
+ $form->setOnchange('cellule_hauteur_nbr','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_sousetat',8);
+ $form->setTaille('om_collectivite',8);
+ $form->setTaille('id',20);
+ $form->setTaille('libelle',20);
+ $form->setTaille('actif',20);
+ $form->setTaille('titre',80);
+ $form->setTaille('titrehauteur',8);
+ $form->setTaille('titrefont',20);
+ $form->setTaille('titreattribut',20);
+ $form->setTaille('titretaille',8);
+ $form->setTaille('titrebordure',20);
+ $form->setTaille('titrealign',20);
+ $form->setTaille('titrefond',20);
+ $form->setTaille('titrefondcouleur',20);
+ $form->setTaille('titretextecouleur',20);
+ $form->setTaille('intervalle_debut',8);
+ $form->setTaille('intervalle_fin',8);
+ $form->setTaille('entete_flag',20);
+ $form->setTaille('entete_fond',20);
+ $form->setTaille('entete_orientation',80);
+ $form->setTaille('entete_hauteur',8);
+ $form->setTaille('entetecolone_bordure',20);
+ $form->setTaille('entetecolone_align',20);
+ $form->setTaille('entete_fondcouleur',20);
+ $form->setTaille('entete_textecouleur',20);
+ $form->setTaille('tableau_largeur',8);
+ $form->setTaille('tableau_bordure',20);
+ $form->setTaille('tableau_fontaille',8);
+ $form->setTaille('bordure_couleur',20);
+ $form->setTaille('se_fond1',20);
+ $form->setTaille('se_fond2',20);
+ $form->setTaille('cellule_fond',20);
+ $form->setTaille('cellule_hauteur',8);
+ $form->setTaille('cellule_largeur',20);
+ $form->setTaille('cellule_bordure_un',20);
+ $form->setTaille('cellule_bordure',20);
+ $form->setTaille('cellule_align',20);
+ $form->setTaille('cellule_fond_total',20);
+ $form->setTaille('cellule_fontaille_total',8);
+ $form->setTaille('cellule_hauteur_total',8);
+ $form->setTaille('cellule_fondcouleur_total',20);
+ $form->setTaille('cellule_bordure_total',20);
+ $form->setTaille('cellule_align_total',20);
+ $form->setTaille('cellule_fond_moyenne',20);
+ $form->setTaille('cellule_fontaille_moyenne',8);
+ $form->setTaille('cellule_hauteur_moyenne',8);
+ $form->setTaille('cellule_fondcouleur_moyenne',20);
+ $form->setTaille('cellule_bordure_moyenne',20);
+ $form->setTaille('cellule_align_moyenne',20);
+ $form->setTaille('cellule_fond_nbr',20);
+ $form->setTaille('cellule_fontaille_nbr',8);
+ $form->setTaille('cellule_hauteur_nbr',8);
+ $form->setTaille('cellule_fondcouleur_nbr',20);
+ $form->setTaille('cellule_bordure_nbr',20);
+ $form->setTaille('cellule_align_nbr',20);
+ $form->setTaille('cellule_numerique',20);
+ $form->setTaille('cellule_total',20);
+ $form->setTaille('cellule_moyenne',20);
+ $form->setTaille('cellule_compteur',20);
+ $form->setTaille('om_sql',80);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_sousetat',8);
+ $form->setMax('om_collectivite',8);
+ $form->setMax('id',20);
+ $form->setMax('libelle',20);
+ $form->setMax('actif',20);
+ $form->setMax('titre',6);
+ $form->setMax('titrehauteur',8);
+ $form->setMax('titrefont',20);
+ $form->setMax('titreattribut',20);
+ $form->setMax('titretaille',8);
+ $form->setMax('titrebordure',20);
+ $form->setMax('titrealign',20);
+ $form->setMax('titrefond',20);
+ $form->setMax('titrefondcouleur',20);
+ $form->setMax('titretextecouleur',20);
+ $form->setMax('intervalle_debut',8);
+ $form->setMax('intervalle_fin',8);
+ $form->setMax('entete_flag',20);
+ $form->setMax('entete_fond',20);
+ $form->setMax('entete_orientation',6);
+ $form->setMax('entete_hauteur',8);
+ $form->setMax('entetecolone_bordure',20);
+ $form->setMax('entetecolone_align',20);
+ $form->setMax('entete_fondcouleur',20);
+ $form->setMax('entete_textecouleur',20);
+ $form->setMax('tableau_largeur',8);
+ $form->setMax('tableau_bordure',20);
+ $form->setMax('tableau_fontaille',8);
+ $form->setMax('bordure_couleur',20);
+ $form->setMax('se_fond1',20);
+ $form->setMax('se_fond2',20);
+ $form->setMax('cellule_fond',20);
+ $form->setMax('cellule_hauteur',8);
+ $form->setMax('cellule_largeur',20);
+ $form->setMax('cellule_bordure_un',20);
+ $form->setMax('cellule_bordure',20);
+ $form->setMax('cellule_align',20);
+ $form->setMax('cellule_fond_total',20);
+ $form->setMax('cellule_fontaille_total',8);
+ $form->setMax('cellule_hauteur_total',8);
+ $form->setMax('cellule_fondcouleur_total',20);
+ $form->setMax('cellule_bordure_total',20);
+ $form->setMax('cellule_align_total',20);
+ $form->setMax('cellule_fond_moyenne',20);
+ $form->setMax('cellule_fontaille_moyenne',8);
+ $form->setMax('cellule_hauteur_moyenne',8);
+ $form->setMax('cellule_fondcouleur_moyenne',20);
+ $form->setMax('cellule_bordure_moyenne',20);
+ $form->setMax('cellule_align_moyenne',20);
+ $form->setMax('cellule_fond_nbr',20);
+ $form->setMax('cellule_fontaille_nbr',8);
+ $form->setMax('cellule_hauteur_nbr',8);
+ $form->setMax('cellule_fondcouleur_nbr',20);
+ $form->setMax('cellule_bordure_nbr',20);
+ $form->setMax('cellule_align_nbr',20);
+ $form->setMax('cellule_numerique',20);
+ $form->setMax('cellule_total',20);
+ $form->setMax('cellule_moyenne',20);
+ $form->setMax('cellule_compteur',20);
+ $form->setMax('om_sql',6);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_sousetat',_('om_sousetat'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('id',_('id'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('actif',_('actif'));
+ $form->setLib('titre',_('titre'));
+ $form->setLib('titrehauteur',_('titrehauteur'));
+ $form->setLib('titrefont',_('titrefont'));
+ $form->setLib('titreattribut',_('titreattribut'));
+ $form->setLib('titretaille',_('titretaille'));
+ $form->setLib('titrebordure',_('titrebordure'));
+ $form->setLib('titrealign',_('titrealign'));
+ $form->setLib('titrefond',_('titrefond'));
+ $form->setLib('titrefondcouleur',_('titrefondcouleur'));
+ $form->setLib('titretextecouleur',_('titretextecouleur'));
+ $form->setLib('intervalle_debut',_('intervalle_debut'));
+ $form->setLib('intervalle_fin',_('intervalle_fin'));
+ $form->setLib('entete_flag',_('entete_flag'));
+ $form->setLib('entete_fond',_('entete_fond'));
+ $form->setLib('entete_orientation',_('entete_orientation'));
+ $form->setLib('entete_hauteur',_('entete_hauteur'));
+ $form->setLib('entetecolone_bordure',_('entetecolone_bordure'));
+ $form->setLib('entetecolone_align',_('entetecolone_align'));
+ $form->setLib('entete_fondcouleur',_('entete_fondcouleur'));
+ $form->setLib('entete_textecouleur',_('entete_textecouleur'));
+ $form->setLib('tableau_largeur',_('tableau_largeur'));
+ $form->setLib('tableau_bordure',_('tableau_bordure'));
+ $form->setLib('tableau_fontaille',_('tableau_fontaille'));
+ $form->setLib('bordure_couleur',_('bordure_couleur'));
+ $form->setLib('se_fond1',_('se_fond1'));
+ $form->setLib('se_fond2',_('se_fond2'));
+ $form->setLib('cellule_fond',_('cellule_fond'));
+ $form->setLib('cellule_hauteur',_('cellule_hauteur'));
+ $form->setLib('cellule_largeur',_('cellule_largeur'));
+ $form->setLib('cellule_bordure_un',_('cellule_bordure_un'));
+ $form->setLib('cellule_bordure',_('cellule_bordure'));
+ $form->setLib('cellule_align',_('cellule_align'));
+ $form->setLib('cellule_fond_total',_('cellule_fond_total'));
+ $form->setLib('cellule_fontaille_total',_('cellule_fontaille_total'));
+ $form->setLib('cellule_hauteur_total',_('cellule_hauteur_total'));
+ $form->setLib('cellule_fondcouleur_total',_('cellule_fondcouleur_total'));
+ $form->setLib('cellule_bordure_total',_('cellule_bordure_total'));
+ $form->setLib('cellule_align_total',_('cellule_align_total'));
+ $form->setLib('cellule_fond_moyenne',_('cellule_fond_moyenne'));
+ $form->setLib('cellule_fontaille_moyenne',_('cellule_fontaille_moyenne'));
+ $form->setLib('cellule_hauteur_moyenne',_('cellule_hauteur_moyenne'));
+ $form->setLib('cellule_fondcouleur_moyenne',_('cellule_fondcouleur_moyenne'));
+ $form->setLib('cellule_bordure_moyenne',_('cellule_bordure_moyenne'));
+ $form->setLib('cellule_align_moyenne',_('cellule_align_moyenne'));
+ $form->setLib('cellule_fond_nbr',_('cellule_fond_nbr'));
+ $form->setLib('cellule_fontaille_nbr',_('cellule_fontaille_nbr'));
+ $form->setLib('cellule_hauteur_nbr',_('cellule_hauteur_nbr'));
+ $form->setLib('cellule_fondcouleur_nbr',_('cellule_fondcouleur_nbr'));
+ $form->setLib('cellule_bordure_nbr',_('cellule_bordure_nbr'));
+ $form->setLib('cellule_align_nbr',_('cellule_align_nbr'));
+ $form->setLib('cellule_numerique',_('cellule_numerique'));
+ $form->setLib('cellule_total',_('cellule_total'));
+ $form->setLib('cellule_moyenne',_('cellule_moyenne'));
+ $form->setLib('cellule_compteur',_('cellule_compteur'));
+ $form->setLib('om_sql',_('om_sql'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ // Logger
+ $this->addToLog("setSelect()[gen/obj]: db->query(\"".$sql_om_collectivite."\");", VERBOSE_MODE);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_tdb.class.php
===================================================================
--- branches/1.x/gen/obj/om_tdb.class.php (rev 0)
+++ branches/1.x/gen/obj/om_tdb.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,165 @@
+<?php
+//$Id$
+//gen openMairie le 12/05/2011 19:29
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_tdb_gen extends dbForm {
+ var $table="om_tdb";
+ var $clePrimaire="om_tdb";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_tdb'] = $val['om_tdb'];
+ $this->valF['login'] = $val['login'];
+ $this->valF['bloc'] = $val['bloc'];
+ $this->valF['om_widget'] = $val['om_widget'];
+ $this->valF['position'] = $val['position'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['login']==""){
+ $this->msg= $this->msg.$imgv._('login')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_tdb','hidden');// cle automatique
+ $form->setType('login','text');
+ $form->setType('bloc','text');
+ if($this->retourformulaire=='om_widget')
+ $form->setType('om_widget','hiddenstatic');
+ else
+ $form->setType('om_widget','select');
+ $form->setType('position','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_tdb','hiddenstatic');
+ $form->setType('login','text');
+ $form->setType('bloc','text');
+ if($this->retourformulaire=='om_widget')
+ $form->setType('om_widget','hiddenstatic');
+ else
+ $form->setType('om_widget','select');
+ $form->setType('position','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_tdb','hiddenstatic');
+ $form->setType('login','hiddenstatic');
+ $form->setType('bloc','hiddenstatic');
+ $form->setType('om_widget','hiddenstatic');
+ $form->setType('position','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_tdb','VerifNum(this)');
+ $form->setOnchange('om_widget','VerifNum(this)');
+ $form->setOnchange('position','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_tdb',4);
+ $form->setTaille('login',20);
+ $form->setTaille('bloc',20);
+ $form->setTaille('om_widget',4);
+ $form->setTaille('position',4);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_tdb',4);
+ $form->setMax('login',20);
+ $form->setMax('bloc',20);
+ $form->setMax('om_widget',4);
+ $form->setMax('position',4);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_tdb',_('om_tdb'));
+ $form->setLib('login',_('login'));
+ $form->setLib('bloc',_('bloc'));
+ $form->setLib('om_widget',_('om_widget'));
+ $form->setLib('position',_('position'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_widget
+ $contenu=array();
+ $res = $db->query($sql_om_widget);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_widget);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_widget." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_widget');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_widget',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_widget')
+ $form->setVal('om_widget', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_utilisateur.class.php
===================================================================
--- branches/1.x/gen/obj/om_utilisateur.class.php (rev 0)
+++ branches/1.x/gen/obj/om_utilisateur.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,223 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_utilisateur_gen extends dbForm {
+ var $table="om_utilisateur";
+ var $clePrimaire="om_utilisateur";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_utilisateur'] = $val['om_utilisateur'];
+ $this->valF['nom'] = $val['nom'];
+ $this->valF['email'] = $val['email'];
+ $this->valF['login'] = $val['login'];
+ $this->valF['pwd'] = $val['pwd'];
+ $this->valF['om_profil'] = $val['om_profil'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['om_type'] = $val['om_type'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['nom']==""){
+ $this->msg= $this->msg.$imgv._('nom')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_utilisateur','hidden');// cle automatique
+ $form->setType('nom','text');
+ $form->setType('email','text');
+ $form->setType('login','text');
+ $form->setType('pwd','text');
+ if($this->retourformulaire=='om_profil')
+ $form->setType('om_profil','hiddenstatic');
+ else
+ $form->setType('om_profil','select');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('om_type','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_utilisateur','hiddenstatic');
+ $form->setType('nom','text');
+ $form->setType('email','text');
+ $form->setType('login','text');
+ $form->setType('pwd','text');
+ if($this->retourformulaire=='om_profil')
+ $form->setType('om_profil','hiddenstatic');
+ else
+ $form->setType('om_profil','select');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('om_type','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_utilisateur','hiddenstatic');
+ $form->setType('nom','hiddenstatic');
+ $form->setType('email','hiddenstatic');
+ $form->setType('login','hiddenstatic');
+ $form->setType('pwd','hiddenstatic');
+ $form->setType('om_profil','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('om_type','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_utilisateur','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_utilisateur',8);
+ $form->setTaille('nom',30);
+ $form->setTaille('email',40);
+ $form->setTaille('login',30);
+ $form->setTaille('pwd',100);
+ $form->setTaille('om_profil',2);
+ $form->setTaille('om_collectivite',11);
+ $form->setTaille('om_type',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_utilisateur',8);
+ $form->setMax('nom',30);
+ $form->setMax('email',40);
+ $form->setMax('login',30);
+ $form->setMax('pwd',100);
+ $form->setMax('om_profil',2);
+ $form->setMax('om_collectivite',11);
+ $form->setMax('om_type',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_utilisateur',_('om_utilisateur'));
+ $form->setLib('nom',_('nom'));
+ $form->setLib('email',_('email'));
+ $form->setLib('login',_('login'));
+ $form->setLib('pwd',_('pwd'));
+ $form->setLib('om_profil',_('om_profil'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('om_type',_('om_type'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_profil
+ $contenu=array();
+ $res = $db->query($sql_om_profil);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_profil);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_profil." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_profil');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_profil',$contenu);
+ }// fin error db
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_profil')
+ $form->setVal('om_profil', $idxformulaire);
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/om_widget.class.php
===================================================================
--- branches/1.x/gen/obj/om_widget.class.php (rev 0)
+++ branches/1.x/gen/obj/om_widget.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,227 @@
+<?php
+//$Id$
+//gen openMairie le 12/05/2011 19:30
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class om_widget_gen extends dbForm {
+ var $table="om_widget";
+ var $clePrimaire="om_widget";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['om_widget'] = $val['om_widget'];
+ $this->valF['om_collectivite'] = $val['om_collectivite'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['lien'] = $val['lien'];
+ $this->valF['texte'] = $val['texte'];
+ $this->valF['om_profil'] = $val['om_profil'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['om_collectivite']==""){
+ $this->msg= $this->msg.$imgv._('om_collectivite')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('om_widget','hidden');// cle automatique
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('libelle','text');
+ $form->setType('lien','text');
+ $form->setType('texte','textarea');
+ if($this->retourformulaire=='om_profil')
+ $form->setType('om_profil','hiddenstatic');
+ else
+ $form->setType('om_profil','select');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('om_widget','hiddenstatic');
+ if($this->retourformulaire=='om_collectivite')
+ $form->setType('om_collectivite','hiddenstatic');
+ else
+ if($_SESSION['niveau']==2)
+ $form->setType('om_collectivite','select');
+ else
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('libelle','text');
+ $form->setType('lien','text');
+ $form->setType('texte','textarea');
+ if($this->retourformulaire=='om_profil')
+ $form->setType('om_profil','hiddenstatic');
+ else
+ $form->setType('om_profil','select');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('om_widget','hiddenstatic');
+ $form->setType('om_collectivite','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('lien','hiddenstatic');
+ $form->setType('texte','hiddenstatic');
+ $form->setType('om_profil','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('om_widget','VerifNum(this)');
+ $form->setOnchange('om_collectivite','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('om_widget',4);
+ $form->setTaille('om_collectivite',4);
+ $form->setTaille('libelle',10);
+ $form->setTaille('lien',31);
+ $form->setTaille('texte',80);
+ $form->setTaille('om_profil',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('om_widget',4);
+ $form->setMax('om_collectivite',4);
+ $form->setMax('libelle',10);
+ $form->setMax('lien',31);
+ $form->setMax('texte',6);
+ $form->setMax('om_profil',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('om_widget',_('om_widget'));
+ $form->setLib('om_collectivite',_('om_collectivite'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('lien',_('lien'));
+ $form->setLib('texte',_('texte'));
+ $form->setLib('om_profil',_('om_profil'));
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // om_collectivite
+ $contenu=array();
+ $res = $db->query($sql_om_collectivite);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_collectivite);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_collectivite." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_collectivite');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_collectivite',$contenu);
+ }// fin error db
+ // om_profil
+ $contenu=array();
+ $res = $db->query($sql_om_profil);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_profil);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_profil." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_profil');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_profil',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+ function setVal(&$form,$maj,$validation,&$db,$DEBUG=null){
+ if($validation==0 and $maj==0 and $_SESSION['niveau']==1) {
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }// fin validation
+ }// fin setVal
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='om_collectivite')
+ $form->setVal('om_collectivite', $idxformulaire);
+ if($retourformulaire =='om_profil')
+ $form->setVal('om_profil', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire om_tdb
+ $sql = "select * from public.om_tdb where om_widget ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('om_tdb')." "._('pour')." "._('om_widget')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/perimetre.class.php
===================================================================
--- branches/1.x/gen/obj/perimetre.class.php (rev 0)
+++ branches/1.x/gen/obj/perimetre.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,158 @@
+<?php
+//$Id$
+//gen openMairie le 24/05/2011 08:00
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class perimetre_gen extends dbForm {
+ var $table="perimetre";
+ var $clePrimaire="perimetre";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['perimetre'] = $val['perimetre'];
+ $this->valF['longueur_exclusion_metre'] = $val['longueur_exclusion_metre'];
+ $this->valF['libelle'] = $val['libelle'];
+ $this->valF['numero_voie'] = $val['numero_voie'];
+ $this->valF['complement'] = $val['complement'];
+ $this->valF['voie'] = $val['voie'];
+ $this->valF['libelle_voie'] = $val['libelle_voie'];
+ $this->valF['complement_voie'] = $val['complement_voie'];
+ $this->valF['geom'] = $val['geom'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['longueur_exclusion_metre']==""){
+ $this->msg= $this->msg.$imgv._('longueur_exclusion_metre')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('perimetre','hidden');// cle automatique
+ $form->setType('longueur_exclusion_metre','text');
+ $form->setType('libelle','text');
+ $form->setType('numero_voie','text');
+ $form->setType('complement','text');
+ $form->setType('voie','text');
+ $form->setType('libelle_voie','text');
+ $form->setType('complement_voie','text');
+ $form->setType('geom','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('perimetre','hiddenstatic');
+ $form->setType('longueur_exclusion_metre','text');
+ $form->setType('libelle','text');
+ $form->setType('numero_voie','text');
+ $form->setType('complement','text');
+ $form->setType('voie','text');
+ $form->setType('libelle_voie','text');
+ $form->setType('complement_voie','text');
+ $form->setType('geom','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('perimetre','hiddenstatic');
+ $form->setType('longueur_exclusion_metre','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ $form->setType('numero_voie','hiddenstatic');
+ $form->setType('complement','hiddenstatic');
+ $form->setType('voie','hiddenstatic');
+ $form->setType('libelle_voie','hiddenstatic');
+ $form->setType('complement_voie','hiddenstatic');
+ $form->setType('geom','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('perimetre','VerifNum(this)');
+ $form->setOnchange('longueur_exclusion_metre','VerifNum(this)');
+ $form->setOnchange('numero_voie','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('perimetre',4);
+ $form->setTaille('longueur_exclusion_metre',4);
+ $form->setTaille('libelle',23);
+ $form->setTaille('numero_voie',4);
+ $form->setTaille('complement',20);
+ $form->setTaille('voie',20);
+ $form->setTaille('libelle_voie',19);
+ $form->setTaille('complement_voie',20);
+ $form->setTaille('geom',50);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('perimetre',4);
+ $form->setMax('longueur_exclusion_metre',4);
+ $form->setMax('libelle',23);
+ $form->setMax('numero_voie',4);
+ $form->setMax('complement',20);
+ $form->setMax('voie',20);
+ $form->setMax('libelle_voie',19);
+ $form->setMax('complement_voie',20);
+ $form->setMax('geom',50);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('perimetre',_('perimetre'));
+ $form->setLib('longueur_exclusion_metre',_('longueur_exclusion_metre'));
+ $form->setLib('libelle',_('libelle'));
+ $form->setLib('numero_voie',_('numero_voie'));
+ $form->setLib('complement',_('complement'));
+ $form->setLib('voie',_('voie'));
+ $form->setLib('libelle_voie',_('libelle_voie'));
+ $form->setLib('complement_voie',_('complement_voie'));
+ $form->setLib('geom',_('geom'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/terme.class.php
===================================================================
--- branches/1.x/gen/obj/terme.class.php (rev 0)
+++ branches/1.x/gen/obj/terme.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,125 @@
+<?php
+//$Id$
+//gen openMairie le 28/04/2011 15:06
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class terme_gen extends dbForm {
+ var $table="terme";
+ var $clePrimaire="terme";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['terme'] = $val['terme'];
+ $this->valF['libelle'] = $val['libelle'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('terme','hidden');// cle automatique
+ $form->setType('libelle','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('terme','hiddenstatic');
+ $form->setType('libelle','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('terme','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('terme','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('terme',4);
+ $form->setTaille('libelle',10);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('terme',4);
+ $form->setMax('libelle',10);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('terme',_('terme'));
+ $form->setLib('libelle',_('libelle'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire demande_licence
+ $sql = "select * from public.demande_licence where terme ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('demande_licence')." "._('pour')." "._('terme')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/type_demande.class.php
===================================================================
--- branches/1.x/gen/obj/type_demande.class.php (rev 0)
+++ branches/1.x/gen/obj/type_demande.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,125 @@
+<?php
+//$Id$
+//gen openMairie le 18/04/2011 14:22
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class type_demande_gen extends dbForm {
+ var $table="type_demande";
+ var $clePrimaire="type_demande";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['type_demande'] = $val['type_demande'];
+ $this->valF['libelle'] = $val['libelle'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('type_demande','hidden');// cle automatique
+ $form->setType('libelle','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('type_demande','hiddenstatic');
+ $form->setType('libelle','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('type_demande','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('type_demande','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('type_demande',4);
+ $form->setTaille('libelle',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('type_demande',4);
+ $form->setMax('libelle',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('type_demande',_('type_demande'));
+ $form->setLib('libelle',_('libelle'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire demande_licence
+ $sql = "select * from public.demande_licence where type_demande ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('demande_licence')." "._('pour')." "._('type_demande')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/type_etablissement.class.php
===================================================================
--- branches/1.x/gen/obj/type_etablissement.class.php (rev 0)
+++ branches/1.x/gen/obj/type_etablissement.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,125 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:00
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class type_etablissement_gen extends dbForm {
+ var $table="type_etablissement";
+ var $clePrimaire="type_etablissement";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['type_etablissement'] = $val['type_etablissement'];
+ $this->valF['libelle'] = $val['libelle'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('type_etablissement','hidden');// cle automatique
+ $form->setType('libelle','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('type_etablissement','hiddenstatic');
+ $form->setType('libelle','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('type_etablissement','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('type_etablissement','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('type_etablissement',4);
+ $form->setTaille('libelle',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('type_etablissement',4);
+ $form->setMax('libelle',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('type_etablissement',_('type_etablissement'));
+ $form->setLib('libelle',_('libelle'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire etablissement
+ $sql = "select * from public.etablissement where type_etablissement ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('etablissement')." "._('pour')." "._('type_etablissement')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/obj/type_licence.class.php
===================================================================
--- branches/1.x/gen/obj/type_licence.class.php (rev 0)
+++ branches/1.x/gen/obj/type_licence.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,125 @@
+<?php
+//$Id$
+//gen openMairie le 06/04/2011 12:22
+require_once (PATH_OPENMAIRIE."formulairedyn.class.php");
+require_once (PATH_OPENMAIRIE."dbformdyn.class.php");
+
+class type_licence_gen extends dbForm {
+ var $table="type_licence";
+ var $clePrimaire="type_licence";
+ var $typeCle="N";
+ var $retourformulaire;
+
+ function setvalF($val) {
+ //affectation valeur formulaire
+ $this->valF['type_licence'] = $val['type_licence'];
+ $this->valF['libelle'] = $val['libelle'];
+ }
+
+ //=================================================
+ //cle primaire automatique [automatic primary key]
+ //==================================================
+
+ function setId(&$db) {
+ //numero automatique
+ $this->valF[$this->table] = $db->nextId(DB_PREFIXE.$this->table);
+ }
+
+ function setValFAjout($val) {
+ //numero automatique -> pas de controle ajout cle primaire
+ }
+
+ function verifierAjout() {
+ //numero automatique -> pas de verfication de cle primaire
+ }
+
+ //====================================
+ // verifier avant validation [verify]
+ //=====================================
+
+ function verifier($val,&$db,$DEBUG) {
+ // verifier le 2eme champ si $verifier = 1 dans gen/dyn/form.inc
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['libelle']==""){
+ $this->msg= $this->msg.$imgv._('libelle')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+ //==========================
+ // Formulaire [form]
+ //==========================
+
+ function setType(&$form,$maj) {
+ //type
+ if ($maj==0){ //ajout
+ $form->setType('type_licence','hidden');// cle automatique
+ $form->setType('libelle','text');
+ }// fin ajout
+ if ($maj==1){ //modifier
+ $form->setType('type_licence','hiddenstatic');
+ $form->setType('libelle','text');
+ }// fin modifier
+ if ($maj==2){ //supprimer
+ $form->setType('type_licence','hiddenstatic');
+ $form->setType('libelle','hiddenstatic');
+ }//fin supprimer
+ }
+
+ function setOnchange(&$form,$maj) {
+ //javascript controle client
+ $form->setOnchange('type_licence','VerifNum(this)');
+ }
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('type_licence',8);
+ $form->setTaille('libelle',20);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('type_licence',8);
+ $form->setMax('libelle',20);
+ }
+
+ function setLib(&$form,$maj) {
+ //libelle des champs
+ $form->setLib('type_licence',_('type_licence'));
+ $form->setLib('libelle',_('libelle'));
+ }
+
+ //==================================
+ // sous Formulaire [subform]
+ //==================================
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ }// fin setValsousformulaire
+
+ //==================================
+ // cle secondaire [secondary key]
+ //==================================
+
+ function cleSecondaire($id,&$db,$val,$debug) {
+ $this->correct=True;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // cle secondaire demande_licence
+ $sql = "select * from public.demande_licence where type_licence ='".$id."'";
+ $res = $db->query($sql);
+ if($debug==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ $this->msg = $this->msg.$imgv._('il_y_a')." ".$nbligne." "._('demande_licence')." "._('pour')." "._('type_licence')." [".$id."]<br>";
+ if($nbligne>0)
+ $this->correct=false;
+ }
+ }// clesecondaire
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/index.php
===================================================================
--- branches/1.x/gen/sql/index.php (rev 0)
+++ branches/1.x/gen/sql/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/index.php
===================================================================
--- branches/1.x/gen/sql/mysql/index.php (rev 0)
+++ branches/1.x/gen/sql/mysql/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_collectivite.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_collectivite.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_collectivite.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_collectivite";
+$tableSelect=DB_PREFIXE."om_collectivite";
+$champs=array("om_collectivite","libelle","niveau");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_collectivite.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_collectivite.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_collectivite.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,33 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_collectivite");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_collectivite";
+$champAffiche=array('om_collectivite','libelle','niveau');
+$champRecherche=array('libelle','niveau');
+$tri="";
+$edition="om_collectivite";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_collectivite.om_collectivite = '".$_SESSION['collectivite']."'";
+$sousformulaire=array('om_etat','om_lettretype','om_parametre','om_sousetat','om_utilisateur');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_droit.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_droit.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_droit.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_droit";
+$tableSelect=DB_PREFIXE."om_droit";
+$champs=array("om_droit","om_profil");
+//champs select
+$sql_om_profil="select * from ".DB_PREFIXE."om_profil";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_droit.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_droit.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_droit.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,31 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_droit");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_droit";
+$champAffiche=array('om_droit','om_profil');
+$champRecherche=array('om_droit','om_profil');
+$tri="";
+$edition="om_droit";
+$selection='';
+if ($retourformulaire== 'om_profil')
+ $selection=" where om_droit.om_profil ='".$idx."'";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_etat.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_etat.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_etat.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_etat";
+$tableSelect=DB_PREFIXE."om_etat";
+$champs=array("om_etat","om_collectivite","id","libelle","actif","orientation","format","footerfont","footerattribut","footertaille","logo","logoleft","logotop","titre","titreleft","titretop","titrelargeur","titrehauteur","titrefont","titreattribut","titretaille","titrebordure","titrealign","corps","corpsleft","corpstop","corpslargeur","corpshauteur","corpsfont","corpsattribut","corpstaille","corpsbordure","corpsalign","om_sql","sousetat","se_font","se_margeleft","se_margetop","se_margeright","se_couleurtexte");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_etat.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_etat.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_etat.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_etat");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_etat";
+$champAffiche=array('om_etat','om_collectivite','id','libelle','actif','orientation','format','footerfont','footerattribut','footertaille','logo','logoleft','logotop','titreleft','titretop','titrelargeur','titrehauteur','titrefont','titreattribut','titretaille','titrebordure','titrealign','corpsleft','corpstop','corpslargeur','corpshauteur','corpsfont','corpsattribut','corpstaille','corpsbordure','corpsalign','se_font','se_margeleft','se_margetop','se_margeright','se_couleurtexte');
+$champRecherche=array('id','libelle','actif','orientation','format','footerfont','footerattribut','logo','titrefont','titreattribut','titrebordure','titrealign','corpsfont','corpsattribut','corpsbordure','corpsalign','se_font','se_couleurtexte');
+$tri="";
+$edition="om_etat";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_etat.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_etat.om_collectivite ='".$idx."' and om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_lettretype.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_lettretype.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_lettretype.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_lettretype";
+$tableSelect=DB_PREFIXE."om_lettretype";
+$champs=array("om_lettretype","om_collectivite","id","libelle","actif","orientation","format","logo","logoleft","logotop","titre","titreleft","titretop","titrelargeur","titrehauteur","titrefont","titreattribut","titretaille","titrebordure","titrealign","corps","corpsleft","corpstop","corpslargeur","corpshauteur","corpsfont","corpsattribut","corpstaille","corpsbordure","corpsalign","om_sql");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_lettretype.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_lettretype.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_lettretype.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_lettretype");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_lettretype";
+$champAffiche=array('om_lettretype','om_collectivite','id','libelle','actif','orientation','format','logo','logoleft','logotop','titreleft','titretop','titrelargeur','titrehauteur','titrefont','titreattribut','titretaille','titrebordure','titrealign','corpsleft','corpstop','corpslargeur','corpshauteur','corpsfont','corpsattribut','corpstaille','corpsbordure','corpsalign');
+$champRecherche=array('id','libelle','actif','orientation','format','logo','titrefont','titreattribut','titrebordure','titrealign','corpsfont','corpsattribut','corpsbordure','corpsalign');
+$tri="";
+$edition="om_lettretype";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_lettretype.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_lettretype.om_collectivite ='".$idx."' and om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_parametre.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_parametre.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_parametre.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_parametre";
+$tableSelect=DB_PREFIXE."om_parametre";
+$champs=array("om_parametre","libelle","valeur","om_collectivite");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_parametre.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_parametre.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_parametre.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_parametre");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_parametre";
+$champAffiche=array('om_parametre','libelle','valeur','om_collectivite');
+$champRecherche=array('libelle','valeur');
+$tri="";
+$edition="om_parametre";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_parametre.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_parametre.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_parametre.om_collectivite ='".$idx."' and om_parametre.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_profil.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_profil.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_profil.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_profil";
+$tableSelect=DB_PREFIXE."om_profil";
+$champs=array("om_profil","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_profil.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_profil.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_profil.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_profil");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_profil";
+$champAffiche=array('om_profil','libelle');
+$champRecherche=array('om_profil','libelle');
+$tri="";
+$edition="om_profil";
+$selection='';
+$sousformulaire=array('om_droit','om_utilisateur');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_sousetat.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_sousetat.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_sousetat.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_sousetat";
+$tableSelect=DB_PREFIXE."om_sousetat";
+$champs=array("om_sousetat","om_collectivite","id","libelle","actif","titre","titrehauteur","titrefont","titreattribut","titretaille","titrebordure","titrealign","titrefond","titrefondcouleur","titretextecouleur","intervalle_debut","intervalle_fin","entete_flag","entete_fond","entete_orientation","entete_hauteur","entetecolone_bordure","entetecolone_align","entete_fondcouleur","entete_textecouleur","tableau_largeur","tableau_bordure","tableau_fontaille","bordure_couleur","se_fond1","se_fond2","cellule_fond","cellule_hauteur","cellule_largeur","cellule_bordure_un","cellule_bordure","cellule_align","cellule_fond_total","cellule_fontaille_total","cellule_hauteur_total","cellule_fondcouleur_total","cellule_bordure_total","cellule_align_total","cellule_fond_moyenne","cellule_fontaille_moyenne","cellule_hauteur_moyenne","cellule_fondcouleur_moyenne","cellule_bordure_moyenne","cellule_align_moyenne","cellule_fond_nbr","cellule_fontaille_nbr","cellule_hauteur_nbr","cellule_fondcouleur_nbr",
"cellule_bordure_nbr","cellule_align_nbr","cellule_numerique","cellule_total","cellule_moyenne","cellule_compteur","om_sql");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_sousetat.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_sousetat.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_sousetat.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_sousetat");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_sousetat";
+$champAffiche=array('om_sousetat','om_collectivite','id','libelle','actif','titrehauteur','titrefont','titreattribut','titretaille','titrebordure','titrealign','titrefond','titrefondcouleur','titretextecouleur','intervalle_debut','intervalle_fin','entete_flag','entete_fond','entete_orientation','entete_hauteur','entetecolone_bordure','entetecolone_align','entete_fondcouleur','entete_textecouleur','tableau_largeur','tableau_bordure','tableau_fontaille','bordure_couleur','se_fond1','se_fond2','cellule_fond','cellule_hauteur','cellule_largeur','cellule_bordure_un','cellule_bordure','cellule_align','cellule_fond_total','cellule_fontaille_total','cellule_hauteur_total','cellule_fondcouleur_total','cellule_bordure_total','cellule_align_total','cellule_fond_moyenne','cellule_fontaille_moyenne','cellule_hauteur_moyenne','cellule_fondcouleur_moyenne','cellule_bordure_moyenne','cellule_align_moyenne','cellule_fond_nbr','cellule_fontaille_nbr','cellule_hauteur_nbr','cellule_fondcouleur_nbr','c
ellule_bordure_nbr','cellule_align_nbr','cellule_numerique','cellule_total','cellule_moyenne','cellule_compteur');
+$champRecherche=array('id','libelle','actif','titrefont','titreattribut','titrebordure','titrealign','titrefond','titrefondcouleur','titretextecouleur','entete_flag','entete_fond','entete_orientation','entetecolone_bordure','entetecolone_align','entete_fondcouleur','entete_textecouleur','tableau_bordure','bordure_couleur','se_fond1','se_fond2','cellule_fond','cellule_largeur','cellule_bordure_un','cellule_bordure','cellule_align','cellule_fond_total','cellule_fondcouleur_total','cellule_bordure_total','cellule_align_total','cellule_fond_moyenne','cellule_fondcouleur_moyenne','cellule_bordure_moyenne','cellule_align_moyenne','cellule_fond_nbr','cellule_fondcouleur_nbr','cellule_bordure_nbr','cellule_align_nbr','cellule_numerique','cellule_total','cellule_moyenne','cellule_compteur');
+$tri="";
+$edition="om_sousetat";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_sousetat.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_sousetat.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_sousetat.om_collectivite ='".$idx."' and om_sousetat.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_utilisateur.form.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_utilisateur.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_utilisateur.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,12 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_utilisateur";
+$tableSelect=DB_PREFIXE."om_utilisateur";
+$champs=array("om_utilisateur","nom","email","login","pwd","om_profil","om_collectivite","om_type");
+//champs select
+$sql_om_profil="select * from ".DB_PREFIXE."om_profil";
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/mysql/om_utilisateur.inc.php
===================================================================
--- branches/1.x/gen/sql/mysql/om_utilisateur.inc.php (rev 0)
+++ branches/1.x/gen/sql/mysql/om_utilisateur.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,44 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 15:57
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_utilisateur");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_utilisateur";
+$champAffiche=array('om_utilisateur','nom','email','login','pwd','om_profil','om_collectivite','om_type');
+$champRecherche=array('nom','email','login','pwd','om_profil','om_type');
+$tri="";
+$edition="om_utilisateur";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_utilisateur.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_profil')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_utilisateur.om_profil ='".$idx."'";
+ }else{
+ $selection=" where om_utilisateur.om_profil ='".$idx."' and om_utilisateur.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_utilisateur.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_utilisateur.om_collectivite ='".$idx."' and om_utilisateur.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/adresse_postale.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/adresse_postale.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/adresse_postale.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 07/04/2011 14:26
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->adresse_postale";
+$tableSelect=DB_PREFIXE."adresse_postale";
+$champs=array("gid","objectid","angle","codcomm","id_refp","notes","num_voi","rivoli","symbol","suf_voi","date_supp","statut_adr","num_arr","num_permis","date_arr","lien","adresse","complement","localisati","typevoie","nomvoie","id_parc","the_geom");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/adresse_postale.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/adresse_postale.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/adresse_postale.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,29 @@
+<?php
+//$Id$
+//gen openMairie le 07/04/2011 14:26
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("adresse_postale");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."adresse_postale";
+$champAffiche=array('gid','objectid','angle','codcomm','id_refp','notes','num_voi','rivoli','symbol','suf_voi','date_supp','statut_adr','num_arr','num_permis','to_char(date_arr ,\'DD/MM/YYYY\') as date_arr','lien','adresse','complement','localisati','typevoie','nomvoie','id_parc','the_geom');
+$champRecherche=array('codcomm','notes','rivoli','suf_voi','date_supp','statut_adr','num_arr','num_permis','lien','adresse','complement','localisati','typevoie','nomvoie','id_parc');
+$tri="";
+$edition="adresse_postale";
+$selection='';
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/courrier.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/courrier.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/courrier.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 01/06/2011 11:01
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->courrier";
+$tableSelect=DB_PREFIXE."courrier";
+$champs=array("courrier","type_courrier","zone_texte","etablissement","date_courrier");
+//champs select
+$sql_etablissement="select * from ".DB_PREFIXE."etablissement";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/courrier.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/courrier.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/courrier.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,31 @@
+<?php
+//$Id$
+//gen openMairie le 01/06/2011 11:01
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("courrier");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."courrier";
+$champAffiche=array('courrier','type_courrier','etablissement','to_char(date_courrier ,\'DD/MM/YYYY\') as date_courrier');
+$champRecherche=array('type_courrier');
+$tri="";
+$edition="courrier";
+$selection='';
+if ($retourformulaire== 'etablissement')
+ $selection=" where courrier.etablissement ='".$idx."'";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/demande_licence.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/demande_licence.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/demande_licence.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,14 @@
+<?php
+//$Id$
+//gen openMairie le 01/06/2011 14:31
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->demande_licence";
+$tableSelect=DB_PREFIXE."demande_licence";
+$champs=array("demande_licence","type_licence","type_demande","terme","date_debut_validite","date_fin_validite","etablissement","heure_debut","heure_fin","occasion","particularite","date_ancienne_demande","date_demande_licence");
+//champs select
+$sql_type_licence="select * from ".DB_PREFIXE."type_licence";
+$sql_type_demande="select * from ".DB_PREFIXE."type_demande";
+$sql_terme="select * from ".DB_PREFIXE."terme";
+$sql_etablissement="select * from ".DB_PREFIXE."etablissement";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/demande_licence.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/demande_licence.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/demande_licence.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,37 @@
+<?php
+//$Id$
+//gen openMairie le 01/06/2011 14:31
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("demande_licence");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."demande_licence";
+$champAffiche=array('demande_licence','type_licence','type_demande','terme','to_char(date_debut_validite ,\'DD/MM/YYYY\') as date_debut_validite','to_char(date_fin_validite ,\'DD/MM/YYYY\') as date_fin_validite','etablissement','heure_debut','heure_fin','occasion','to_char(date_ancienne_demande ,\'DD/MM/YYYY\') as date_ancienne_demande','to_char(date_demande_licence ,\'DD/MM/YYYY\') as date_demande_licence');
+$champRecherche=array('occasion');
+$tri="";
+$edition="demande_licence";
+$selection='';
+if ($retourformulaire== 'type_licence')
+ $selection=" where demande_licence.type_licence ='".$idx."'";
+if ($retourformulaire== 'type_demande')
+ $selection=" where demande_licence.type_demande ='".$idx."'";
+if ($retourformulaire== 'terme')
+ $selection=" where demande_licence.terme ='".$idx."'";
+if ($retourformulaire== 'etablissement')
+ $selection=" where demande_licence.etablissement ='".$idx."'";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/dossier.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/dossier.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/dossier.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 18/05/2011 12:19
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->dossier";
+$tableSelect=DB_PREFIXE."dossier";
+$champs=array("dossier","date_piece","nom","observation","etablissement","ancien_nom");
+//champs select
+$sql_etablissement="select * from ".DB_PREFIXE."etablissement";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/dossier.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/dossier.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/dossier.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,31 @@
+<?php
+//$Id$
+//gen openMairie le 18/05/2011 12:19
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("dossier");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."dossier";
+$champAffiche=array('dossier','to_char(date_piece ,\'DD/MM/YYYY\') as date_piece','nom','observation','etablissement','ancien_nom');
+$champRecherche=array('nom','observation','ancien_nom');
+$tri="";
+$edition="dossier";
+$selection='';
+if ($retourformulaire== 'etablissement')
+ $selection=" where dossier.etablissement ='".$idx."'";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/etablissement.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/etablissement.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/etablissement.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 12/07/2011 13:14
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->etablissement";
+$tableSelect=DB_PREFIXE."etablissement";
+$champs=array("etablissement","raison_sociale","enseigne","no_siret","forme_juridique","numero_voie","complement","voie","libelle_voie","complement_voie","civilite_exploitant","nom_exploitant","nom_marital_exploitant","date_naissance_exploitant","ville_naissance_exploitant","cp_naissance_exploitant","prenom_exploitant","adresse1_exploitant","adresse2_exploitant","cp_exploitant","ville_exploitant","exploitant","nationalite_exploitant","civilite_proprietaire","nom_proprietaire","prenom_proprietaire","adresse1_proprietaire","adresse2_proprietaire","cp_proprietaire","ville_proprietaire","permis_exploitation","date_permis_exploitation","date_liquidation","date_fermeture","nature","geom","cp_etablissement","ville_etablissement","particularite_exploitant","permis_exploitation_nuit","date_permis_exploitation_nuit","profession_proprietaire");
+//champs select
+$sql_exploitant="select * from ".DB_PREFIXE."exploitant";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/etablissement.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/etablissement.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/etablissement.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,32 @@
+<?php
+//$Id$
+//gen openMairie le 12/07/2011 13:14
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("etablissement");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."etablissement";
+$champAffiche=array('etablissement','raison_sociale','enseigne','no_siret','forme_juridique','numero_voie','complement','voie','libelle_voie','complement_voie','civilite_exploitant','nom_exploitant','nom_marital_exploitant','to_char(date_naissance_exploitant ,\'DD/MM/YYYY\') as date_naissance_exploitant','ville_naissance_exploitant','cp_naissance_exploitant','prenom_exploitant','adresse1_exploitant','adresse2_exploitant','cp_exploitant','ville_exploitant','exploitant','nationalite_exploitant','civilite_proprietaire','nom_proprietaire','prenom_proprietaire','adresse1_proprietaire','adresse2_proprietaire','cp_proprietaire','ville_proprietaire','permis_exploitation','to_char(date_permis_exploitation ,\'DD/MM/YYYY\') as date_permis_exploitation','to_char(date_liquidation ,\'DD/MM/YYYY\') as date_liquidation','to_char(date_fermeture ,\'DD/MM/YYYY\') as date_fermeture','nature','geom','cp_etablissement','ville_etablissement','permis_exploitation_nuit','to_char(date_permis_exploitation_nui
t ,\'DD/MM/YYYY\') as date_permis_exploitation_nuit','profession_proprietaire');
+$champRecherche=array('raison_sociale','enseigne','no_siret','forme_juridique','complement','voie','libelle_voie','complement_voie','civilite_exploitant','nom_exploitant','nom_marital_exploitant','ville_naissance_exploitant','cp_naissance_exploitant','prenom_exploitant','adresse1_exploitant','adresse2_exploitant','cp_exploitant','ville_exploitant','nationalite_exploitant','civilite_proprietaire','nom_proprietaire','prenom_proprietaire','adresse1_proprietaire','adresse2_proprietaire','cp_proprietaire','ville_proprietaire','permis_exploitation','nature','cp_etablissement','ville_etablissement','permis_exploitation_nuit','profession_proprietaire');
+$tri="";
+$edition="etablissement";
+$selection='';
+if ($retourformulaire== 'exploitant')
+ $selection=" where etablissement.exploitant ='".$idx."'";
+$sousformulaire=array('courrier','dossier','demande_licence');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/exploitant.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/exploitant.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/exploitant.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 29/04/2011 08:46
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->exploitant";
+$tableSelect=DB_PREFIXE."exploitant";
+$champs=array("exploitant","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/exploitant.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/exploitant.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/exploitant.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 29/04/2011 08:46
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("exploitant");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."exploitant";
+$champAffiche=array('exploitant','libelle');
+$champRecherche=array('libelle');
+$tri="";
+$edition="exploitant";
+$selection='';
+$sousformulaire=array('etablissement');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/index.php
===================================================================
--- branches/1.x/gen/sql/pgsql/index.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_collectivite.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_collectivite.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_collectivite.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 17/11/2010 17:42
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_collectivite";
+$tableSelect=DB_PREFIXE."om_collectivite";
+$champs=array("om_collectivite","libelle","niveau");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_collectivite.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_collectivite.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_collectivite.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,33 @@
+<?php
+//$Id$
+//gen openMairie le 13/05/2011 10:49
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_collectivite");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_collectivite";
+$champAffiche=array('om_collectivite','libelle','niveau');
+$champRecherche=array('libelle','niveau');
+$tri="";
+$edition="om_collectivite";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_collectivite.om_collectivite = '".$_SESSION['collectivite']."'";
+$sousformulaire=array('om_utilisateur','om_parametre','om_etat','om_sousetat','om_lettretype','om_widget','om_sig_point');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_droit.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_droit.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_droit.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 17/11/2010 12:19
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_droit";
+$tableSelect=DB_PREFIXE."om_droit";
+$champs=array("om_droit","om_profil");
+//champs select
+$sql_om_profil="select * from ".DB_PREFIXE."om_profil";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_droit.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_droit.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_droit.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,31 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 13:09
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_droit");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_droit";
+$champAffiche=array('om_droit','om_profil');
+$champRecherche=array('om_droit','om_profil');
+$tri="";
+$edition="om_droit";
+$selection='';
+if ($retourformulaire== 'om_profil')
+ $selection=" where om_droit.om_profil ='".$idx."'";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_etat.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_etat.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_etat.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 17/11/2010 20:32
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_etat";
+$tableSelect=DB_PREFIXE."om_etat";
+$champs=array("om_etat","om_collectivite","id","libelle","actif","orientation","format","footerfont","footerattribut","footertaille","logo","logoleft","logotop","titre","titreleft","titretop","titrelargeur","titrehauteur","titrefont","titreattribut","titretaille","titrebordure","titrealign","corps","corpsleft","corpstop","corpslargeur","corpshauteur","corpsfont","corpsattribut","corpstaille","corpsbordure","corpsalign","om_sql","sousetat","se_font","se_margeleft","se_margetop","se_margeright","se_couleurtexte");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_etat.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_etat.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_etat.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 13:09
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_etat");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_etat";
+$champAffiche=array('om_etat','om_collectivite','id','libelle','actif','orientation','format','footerfont','footerattribut','footertaille','logo','logoleft','logotop','titreleft','titretop','titrelargeur','titrehauteur','titrefont','titreattribut','titretaille','titrebordure','titrealign','corpsleft','corpstop','corpslargeur','corpshauteur','corpsfont','corpsattribut','corpstaille','corpsbordure','corpsalign','se_font','se_margeleft','se_margetop','se_margeright','se_couleurtexte');
+$champRecherche=array('id','libelle','actif','orientation','format','footerfont','footerattribut','logo','titrefont','titreattribut','titrebordure','titrealign','corpsfont','corpsattribut','corpsbordure','corpsalign','se_font','se_couleurtexte');
+$tri="";
+$edition="om_etat";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_etat.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_etat.om_collectivite ='".$idx."' and om_etat.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_lettretype.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_lettretype.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_lettretype.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 17/11/2010 20:20
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_lettretype";
+$tableSelect=DB_PREFIXE."om_lettretype";
+$champs=array("om_lettretype","om_collectivite","id","libelle","actif","orientation","format","logo","logoleft","logotop","titre","titreleft","titretop","titrelargeur","titrehauteur","titrefont","titreattribut","titretaille","titrebordure","titrealign","corps","corpsleft","corpstop","corpslargeur","corpshauteur","corpsfont","corpsattribut","corpstaille","corpsbordure","corpsalign","om_sql");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_lettretype.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_lettretype.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_lettretype.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 13:10
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_lettretype");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_lettretype";
+$champAffiche=array('om_lettretype','om_collectivite','id','libelle','actif','orientation','format','logo','logoleft','logotop','titreleft','titretop','titrelargeur','titrehauteur','titrefont','titreattribut','titretaille','titrebordure','titrealign','corpsleft','corpstop','corpslargeur','corpshauteur','corpsfont','corpsattribut','corpstaille','corpsbordure','corpsalign');
+$champRecherche=array('id','libelle','actif','orientation','format','logo','titrefont','titreattribut','titrebordure','titrealign','corpsfont','corpsattribut','corpsbordure','corpsalign');
+$tri="";
+$edition="om_lettretype";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_lettretype.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_lettretype.om_collectivite ='".$idx."' and om_lettretype.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_parametre.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_parametre.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_parametre.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 27/11/2010 20:30
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_parametre";
+$tableSelect=DB_PREFIXE."om_parametre";
+$champs=array("om_parametre","libelle","valeur","om_collectivite");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_parametre.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_parametre.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_parametre.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 13:09
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_parametre");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_parametre";
+$champAffiche=array('om_parametre','libelle','valeur','om_collectivite');
+$champRecherche=array('libelle','valeur');
+$tri="";
+$edition="om_parametre";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_parametre.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_parametre.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_parametre.om_collectivite ='".$idx."' and om_parametre.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_profil.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_profil.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_profil.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 17/11/2010 12:23
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_profil";
+$tableSelect=DB_PREFIXE."om_profil";
+$champs=array("om_profil","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_profil.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_profil.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_profil.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 13:09
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_profil");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_profil";
+$champAffiche=array('om_profil','libelle');
+$champRecherche=array('om_profil','libelle');
+$tri="";
+$edition="om_profil";
+$selection='';
+$sousformulaire=array('om_droit','om_utilisateur');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_sig_point.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_sig_point.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_sig_point.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 12/04/2011 16:08
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_sig_point";
+$tableSelect=DB_PREFIXE."om_sig_point";
+$champs=array("om_sig_point","om_collectivite","id","libelle","actif","zoom","fond_osm","fond_bing","fond_sat","layer_info","etendue","projection_externe","url","om_sql","maj","table_update","champ","retour");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_sig_point.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_sig_point.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_sig_point.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 12/04/2011 16:08
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_sig_point");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_sig_point";
+$champAffiche=array('om_sig_point','om_collectivite','id','libelle','actif','zoom','fond_osm','fond_bing','fond_sat','layer_info','etendue','projection_externe','maj','table_update','champ','retour');
+$champRecherche=array('id','libelle','actif','zoom','fond_osm','fond_bing','fond_sat','layer_info','etendue','projection_externe','maj','table_update','champ','retour');
+$tri="";
+$edition="om_sig_point";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_sig_point.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_sig_point.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_sig_point.om_collectivite ='".$idx."' and om_sig_point.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_sousetat.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_sousetat.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_sousetat.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 20/09/2011 09:16
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_sousetat";
+$tableSelect=DB_PREFIXE."om_sousetat";
+$champs=array("om_sousetat","om_collectivite","id","libelle","actif","titre","titrehauteur","titrefont","titreattribut","titretaille","titrebordure","titrealign","titrefond","titrefondcouleur","titretextecouleur","intervalle_debut","intervalle_fin","entete_flag","entete_fond","entete_orientation","entete_hauteur","entetecolone_bordure","entetecolone_align","entete_fondcouleur","entete_textecouleur","tableau_largeur","tableau_bordure","tableau_fontaille","bordure_couleur","se_fond1","se_fond2","cellule_fond","cellule_hauteur","cellule_largeur","cellule_bordure_un","cellule_bordure","cellule_align","cellule_fond_total","cellule_fontaille_total","cellule_hauteur_total","cellule_fondcouleur_total","cellule_bordure_total","cellule_align_total","cellule_fond_moyenne","cellule_fontaille_moyenne","cellule_hauteur_moyenne","cellule_fondcouleur_moyenne","cellule_bordure_moyenne","cellule_align_moyenne","cellule_fond_nbr","cellule_fontaille_nbr","cellule_hauteur_nbr","cellule_fondcouleur_nbr",
"cellule_bordure_nbr","cellule_align_nbr","cellule_numerique","cellule_total","cellule_moyenne","cellule_compteur","om_sql");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_sousetat.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_sousetat.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_sousetat.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,38 @@
+<?php
+//$Id$
+//gen openMairie le 20/09/2011 09:16
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_sousetat");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_sousetat";
+$champAffiche=array('om_sousetat','om_collectivite','id','libelle','actif','titrehauteur','titrefont','titreattribut','titretaille','titrebordure','titrealign','titrefond','titrefondcouleur','titretextecouleur','intervalle_debut','intervalle_fin','entete_flag','entete_fond','entete_hauteur','entetecolone_bordure','entetecolone_align','entete_fondcouleur','entete_textecouleur','tableau_largeur','tableau_bordure','tableau_fontaille','bordure_couleur','se_fond1','se_fond2','cellule_fond','cellule_hauteur','cellule_largeur','cellule_bordure_un','cellule_bordure','cellule_align','cellule_fond_total','cellule_fontaille_total','cellule_hauteur_total','cellule_fondcouleur_total','cellule_bordure_total','cellule_align_total','cellule_fond_moyenne','cellule_fontaille_moyenne','cellule_hauteur_moyenne','cellule_fondcouleur_moyenne','cellule_bordure_moyenne','cellule_align_moyenne','cellule_fond_nbr','cellule_fontaille_nbr','cellule_hauteur_nbr','cellule_fondcouleur_nbr','cellule_bordure_nbr','
cellule_align_nbr','cellule_numerique','cellule_total','cellule_moyenne','cellule_compteur');
+$champRecherche=array('id','libelle','actif','titrefont','titreattribut','titrebordure','titrealign','titrefond','titrefondcouleur','titretextecouleur','entete_flag','entete_fond','entetecolone_bordure','entetecolone_align','entete_fondcouleur','entete_textecouleur','tableau_bordure','bordure_couleur','se_fond1','se_fond2','cellule_fond','cellule_largeur','cellule_bordure_un','cellule_bordure','cellule_align','cellule_fond_total','cellule_fondcouleur_total','cellule_bordure_total','cellule_align_total','cellule_fond_moyenne','cellule_fondcouleur_moyenne','cellule_bordure_moyenne','cellule_align_moyenne','cellule_fond_nbr','cellule_fondcouleur_nbr','cellule_bordure_nbr','cellule_align_nbr','cellule_numerique','cellule_total','cellule_moyenne','cellule_compteur');
+$tri="";
+$edition="om_sousetat";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_sousetat.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_sousetat.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_sousetat.om_collectivite ='".$idx."' and om_sousetat.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_tdb.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_tdb.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_tdb.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,11 @@
+<?php
+//$Id$
+//gen openMairie le 12/05/2011 19:29
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_tdb";
+$tableSelect=DB_PREFIXE."om_tdb";
+$champs=array("om_tdb","login","bloc","om_widget","position");
+//champs select
+$sql_om_widget="select * from ".DB_PREFIXE."om_widget";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_tdb.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_tdb.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_tdb.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,31 @@
+<?php
+//$Id$
+//gen openMairie le 12/05/2011 19:29
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_tdb");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_tdb";
+$champAffiche=array('om_tdb','login','bloc','om_widget','position');
+$champRecherche=array('login','bloc');
+$tri="";
+$edition="om_tdb";
+$selection='';
+if ($retourformulaire== 'om_widget')
+ $selection=" where om_tdb.om_widget ='".$idx."'";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_utilisateur.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_utilisateur.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_utilisateur.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+//$Id$
+//gen openMairie le 17/11/2010 12:24
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_utilisateur";
+$tableSelect=DB_PREFIXE."om_utilisateur";
+$champs=array("om_utilisateur","nom","email","login","pwd","om_profil","om_collectivite","om_type");
+//champs select
+$sql_om_profil="select * from ".DB_PREFIXE."om_profil";
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+$selection = " and om_collectivite = 1";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_utilisateur.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_utilisateur.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_utilisateur.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,44 @@
+<?php
+//$Id$
+//gen openMairie le 06/12/2010 13:09
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_utilisateur");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_utilisateur";
+$champAffiche=array('om_utilisateur','nom','email','login','pwd','om_profil','om_collectivite','om_type');
+$champRecherche=array('nom','email','login','pwd','om_profil','om_type');
+$tri="";
+$edition="om_utilisateur";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_utilisateur.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_profil')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_utilisateur.om_profil ='".$idx."'";
+ }else{
+ $selection=" where om_utilisateur.om_profil ='".$idx."' and om_utilisateur.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_utilisateur.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_utilisateur.om_collectivite ='".$idx."' and om_utilisateur.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_widget.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_widget.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_widget.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,12 @@
+<?php
+//$Id$
+//gen openMairie le 12/05/2011 19:30
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->om_widget";
+$tableSelect=DB_PREFIXE."om_widget";
+$champs=array("om_widget","om_collectivite","libelle","lien","texte","om_profil");
+//champs select
+$sql_om_collectivite="select * from ".DB_PREFIXE."om_collectivite";
+$sql_om_profil="select * from ".DB_PREFIXE."om_profil";
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/om_widget.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/om_widget.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/om_widget.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,45 @@
+<?php
+//$Id$
+//gen openMairie le 12/05/2011 19:30
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("om_widget");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."om_widget";
+$champAffiche=array('om_widget','om_collectivite','libelle','lien','om_profil');
+$champRecherche=array('libelle','lien','om_profil');
+$tri="";
+$edition="om_widget";
+if ($_SESSION['niveau']== '2')
+ $selection='';
+else
+ $selection=" where om_widget.om_collectivite = '".$_SESSION['collectivite']."'";
+if ($retourformulaire== 'om_collectivite')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_widget.om_collectivite ='".$idx."'";
+ }else{
+ $selection=" where om_widget.om_collectivite ='".$idx."' and om_widget.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+if ($retourformulaire== 'om_profil')
+ if ($_SESSION['niveau']== '2'){
+ $selection=" where om_widget.om_profil ='".$idx."'";
+ }else{
+ $selection=" where om_widget.om_profil ='".$idx."' and om_widget.om_collectivite = '".$_SESSION['collectivite']."'";
+ }
+$sousformulaire=array('om_tdb');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/perimetre.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/perimetre.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/perimetre.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 24/05/2011 08:00
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->perimetre";
+$tableSelect=DB_PREFIXE."perimetre";
+$champs=array("perimetre","longueur_exclusion_metre","libelle","numero_voie","complement","voie","libelle_voie","complement_voie","geom");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/perimetre.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/perimetre.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/perimetre.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,29 @@
+<?php
+//$Id$
+//gen openMairie le 24/05/2011 08:00
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("perimetre");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."perimetre";
+$champAffiche=array('perimetre','longueur_exclusion_metre','libelle','numero_voie','complement','voie','libelle_voie','complement_voie','geom');
+$champRecherche=array('libelle','complement','voie','libelle_voie','complement_voie');
+$tri="";
+$edition="perimetre";
+$selection='';
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/terme.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/terme.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/terme.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 28/04/2011 15:06
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->terme";
+$tableSelect=DB_PREFIXE."terme";
+$champs=array("terme","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/terme.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/terme.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/terme.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 28/04/2011 15:06
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("terme");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."terme";
+$champAffiche=array('terme','libelle');
+$champRecherche=array('libelle');
+$tri="";
+$edition="terme";
+$selection='';
+$sousformulaire=array('demande_licence');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/type_demande.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/type_demande.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/type_demande.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 18/04/2011 14:22
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->type_demande";
+$tableSelect=DB_PREFIXE."type_demande";
+$champs=array("type_demande","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/type_demande.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/type_demande.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/type_demande.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 18/04/2011 14:22
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("type_demande");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."type_demande";
+$champAffiche=array('type_demande','libelle');
+$champRecherche=array('libelle');
+$tri="";
+$edition="type_demande";
+$selection='';
+$sousformulaire=array('demande_licence');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/type_etablissement.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/type_etablissement.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/type_etablissement.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:00
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->type_etablissement";
+$tableSelect=DB_PREFIXE."type_etablissement";
+$champs=array("type_etablissement","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/type_etablissement.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/type_etablissement.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/type_etablissement.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:00
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("type_etablissement");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."type_etablissement";
+$champAffiche=array('type_etablissement','libelle');
+$champRecherche=array('libelle');
+$tri="";
+$edition="type_etablissement";
+$selection='';
+$sousformulaire=array('etablissement');
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/type_licence.form.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/type_licence.form.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/type_licence.form.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,9 @@
+<?php
+//$Id$
+//gen openMairie le 06/04/2011 12:22
+$DEBUG=0;
+$ico="../img/ico_application.png";
+$ent="option->type_licence";
+$tableSelect=DB_PREFIXE."type_licence";
+$champs=array("type_licence","libelle");
+?>
\ No newline at end of file

Added: branches/1.x/gen/sql/pgsql/type_licence.inc.php
===================================================================
--- branches/1.x/gen/sql/pgsql/type_licence.inc.php (rev 0)
+++ branches/1.x/gen/sql/pgsql/type_licence.inc.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,30 @@
+<?php
+//$Id$
+//gen openMairie le 06/04/2011 12:22
+$DEBUG=0;
+$serie=15;
+$ico="../img/ico_application.png";
+$ent = _("option")." -> "._("type_licence");
+if(!isset($premier)) $premier='';
+if(!isset($recherche1)) $recherche1='';
+if(!isset($tricolsf)) $tricolsf='';
+if(!isset($premiersf)) $premiersf='';
+if(!isset($selection)) $selection='';
+if(!isset($retourformulaire)) $retourformulaire='';
+if(isset($idx)){
+ if($idx != ']')
+ if (trim($idx!=''))
+ $ent = $ent."-><font id='idz1'>&nbsp;".$idx."&nbsp;</font>";
+ }
+ if(isset($idz) ){
+ if (trim($idz!=''))
+ $ent = $ent."&nbsp;<font id='idz1'>&nbsp;".strtoupper($idz)."&nbsp;</font>";
+}
+$table=DB_PREFIXE."type_licence";
+$champAffiche=array('type_licence','libelle');
+$champRecherche=array('libelle');
+$tri="";
+$edition="type_licence";
+$selection='';
+$sousformulaire=array('demande_licence');
+?>
\ No newline at end of file

Added: branches/1.x/obj/courrier.class.php
===================================================================
--- branches/1.x/obj/courrier.class.php (rev 0)
+++ branches/1.x/obj/courrier.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,62 @@
+<?php
+//$Id$
+//gen openMairie le 04/05/2011 08:25
+require_once ("../gen/obj/courrier.class.php");
+
+class courrier extends courrier_gen {
+
+
+
+function setValF($val) {
+ parent::setValF($val);
+}
+
+
+
+function courrier($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+
+function setType(&$form,$maj) {
+ parent::setType($form,$maj);
+ $form->setType('etablissement','hidden');
+}
+
+
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('courrier',4);
+ $form->setTaille('date_courrier',10);
+ $form->setTaille('zone_texte',80);
+ $form->setTaille('type_courrier',80);
+ $form->setTaille('etablissement',4);
+ }
+
+
+
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('courrier',4);
+ $form->setMax('date_courrier',10);
+ $form->setMax('zone_texte',30);
+ $form->setMax('type_courrier',80);
+ $form->setMax('etablissement',4);
+ }
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='etablissement')
+ $form->setVal('etablissement', $idxformulaire);
+ if($retourformulaire =='etablissement_temporaire')
+ $form->setVal('etablissement', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+
+
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/demande_licence.class.php
===================================================================
--- branches/1.x/obj/demande_licence.class.php (rev 0)
+++ branches/1.x/obj/demande_licence.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,267 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 07:59
+require_once ("../gen/obj/demande_licence.class.php");
+
+class demande_licence extends demande_licence_gen {
+
+function demande_licence($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+function setValF($val) {
+ parent::setValF($val);
+ if($val['date_demande_licence']=='')
+ $this->valF['date_demande_licence']=date('Y-m-d');
+ if($val['date_debut_validite']==''){
+ $date_explode=explode("-", $this->valF['date_demande_licence']);
+ $this->valF['date_debut_validite']=date('Y-m-d',mktime(0, 0, 0, $date_explode[1], $date_explode[2]+15, $date_explode[0]));
+ }
+ if($val['date_fin_validite']=='')
+ $this->valF['date_fin_validite']=date('Y-m-d', mktime(0, 0, 0, date("m"), date("d"), date("Y")+20));
+ if($val['terme']=='')
+ $this->valF['terme']=null;
+ if($val['type_licence']=='')
+ $this->valF['type_licence']=1;
+ if($val['type_demande']=='')
+ $this->valF['type_demande']=1;
+ if($val['heure_debut']=='')
+ $this->valF['heure_debut']='00:00:00';
+ if($val['heure_fin']=='')
+ $this->valF['heure_fin']='23:59:59';
+ if($val['date_ancienne_demande']=='')
+ $this->valF['date_ancienne_demande']=null;
+}
+function setOnchange(&$form,$maj) {
+ $form->setOnchange('heure_debut','ftime(this)');
+ $form->setOnchange('heure_fin','ftime(this)');
+ }
+
+
+function setLib(&$form,$maj) {
+
+ //libelle des champs
+ $form->setLib('type_licence',_('Type de Licence :'));
+ $form->setLib('type_demande',_('Type de Demande :'));
+ $form->setLib('occasion',_('Occasion :'));
+ $form->setLib('particularite',_('Particularite :'));
+
+ $form->setLib('terme',_('Terme :'));
+ $form->setLib('date_demande_licence',_('Date demande licence :'));
+ $form->setLib('date_debut_validite',_('Date debut validite :'));
+ $form->setLib('date_fin_validite',_('Date fin validite :'));
+ $form->setLib('date_ancienne_demande',_('Date de la precedente demande :'));
+
+
+ $form->setRegroupe('terme','D',' '._('Terme').' ', "collapsible");
+ $form->setRegroupe('date_demande_licence','G','');
+ $form->setRegroupe('date_debut_validite','G','');
+ $form->setRegroupe('date_fin_validite','G','');
+ $form->setRegroupe('date_ancienne_demande','F','');
+
+
+}
+
+function setType(&$form,$maj)
+{
+ parent::setType($form,$maj);
+ $form->setType('etablissement','hidden');
+
+}
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('demande_licence',4);
+ $form->setTaille('type_licence',4);
+ $form->setTaille('type_demande',20);
+ $form->setTaille('terme',4);
+ $form->setTaille('date_demande_licence',10);
+ $form->setTaille('date_debut_validite',10);
+ $form->setTaille('date_fin_validite',10);
+ $form->setTaille('date_ancienne_demande',10);
+ $form->setTaille('occasion',50);
+ $form->setTaille('particularite',50);
+ }
+
+function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('particularite',10);
+ $form->setMax('demande_licence',4);
+ $form->setMax('type_licence',4);
+ $form->setMax('type_demande',20);
+ $form->setMax('terme',4);
+ $form->setMax('date_demande_licence',10);
+ $form->setMax('date_debut_validite',10);
+ $form->setMax('date_fin_validite',10);
+ $form->setMax('date_ancienne_demande',10);
+ $form->setMax('occasion',50);
+ }
+
+
+function verifDistance($val,&$db)
+{
+ $sql0="select geom from ".DB_PREFIXE."etablissement
+ where etablissement=".$val['etablissement'];
+ $res0=$db->getOne($sql0); // on récupère la géométrie de l'établissement
+
+
+ $sql= "select distance(geom,'".$res0."') as distance,perimetre,libelle from ".DB_PREFIXE."perimetre where distance(geom,'".$res0."') < longueur_exclusion_metre order by perimetre";
+ $res= $db->query($sql); // on recherche toute les distances entre un point d'exculion et cette géométrie et on la compare a la longueur d'exclusion
+ if (database::isError($res)){
+ $this->erreur_db($res->getDebugInfo(),$res->getMessage(),'');
+ }else{
+ while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){
+ $this->msg = $this->msg." Attention : Distance non-respectee avec le perimetre numero <a class=\"type1\" href=\"./form.php?obj=perimetre&tricol=&idx=".$row['perimetre']."&premier=0&recherche=&selectioncol=#\">".$row['perimetre']."</a>
+ <br> de libelle <a href=\"./form.php?obj=perimetre&tricol=&idx=".$row['perimetre']."&premier=0&recherche=&selectioncol=#\">".$row['libelle'] ."</a> ( ".round($row['distance'],0)." metres )<br><br>";
+ }
+ }
+ $sql= "select distance(etablissement.geom,'".$res0."') as distance,
+ etablissement.enseigne as ens,
+ etablissement.etablissement,
+ type_licence.libelle as typ
+ from ".DB_PREFIXE."etablissement
+ inner join ".DB_PREFIXE."demande_licence
+ on demande_licence.etablissement = etablissement.etablissement
+ inner join ".DB_PREFIXE."type_licence
+ on type_licence.type_licence = demande_licence.type_licence
+ where
+ distance(etablissement.geom,'".$res0."') < 50
+ and
+ ( demande_licence.type_licence = 2
+ or demande_licence.type_licence = 3
+ or demande_licence.type_licence = 4
+ )
+ and etablissement.etablissement<>".$val['etablissement']."
+ order by etablissement.etablissement";
+ /* */
+ $res= $db->query($sql); // on recherche toute les distances entre un point d'exculion et cette géométrie et on la compare a la longueur d'exclusion
+ if (database::isError($res)){
+ $this->erreur_db($res->getDebugInfo(),$res->getMessage(),'');
+ }else{
+ while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){
+ $this->msg = $this->msg."
+
+<style type=\"text/css\"><!--a.type1:hover { color: red;}--></style>
+ Attention : Distance non-respectee avec l'etablissement numero <a class=\"type1\" href=\"./form.php?obj=etablissement&tricol=&idx=".$row['etablissement']."&premier=0&recherche=&selectioncol=#\">".$row["etablissement"]."</a>
+ <br> d'enseigne <a class=\"type1\" href=\"./form.php?obj=etablissement&tricol=&idx=".$row['etablissement']."&premier=0&recherche=&selectioncol=#\">".$row['ens'] ."</a> possedant une licence ".$row['typ']." ( ".round($row['distance'],0)." metres )<br><br>";
+ }
+ }
+
+}
+
+function verifQte($val,&$db,$type)
+{
+ $sql= "select COUNT(*) as somme from ".DB_PREFIXE."demande_licence where
+ etablissement =".$val['etablissement']."
+ and terme=".$type."
+ and to_char(date_debut_validite,'YYYY') = to_char(date('".$val['date_debut_validite']."'),'YYYY')";
+
+ $res= $db->getOne($sql);
+ if (database::isError($res))
+ $this->erreur_db($res->getDebugInfo(),$res->getMessage(),'');
+ else {
+ if ($res>=($type-1)*5) // 5 pour les temporaires 10 pour les liee a un terrain de sport
+ $this->msg= $this->msg."Nombre maximum de demandes de licence temporaire ou lie a un terain de sport pour cette etablissement depasse";
+ }
+
+
+}
+
+function triggerajouter($id, &$db, $val){
+
+
+
+ $sql= "select etablissement.permis_exploitation
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$val['etablissement'];
+ $res= $db->getOne($sql);
+ if($res != 'Oui') $this->msg= $this->msg."<br>l'entreprise n'as pas de permis d'exploitation<br>";
+
+
+ $sql2= "select etablissement.geom
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$val['etablissement'];
+ $res2= $db->getOne($sql2);
+
+ if ($val['type_demande'] != 2 && // Si la demande n'est pas une demande de transfert
+ ( $val['type_licence']==2 || $val['type_licence']==3 || $val['type_licence']==4)&& // Si la demande est une demande de licence de boisson alcoolisee
+ $val['terme']==1) // Si la licence est une licence Permanente
+ {
+ if($res2!=null)
+ $this->verifDistance($val,$db);
+ else
+ $this->msg= $this->msg."<br>l'entreprise n'est pas geolocalisable<br>";
+ }
+ else if ($val['terme']!=1)
+ $this->verifQte($val,$db,$val['terme']);
+
+ if($val['date_ancienne_demande']==''){
+ $sql2= "select date_debut_validite
+ from ".DB_PREFIXE."demande_licence
+ where etablissement=".$val['etablissement']."
+ order by date_debut_validite desc limit 1;
+ ";
+ $res2= $db->getOne($sql2);
+ $val['date_ancienne_demande']=$res2;
+ $this->valF['date_ancienne_demande']=$res2;
+ }
+}
+
+ function verifier($val,&$db,$DEBUG) {
+ parent::verifier($val,$db,$DEBUG);
+ if ($this->valF['terme']==""){
+ $this->msg= $this->msg."Terme obligatoire";
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+function triggermodifier($id, &$db, $val) {
+
+ $sql= "select etablissement.permis_exploitation
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$val['etablissement'];
+ $res= $db->getOne($sql);
+ if($res != 'Oui') $this->msg= $this->msg."<br>l'entreprise n'as pas de permis d'exploitation<br>";
+
+
+ $sql2= "select etablissement.geom
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$val['etablissement'];
+ $res2= $db->getOne($sql2);
+
+
+
+ if ($val['type_demande'] != 3 && // Si la demande n'est pas une mutation
+ ( $val['type_licence']==2 || $val['type_licence']==3 || $val['type_licence']==4)&& // Si la demande est une demande de licence de boisson alcoolisee
+ $val['terme']==1) // Si la licence est une licence Permanente
+ {
+ if($res2!=null)
+ $this->verifDistance($val,$db);
+ else
+ $this->msg= $this->msg."<br>l'entreprise n'est pas geolocalisable<br>";
+ }
+ else if ($val['terme']!=1)
+ $this->verifQte($val,$db,$val['terme']);
+}
+
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='etablissement'){
+
+ $sql= "select etablissement.particularite_exploitant
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$idxformulaire;
+ $res= $db->getOne($sql);
+
+ if($form->val['particularite']==null)
+ $form->setVal('particularite', $res);
+ $form->setVal('etablissement', $idxformulaire);
+ }
+ if($retourformulaire =='etablissement_temporaire')
+ $form->setVal('etablissement', $idxformulaire);
+ }// fin validation
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/demande_licence_temporaire.class.php
===================================================================
--- branches/1.x/obj/demande_licence_temporaire.class.php (rev 0)
+++ branches/1.x/obj/demande_licence_temporaire.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,263 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 07:59
+require_once ("../gen/obj/demande_licence.class.php");
+
+class demande_licence_temporaire extends demande_licence_gen {
+
+function demande_licence_temporaire($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+function setValF($val) {
+ parent::setValF($val);
+ if($val['date_demande_licence']=='')
+ $this->valF['date_demande_licence']=date('Y-m-d');
+ if($val['date_debut_validite']==''){
+ $date_explode=explode("-", $this->valF['date_demande_licence']);
+ $this->valF['date_debut_validite']=date('Y-m-d',mktime(0, 0, 0, $date_explode[1], $date_explode[2]+15, $date_explode[0]));
+ }
+ if($val['date_fin_validite']=='')
+ $this->valF['date_fin_validite']=date('Y-m-d');
+ if($val['terme']=='')
+ $this->valF['terme']=null;
+ if($val['terme']==1){
+ $this->valF['terme']=2;
+ $this->msg = $this->msg.'<br> Erreur terme permanent pour la licence d\'un etablissement temporaire. Terme rectifie par "Temporaire"<br>';
+ }
+
+ if($val['type_licence']=='')
+ $this->valF['type_licence']=1;
+ $this->valF['type_demande']=1;
+ if($val['heure_debut']=='')
+ $this->valF['heure_debut']='00:00:00';
+ if($val['heure_fin']=='')
+ $this->valF['heure_fin']='23:59:59';
+ if($val['type_demande']="D'ouverture")
+ $this->valF['type_demande']=1;
+ if($val['date_ancienne_demande']=='')
+ $this->valF['date_ancienne_demande']=null;
+}
+function setOnchange(&$form,$maj) {
+ $form->setOnchange('heure_debut','ftime(this)');
+ $form->setOnchange('heure_fin','ftime(this)');
+ }
+
+
+function setLib(&$form,$maj) {
+
+ //libelle des champs
+ $form->setLib('type_licence',_('Type de Licence :'));
+ $form->setLib('type_demande',_('Type de Demande :'));
+ $form->setLib('occasion',_('Occasion :'));
+
+ $form->setLib('terme',_('Terme :'));
+ $form->setLib('date_demande_licence',_('Date demande licence :'));
+ $form->setLib('date_debut_validite',_('Date debut validite :'));
+ $form->setLib('date_fin_validite',_('Date fin validite :'));
+ $form->setLib('date_ancienne_demande',_('Date de la précédente demande :'));
+
+
+ $form->setRegroupe('terme','D',' '._('Terme').' ', "collapsible");
+ $form->setRegroupe('date_demande_licence','G','');
+ $form->setRegroupe('date_debut_validite','G','');
+ $form->setRegroupe('date_fin_validite','G','');
+ $form->setRegroupe('date_ancienne_demande','F','');
+
+
+}
+function setType(&$form,$maj)
+{
+ parent::setType($form,$maj);
+ $form->setType('etablissement','hidden');
+ $form->setType('particularite','hidden');
+ $form->setType('type_demande','hiddenstatic');
+ $form->setType('date_ancienne_demande','hidden');
+}
+
+function setSelect(&$form, $maj,&$db,$debug) {
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ // type_licence
+ $contenu=array();
+ $res = $db->query($sql_type_licence);
+ if (database::isError($res))
+ die($res->getMessage().$sql_type_licence);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_type_licence." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('type_licence');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('type_licence',$contenu);
+ }// fin error db
+ // terme
+ $contenu=array();
+ $res = $db->query($sql_terme_temp);
+ if (database::isError($res))
+ die($res->getMessage().$sql_terme);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_terme." est executee<br>";
+ $k=0;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('terme',$contenu);
+ }// fin error db
+ // etablissement
+ $contenu=array();
+ $res = $db->query($sql_etablissement);
+ if (database::isError($res))
+ die($res->getMessage().$sql_etablissement);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_etablissement." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('etablissement');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('etablissement',$contenu);
+ }// fin error db
+ }// fin maj
+ }// fin select
+
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('demande_licence',4);
+ $form->setTaille('type_licence',4);
+ $form->setTaille('type_demande',20);
+ $form->setTaille('terme',4);
+ $form->setTaille('date_demande_licence',10);
+ $form->setTaille('date_debut_validite',10);
+ $form->setTaille('date_fin_validite',10);
+ $form->setTaille('date_ancienne_demande',10);
+ $form->setTaille('occasion',50);
+ }
+
+function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('demande_licence',4);
+ $form->setMax('type_licence',4);
+ $form->setMax('type_demande',20);
+ $form->setMax('terme',4);
+ $form->setMax('date_demande_licence',10);
+ $form->setMax('date_debut_validite',10);
+ $form->setMax('date_fin_validite',10);
+ $form->setMax('date_ancienne_demande',10);
+ $form->setMax('occasion',50);
+ }
+
+
+
+
+function verifQte($val,&$db,$type)
+{
+ $sql= "select COUNT(*) as somme from ".DB_PREFIXE."demande_licence where
+ etablissement =".$val['etablissement']."
+ and terme=".$type."
+ and to_char(date_debut_validite,'YYYY') = to_char(date('".$val['date_debut_validite']."'),'YYYY')";
+
+ $res= $db->getOne($sql);
+ if (database::isError($res))
+ $this->erreur_db($res->getDebugInfo(),$res->getMessage(),'');
+ else {
+ if ($res>=($type-1)*5) // 5 pour les temporaires 10 pour les liee a un terrain de sport
+ $this->msg= $this->msg."Nombre maximum de demandes de licence temporaire ou lie a un terain de sport pour cette etablissement depasse";
+ }
+
+
+}
+
+function triggerajouter($id, &$db, $val){
+
+ if($val['date_debut_validite']=='')
+ $val['date_debut_validite']=date('Y-m-d');
+ if($val['date_fin_validite']=='')
+ $val['date_fin_validite']=date('Y-m-d');
+
+
+ $sql= "select etablissement.permis_exploitation
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$val['etablissement'];
+ $res= $db->getOne($sql);
+ if($res != 'Oui') $this->msg= $this->msg."<br>l'entreprise n'as pas de permis d'exploitation<br>";
+
+
+ $sql2= "select etablissement.geom
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$val['etablissement'];
+ $res2= $db->getOne($sql2);
+
+ if ($val['type_demande'] != 3 && // Si la demande n'est pas une mutation
+ ( $val['type_licence']==2 || $val['type_licence']==3 || $val['type_licence']==4)) // Si la demande est une demande de licence de boisson alcoolisee
+ $this->verifQte($val,$db,$val['terme']);
+
+
+ if($val['date_ancienne_demande']==''){
+ $sql2= "select date_debut_validite
+ from ".DB_PREFIXE."demande_licence
+ order by date_debut_validite desc limit 1;
+ ";
+ $res2= $db->getOne($sql2);
+ $val['date_ancienne_demande']=$res2;
+ $this->valF['date_ancienne_demande']=$res2;
+ }
+}
+
+ function verifier($val,&$db,$DEBUG) {
+ parent::verifier($val,$db,$DEBUG);
+ if ($this->valF['terme']==""){
+ $this->msg= $this->msg."Terme obligatoire";
+ $this->correct=False;
+ }
+ } // fin verifier [end verify]
+
+function triggermodifier($id, &$db, $val) {
+
+ if($val['date_debut_validite']=='')
+ $val['date_debut_validite']=date('Y-m-d');
+ if($val['date_fin_validite']=='')
+ $val['date_fin_validite']=date('Y-m-d');
+
+ if ($val['type_demande'] != 3 && // Si la demande n'est pas une mutation
+ ( $val['type_licence']==2 || $val['type_licence']==3 || $val['type_licence']==4)&& // Si la demande est une demande de licence de boisson alcoolisee
+ $val['terme']==1) // Si la licence est une licence Permanente
+ $this->verifDistance($val,$db);
+ else if ($val['terme']!=1)
+ $this->verifQte($val,$db,$val['terme']);
+}
+
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='etablissement_temporaire'){
+
+ $sql= "select etablissement.particularite_exploitant
+ from ".DB_PREFIXE."etablissement
+ where etablissement =".$idxformulaire;
+ $res= $db->getOne($sql);
+
+ if($form->val['particularite']==null)
+ $form->setVal('particularite', $res);
+ $form->setVal('etablissement', $idxformulaire);
+ $form->setVal('type_demande', "D'ouverture");
+ }
+ }// fin validation
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/dossier.class.php
===================================================================
--- branches/1.x/obj/dossier.class.php (rev 0)
+++ branches/1.x/obj/dossier.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,237 @@
+<?php
+//$Id$
+//gen openMairie le 06/04/2011 13:45
+require_once ("../gen/obj/dossier.class.php");
+
+class dossier extends dossier_gen {
+
+function dossier($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+
+
+
+function setValF($val) {
+ parent::setValF($val);
+
+ if($val['nom']=='')
+ $this->valF['nom']=null;
+ if($val['ancien_nom']=='')
+ $this->valF['ancien_nom']=null;
+ if($val['observation']=='')
+ $this->valF['observation']=null;
+ if($val['etablissement']=='')
+ $this->valF['etablissement']=null;
+
+}
+
+function setLib(&$form,$maj) {
+
+//libelle des champs
+ $form->setLib('date_piece',_('Date de depot :'));
+ $form->setLib('nom',_('Nom de la piece :'));
+ $form->setLib('observation',_('Observation :'));
+ $form->setLib('etablissement',_('etablissement :'));
+
+}
+
+function setType(&$form,$maj) {
+ parent::setType($form,$maj);
+ $form->setType('nom','upload2');
+ $form->setType('ancien_nom','hidden');
+ $form->setType('etablissement','hidden');
+}
+
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('nom',50);
+ $form->setTaille('date_piece',10);
+ $form->setTaille('ancien_nom',50);
+ $form->setTaille('observation',80);
+ $form->setTaille('etablissement',30);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('nom',50);
+ $form->setMax('date_piece',10);
+ $form->setMax('ancien_nom',50);
+ $form->setMax('observation',200);
+ $form->setMax('etablissement',30);
+ }
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){
+ $this->retourformulaire = $retourformulaire;
+ if($validation==0) {
+ if($retourformulaire =='etablissement')
+ $form->setVal('etablissement', $idxformulaire);
+ if($retourformulaire =='etablissement_temporaire')
+ $form->setVal('etablissement', $idxformulaire);
+ }// fin validation
+ }// fin setValsousformulaire
+
+
+function triggerajouterapres($id,&$db,$val,$DEBUG) {
+ $dossierparcentaine =1;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../app/img/info.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // analyse fichier source
+ $fic=explode(".", $this->valF["nom"]);
+ $extension=$fic[sizeof($fic)-1];
+ $fichier ="../trs/".$_SESSION['coll']."/".$this->valF["nom"];
+ $nom=$this->valF['dossier'];
+ $x=0;
+ $k=0;
+ $nomk=$nom ;
+ // repertoire collectivite
+ $rep ="../trs/".$_SESSION['coll']."/";
+ if(!file_exists($rep)) // creation du repertoire collectivite
+ mkdir($rep);
+ // ===================================================
+ // version 1.11
+ // repertoire par centaine
+ // voir variable dans dyn/var.inc
+ // ===================================================
+ include ("../dyn/var.inc");
+ if(!isset($dossierparcentaine)) $dossierparcentaine =0;
+ if($dossierparcentaine==1){
+ $temp = intval($this->valF["dossier"]/100);
+ $temp = $temp."/";
+ $rep =$rep.$temp;
+ if(!file_exists($rep)) // repertoire par centaine de concession
+ mkdir($rep);
+ }
+ while ($x==0):
+ $fichierobjet=$rep.$nomk.".".$extension;
+ $k++ ;
+ if(file_exists($fichierobjet)){
+ $nomk=$nom."_".$k;
+ }else
+ $x=1;
+ endwhile ;
+ $valF['nom']= $nomk.".".$extension;
+ $valF['ancien_nom']=$nomk.".".$extension; // extension
+ // *** 1.11
+ if($dossierparcentaine==1){
+ copy($fichier,$rep.$this->valF['dossier'].".".$extension);
+ unlink($fichier);
+ $valF['nom']=$temp.$this->valF['dossier'].".".$extension; // extension
+ $valF['ancien_nom']=$temp.$this->valF['dossier'].".".$extension; // extension
+ }else
+ rename($fichier,$rep.$this->valF['dossier'].".".$extension); //
+ // changer le champ "fichier"
+ $cle= "dossier = ".$this->valF['dossier']."";
+ $res= $db->autoExecute(DB_PREFIXE.$this->table,$valF,DB_AUTOQUERY_UPDATE,$cle);
+ if (DB :: isError($res))
+ $res->getDebugInfo();
+ else{
+ if ($DEBUG == 1)
+ echo "La requete de mise a jour est effectuee.<br>";
+ $this->msg=$this->msg.$imgv._("enregistrement")." ".
+ $id." "._("table")." ".
+ $this->table." [".$db->affectedRows().
+ _("enregistrement")." "._("mis_a_jour")."]" .$f.
+ $imgv._("creation")." "._("fichier")." ".$valF['nom'].$f ;
+ } // requete maj
+ }
+
+ function triggermodifierapres($id,&$db,$val,$DEBUG) {
+ $dossierparcentaine =1;
+
+ if ($val["ancien_nom"]!=$val["nom"]){
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../app/img/info.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // repertoire collectivite
+ $rep ="../trs/".$_SESSION['coll']."/";
+ if(file_exists($rep.$val["ancien_nom"])){
+ unlink($rep.$val["ancien_nom"]);
+ $this->msg=$this->msg.$imgv._("destruction")." "._("fichier")." ".
+ $rep.$val['ancien_nom'].$f ;
+ }else{
+ $this->msg=$this->msg.$imgv._("fichier")." ".
+ _("inexistant")." ".$rep.
+ $val["ancien_nom"].$f;
+ }
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../app/img/info.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // analyse fichier source
+ $fic=explode(".", $this->valF["nom"]);
+ $extension=$fic[sizeof($fic)-1];
+ $fichier ="../trs/".$_SESSION['coll']."/".$this->valF["nom"];
+ $nom=$this->valF['dossier'];
+ $x=0;
+ $k=0;
+ $nomk=$nom ;
+ // repertoire collectivite
+ $rep ="../trs/".$_SESSION['coll']."/";
+ if(!file_exists($rep)) // creation du repertoire collectivite
+ mkdir($rep);
+ // ===================================================
+ // version 1.11
+ // repertoire par centaine
+ // voir variable dans dyn/var.inc
+ // ===================================================
+ include ("../dyn/var.inc");
+ if(!isset($dossierparcentaine)) $dossierparcentaine =0;
+ if($dossierparcentaine==1){
+ $temp = intval($val['dossier']/100);
+ $temp = $temp."/";
+ $rep =$rep.$temp;
+ if(!file_exists($rep)) // repertoire par centaine de concession
+ mkdir($rep);
+ }
+ while ($x==0):
+ $fichierobjet=$rep.$nomk.".".$extension;
+ $k++ ;
+ if(file_exists($fichierobjet)){
+ $nomk=$nom."_".$k;
+ }else
+ $x=1;
+ endwhile ;
+ $valF['nom']= $nomk.".".$extension;
+ // *** 1.11
+ if($dossierparcentaine==1){
+ copy($fichier,$rep.$this->valF['dossier'].".".$extension);
+ unlink($fichier);
+ $valF['nom']=$temp.$this->valF['dossier'].".".$extension; // extension
+ $valF['ancien_nom']=$temp.$this->valF['dossier'].".".$extension; // extension
+ }else
+ rename($fichier,$rep.$this->valF['dossier'].".".$extension); //
+ // changer le champ "fichier"
+ $cle= "dossier = ".$this->valF['dossier']."";
+ $res= $db->autoExecute(DB_PREFIXE.$this->table,$valF,DB_AUTOQUERY_UPDATE,$cle);
+ if (DB :: isError($res))
+ $res->getDebugInfo();
+ else{
+ if ($DEBUG == 1)
+ echo "La requete de mise a jour est effectuee.<br>";
+ $this->msg=$this->msg.$imgv._("enregistrement")." ".
+ $id." "._("table")." ".
+ $this->table." [".$db->affectedRows().
+ _("enregistrement")." "._("mis_a_jour")."]" .$f.
+ $imgv._("creation")." "._("fichier")." ".$valF['nom'].$f ;
+ } // requete maj
+ }
+}
+
+function triggersupprimerapres($id,&$db,$val,$DEBUG) {
+ $dossierparcentaine =1;
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../app/img/info.png' style='vertical-align:middle' hspace='2' border='0'>";
+ // repertoire collectivite
+ $rep ="../trs/".$_SESSION['coll']."/";
+ if(file_exists($rep.$val["ancien_nom"])){
+ unlink($rep.$val["ancien_nom"]);
+ $this->msg=$this->msg.$imgv._("destruction")." "._("fichier")." ".
+ $rep.$val['ancien_nom'].$f ;
+ }else{
+ $this->msg=$this->msg.$imgv._("fichier")." ".
+ _("inexistant")." ".$rep.
+ $val["ancien_nom"].$f;
+ }
+}
+
+
+}// fin classe
+?>

Added: branches/1.x/obj/etablissement.class.php
===================================================================
--- branches/1.x/obj/etablissement.class.php (rev 0)
+++ branches/1.x/obj/etablissement.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,641 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:01
+require_once ("../gen/obj/etablissement.class.php");
+
+class etablissement extends etablissement_gen {
+
+ var $wkt;
+
+function etablissement($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ $this->wkt=0;
+}// fin constructeur
+
+
+function setValF($val) {
+parent::setValF($val);
+ if($val['raison_sociale']=='')
+ $this->valF['raison_sociale']=null;
+ if($val['enseigne']=='')
+ $this->valF['enseigne']=null;
+ if($val['no_siret']=='')
+ $this->valF['no_siret']=null;
+ if($val['forme_juridique']=='')
+ $this->valF['forme_juridique']=null;
+ if($val['permis_exploitation']=='')
+ $this->valF['permis_exploitation']=null;
+ if($val['date_permis_exploitation']=='')
+ $this->valF['date_permis_exploitation']=null;
+ if($val['permis_exploitation_nuit']=='')
+ $this->valF['permis_exploitation_nuit']=null;
+ if($val['date_permis_exploitation_nuit']=='')
+ $this->valF['date_permis_exploitation_nuit']=null;
+
+
+ if($val['numero_voie']=='')
+ $this->valF['numero_voie']=null;
+ if($val['complement']=='')
+ $this->valF['complement']=null;
+ if($val['voie']=='')
+ $this->valF['voie']=null;
+ if($val['libelle_voie']=='')
+ $this->valF['libelle_voie']=null;
+ if($val['complement_voie']=='')
+ $this->valF['complement_voie']=null;
+
+ if($val['cp_etablissement']=='')
+ $this->valF['cp_etablissement']=null;
+ if($val['ville_etablissement']=='')
+ $this->valF['ville_etablissement']=null;
+
+ if($val['date_naissance_exploitant']=='')
+ $this->valF['date_naissance_exploitant']=null;
+ if($val['ville_naissance_exploitant']=='')
+ $this->valF['ville_naissance_exploitant']=null;
+ if($val['cp_naissance_exploitant']=='')
+ $this->valF['cp_naissance_exploitant']=null;
+ if($val['nationalite_exploitant']=='')
+ $this->valF['nationalite_exploitant']=null;
+ if($val['nom_exploitant']=='')
+ $this->valF['nom_exploitant']=null;
+ if($val['nom_marital_exploitant']=='')
+ $this->valF['nom_marital_exploitant']=null;
+ if($val['prenom_exploitant']=='')
+ $this->valF['prenom_exploitant']=null;
+ if($val['adresse1_exploitant']=='')
+ $this->valF['adresse1_exploitant']=null;
+ if($val['adresse2_exploitant']=='')
+ $this->valF['adresse2_exploitant']=null;
+ if($val['cp_exploitant']=='')
+ $this->valF['cp_exploitant']=null;
+ if($val['ville_exploitant']=='')
+ $this->valF['ville_exploitant']=null;
+ if($val['particularite_exploitant']=='')
+ $this->valF['particularite_exploitant']=null;
+
+
+ if($val['nom_proprietaire']=='')
+ $this->valF['nom_proprietaire']=null;
+ if($val['prenom_proprietaire']=='')
+ $this->valF['prenom_proprietaire']=null;
+ if($val['adresse1_proprietaire']=='')
+ $this->valF['adresse1_proprietaire']=null;
+ if($val['adresse2_proprietaire']=='')
+ $this->valF['adresse2_proprietaire']=null;
+ if($val['cp_proprietaire']=='')
+ $this->valF['cp_proprietaire']=null;
+ if($val['ville_proprietaire']=='')
+ $this->valF['ville_proprietaire']=null;
+ if($val['profession_proprietaire']=='')
+ $this->valF['profession_proprietaire']=null;
+
+ if( ($val['nom_proprietaire']=='')
+ && ($val['prenom_proprietaire']=='')
+ && ($val['adresse1_proprietaire']=='')
+ && ($val['adresse2_proprietaire']=='')
+ && ($val['cp_proprietaire']=='')
+ && ($val['ville_proprietaire']==''))
+ {
+ if($val['civilite_exploitant']!='')
+ $this->valF['civilite_proprietaire']=$val['civilite_exploitant'];
+ if($val['nom_exploitant']!='')
+ $this->valF['nom_proprietaire']=$val['nom_exploitant'];
+ if($val['prenom_exploitant']!='')
+ $this->valF['prenom_proprietaire']=$val['prenom_exploitant'];
+ if($val['adresse1_exploitant']!='')
+ $this->valF['adresse1_proprietaire']=$val['adresse1_exploitant'];
+ if($val['adresse2_exploitant']!='')
+ $this->valF['adresse2_proprietaire']=$val['adresse2_exploitant'];
+ if($val['cp_exploitant']!='')
+ $this->valF['cp_proprietaire']=$val['cp_exploitant'];
+ if($val['ville_exploitant']!='')
+ $this->valF['ville_proprietaire']=$val['ville_exploitant'];
+ }
+
+
+ if($val['no_siret']=='')
+ $this->valF['no_siret']=null;
+ if($val['forme_juridique']=='')
+ $this->valF['forme_juridique']=null;
+ if($val['exploitant']=='')
+ $this->valF['exploitant']=null;
+ if($val['date_liquidation']=='')
+ $this->valF['date_liquidation']=null;
+ if($val['date_fermeture']=='')
+ $this->valF['date_fermeture']=null;
+ if($val['date_permis_exploitation']=='')
+ $this->valF['date_permis_exploitation']=null;
+
+
+ if($val['geom']=='')
+ $this->valF['geom']= null;
+ else
+ if(substr($val['geom'],0,5)== "POINT"){
+ $this->wkt=1;
+ $this->valF['geom'] = null;
+ }else
+ $this->valF['geom'] = $val['geom'];
+
+
+
+ $this->valF['nature']='permanent';
+ //++
+ //
+ if($val['date_naissance_co_exploitant']=='')
+ $this->valF['date_naissance_co_exploitant']=null;
+ if($val['ville_naissance_co_exploitant']=='')
+ $this->valF['ville_naissance_co_exploitant']=null;
+ if($val['cp_naissance_co_exploitant']=='')
+ $this->valF['cp_naissance_co_exploitant']=null;
+ if($val['nationalite_co_exploitant']=='')
+ $this->valF['nationalite_co_exploitant']=null;
+ if($val['nom_co_exploitant']=='')
+ $this->valF['nom_co_exploitant']=null;
+ if($val['nom_marital_co_exploitant']=='')
+ $this->valF['nom_marital_co_exploitant']=null;
+ if($val['prenom_co_exploitant']=='')
+ $this->valF['prenom_co_exploitant']=null;
+ if($val['adresse1_co_exploitant']=='')
+ $this->valF['adresse1_co_exploitant']=null;
+ if($val['adresse2_co_exploitant']=='')
+ $this->valF['adresse2_co_exploitant']=null;
+ if($val['cp_co_exploitant']=='')
+ $this->valF['cp_co_exploitant']=null;
+ if($val['ville_co_exploitant']=='')
+ $this->valF['ville_co_exploitant']=null;
+ if($val['co_exploitant']=='')
+ $this->valF['co_exploitant']=null;
+ if($val['particularite_co_exploitant']=='')
+ $this->valF['particularite_co_exploitant']=null;
+
+ if($val['nom_ancien_exploitant']=='')
+ $this->valF['nom_ancien_exploitant']=null;
+ if($val['prenom_ancien_exploitant']=='')
+ $this->valF['prenom_ancien_exploitant']=null;
+ if($val['ancien_exploitant']=='')
+ $this->valF['ancien_exploitant']=null;
+ if($val['ancien_proprietaire']=='')
+ $this->valF['ancien_proprietaire']=null;
+
+}
+
+function setLib(&$form,$maj) {
+
+ //libelle des champs
+ $form->setLib('raison_sociale',_('Raison Sociale :'));
+ $form->setLib('enseigne',_('Enseigne :'));
+ $form->setLib('no_siret',_('Num. Siret :'));
+ $form->setLib('forme_juridique',_('Forme Juridique :'));
+ $form->setLib('permis_exploitation',_('Permis d\'exploitation :'));
+ $form->setLib('date_permis_exploitation',_('Date de permis d\'exploitation :'));
+ $form->setLib('permis_exploitation_nuit',_('Permis d\'exploitation de nuit:'));
+ $form->setLib('date_permis_exploitation_nuit',_('Date de permis d\'exploitation de nuit :'));
+
+
+ $form->setLib('numero_voie',_('Numero Voie :'));
+ $form->setLib('complement',_('Complement :'));
+ $form->setLib('voie',_('Voie :'));
+ $form->setLib('libelle_voie',_('Libelle de Voie :'));
+ $form->setLib('complement_voie',_('Complement de Voie :'));
+ $form->setLib('adresse_postale',_(' '));
+
+
+ $form->setRegroupe('numero_voie','D',' '._('localisation').' ', "collapsible");
+ $form->setRegroupe('complement','G','');
+ $form->setRegroupe('voie','G','');
+ $form->setRegroupe('libelle_voie','G','');
+ $form->setRegroupe('complement_voie','G','');
+ $form->setRegroupe('cp_etablissement','G','');
+ $form->setRegroupe('ville_etablissement','F','');
+
+ $form->setLib('cp_etablissement',_('CP de l\'etablissement :'));
+ $form->setLib('ville_etablissement',_('Ville de l\'etablissement :'));
+
+ $form->setLib('civilite_exploitant',_('Civilite :'));
+ $form->setLib('nom_exploitant',_('Nom :'));
+ $form->setLib('nom_marital_exploitant',_('Nom Marital :'));
+ $form->setLib('prenom_exploitant',_('Prenom :'));
+ $form->setLib('date_naissance_exploitant',_('Date de Naissance :'));
+ $form->setLib('ville_naissance_exploitant',_('Ville de Naissance :'));
+ $form->setLib('cp_naissance_exploitant',_('CP de Naissance :'));
+ $form->setLib('adresse1_exploitant',_('Adresse1 :'));
+ $form->setLib('adresse2_exploitant',_('Adresse2 :'));
+ $form->setLib('cp_exploitant',_('CP :'));
+ $form->setLib('ville_exploitant',_('Ville :'));
+ $form->setLib('nationalite_exploitant',_('Nationalite :'));
+ $form->setLib('exploitant',_('Exploitation :'));
+ $form->setLib('particularite_exploitant',_('Particularite :'));
+ //
+ $form->setLib('civilite_co_exploitant',_('Civilite'));
+ $form->setLib('nom_co_exploitant',_('Nom'));
+ $form->setLib('nom_marital_co_exploitant',_('Nom marital'));
+ $form->setLib('prenom_co_exploitant',_('Prenom'));
+ $form->setLib('date_naissance_co_exploitant',_('Date naissance'));
+ $form->setLib('ville_naissance_co_exploitant',_('Ville naissance'));
+ $form->setLib('cp_naissance_co_exploitant',_('Cp naissance'));
+ $form->setLib('adresse1_co_exploitant',_('Adresse1'));
+ $form->setLib('adresse2_co_exploitant',_('Adresse2'));
+ $form->setLib('cp_co_exploitant',_('Cp'));
+ $form->setLib('ville_co_exploitant',_('Ville'));
+ $form->setLib('nationalite_co_exploitant',_('Nationalite'));
+ $form->setLib('co_exploitant',_('Co-Exploitant'));
+ $form->setLib('particularite_co_exploitant',_('Particularite'));
+
+ $form->setLib('nom_ancien_exploitant',_('Nom'));
+ $form->setLib('prenom_ancien_exploitant',_('Prenom'));
+ $form->setLib('ancien_exploitant',_('Qualite'));
+ //
+ $form->setRegroupe('civilite_co_exploitant','D',' '._('Co-Exploitant').' ', "startClosed");
+ $form->setRegroupe('nom_co_exploitant','G','');
+ $form->setRegroupe('nom_marital_co_exploitant','G','');
+ $form->setRegroupe('prenom_co_exploitant','G','');
+ $form->setRegroupe('date_naissance_co_exploitant','G','');
+ $form->setRegroupe('ville_naissance_co_exploitant','G','');
+ $form->setRegroupe('cp_naissance_co_exploitant','G','');
+ $form->setRegroupe('adresse1_co_exploitant','G','');
+ $form->setRegroupe('adresse2_co_exploitant','G','');
+ $form->setRegroupe('cp_co_exploitant','G','');
+ $form->setRegroupe('ville_co_exploitant','G','');
+ $form->setRegroupe('nationalite_co_exploitant','G','');
+ $form->setRegroupe('co_exploitant','G','');
+ $form->setRegroupe('particularite_co_exploitant','F','');
+ //
+ $form->setRegroupe('nom_ancien_exploitant','D',' '._('Ancien Exploitant ou Proprietaire').' ', "collapsible");
+ $form->setRegroupe('prenom_ancien_exploitant','G','');
+ $form->setRegroupe('ancien_exploitant','F','');
+ //
+ $form->setRegroupe('civilite_exploitant','D',' '._('Exploitant').' ', "collapsible");
+ $form->setRegroupe('nom_exploitant','G','');
+ $form->setRegroupe('nom_marital_exploitant','G','');
+ $form->setRegroupe('prenom_exploitant','G','');
+ $form->setRegroupe('date_naissance_exploitant','G','');
+ $form->setRegroupe('ville_naissance_exploitant','G','');
+ $form->setRegroupe('cp_naissance_exploitant','G','');
+ $form->setRegroupe('adresse1_exploitant','G','');
+ $form->setRegroupe('adresse2_exploitant','G','');
+ $form->setRegroupe('cp_exploitant','G','');
+ $form->setRegroupe('ville_exploitant','G','');
+ $form->setRegroupe('nationalite_exploitant','G','');
+ $form->setRegroupe('exploitant','G','');
+ $form->setRegroupe('particularite_exploitant','F','');
+
+ $form->setLib('civilite_proprietaire',_('Civilite :'));
+ $form->setLib('nom_proprietaire',_('Nom :'));
+ $form->setLib('prenom_proprietaire',_('Prenom :'));
+ $form->setLib('adresse1_proprietaire',_('Adresse1 :'));
+ $form->setLib('adresse2_proprietaire',_('Adresse2 :'));
+ $form->setLib('cp_proprietaire',_('CP :'));
+ $form->setLib('ville_proprietaire',_('Ville :'));
+
+ $form->setRegroupe('civilite_proprietaire','D',' '._('Proprietaire').' ', "startClosed");
+ $form->setRegroupe('nom_proprietaire','G','');
+ $form->setRegroupe('prenom_proprietaire','G','');
+ $form->setRegroupe('adresse1_proprietaire','G','');
+ $form->setRegroupe('adresse2_proprietaire','G','');
+ $form->setRegroupe('cp_proprietaire','G','');
+ $form->setRegroupe('ville_proprietaire','G','');
+ $form->setRegroupe('profession_proprietaire','F','');
+
+
+ $form->setLib('date_fermeture',_('Date de Fermeture :'));
+ $form->setLib('date_liquidation',_('Date de Liquidation :'));
+ $form->setLib('nature',_('n'));
+
+ $form->setRegroupe('date_fermeture','D',' '._('Inactivite').' ', "startClosed");
+ $form->setRegroupe('date_liquidation','F','');
+
+}
+function setGroupe(&$form, $maj) {
+ parent :: setGroupe($form, $maj);
+ $form->setGroupe('numero_voie','D');
+ $form->setGroupe('voie','G');
+ $form->setGroupe('adresse_postale','G');
+ $form->setGroupe('libelle_voie','G');
+ $form->setGroupe('complement','F');
+ $form->setGroupe('nom_exploitant','D');
+ $form->setGroupe('nom_marital_exploitant','F');
+ $form->setGroupe('ville_naissance_exploitant','D');
+ $form->setGroupe('cp_naissance_exploitant','F');
+ $form->setGroupe('adresse1_exploitant','D');
+ $form->setGroupe('adresse2_exploitant','F');
+ $form->setGroupe('cp_exploitant','D');
+ $form->setGroupe('ville_exploitant','F');
+ $form->setGroupe('exploitant','D');
+ $form->setGroupe('particularite_exploitant','F');
+ //
+ $form->setGroupe('nom_co_exploitant','D');
+ $form->setGroupe('nom_marital_co_exploitant','F');
+ $form->setGroupe('ville_naissance_co_exploitant','D');
+ $form->setGroupe('cp_naissance_co_exploitant','F');
+ $form->setGroupe('adresse1_co_exploitant','D');
+ $form->setGroupe('adresse2_co_exploitant','F');
+ $form->setGroupe('cp_co_exploitant','D');
+ $form->setGroupe('ville_co_exploitant','F');
+ $form->setGroupe('co_exploitant','D');
+ $form->setGroupe('particularite_co_exploitant','F');
+ //
+ $form->setGroupe('nom_ancien_exploitant','D');
+ $form->setGroupe('prenom_ancien_exploitant','F');
+ //
+ $form->setGroupe('nom_proprietaire','D');
+ $form->setGroupe('prenom_proprietaire','F');
+ $form->setGroupe('adresse1_proprietaire','D');
+ $form->setGroupe('adresse2_proprietaire','F');
+ $form->setGroupe('cp_proprietaire','D');
+ $form->setGroupe('ville_proprietaire','F');
+}
+function setRegroupe(&$form, $maj) {
+ parent :: setRegroupe($form, $maj);
+
+ $form->setRegroupe('numero_voie','D',' '._('localisation').' ', "collapsible");
+ $form->setRegroupe('voie','G','');
+ $form->setRegroupe('adresse_postale','G','');
+ $form->setRegroupe('libelle_voie','G','');
+ $form->setRegroupe('complement','G','');
+ $form->setRegroupe('complement_voie','G','');
+
+ $form->setRegroupe('cp_etablissement','G','','');
+ $form->setRegroupe('ville_etablissement','F','');
+
+ $form->setRegroupe('civilite_exploitant','D',' '._('Exploitant').' ', "collapsible");
+ $form->setRegroupe('nom_exploitant','G','');
+ $form->setRegroupe('nom_marital_exploitant','G','');
+ $form->setRegroupe('prenom_exploitant','G','');
+ $form->setRegroupe('date_naissance_exploitant','G','');
+ $form->setRegroupe('ville_naissance_exploitant','G','');
+ $form->setRegroupe('cp_naissance_exploitant','G','');
+ $form->setRegroupe('adresse1_exploitant','G','');
+ $form->setRegroupe('adresse2_exploitant','G','');
+ $form->setRegroupe('cp_exploitant','G','');
+ $form->setRegroupe('ville_exploitant','G','');
+ $form->setRegroupe('nationalite_exploitant','G','');
+ $form->setRegroupe('exploitant','G','');
+ $form->setRegroupe('particularite_exploitant','F','');
+
+ $form->setRegroupe('civilite_proprietaire','D',' '._('Proprietaire').' ', "startClosed");
+ $form->setRegroupe('nom_proprietaire','G','');
+ $form->setRegroupe('prenom_proprietaire','G','');
+ $form->setRegroupe('adresse1_proprietaire','G','');
+ $form->setRegroupe('adresse2_proprietaire','G','');
+ $form->setRegroupe('cp_proprietaire','G','');
+ $form->setRegroupe('ville_proprietaire','G','');
+ $form->setRegroupe('profession_proprietaire','F','');
+
+ $form->setRegroupe('date_fermeture','D',' '._('Inactivite').' ', "startClosed");
+ $form->setRegroupe('date_liquidation','F','');
+
+
+}
+ function setSelect(&$form, $maj,&$db,$debug) {
+ parent :: setSelect($form, $maj,$db,$debug);
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ if($maj<2){
+ //adresse_postale
+ $contenu=array();
+ $contenu[0]="<img src='../app/img/adresse_postale.png'>";
+ $form->setSelect("adresse_postale",$contenu);
+
+ $contenu2[0][0]="Monsieur";
+ $contenu2[1][0]="Monsieur";
+ $contenu2[0][1]="Madame";
+ $contenu2[1][1]="Madame";
+ $contenu2[0][2]="Mademoiselle";
+ $contenu2[1][2]="Mademoiselle";
+ $contenu2[0][3]="Societe";
+ $contenu2[1][3]="Societe";
+ $form->setSelect('civilite_proprietaire',$contenu2);
+ $form->setSelect('civilite_exploitant',$contenu2);
+ $form->setSelect('civilite_co_exploitant',$contenu2);
+ // exploitant
+ $contenu=array();
+ $res = $db->query($sql_exploitant);
+ if (database::isError($res))
+ die($res->getMessage().$sql_exploitant);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_exploitant." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('exploitant');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('co_exploitant',$contenu);
+ $form->setSelect('ancien_exploitant',$contenu);
+ }// fin error db
+ }
+ }
+
+
+function setVal(&$form, $maj, $validation, &$db, $DEBUG=null)
+ {
+ parent::setVal($form, $maj, $validation, $db, $DEBUG);
+ if (file_exists ("../sig/var_point.inc"))
+ include ("../sig/var_point.inc");
+ $form->setVal("adresse_postale","adresse_postale('f1',f1.libelle_voie.value,f1.numero_voie.value)");
+ // variables
+ $this->validation = $validation;
+ $this->form = $form;
+ }
+
+
+function setType(&$form,$maj)
+{
+ parent::setType($form,$maj);
+ $form->setType('voie','hidden');
+ $form->setType('geom','hidden');
+ $form->setType('ancien_proprietaire','hidden');
+ $form->setType('adresse_postale','httpclick');
+ $form->setType('nature','hidden');
+ $form->setType('permis_exploitation','hiddenstatic');
+ $form->setType('civilite_proprietaire','hiddenstatic');
+ $form->setType('civilite_exploitant','hiddenstatic');
+ if($maj<2)
+ {
+ $form->setType('civilite_proprietaire','select');
+ $form->setType('civilite_exploitant','select');
+ $form->setType('permis_exploitation','checkbox');
+ $form->setType('permis_exploitation_nuit','checkbox');
+ //+++
+ $form->setType('civilite_co_exploitant','select');
+ $form->setType('nom_co_exploitant','text');
+ $form->setType('nom_marital_co_exploitant','text');
+ $form->setType('prenom_co_exploitant','text');
+ if($this->retourformulaire=='')
+ $form->setType('date_naissance_co_exploitant','date');
+ else
+ $form->setType('date_naissance_co_exploitant','date2');
+ $form->setType('ville_naissance_co_exploitant','text');
+ $form->setType('cp_naissance_co_exploitant','text');
+ $form->setType('adresse1_co_exploitant','text');
+ $form->setType('adresse2_co_exploitant','text');
+ $form->setType('cp_co_exploitant','text');
+ $form->setType('ville_co_exploitant','text');
+ $form->setType('nationalite_co_exploitant','text');
+ $form->setType('co_exploitant','select');
+ $form->setType('particularite_co_exploitant','textarea');
+ $form->setType('nom_ancien_exploitant','text');
+ $form->setType('prenom_ancien_exploitant','text');
+ $form->setType('ancien_exploitant','select');
+ }
+}
+function setTaille(&$form,$maj) {
+ parent::setTaille($form,$maj);
+ //taille des champs affiches (text)
+ $form->setTaille('etablissement',4);
+ $form->setTaille('raison_sociale',30);
+ $form->setTaille('enseigne',30);
+ $form->setTaille('numero_voie',4);
+ $form->setTaille('complement',10);
+ $form->setTaille('voie',5);
+ $form->setTaille('libelle_voie',40);
+ $form->setTaille('cp_etablissement',5);
+ $form->setTaille('ville_etablissement',40);
+ $form->setTaille('complement_voie',40);
+ $form->setTaille('civilite_proprietaire',15);
+ $form->setTaille('nom_proprietaire',20);
+ $form->setTaille('prenom_proprietaire',20);
+ $form->setTaille('adresse1_proprietaire',40);
+ $form->setTaille('adresse2_proprietaire',40);
+ $form->setTaille('cp_proprietaire',5);
+ $form->setTaille('ville_proprietaire',40);
+ $form->setTaille('profession_proprietaire',30);
+ $form->setTaille('civilite_exploitant',15);
+ $form->setTaille('nom_exploitant',20);
+ $form->setTaille('nom_marital_exploitant',20);
+ $form->setTaille('prenom_exploitant',20);
+ $form->setTaille('adresse1_exploitant',40);
+ $form->setTaille('adresse2_exploitant',40);
+ $form->setTaille('cp_exploitant',5);
+ $form->setTaille('ville_exploitant',40);
+ $form->setTaille('exploitant',4);
+ $form->setTaille('particularite_exploitant',40);
+ $form->setTaille('no_siret',14);
+ $form->setTaille('cp_naissance_exploitant',5);
+ //
+ $form->setTaille('civilite_co_exploitant',20);
+ $form->setTaille('nom_co_exploitant',20);
+ $form->setTaille('nom_marital_co_exploitant',20);
+ $form->setTaille('prenom_co_exploitant',20);
+ $form->setTaille('date_naissance_co_exploitant',12);
+ $form->setTaille('ville_naissance_co_exploitant',20);
+ $form->setTaille('cp_naissance_co_exploitant',5);
+ $form->setTaille('adresse1_co_exploitant',40);
+ $form->setTaille('adresse2_co_exploitant',40);
+ $form->setTaille('cp_co_exploitant',5);
+ $form->setTaille('ville_co_exploitant',40);
+ $form->setTaille('nationalite_co_exploitant',20);
+ $form->setTaille('co_exploitant',4);
+ $form->setTaille('particularite_co_exploitant',40);
+ $form->setTaille('nom_ancien_exploitant',30);
+ $form->setTaille('prenom_ancien_exploitant',30);
+ }
+
+ function setMax(&$form,$maj) {
+ parent::setMax($form,$maj);
+ //longueur max en saisie (text)
+ $form->setMax('etablissement',4);
+ $form->setMax('raison_sociale',30);
+ $form->setMax('enseigne',30);
+ $form->setMax('numero_voie',4);
+ $form->setMax('complement',10);
+ $form->setMax('cp_etablissement',5);
+ $form->setMax('ville_etablissement',40);
+ $form->setMax('voie',5);
+ $form->setMax('libelle_voie',40);
+ $form->setMax('complement_voie',40);
+ $form->setMax('civilite_proprietaire',15);
+ $form->setMax('nom_proprietaire',20);
+ $form->setMax('prenom_proprietaire',20);
+ $form->setMax('adresse1_proprietaire',40);
+ $form->setMax('adresse2_proprietaire',40);
+ $form->setMax('cp_proprietaire',5);
+ $form->setMax('ville_proprietaire',40);
+ $form->setMax('profession_proprietaire',30);
+ $form->setMax('civilite_exploitant',15);
+ $form->setMax('nom_exploitant',20);
+ $form->setMax('nom_marital_exploitant',20);
+ $form->setMax('prenom_exploitant',20);
+ $form->setMax('adresse1_exploitant',40);
+ $form->setMax('adresse2_exploitant',40);
+ $form->setMax('cp_exploitant',5);
+ $form->setMax('ville_exploitant',40);
+ $form->setMax('exploitant',4);
+ $form->setMax('particularite_exploitant',2);
+ $form->setMax('cp_naissance_exploitant',5);
+ $form->setMax('no_siret',14);
+ //
+ $form->setMax('civilite_co_exploitant',15);
+ $form->setMax('nom_co_exploitant',20);
+ $form->setMax('nom_marital_co_exploitant',20);
+ $form->setMax('prenom_co_exploitant',20);
+ $form->setMax('date_naissance_co_exploitant',12);
+ $form->setMax('ville_naissance_co_exploitant',20);
+ $form->setMax('cp_naissance_co_exploitant',5);
+ $form->setMax('adresse1_co_exploitant',40);
+ $form->setMax('adresse2_co_exploitant',40);
+ $form->setMax('cp_co_exploitant',5);
+ $form->setMax('ville_co_exploitant',40);
+ $form->setMax('nationalite_co_exploitant',20);
+ $form->setMax('co_exploitant',4);
+ $form->setMax('particularite_co_exploitant',2);
+ $form->setMax('nom_ancien_exploitant',30);
+ $form->setMax('prenom_ancien_exploitant',30);
+ }
+
+ function setOnchange(&$form,$maj) {
+ parent::setOnchange($form,$maj);
+ //javascript controle client
+ $form->setOnchange('cp_proprietaire','VerifNum(this)');
+ $form->setOnchange('cp_etablissement','VerifNum(this)');
+ $form->setOnchange('cp_exploitant','VerifNum(this)');
+ $form->setOnchange('no_siret','VerifNum(this)');
+ $form->setOnchange("libelle_voie","this.value=this.value.toUpperCase()");
+ $form->setOnchange("nom_marital_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("raison_sociale","this.value=this.value.toUpperCase()");
+ $form->setOnchange("enseigne","this.value=this.value.toUpperCase()");
+ $form->setOnchange("nom_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("prenom_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("nom_proprietaire","this.value=this.value.toUpperCase()");
+ $form->setOnchange("prenom_proprietaire","this.value=this.value.toUpperCase()");
+ $form->setOnchange("ville_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("ville_etablissement","this.value=this.value.toUpperCase()");
+ $form->setOnchange("ville_proprietaire","this.value=this.value.toUpperCase()");
+ //
+ $form->setOnchange('date_naissance_co_exploitant','fdate(this)');
+ $form->setOnchange('co_exploitant','VerifNum(this)');
+ }
+
+ function triggermodifierapres($id,&$db,$val,$DEBUG) {
+ if($this->wkt==1){
+ $this->sig_wkt($id,$db,$val,$DEBUG);
+ }
+ }
+
+ function triggerajouterapres($id,&$db,$val,$DEBUG) {
+ $id=$this->valF['etablissement']; // id n est pas valorise en ajout
+ if($this->wkt==1){
+ $this->sig_wkt($id,$db,$val,$DEBUG);
+ }
+ }
+
+ function sig_wkt($id,&$db,$val,$DEBUG){
+ // si wkt -> saisie en format binaire wkb pour postgre
+ $projection = $db -> getOne("select srid from ".DB_PREFIXE."geometry_columns where f_table_name='".$this->table."'");
+ $sql ="update ".DB_PREFIXE.$this->table." set geom =geometryfromtext('".$val["geom"]."', ".$projection." ) where ".$this->table." ='".$id."'";
+ $res = $db -> query($sql);
+ if (DB :: isError($res)){
+ die($res->getMessage()."erreur ".$sql);
+ }else{
+ $this->msg.="&nbsp;"._("mis a jour format wkt vers wkb du geom ")."&nbsp;".$this->table."&nbsp;".$id;
+ }
+ }
+
+
+
+}// fin classe
+?>

Added: branches/1.x/obj/etablissement_temporaire.class.php
===================================================================
--- branches/1.x/obj/etablissement_temporaire.class.php (rev 0)
+++ branches/1.x/obj/etablissement_temporaire.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,412 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:01
+require_once ("../gen/obj/etablissement.class.php");
+
+class etablissement_temporaire extends etablissement_gen {
+
+function etablissement_temporaire($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+
+function setValF($val) {
+parent::setValF($val);
+ if($val['raison_sociale']=='')
+ $this->valF['raison_sociale']=null;
+ if($val['enseigne']=='')
+ $this->valF['enseigne']=null;
+ if($val['no_siret']=='')
+ $this->valF['no_siret']=null;
+ if($val['forme_juridique']=='')
+ $this->valF['forme_juridique']=null;
+ if($val['permis_exploitation']=='')
+ $this->valF['permis_exploitation']=null;
+ if($val['date_permis_exploitation']=='')
+ $this->valF['date_permis_exploitation']=null;
+
+ if($val['numero_voie']=='')
+ $this->valF['numero_voie']=null;
+ if($val['complement']=='')
+ $this->valF['complement']=null;
+ if($val['voie']=='')
+ $this->valF['voie']=null;
+ if($val['libelle_voie']=='')
+ $this->valF['libelle_voie']=null;
+ if($val['complement_voie']=='')
+ $this->valF['complement_voie']=null;
+
+
+ if($val['cp_etablissement']=='')
+ $this->valF['cp_etablissement']=null;
+ if($val['ville_etablissement']=='')
+ $this->valF['ville_etablissement']=null;
+
+ if($val['date_naissance_exploitant']=='')
+ $this->valF['date_naissance_exploitant']=null;
+ if($val['ville_naissance_exploitant']=='')
+ $this->valF['ville_naissance_exploitant']=null;
+ if($val['cp_naissance_exploitant']=='')
+ $this->valF['cp_naissance_exploitant']=null;
+ if($val['nationalite_exploitant']=='')
+ $this->valF['nationalite_exploitant']=null;
+ if($val['nom_exploitant']=='')
+ $this->valF['nom_exploitant']=null;
+ if($val['nom_marital_exploitant']=='')
+ $this->valF['nom_marital_exploitant']=null;
+ if($val['prenom_exploitant']=='')
+ $this->valF['prenom_exploitant']=null;
+ if($val['adresse1_exploitant']=='')
+ $this->valF['adresse1_exploitant']=null;
+ if($val['adresse2_exploitant']=='')
+ $this->valF['adresse2_exploitant']=null;
+ if($val['cp_exploitant']=='')
+ $this->valF['cp_exploitant']=null;
+ if($val['ville_exploitant']=='')
+ $this->valF['ville_exploitant']=null;
+ if($val['particularite_exploitant']=='')
+ $this->valF['particularite_exploitant']=null;
+
+
+ if($val['nom_proprietaire']=='')
+ $this->valF['nom_proprietaire']=null;
+ if($val['prenom_proprietaire']=='')
+ $this->valF['prenom_proprietaire']=null;
+ if($val['adresse1_proprietaire']=='')
+ $this->valF['adresse1_proprietaire']=null;
+ if($val['adresse2_proprietaire']=='')
+ $this->valF['adresse2_proprietaire']=null;
+ if($val['cp_proprietaire']=='')
+ $this->valF['cp_proprietaire']=null;
+ if($val['ville_proprietaire']=='')
+ $this->valF['ville_proprietaire']=null;
+
+ if($val['nom_proprietaire']==''
+ && $val['prenom_proprietaire']==''
+ && $val['adresse1_proprietaire']==''
+ && $val['adresse2_proprietaire']==''
+ && $val['cp_proprietaire']==''
+ && $val['ville_proprietaire']=='')
+ {
+ if($val['civilite_exploitant']!='')
+ $this->valF['civilite_proprietaire']=$val['civilite_exploitant'];
+ if($val['nom_exploitant']!='')
+ $this->valF['nom_proprietaire']=$val['nom_exploitant'];
+ if($val['prenom_exploitant']!='')
+ $this->valF['prenom_proprietaire']=$val['prenom_exploitant'];
+ if($val['adresse1_exploitant']!='')
+ $this->valF['adresse1_proprietaire']=$val['adresse1_exploitant'];
+ if($val['adresse2_exploitant']!='')
+ $this->valF['adresse2_proprietaire']=$val['adresse2_exploitant'];
+ if($val['cp_exploitant']!='')
+ $this->valF['cp_proprietaire']=$val['cp_exploitant'];
+ if($val['ville_exploitant']!='')
+ $this->valF['ville_proprietaire']=$val['ville_exploitant'];
+ }
+
+
+ if($val['no_siret']=='')
+ $this->valF['no_siret']=null;
+ if($val['forme_juridique']=='')
+ $this->valF['forme_juridique']=null;
+ if($val['exploitant']=='')
+ $this->valF['exploitant']=null;
+ if($val['date_liquidation']=='')
+ $this->valF['date_liquidation']=null;
+ if($val['date_fermeture']=='')
+ $this->valF['date_fermeture']=null;
+ if($val['date_permis_exploitation']=='')
+ $this->valF['date_permis_exploitation']=null;
+ if($val['geom']=='')
+ $this->valF['geom']=null;
+ //++
+ //
+ if($val['date_naissance_co_exploitant']=='')
+ $this->valF['date_naissance_co_exploitant']=null;
+ if($val['ville_naissance_co_exploitant']=='')
+ $this->valF['ville_naissance_co_exploitant']=null;
+ if($val['cp_naissance_co_exploitant']=='')
+ $this->valF['cp_naissance_co_exploitant']=null;
+ if($val['nationalite_co_exploitant']=='')
+ $this->valF['nationalite_co_exploitant']=null;
+ if($val['nom_co_exploitant']=='')
+ $this->valF['nom_co_exploitant']=null;
+ if($val['nom_marital_co_exploitant']=='')
+ $this->valF['nom_marital_co_exploitant']=null;
+ if($val['prenom_co_exploitant']=='')
+ $this->valF['prenom_co_exploitant']=null;
+ if($val['adresse1_co_exploitant']=='')
+ $this->valF['adresse1_co_exploitant']=null;
+ if($val['adresse2_co_exploitant']=='')
+ $this->valF['adresse2_co_exploitant']=null;
+ if($val['cp_co_exploitant']=='')
+ $this->valF['cp_co_exploitant']=null;
+ if($val['ville_co_exploitant']=='')
+ $this->valF['ville_co_exploitant']=null;
+ if($val['co_exploitant']=='')
+ $this->valF['co_exploitant']=null;
+ if($val['particularite_co_exploitant']=='')
+ $this->valF['particularite_co_exploitant']=null;
+
+ if($val['nom_ancien_exploitant']=='')
+ $this->valF['nom_ancien_exploitant']=null;
+ if($val['prenom_ancien_exploitant']=='')
+ $this->valF['prenom_ancien_exploitant']=null;
+ if($val['ancien_exploitant']=='')
+ $this->valF['ancien_exploitant']=null;
+
+ $this->valF['nature']='temporaire';
+}
+
+function setLib(&$form,$maj) {
+
+ //libelle des champs
+ $form->setLib('raison_sociale',_('Raison Sociale :'));
+ $form->setLib('enseigne',_('Enseigne :'));
+ $form->setLib('no_siret',_('Num. Siret :'));
+ $form->setLib('forme_juridique',_('Forme Juridique :'));
+ $form->setLib('date_permis_exploitation',_('Date de permis d\'exploitation :'));
+
+
+ $form->setLib('numero_voie',_('Numero Voie :'));
+ $form->setLib('complement',_('Complement :'));
+ $form->setLib('voie',_('Voie :'));
+ $form->setLib('libelle_voie',_('Libelle de Voie :'));
+ $form->setLib('complement_voie',_('Complement de Voie :'));
+
+
+ $form->setRegroupe('numero_voie','D',' '._('localisation').' ', "collapsible");
+ $form->setRegroupe('complement','G','');
+ $form->setRegroupe('voie','G','');
+ $form->setRegroupe('libelle_voie','G','');
+ $form->setRegroupe('complement_voie','G','');
+ $form->setRegroupe('cp_etablissement','G','');
+ $form->setRegroupe('ville_etablissement','F','');
+
+
+ $form->setLib('cp_etablissement',_('CP de l\'etablissement :'));
+ $form->setLib('ville_etablissement',_('Ville de l\'etablissement :'));
+
+
+ $form->setLib('civilite_exploitant',_('Civilite :'));
+ $form->setLib('nom_exploitant',_('Nom :'));
+ $form->setLib('nom_marital_exploitant',_('Nom Marital :'));
+ $form->setLib('prenom_exploitant',_('Prenom :'));
+ $form->setLib('date_naissance_exploitant',_('Date de Naissance :'));
+ $form->setLib('ville_naissance_exploitant',_('Ville de Naissance :'));
+ $form->setLib('cp_naissance_exploitant',_('CP de Naissance :'));
+ $form->setLib('adresse1_exploitant',_('Adresse1 :'));
+ $form->setLib('adresse2_exploitant',_('Adresse2 :'));
+ $form->setLib('cp_exploitant',_('CP :'));
+ $form->setLib('ville_exploitant',_('Ville :'));
+ $form->setLib('nationalite_exploitant',_('Nationalite :'));
+ $form->setLib('exploitant',_('Exploitation :'));
+ $form->setLib('particularite_exploitant',_('Particularite :'));
+
+ $form->setRegroupe('civilite_exploitant','D',' '._('Exploitant').' ', "collapsible");
+ $form->setRegroupe('nom_exploitant','G','');
+ $form->setRegroupe('nom_marital_exploitant','G','');
+ $form->setRegroupe('prenom_exploitant','G','');
+ $form->setRegroupe('date_naissance_exploitant','G','');
+ $form->setRegroupe('ville_naissance_exploitant','G','');
+ $form->setRegroupe('cp_naissance_exploitant','G','');
+ $form->setRegroupe('adresse1_exploitant','G','');
+ $form->setRegroupe('adresse2_exploitant','G','');
+ $form->setRegroupe('cp_exploitant','G','');
+ $form->setRegroupe('ville_exploitant','G','');
+ $form->setRegroupe('nationalite_exploitant','G','');
+ $form->setRegroupe('exploitant','G','');
+ $form->setRegroupe('particularite_exploitant','F','');
+
+ $form->setLib('civilite_proprietaire',_('Civilite :'));
+ $form->setLib('nom_proprietaire',_('Nom :'));
+ $form->setLib('prenom_proprietaire',_('Prenom :'));
+ $form->setLib('adresse1_proprietaire',_('Adresse1 :'));
+ $form->setLib('adresse2_proprietaire',_('Adresse2 :'));
+ $form->setLib('cp_proprietaire',_('CP :'));
+ $form->setLib('ville_proprietaire',_('Ville :'));
+
+
+
+ $form->setLib('date_fermeture',_('Date de Fermeture :'));
+ $form->setLib('date_liquidation',_('Date de Liquidation :'));
+
+
+ $form->setLib('nature',_('n'));
+
+
+}
+function setGroupe(&$form, $maj) {
+ parent :: setGroupe($form, $maj);
+ $form->setGroupe('nom_exploitant','D');
+ $form->setGroupe('nom_marital_exploitant','F');
+ $form->setGroupe('ville_naissance_exploitant','D');
+ $form->setGroupe('cp_naissance_exploitant','F');
+ $form->setGroupe('adresse1_exploitant','D');
+ $form->setGroupe('adresse2_exploitant','F');
+ $form->setGroupe('cp_exploitant','D');
+ $form->setGroupe('ville_exploitant','F');
+ $form->setGroupe('exploitant','D');
+ $form->setGroupe('particularite_exploitant','F');
+}
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ parent :: setSelect($form, $maj,$db,$debug);
+ if($maj<2){
+ //adresse_postale
+ $contenu=array();
+ $contenu[0]=" adresse_postale ";
+ $form->setSelect("adresse_postale",$contenu);
+
+ $contenu2[0][0]="Monsieur";
+ $contenu2[1][0]="Monsieur";
+ $contenu2[0][1]="Madame";
+ $contenu2[1][1]="Madame";
+ $contenu2[0][2]="Mademoiselle";
+ $contenu2[1][2]="Mademoiselle";
+ $contenu2[0][3]="Societe";
+ $contenu2[1][3]="Societe";
+ $form->setSelect('civilite_proprietaire',$contenu2);
+ $form->setSelect('civilite_exploitant',$contenu2);
+ }
+ }
+
+
+function setType(&$form,$maj)
+{
+ parent::setType($form,$maj);
+ $form->setType('voie','hidden');
+ $form->setType('geom','hidden');
+ //++
+ $form->setType('civilite_co_exploitant','hidden');
+ $form->setType('nom_co_exploitant','hidden');
+ $form->setType('nom_marital_co_exploitant','hidden');
+ $form->setType('prenom_co_exploitant','hidden');
+ $form->setType('date_naissance_co_exploitant','hidden');
+ $form->setType('date_naissance_co_exploitant','hidden');
+ $form->setType('ville_naissance_co_exploitant','hidden');
+ $form->setType('cp_naissance_co_exploitant','hidden');
+ $form->setType('adresse1_co_exploitant','hidden');
+ $form->setType('adresse2_co_exploitant','hidden');
+ $form->setType('cp_co_exploitant','hidden');
+ $form->setType('ville_co_exploitant','hidden');
+ $form->setType('nationalite_co_exploitant','hidden');
+ $form->setType('co_exploitant','hidden');
+ $form->setType('particularite_co_exploitant','hidden');
+ $form->setType('nom_ancien_exploitant','hidden');
+ $form->setType('prenom_ancien_exploitant','hidden');
+ $form->setType('ancien_exploitant','hidden');
+ $form->setType('ancien_proprietaire','hidden');
+
+ //
+ $form->setType('adresse_postale','hidden');
+ $form->setType('permis_exploitation','hidden');
+ $form->setType('permis_exploitation_nuit','hidden');
+ $form->setType('date_permis_exploitation','hidden');
+ $form->setType('date_permis_exploitation_nuit','hidden');
+ $form->setType('civilite_proprietaire','hidden');
+ $form->setType('nom_proprietaire','hidden');
+ $form->setType('prenom_proprietaire','hidden');
+ $form->setType('adresse1_proprietaire','hidden');
+ $form->setType('adresse2_proprietaire','hidden');
+ $form->setType('cp_proprietaire','hidden');
+ $form->setType('ville_proprietaire','hidden');
+ $form->setType('profession_proprietaire','hidden');
+ $form->setType('date_fermeture','hidden');
+ $form->setType('date_liquidation','hidden');
+ $form->setType('no_siret','hidden');
+ $form->setType('forme_juridique','hidden');
+ $form->setType('nature','hidden');
+ if($maj<2)
+ {
+ $form->setType('civilite_exploitant','select');
+ }
+}
+function setTaille(&$form,$maj) {
+ parent::setTaille($form,$maj);
+ //taille des champs affiches (text)
+ $form->setTaille('etablissement',4);
+ $form->setTaille('raison_sociale',30);
+ $form->setTaille('enseigne',30);
+ $form->setTaille('numero_voie',4);
+ $form->setTaille('complement',10);
+ $form->setTaille('cp_etablissement',5);
+ $form->setTaille('ville_etablissement',40);
+ $form->setTaille('voie',5);
+ $form->setTaille('libelle_voie',40);
+ $form->setTaille('complement_voie',40);
+ $form->setTaille('civilite_proprietaire',15);
+ $form->setTaille('nom_proprietaire',20);
+ $form->setTaille('prenom_proprietaire',20);
+ $form->setTaille('adresse1_proprietaire',40);
+ $form->setTaille('adresse2_proprietaire',40);
+ $form->setTaille('cp_proprietaire',5);
+ $form->setTaille('ville_proprietaire',40);
+ $form->setTaille('civilite_exploitant',15);
+ $form->setTaille('nom_exploitant',20);
+ $form->setTaille('nom_marital_exploitant',20);
+ $form->setTaille('prenom_exploitant',20);
+ $form->setTaille('adresse1_exploitant',40);
+ $form->setTaille('adresse2_exploitant',40);
+ $form->setTaille('cp_exploitant',5);
+ $form->setTaille('ville_exploitant',40);
+ $form->setTaille('exploitant',4);
+ $form->setTaille('particularite_exploitant',40);
+ $form->setTaille('no_siret',14);
+ }
+
+ function setMax(&$form,$maj) {
+ parent::setMax($form,$maj);
+ //longueur max en saisie (text)
+ $form->setMax('etablissement',4);
+ $form->setMax('raison_sociale',30);
+ $form->setMax('enseigne',30);
+ $form->setMax('numero_voie',4);
+ $form->setMax('cp_etablissement',5);
+ $form->setMax('ville_etablissement',40);
+ $form->setMax('complement',10);
+ $form->setMax('voie',5);
+ $form->setMax('libelle_voie',40);
+ $form->setMax('complement_voie',40);
+ $form->setMax('civilite_proprietaire',15);
+ $form->setMax('nom_proprietaire',20);
+ $form->setMax('prenom_proprietaire',20);
+ $form->setMax('adresse1_proprietaire',40);
+ $form->setMax('adresse2_proprietaire',40);
+ $form->setMax('cp_proprietaire',5);
+ $form->setMax('ville_proprietaire',40);
+ $form->setMax('civilite_exploitant',15);
+ $form->setMax('nom_exploitant',20);
+ $form->setMax('nom_marital_exploitant',20);
+ $form->setMax('prenom_exploitant',20);
+ $form->setMax('adresse1_exploitant',40);
+ $form->setMax('adresse2_exploitant',40);
+ $form->setMax('cp_exploitant',5);
+ $form->setMax('ville_exploitant',40);
+ $form->setMax('exploitant',4);
+ $form->setMax('particularite_exploitant',2);
+ $form->setMax('no_siret',14);
+ }
+
+ function setOnchange(&$form,$maj) {
+ parent::setOnchange($form,$maj);
+ //javascript controle client
+ $form->setOnchange('cp_proprietaire','VerifNum(this)');
+ $form->setOnchange('cp_etablissement','VerifNum(this)');
+ $form->setOnchange('cp_exploitant','VerifNum(this)');
+ $form->setOnchange('no_siret','VerifNum(this)');
+ $form->setOnchange("libelle_voie","this.value=this.value.toUpperCase()");
+ $form->setOnchange("nom_marital_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("raison_sociale","this.value=this.value.toUpperCase()");
+ $form->setOnchange("enseigne","this.value=this.value.toUpperCase()");
+ $form->setOnchange("nom_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("prenom_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("nom_proprietaire","this.value=this.value.toUpperCase()");
+ $form->setOnchange("prenom_proprietaire","this.value=this.value.toUpperCase()");
+ $form->setOnchange("ville_exploitant","this.value=this.value.toUpperCase()");
+ $form->setOnchange("ville_etablissement","this.value=this.value.toUpperCase()");
+ $form->setOnchange("ville_proprietaire","this.value=this.value.toUpperCase()");
+ }
+
+}// fin classe
+?>

Added: branches/1.x/obj/exploitant.class.php
===================================================================
--- branches/1.x/obj/exploitant.class.php (rev 0)
+++ branches/1.x/obj/exploitant.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,25 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:00
+require_once ("../gen/obj/exploitant.class.php");
+
+class exploitant extends exploitant_gen {
+
+function exploitant($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('exploitant',4);
+ $form->setTaille('libelle',30);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('exploitant',4);
+ $form->setMax('libelle',30);
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/index.php
===================================================================
--- branches/1.x/obj/index.php (rev 0)
+++ branches/1.x/obj/index.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Ce fichier permet de faire une redirection vers le fichier index.php a la
+ * racine de l'application.
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: index.php 14 2010-07-06 09:47:19Z fmichon $
+ */
+
+header("Location: ../index.php");
+exit();
+
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_collectivite.class.php
===================================================================
--- branches/1.x/obj/om_collectivite.class.php (rev 0)
+++ branches/1.x/obj/om_collectivite.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,75 @@
+<?php
+//$Id$
+//gen openMairie le 15/10/2010 15:56
+require_once ("../gen/obj/om_collectivite.class.php");
+
+class om_collectivite extends om_collectivite_gen {
+
+ var $maj;
+
+ function om_collectivite($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+
+ function setType(&$form,$maj) {
+ parent::setType($form,$maj);
+
+ if ($maj < 2) {
+ $form->setType('niveau', 'select');
+ }
+ }
+
+ function verifier($val, &$db, $DEBUG) {
+ parent::verifier($val, $db, $DEBUG);
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['niveau']==""){
+ $this->msg= $this->msg.$imgv._('niveau')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }else
+ // verification si il y a une autre collectivite multi
+ if($this->valF['niveau']==2)
+ if($this->maj==0)
+ $this->verifierniveau($db, $DEBUG,']');
+ else
+ $this->verifierniveau($db, $DEBUG,$val['om_collectivite']);
+ }
+
+ function setSelect(&$form, $maj,$db,$debug) {
+ if($maj<2){
+ $contenu=array();
+ $contenu[0]=array(1,2);
+ $contenu[1]=array(_("mono"),_("multi"));
+ $form->setSelect("niveau",$contenu);
+ }
+ }
+
+ /**
+ * verification sur existence d une collectivite de niveau 2
+ */
+ function verifierniveau(&$db, $DEBUG,$id){
+ $sql = "select * from ".DB_PREFIXE."om_collectivite where niveau = '2'";
+ if($id!=']')
+ $sql.=" and om_collectivite !='".$id."'";
+ $res = $db->query($sql);
+ if($DEBUG==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ if ($nbligne>0){
+ $this->msg= $this->msg." ".$nbligne." "._("collectivite")." "._("existant").
+ " "._("niveau")." 2 ! "._("vous ne pouvez avoir qu une collectivite")." ".
+ _("de")." "._("niveau")." multi ";
+ $this->correct=False;
+ }
+ }
+ }
+
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {
+ parent::setVal($form, $maj, $validation, $db, $DEBUG=null);
+ $this->maj=$maj;
+ }
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_droit.class.php
===================================================================
--- branches/1.x/obj/om_droit.class.php (rev 0)
+++ branches/1.x/obj/om_droit.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+//$Id$
+//gen openMairie le 15/10/2010 15:55
+require_once ("../gen/obj/om_droit.class.php");
+
+class om_droit extends om_droit_gen {
+
+function om_droit($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_etat.class.php
===================================================================
--- branches/1.x/obj/om_etat.class.php (rev 0)
+++ branches/1.x/obj/om_etat.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,438 @@
+<?php
+//$Id$
+//gen openMairie le 18/10/2010 16:23
+require_once ("../gen/obj/om_etat.class.php");
+
+class om_etat extends om_etat_gen {
+
+ var $maj;
+ var $retourformulaire;
+
+ function om_etat($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ function verifier($val, &$db, $DEBUG) {
+ parent::verifier($val, $db, $DEBUG);
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['id']==""){
+ $this->msg= $this->msg.$imgv._('identifiant')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }else
+ // verification si il y a un autre id "actif" pour la collectivite
+ if($this->valF['actif']=="Oui")
+ if($this->maj==0)
+ $this->verifieractif($db, $val, $DEBUG,']');
+ else
+ $this->verifieractif($db, $val, $DEBUG,$val['om_etat']);
+ }
+
+ /**
+ *
+ */
+ function setType(&$form,$maj) {
+ parent :: setType($form,$maj);
+ $form->setType('image', 'hidden');
+ if ($maj < 2) { //ajouter et modifier
+ $form->setType('actif', 'checkbox');
+ $form->setType('orientation', 'select');
+ $form->setType('format', 'select');
+ $form->setType('titreattribut', 'select');
+ $form->setType('corpsattribut', 'select');
+ $form->setType('footerattribut', 'select');
+ $form->setType('titrefont', 'select');
+ $form->setType('corpsfont', 'select');
+ $form->setType('footerfont', 'select');
+ $form->setType('se_font', 'select');
+ $form->setType('titrealign', 'select');
+ $form->setType('corpsalign', 'select');
+ $form->setType('titrebordure', 'select');
+ $form->setType('corpsbordure', 'select');
+ $form->setType('titre', 'textarea');
+ $form->setType('corps', 'textarea');
+ $form->setType('sql', 'textarea');
+ $form->setType('om_sousetat', 'select');
+ $form->setType('sousetat', 'textareamulti');
+ if($this->retourformulaire=='om_collectivite'){
+ $form->setType('logotop', 'localisation2');
+ $form->setType('titretop', 'localisation2');
+ $form->setType('corpstop', 'localisation2');
+ $form->setType('se_couleurtexte', 'rvb2');
+ $form->setType('logo', 'upload2');
+ }else{
+ $form->setType('logotop', 'localisation');
+ $form->setType('titretop', 'localisation');
+ $form->setType('corpstop', 'localisation');
+ $form->setType('se_couleurtexte', 'rvb');
+ $form->setType('logo', 'upload');
+ }
+ }
+ }
+
+ function setTaille(&$form, $maj) {
+ parent :: setTaille($form, $maj);
+ $form->setTaille('sousetat', 50);
+ $form->setTaille('corps', 120);
+ $form->setTaille('om_sql', 120);
+ $form->setTaille('id', 20);
+ $form->setTaille('libelle', 20);
+ }
+
+ function setMax(&$form, $maj) {
+ parent :: setMax($form, $maj);
+ $form->setMax('sousetat', 8);
+ $form->setMax('corps', 30);
+ $form->setMax('om_sql', 5);
+ }
+
+
+ /**
+ *
+ */
+ function setSelect(&$form, $maj, $db, $debug) {
+ parent :: setSelect($form, $maj, $db, $debug);
+ //
+ $contenu=array();
+ $contenu[0]=array('P','L');
+ $contenu[1]=array(_("portrait"),_("paysage"));
+ $form->setSelect("orientation",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('A4','A3');
+ $contenu[1]=array('A4','A3');
+ $form->setSelect("format",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('','I','B','U','BI','UI');
+ $contenu[1]=array(_("normal"),_("italique"),_("gras"),_("souligne"),_("italique")." "._("gras"),_("souligne")." "._("gras"));
+ $form->setSelect("titreattribut",$contenu);
+ $form->setSelect("corpsattribut",$contenu);
+ $form->setSelect("footerattribut",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('helvetica','times','arial','courier');
+ $contenu[1]=array('helvetica','times','arial','courier');
+ $form->setSelect("titrefont",$contenu);
+ $form->setSelect("corpsfont",$contenu);
+ $form->setSelect("footerfont",$contenu);
+ $form->setSelect("se_font",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('L','R','J','C');
+ $contenu[1]=array(_("gauche"),_("droite"),_("justifie"),_("centre"));
+ $form->setSelect("titrealign",$contenu);
+ $form->setSelect("corpsalign",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('0','1');
+ $contenu[1]=array(_("sans"),_("avec"));
+ $form->setSelect("titrebordure",$contenu);
+ $form->setSelect("corpsbordure",$contenu);
+ // position geographique
+ $contenu=array();
+ $contenu[0]=array('image','logoleft');
+ $form->setSelect("logotop",$contenu);
+ $contenu=array();
+ $contenu[0]=array('image','titreleft');
+ $form->setSelect("titretop",$contenu);
+ $contenu=array();
+ $contenu[0]=array('image','corpsleft');
+ $form->setSelect("corpstop",$contenu);
+
+ // parametre textareamulti
+ $contenu=array();
+ $contenu[0] ="om_sousetat";
+ $form->setSelect("sousetat",$contenu);
+
+ // om_sousetat
+ if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc"))
+ include ("../sql/".$db->phptype."/".$this->table.".form.inc");
+ $contenu=array();
+ $res = $db->query($sql_om_sousetat);
+ if (database::isError($res))
+ die($res->getMessage().$sql_om_sousetat);
+ else{
+ if ($debug == 1)
+ echo " la requete ".$sql_om_sousetat." est executee<br>";
+ $contenu[0][0]='';
+ $contenu[1][0]=_('choisir')."&nbsp;"._('om_sousetat');
+ $k=1;
+ while ($row=& $res->fetchRow()){
+ $contenu[0][$k]=$row[0];
+ $contenu[1][$k]=$row[1];
+ $k++;
+ }
+ $form->setSelect('om_sousetat',$contenu);
+ }
+ }
+
+ /**
+ *
+ */
+ function setRegroupe(&$form, $maj) {
+
+ $form->setRegroupe('om_collectivite','D',_('om_collectivite'), "collapsible");
+ $form->setRegroupe('id','G','');
+ $form->setRegroupe('libelle','G','');
+ $form->setRegroupe('actif','F','');
+
+ $form->setRegroupe('orientation', 'D', _("Parametres generaux du document"), "startClosed");
+ $form->setRegroupe('format','G','');
+ $form->setRegroupe('footerfont','G','');
+ $form->setRegroupe('footerattribut','G','');
+ $form->setRegroupe('footertaille','G','');
+ $form->setRegroupe('logo','G','');
+ $form->setRegroupe('logoleft','G','');
+ $form->setRegroupe('logotop','F','');
+
+ $form->setRegroupe('titreleft','D',_("Parametres du titre du document"), "startClosed");
+ $form->setRegroupe('titretop','G','');
+ $form->setRegroupe('titrelargeur','G','');
+ $form->setRegroupe('titrehauteur','G','');
+ $form->setRegroupe('titrefont','G','');
+ $form->setRegroupe('titreattribut','G','');
+ $form->setRegroupe('titretaille','G','');
+ $form->setRegroupe('titrebordure','G','');
+ $form->setRegroupe('titrealign','F','');
+
+ $form->setRegroupe('corpsleft','D',_("Parametres du corps du document"), "startClosed");
+ $form->setRegroupe('corpstop','G','');
+ $form->setRegroupe('corpslargeur','G','');
+ $form->setRegroupe('corpshauteur','G','');
+ $form->setRegroupe('corpsfont','G','');
+ $form->setRegroupe('corpsattribut','G','');
+ $form->setRegroupe('corpstaille','G','');
+ $form->setRegroupe('corpsbordure','G','');
+ $form->setRegroupe('corpsalign','F','');
+
+ $form->setRegroupe('om_sousetat','D', _("Sous etat(s) : selection"), "startClosed");
+ $form->setRegroupe('sousetat','F', '');
+
+
+ $form->setRegroupe('se_font','D', _("Sous etat(s) : police / marges / couleur"), "startClosed");
+ $form->setRegroupe('se_margeleft','G','');
+ $form->setRegroupe('se_margetop','G','');
+ $form->setRegroupe('se_margeright','G','');
+ $form->setRegroupe('se_couleurtexte','F','');
+
+ }
+
+ /**
+ *
+ */
+ function setGroupe(&$form, $maj) {
+
+ $form->setGroupe('om_collectivite','D');
+ $form->setGroupe('id','G');
+ $form->setGroupe('libelle','G');
+ $form->setGroupe('actif','F');
+
+ $form->setGroupe('orientation','D');
+ $form->setGroupe('format','F');
+
+ $form->setGroupe('footerfont','D');
+ $form->setGroupe('footerattribut','G');
+ $form->setGroupe('footertaille','F');
+
+ $form->setGroupe('logo','D');
+ $form->setGroupe('logoleft','G');
+ $form->setGroupe('logotop','F');
+
+ $form->setGroupe('titreleft','D');
+ $form->setGroupe('titretop','G');
+ $form->setGroupe('titrelargeur','G');
+ $form->setGroupe('titrehauteur','F');
+
+ $form->setGroupe('titrefont','D');
+ $form->setGroupe('titreattribut','G');
+ $form->setGroupe('titretaille','G');
+ $form->setGroupe('titrebordure','G');
+ $form->setGroupe('titrealign','F');
+
+ $form->setGroupe('corpsleft','D');
+ $form->setGroupe('corpstop','G');
+ $form->setGroupe('corpslargeur','G');
+ $form->setGroupe('corpshauteur','F');
+
+ $form->setGroupe('corpsfont','D');
+ $form->setGroupe('corpsattribut','G');
+ $form->setGroupe('corpstaille','G');
+ $form->setGroupe('corpsbordure','G');
+ $form->setGroupe('corpsalign','F');
+
+ $form->setGroupe('om_sousetat','D');
+ $form->setGroupe('sousetat','F');
+
+ $form->setGroupe('se_font','D');
+ $form->setGroupe('se_margeleft','G');
+ $form->setGroupe('se_margetop','G');
+ $form->setGroupe('se_margeright','G');
+ $form->setGroupe('se_couleurtexte','F');
+
+ }
+
+ /**
+ *
+ */
+ function setLib(&$form, $maj) {
+
+ $form->setLib('footerattribut',_('mise_en_forme')."&nbsp;"._('du')."&nbsp;"._('texte'));
+ $form->setLib('titreleft',_('left'));
+ $form->setLib('titretop',_('top'));
+ $form->setLib('titrelargeur',_('largeur'));
+ $form->setLib('titrehauteur',_('hauteur'));
+ $form->setLib('titrefont',_('font'));
+ $form->setLib('titreattribut',_('mise_en_forme')."&nbsp;"._('du')."&nbsp;"._('texte'));
+ $form->setLib('titretaille',_('taille'));
+ $form->setLib('titrebordure',_('bordure'));
+ $form->setLib('titrealign','');
+
+ $form->setLib('titre',_('titre'));
+
+ $form->setLib('corps',_('corps'));
+ $form->setLib('corpsleft',_('left'));
+ $form->setLib('corpstop',_('top'));
+
+ $form->setLib('corpslargeur',_('largeur'));
+ $form->setLib('corpshauteur',_('hauteur'));
+ $form->setLib('corpsfont',_('font'));
+ $form->setLib('corpsattribut',_('mise_en_forme')."&nbsp;"._('du')."&nbsp;"._('texte'));
+ $form->setLib('corpstaille',_('taille'));
+ $form->setLib('corpsbordure',_('bordure'));
+ $form->setLib('corpsalign','');
+
+ $form->setLib('om_sousetat',_('sous_etat'));
+ $form->setLib('sousetat','');
+ $form->setLib('se_font',_('font'));
+ $form->setLib('se_margeleft',_('marges')."&nbsp;"._('left'));
+ $form->setLib('se_margetop',_('marges')."&nbsp;"._('haute'));
+ $form->setLib('se_margeright',_('marges')."&nbsp;"._('droite'));
+ $form->setLib('se_couleurtexte',_('couleur'));
+
+ }
+
+ /**
+ *
+ */
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {
+ parent::setVal($form, $maj, $validation, $db, $DEBUG=null);
+ $this->maj=$maj;
+ if ($validation == 0) {
+ if ($maj == 0) {
+ // ======================= a rajouter au generateur ===========
+ //if($_SESSION['niveau']==1)
+ // $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ // =============================================================
+ $form->setVal('orientation','P');
+ $form->setVal('format','A4');
+ $form->setVal('footerfont','helvetica');
+ $form->setVal('footerattribut','I');
+ $form->setVal('footertaille',8);
+ $form->setVal('logo','logopdf.png');
+ $form->setVal('logoleft', 10);
+ $form->setVal('logotop', 10);
+ $form->setVal('titre',_("Texte du titre"));
+ $form->setVal('titreleft',109);
+ $form->setVal('titretop',16);
+ $form->setVal('titrelargeur',0);
+ $form->setVal('titrehauteur',10);
+ $form->setVal('titrefont','arial');
+ $form->setVal('titreattribut','B');
+ $form->setVal('titretaille',20);
+ $form->setVal('titrebordure',0);
+ $form->setVal('titrealign','L');
+ $form->setVal('corps',_("Texte du corps"));
+ $form->setVal('corpsleft',14);
+ $form->setVal('corpstop',66);
+ $form->setVal('corpslargeur',110);
+ $form->setVal('corpshauteur',5);
+ $form->setVal('corpsfont','times');
+ $form->setVal('corpsattribut','');
+ $form->setVal('corpstaille',10);
+ $form->setVal('corpsbordure',0);
+ $form->setVal('corpsalign','J');
+ $form->setVal('om_sql',' select ... from ... where ... = &idx');
+ $form->setVal('sousetat','');
+ $form->setVal('se_font','helvetica');
+ $form->setVal('se_margeleft',8);
+ $form->setVal('se_margetop',5);
+ $form->setVal('se_margeright',5);
+ $form->setVal('se_couleurtexte','0-0-0');
+ }
+
+
+
+ }
+
+ }
+ function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$db, $DEBUG=null) {
+ $this->maj=$maj;
+ $this->retourformulaire=$retourformulaire;
+ if ($validation==0) {
+ if ($maj == 0){
+ $form->setVal($retourformulaire, $idxformulaire);
+ $form->setVal('orientation','P');
+ $form->setVal('format','A4');
+ $form->setVal('footerfont','helvetica');
+ $form->setVal('footerattribut','I');
+ $form->setVal('footertaille',8);
+ $form->setVal('logo','logopdf.png');
+ $form->setVal('logoleft', 10);
+ $form->setVal('logotop', 10);
+ $form->setVal('titre',_("Texte du titre"));
+ $form->setVal('titreleft',109);
+ $form->setVal('titretop',16);
+ $form->setVal('titrelargeur',0);
+ $form->setVal('titrehauteur',10);
+ $form->setVal('titrefont','arial');
+ $form->setVal('titreattribut','B');
+ $form->setVal('titretaille',20);
+ $form->setVal('titrebordure',0);
+ $form->setVal('titrealign','L');
+ $form->setVal('corps',_("Texte du corps"));
+ $form->setVal('corpsleft',14);
+ $form->setVal('corpstop',66);
+ $form->setVal('corpslargeur',110);
+ $form->setVal('corpshauteur',5);
+ $form->setVal('corpsfont','times');
+ $form->setVal('corpsattribut','');
+ $form->setVal('corpstaille',10);
+ $form->setVal('corpsbordure',0);
+ $form->setVal('corpsalign','J');
+ $form->setVal('om_sql',' select ... from ... where ... = &idx');
+ $form->setVal('sousetat','');
+ $form->setVal('se_font','helvetica');
+ $form->setVal('se_margeleft',8);
+ $form->setVal('se_margetop',5);
+ $form->setVal('se_margeright',5);
+ $form->setVal('se_couleurtexte','0-0-0');
+ }}
+ }
+
+ /**
+ * verification sur existence d un etat deja actif pour la collectivite
+ */
+ function verifieractif(&$db, $val, $DEBUG,$id){
+ $sql = "select om_etat from ".DB_PREFIXE."om_etat where id ='".$val['id']."'";
+ $sql.= " and om_collectivite ='".$val['om_collectivite']."'";
+ $sql.= " and actif ='Oui'";
+ if($id!=']')
+ $sql.=" and om_etat !='".$id."'";
+ $res = $db->query($sql);
+ if($DEBUG==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ if ($nbligne>0){
+ $this->msg= $this->msg." ".$nbligne." "._("etat")." "._("existant").
+ " "._("actif")." ! "._("vous ne pouvez avoir qu un etat")." '".
+ $val['id']."' "._("actif")." "._("par collectivite");
+ $this->correct=False;
+ }
+ }
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_lettretype.class.php
===================================================================
--- branches/1.x/obj/om_lettretype.class.php (rev 0)
+++ branches/1.x/obj/om_lettretype.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,347 @@
+<?php
+//$Id$
+//gen openMairie le 19/10/2010 18:45
+require_once ("../gen/obj/om_lettretype.class.php");
+
+class om_lettretype extends om_lettretype_gen {
+
+ var $maj;
+ var $retourformulaire;
+
+ function om_lettretype($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ function verifier($val, &$db, $DEBUG) {
+ parent::verifier($val, $db, $DEBUG);
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['id']==""){
+ $this->msg= $this->msg.$imgv._('identifiant')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }else
+ // verification si il y a un autre id "actif" pour la collectivite
+ if($this->valF['actif']=="Oui")
+ if($this->maj==0)
+ $this->verifieractif($db, $val, $DEBUG,']');
+ else
+ $this->verifieractif($db, $val, $DEBUG,$val['om_lettretype']);
+ }
+
+
+
+ /**
+ *
+ */
+ function setType(&$form,$maj) {
+ parent::setType($form,$maj);
+ $form->setType('image', 'hidden');
+ if ($maj < 2) { //ajouter et modifier
+ $form->setType('actif', 'checkbox');
+ $form->setType('orientation', 'select');
+ $form->setType('format', 'select');
+ $form->setType('titreattribut', 'select');
+ $form->setType('corpsattribut', 'select');
+ $form->setType('titrefont', 'select');
+ $form->setType('corpsfont', 'select');
+ $form->setType('titrealign', 'select');
+ $form->setType('corpsalign', 'select');
+ $form->setType('titrebordure', 'select');
+ $form->setType('corpsbordure', 'select');
+ $form->setType('titre', 'textarea');
+ $form->setType('corps', 'textarea');
+ $form->setType('sql', 'textarea');
+ if($this->retourformulaire=='om_collectivite'){
+ $form->setType('logotop', 'localisation2');
+ $form->setType('titretop', 'localisation2');
+ $form->setType('corpstop', 'localisation2');
+ $form->setType('logo', 'upload2');
+ }else{
+ $form->setType('logotop', 'localisation');
+ $form->setType('titretop', 'localisation');
+ $form->setType('corpstop', 'localisation');
+ $form->setType('logo', 'upload');
+ }
+ if ($maj == 1) { //modifier
+ $form->setType('idx', 'hidden');
+ }
+ } else { // supprimer
+ $form->setType('idx', 'hiddenstatic');
+ }
+
+ }
+
+ function setTaille(&$form, $maj) {
+ parent :: setTaille($form, $maj);
+ $form->setTaille('id', 20);
+ $form->setTaille('libelle', 20);
+ }
+
+
+ /**
+ *
+ */
+ function setSelect(&$form, $maj, &$db, $debug) {
+ parent :: setSelect($form, $maj, $db, $debug);
+
+ $contenu=array();
+ $contenu[0]=array('P','L');
+ $contenu[1]=array(_("portrait"),_("paysage"));
+ $form->setSelect("orientation",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('A4','A3');
+ $contenu[1]=array('A4','A3');
+ $form->setSelect("format",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('','I','B','U','BI','UI');
+ $contenu[1]=array(_("normal"),_("italique"),_("gras"),_("souligne"),_("italique")." "._("gras"),_("souligne")." "._("gras"));
+ $form->setSelect("titreattribut",$contenu);
+ $form->setSelect("corpsattribut",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('helvetica','times','arial','courier');
+ $contenu[1]=array('helvetica','times','arial','courier');
+ $form->setSelect("titrefont",$contenu);
+ $form->setSelect("corpsfont",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('L','R','J','C');
+ $contenu[1]=array(_("gauche"),_("droite"),_("justifie"),_("centre"));
+ $form->setSelect("titrealign",$contenu);
+ $form->setSelect("corpsalign",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('0','1');
+ $contenu[1]=array(_("sans"),_("avec"));
+ $form->setSelect("titrebordure",$contenu);
+ $form->setSelect("corpsbordure",$contenu);
+ // position geographique
+ $contenu=array();
+ $contenu[0]=array('image','logoleft');
+ $form->setSelect("logotop",$contenu);
+ $contenu=array();
+ $contenu[0]=array('image','titreleft');
+ $form->setSelect("titretop",$contenu);
+ $contenu=array();
+ $contenu[0]=array('image','corpsleft');
+ $form->setSelect("corpstop",$contenu);
+ $form->setSelect("corpstop",$contenu);
+ }
+
+
+ /**
+ *
+ */
+ function setRegroupe(&$form, $maj) {
+
+ $form->setRegroupe('om_collectivite','D',_('om_collectivite'), "collapsible");
+ $form->setRegroupe('id','G','');
+ $form->setRegroupe('libelle','G','');
+ $form->setRegroupe('actif','F','');
+
+ $form->setRegroupe('orientation','D', _("Parametres generaux du document"), "startClosed");
+ $form->setRegroupe('format','G','');
+ $form->setRegroupe('logo','G','');
+ $form->setRegroupe('logoleft','G','');
+ $form->setRegroupe('logotop','F','');
+
+ $form->setRegroupe('titreleft','D',_("Parametres du titre du document"), "startClosed");
+ $form->setRegroupe('titretop','G','');
+ $form->setRegroupe('titrelargeur','G','');
+ $form->setRegroupe('titrehauteur','G','');
+ $form->setRegroupe('titrefont','G','');
+ $form->setRegroupe('titreattribut','G','');
+ $form->setRegroupe('titretaille','G','');
+ $form->setRegroupe('titrebordure','G','');
+ $form->setRegroupe('titrealign','F','');
+
+ $form->setRegroupe('corpsleft','D',_("Parametres du corps du document"), "startClosed");
+ $form->setRegroupe('corpstop','G','');
+ $form->setRegroupe('corpslargeur','G','');
+ $form->setRegroupe('corpshauteur','G','');
+ $form->setRegroupe('corpsfont','G','');
+ $form->setRegroupe('corpsattribut','G','');
+ $form->setRegroupe('corpstaille','G','');
+ $form->setRegroupe('corpsbordure','G','');
+ $form->setRegroupe('corpsalign','F','');
+
+ }
+
+ /**
+ *
+ */
+ function setGroupe(&$form, $maj) {
+
+ $form->setGroupe('om_collectivite','D');
+ $form->setGroupe('id','G');
+ $form->setGroupe('libelle','G');
+ $form->setGroupe('actif','F');
+
+ $form->setGroupe('orientation','D');
+ $form->setGroupe('format','F');
+ $form->setGroupe('logo','D');
+ $form->setGroupe('logoleft','G');
+ $form->setGroupe('logotop','F');
+
+ $form->setGroupe('titreleft','D');
+ $form->setGroupe('titretop','G');
+ $form->setGroupe('titrelargeur','G');
+ $form->setGroupe('titrehauteur','F');
+
+ $form->setGroupe('titrefont','D');
+ $form->setGroupe('titreattribut','G');
+ $form->setGroupe('titretaille','G');
+ $form->setGroupe('titrebordure','G');
+ $form->setGroupe('titrealign','F');
+
+ $form->setGroupe('corpsleft','D');
+ $form->setGroupe('corpstop','G');
+ $form->setGroupe('corpslargeur','G');
+ $form->setGroupe('corpshauteur','F');
+
+ $form->setGroupe('corpsfont','D');
+ $form->setGroupe('corpsattribut','G');
+ $form->setGroupe('corpstaille','G');
+ $form->setGroupe('corpsbordure','G');
+ $form->setGroupe('corpsalign','F');
+
+ }
+
+ /**
+ *
+ */
+ function setLib(&$form, $maj) {
+
+ $form->setLib('logoleft',_('left'));
+ $form->setLib('logotop',_('top'));
+ $form->setLib('orientation',_('orientation'));
+ $form->setLib('format',_('format'));
+
+ $form->setLib('titre',_('titre'));
+
+ $form->setLib('titreleft',_('left'));
+ $form->setLib('titretop',_('top'));
+ $form->setLib('titrelargeur',_('largeur'));
+ $form->setLib('titrehauteur',_('Hauteur'));
+ $form->setLib('titrefont',_('font'));
+ $form->setLib('titreattribut',_('Mise en forme du texte'));
+ $form->setLib('titretaille',_('Taille'));
+ $form->setLib('titrebordure',_('Bordure'));
+ $form->setLib('titrealign',_('align'));
+
+ $form->setLib('corps',_('corps'));
+ $form->setLib('corpsleft',_('left'));
+ $form->setLib('corpstop',_('top'));
+
+ $form->setLib('corpslargeur',_('largeur'));
+ $form->setLib('corpshauteur',_('hauteur'));
+ $form->setLib('corpsfont','font');
+ $form->setLib('corpsattribut',_('mise_en_forme')."&nbsp;"._('du')."&nbsp;"._('texte'));
+ $form->setLib('corpstaille',_('taille'));
+ $form->setLib('corpsbordure',_('bordure'));
+ $form->setLib('corpsalign',_('align'));
+
+ $form->setLib('om_sql',_('sql'));
+
+ }
+
+ /**
+ *
+ */
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {
+ parent::setVal($form, $maj, $validation, $db, $DEBUG=null);
+ $this->maj=$maj;
+ if ($validation == 0) {
+ if ($maj == 0) {
+ $form->setVal('orientation','P');
+ $form->setVal('format','A4');
+ $form->setVal('logoleft', 10);
+ $form->setVal('logo','logo.png');
+ $form->setVal('logotop', 10);
+ $form->setVal('titre',_('Texte du titre'));
+ $form->setVal('titreleft',109);
+ $form->setVal('titretop',16);
+ $form->setVal('titrelargeur',0);
+ $form->setVal('titrehauteur',10);
+ $form->setVal('titrefont','arial');
+ $form->setVal('titreattribut','B');
+ $form->setVal('titretaille',20);
+ $form->setVal('titrebordure',0);
+ $form->setVal('titrealign','L');
+ $form->setVal('corps',_('Texte du corps'));
+ $form->setVal('corpsleft',14);
+ $form->setVal('corpstop',66);
+ $form->setVal('corpslargeur',110);
+ $form->setVal('corpshauteur',5);
+ $form->setVal('corpsfont','times');
+ $form->setVal('corpsattribut','');
+ $form->setVal('corpstaille',10);
+ $form->setVal('corpsbordure',0);
+ $form->setVal('corpsalign','J');
+ $form->setVal('om_sql',' select ... from ... where ... = &idx');
+ }
+ }
+ }
+
+ function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$db, $DEBUG=null) {
+ $this->maj=$maj;
+ $this->retourformulaire=$retourformulaire;
+ if ($validation==0) {
+ if ($maj == 0){
+ $form->setVal('orientation','P');
+ $form->setVal('format','A4');
+ $form->setVal('logoleft', 10);
+ $form->setVal('logo','logo.png');
+ $form->setVal('logotop', 10);
+ $form->setVal('titre',_('Texte du titre'));
+ $form->setVal('titreleft',109);
+ $form->setVal('titretop',16);
+ $form->setVal('titrelargeur',0);
+ $form->setVal('titrehauteur',10);
+ $form->setVal('titrefont','arial');
+ $form->setVal('titreattribut','B');
+ $form->setVal('titretaille',20);
+ $form->setVal('titrebordure',0);
+ $form->setVal('titrealign','L');
+ $form->setVal('corps',_('Texte du corps'));
+ $form->setVal('corpsleft',14);
+ $form->setVal('corpstop',66);
+ $form->setVal('corpslargeur',110);
+ $form->setVal('corpshauteur',5);
+ $form->setVal('corpsfont','times');
+ $form->setVal('corpsattribut','');
+ $form->setVal('corpstaille',10);
+ $form->setVal('corpsbordure',0);
+ $form->setVal('corpsalign','J');
+ $form->setVal('om_sql',' select ... from ... where ... = &idx');
+ $form->setVal($retourformulaire, $idxformulaire);
+ }}
+ }
+
+ /**
+ * verification sur existence d un etat deja actif pour la collectivite
+ */
+ function verifieractif(&$db, $val, $DEBUG,$id){
+ $sql = "select om_lettretype from ".DB_PREFIXE."om_lettretype where id ='".$val['id']."'";
+ $sql.= " and om_collectivite ='".$val['om_collectivite']."'";
+ $sql.= " and actif ='Oui'";
+ if($id!=']')
+ $sql.=" and om_lettretype !='".$id."'";
+ $res = $db->query($sql);
+ if($DEBUG==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ if ($nbligne>0){
+ $this->msg= $this->msg." ".$nbligne." "._("lettretype")." "._("existant").
+ " "._("actif")." ! "._("vous ne pouvez avoir qu une lettretype")." '".
+ $val['id']."' "._("actif")." "._("par collectivite");
+ $this->correct=False;
+ }
+ }
+ }
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_parametre.class.php
===================================================================
--- branches/1.x/obj/om_parametre.class.php (rev 0)
+++ branches/1.x/obj/om_parametre.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,18 @@
+<?php
+//$Id$
+//gen openMairie le 15/10/2010 15:54
+require_once ("../gen/obj/om_parametre.class.php");
+
+class om_parametre extends om_parametre_gen {
+
+ function om_parametre($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ function setVal(&$form,$maj){
+ if ($maj == 0)
+ $form->setVal('om_collectivite', $_SESSION['collectivite']);
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_profil.class.php
===================================================================
--- branches/1.x/obj/om_profil.class.php (rev 0)
+++ branches/1.x/obj/om_profil.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+//$Id$
+//gen openMairie le 15/10/2010 15:54
+require_once ("../gen/obj/om_profil.class.php");
+
+class om_profil extends om_profil_gen {
+
+function om_profil($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_sig_point.class.php
===================================================================
--- branches/1.x/obj/om_sig_point.class.php (rev 0)
+++ branches/1.x/obj/om_sig_point.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,195 @@
+<?php
+//$Id$
+//gen openMairie le 06/04/2011 08:33
+require_once ("../gen/obj/om_sig_point.class.php");
+
+class om_sig_point extends om_sig_point_gen {
+
+ var $maj; // pour verification actif
+
+ function om_sig_point($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ function setType(&$form,$maj) {
+ parent::setType($form,$maj);
+ if($maj<2){
+ $form->setType('etendue','select');
+ $form->setType('projection_externe','select');
+ $form->setType('layer_info', 'checkbox');
+ $form->setType('fond_osm','checkbox');
+ $form->setType('fond_bing','checkbox');
+ $form->setType('fond_sat','checkbox');
+ $form->setType('maj','checkbox');
+ $form->setType('actif', 'checkbox');
+ }
+ }
+
+ /**
+ * Methode verifier
+ */
+ function verifier($val = array(), &$db = NULL, $DEBUG = false) {
+ // On appelle la methode de la classe parent
+ parent::verifier($val, $db, $DEBUG);
+ // On verifie si le champ n'est pas vide
+ if ($this->valF['id'] == "") {
+ $this->correct = false;
+ $this->addToMessage(_("Le champ")." "._("id")." "._("est obligatoire"));
+ } else {
+ // On verifie si il y a un autre id 'actif' pour la collectivite
+ if ($this->valF['actif'] == "Oui") {
+ if ($this->maj == 0) {
+ //
+ $this->verifieractif($db, $val, $DEBUG, ']');
+ } else {
+ //
+ $this->verifieractif($db, $val, $DEBUG, $val['om_sig_point']);
+ }
+ }
+ }
+ }
+
+ function setTaille(&$form,$maj) {
+ parent::setTaille($form,$maj);
+ //taille des champs affiches (text)
+ $form->setTaille('om_sig_point',4);
+ $form->setTaille('om_collectivite',4);
+ $form->setTaille('id',20);
+ $form->setTaille('libelle',50);
+ $form->setTaille('zoom',3);
+ $form->setTaille('fond_osm',1);
+ $form->setTaille('fond_bing',1);
+ $form->setTaille('fond_sat',1);
+ $form->setTaille('etendue',60);
+ $form->setTaille('projection_externe',20);
+ $form->setTaille('maj',1);
+ $form->setTaille('table_update',30);
+ $form->setTaille('champ',30);
+ $form->setTaille('retour',50);
+ }
+
+ function setMax(&$form,$maj) {
+ parent::setMax($form,$maj);
+ $form->setMax('om_sig_point',4);
+ $form->setMax('om_collectivite',4);
+ $form->setMax('id',50);
+ $form->setMax('libelle',50);
+ $form->setMax('zoom',3);
+ $form->setMax('fond_osm',1);
+ $form->setMax('fond_bing',1);
+ $form->setMax('fond_sat',1);
+ $form->setMax('etendue',60);
+ $form->setMax('projection_externe',60);
+ $form->setMax('url',2);
+ $form->setMax('maj',1);
+ $form->setMax('table_update',30);
+ $form->setMax('champ',30);
+ $form->setMax('retour',50);
+ }
+
+ function setOnchange(&$form,$maj) {
+ parent::setOnchange($form,$maj);
+ $form->setOnchange('zoom','VerifNum(this)');
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ parent::setSelect($form, $maj,$db,$debug);
+ if($maj<2){
+ if(file_exists ("../dyn/var_point.inc"))
+ include ("../dyn/var_point.inc");
+ $form->setSelect("etendue",$contenu_etendue);
+ $form->setSelect("projection_externe",$contenu_epsg);
+ }// fin maj
+ }
+
+ function setGroupe (&$form, $maj) {
+
+ $form->setGroupe('id','D');
+ $form->setGroupe('libelle','G');
+ $form->setGroupe('actif','F');
+
+ $form->setGroupe('zoom','D');
+ $form->setGroupe('fond_osm','G');
+ $form->setGroupe('fond_bing','G');
+ $form->setGroupe('fond_sat','G');
+ $form->setGroupe('layer_info','F');
+
+ $form->setGroupe('etendue','D');
+ $form->setGroupe('projection_externe','F');
+
+ $form->setGroupe('maj','D');
+ $form->setGroupe('table_update','G');
+ $form->setGroupe('champ','F');
+ }
+
+ function setRegroupe (&$form, $maj) {
+
+ $form->setRegroupe('zoom','D',' '._('fond').' ', "collapsible");
+ $form->setRegroupe('fond_osm','G','');
+ $form->setRegroupe('fond_bing','G','');
+ $form->setRegroupe('fond_sat','G','');
+ $form->setRegroupe('layer_info','F','');
+
+ $form->setRegroupe('id','D',' '._('titre').' ', "collapsible");
+ $form->setRegroupe('libelle','G','');
+ $form->setRegroupe('actif','F','');
+
+ $form->setRegroupe('etendue','D',' '._('etendue').' ', "collapsible");
+ $form->setRegroupe('projection_externe','F','');
+
+ $form->setRegroupe('maj','D',' '._('Mise a jour').' ', "startClosed");
+ $form->setRegroupe('table_update','G','');
+ $form->setRegroupe('champ','F','');
+
+ }
+
+ function setLib(&$form,$maj) {
+ parent::setLib($form,$maj);
+ //libelle des champs
+ $form->setLib('fond_osm',_('osm : '));
+ $form->setLib('fond_bing',_('bing : '));
+ $form->setLib('fond_sat',_('sat : '));
+ $form->setLib('etendue',_('etendue'));
+ $form->setLib('projection_externe',_('projection'));
+ $form->setLib('url',_('url'));
+ $form->setLib('om_sql',_('requete sql'));
+ $form->setLib('maj',_('maj'));
+ $form->setLib('table_update',_(' table :'));
+ }
+
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {
+ parent::setVal($form, $maj, $validation, $db, $DEBUG=null);
+ $this->maj=$maj;
+ }
+
+ function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$db, $DEBUG=null) {
+ parent::setValsousformulaire($form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, $db, $DEBUG=null);
+ $this->maj=$maj;
+ }
+
+ /**
+ * verification sur existence d un etat deja actif pour la collectivite
+ */
+ function verifieractif(&$db, $val, $DEBUG,$id){
+ $sql = "select om_sig_point from ".DB_PREFIXE."om_sig_point where id ='".$val['id']."'";
+ $sql.= " and om_collectivite ='".$val['om_collectivite']."'";
+ $sql.= " and actif ='Oui'";
+ if($id!=']')
+ $sql.=" and om_sig_point !='".$id."'";
+ $res = $db->query($sql);
+ if($DEBUG==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ if ($nbligne>0){
+ $this->msg= $this->msg." ".$nbligne." "._("sig_point")." "._("existant").
+ " "._("actif")." ! "._("vous ne pouvez avoir qu un sig_point")." '".
+ $val['id']."' "._("actif")." "._("par collectivite");
+ $this->correct=False;
+ }
+ }
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_sousetat.class.php
===================================================================
--- branches/1.x/obj/om_sousetat.class.php (rev 0)
+++ branches/1.x/obj/om_sousetat.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,589 @@
+<?php
+//$Id$
+//gen openMairie le 18/10/2010 21:29
+require_once ("../gen/obj/om_sousetat.class.php");
+
+class om_sousetat extends om_sousetat_gen {
+
+ var $maj;
+ var $retourformulaire;
+
+ function om_sousetat($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ function verifier($val, &$db, $DEBUG) {
+ parent::verifier($val, $db, $DEBUG);
+ $f="&nbsp!&nbsp;&nbsp;&nbsp;&nbsp;";
+ $imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>";
+ if ($this->valF['id']==""){
+ $this->msg= $this->msg.$imgv._('identifiant')."&nbsp;"._('obligatoire').$f;
+ $this->correct=False;
+ }else
+ // verification si il y a un autre id "actif" pour la collectivite
+ if($this->valF['actif']=="Oui")
+ if($this->maj==0)
+ $this->verifieractif($db, $val, $DEBUG,']');
+ else
+ $this->verifieractif($db, $val, $DEBUG,$val['om_sousetat']);
+ }
+
+
+
+ /**
+ *
+ */
+ function setType(&$form,$maj) {
+ parent :: setType(&$form,$maj);
+ $form->setType('image', 'hidden');
+ if ($maj < 2) { //ajouter et modifier
+ $form->setType('actif', 'checkbox');
+ $form->setType('titreattribut', 'select');
+ $form->setType('titrefont', 'select');
+ $form->setType('titrealign', 'select');
+ $form->setType('titrebordure', 'select');
+ $form->setType('titre', 'textarea');
+ $form->setType('titrefond', 'select');
+ $form->setType('entete_flag', 'select');
+ $form->setType('entete_fond', 'select');
+ $form->setType('tableau_bordure', 'select');
+ $form->setType('cellule_fond', 'select');
+ $form->setType('cellule_fond_total', 'select');
+ $form->setType('cellule_fond_moyenne', 'select');
+ $form->setType('cellule_fond_nbr', 'select');
+ $form->setType('om_sql', 'textarea');
+ if($this->retourformulaire=='om_collectivite'){
+ $form->setType('titrefondcouleur', 'rvb2');
+ $form->setType('titretextecouleur', 'rvb2');
+ $form->setType('entete_fondcouleur','rvb2');
+ $form->setType('entete_textecouleur','rvb2');
+ $form->setType('bordure_couleur','rvb2');
+ $form->setType('se_fond1','rvb2');
+ $form->setType('se_fond2','rvb2');
+ $form->setType('cellule_fondcouleur_total','rvb2');
+ $form->setType('cellule_fondcouleur_moyenne','rvb2');
+ $form->setType('cellule_fondcouleur_nbr','rvb2');
+ }else{
+ $form->setType('titrefondcouleur', 'rvb');
+ $form->setType('titretextecouleur', 'rvb');
+ $form->setType('entete_fondcouleur','rvb');
+ $form->setType('entete_textecouleur','rvb');
+ $form->setType('bordure_couleur','rvb');
+ $form->setType('se_fond1','rvb');
+ $form->setType('se_fond2','rvb');
+ $form->setType('cellule_fondcouleur_total','rvb');
+ $form->setType('cellule_fondcouleur_moyenne','rvb');
+ $form->setType('cellule_fondcouleur_nbr','rvb');
+ }
+ if ($maj == 1) { //modifier
+ $form->setType('idx', 'hidden');
+ }
+ } else { // supprimer
+ $form->setType('idx', 'hiddenstatic');
+ }
+ }
+
+ /**
+ *
+ */
+ function setTaille(&$form, $maj) {
+ $form->setTaille('id', 30);
+ $form->setTaille('libelle', 20);
+
+ $form->setTaille('titre', 80);
+ $form->setTaille('om_sql', 80);
+
+ $form->setTaille('entete_orientation',20);
+ $form->setTaille('entetecolone_bordure',40);
+ $form->setTaille('entetecolone_align',20);
+
+ $form->setTaille('cellule_largeur',40);
+ $form->setTaille('cellule_bordure_un',40);
+ $form->setTaille('cellule_bordure',40);
+ $form->setTaille('cellule_align',20);
+
+ $form->setTaille('cellule_bordure_total',40);
+ $form->setTaille('cellule_align_total',20);
+
+ $form->setTaille('cellule_bordure_moyenne',40);
+ $form->setTaille('cellule_align_moyenne',20);
+
+ $form->setTaille('cellule_bordure_nbr',40);
+ $form->setTaille('cellule_align_nbr',20);
+
+ $form->setTaille('cellule_numerique',40);
+ $form->setTaille('cellule_total',20);
+ $form->setTaille('cellule_moyenne',20);
+ $form->setTaille('cellule_compteur',20);
+ }
+
+ /**
+ *
+ */
+ function setMax(&$form, $maj) {
+
+ $form->setMax('titre', 3);
+ $form->setMax('om_sql', 10);
+ }
+
+ /**
+ *
+ */
+ function setSelect(&$form, $maj, $db, $debug) {
+ parent :: setSelect($form, $maj, $db, $debug);
+ //
+ $contenu=array();
+ $contenu[0]=array('P','L');
+ $contenu[1]=array(_("portrait"),_("paysage"));
+ $form->setSelect("orientation",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('A4','A3');
+ $contenu[1]=array('A4','A3');
+ $form->setSelect("format",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('','I','B','U','BI','UI');
+ $contenu[1]=array(_("normal"),_("italique"),_("gras"),_("souligne"),_("italique")." "._("gras"),_("souligne")." "._("gras"));
+ $form->setSelect("titreattribut",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('helvetica','times','arial','courier');
+ $contenu[1]=array('helvetica','times','arial','courier');
+ $form->setSelect("titrefont",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('L','R','J','C');
+ $contenu[1]=array(_("gauche"),_("droite"),_("justifie"),_("centre"));
+ $form->setSelect("titrealign",$contenu);
+ //
+ $contenu=array();
+ $contenu[0]=array('0','1');
+ $contenu[1]=array(_("sans"),_("avec"));
+ $form->setSelect("titrebordure",$contenu);
+ $form->setSelect("entete_flag",$contenu);
+ $form->setSelect("tableau_bordure",$contenu);
+ // fond
+ $contenu[1]=array(_("transparent"),_("fond"));
+ $form->setSelect("titrefond",$contenu);
+ $form->setSelect("entete_fond",$contenu);
+ $form->setSelect("cellule_fond",$contenu);
+ $form->setSelect("cellule_fond_total",$contenu);
+ $form->setSelect("cellule_fond_moyenne",$contenu);
+ $form->setSelect("cellule_fond_nbr",$contenu);
+ // position geographique
+ $contenu=array();
+ $contenu[0]=array('image','logoleft');
+ $form->setSelect("logotop",$contenu);
+ $contenu=array();
+ $contenu[0]=array('image','titreleft');
+ $form->setSelect("titretop",$contenu);
+ $contenu=array();
+ $contenu[0]=array('image','corpsleft');
+ $form->setSelect("corpstop",$contenu);
+ }
+
+
+ /**
+ *
+ */
+ function setRegroupe(&$form, $maj) {
+
+ $form->setRegroupe('om_collectivite','D',_('om_collectivite'),"collapsible");
+ $form->setRegroupe('id','G','');
+ $form->setRegroupe('libelle','G','');
+ $form->setRegroupe('actif','F','');
+
+ $form->setRegroupe('titrehauteur','D',_("parametres")."&nbsp;"._("titre"), "startClosed");
+ $form->setRegroupe('titrelargeur','G','');
+ $form->setRegroupe('titrefont','G','');
+ $form->setRegroupe('titreattribut','G','');
+ $form->setRegroupe('titretaille','G','');
+ $form->setRegroupe('titrebordure','G','');
+ $form->setRegroupe('titrealign','G','');
+ $form->setRegroupe('titrefond','G','');
+ $form->setRegroupe('titrefondcouleur','G','');
+ $form->setRegroupe('titretextecouleur','G','');
+ $form->setRegroupe('intervalle_debut','G','');
+ $form->setRegroupe('intervalle_fin','F','');
+ // entete
+ $form->setRegroupe('entete_flag','D',_("entete")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('entete_fond','G','');
+ $form->setRegroupe('entete_orientation','G','');
+ $form->setRegroupe('entete_hauteur','G','');
+ $form->setRegroupe('entetecolone_bordure','G','');
+ $form->setRegroupe('entetecolone_align','G','');
+ $form->setRegroupe('entete_fondcouleur','G','');
+ $form->setRegroupe('entete_textecouleur','F','');
+ // data
+ $form->setRegroupe('tableau_largeur','D',_("data")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('tableau_bordure','G','');
+ $form->setRegroupe('tableau_fontaille','G','');
+ $form->setRegroupe('bordure_couleur','G','');
+ $form->setRegroupe('se_fond1','G','');
+ $form->setRegroupe('se_fond2','F','');
+ // cellule
+ $form->setRegroupe('cellule_fond','D',_("cellule")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('cellule_hauteur','G','');
+ $form->setRegroupe('cellule_largeur','G','');
+ $form->setRegroupe('cellule_bordure_un','G','');
+ $form->setRegroupe('cellule_bordure','G','');
+ $form->setRegroupe('cellule_align','F','');
+ // total
+ $form->setRegroupe('cellule_fond_total','D',_("total")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('cellule_fontaille_total','G','');
+ $form->setRegroupe('cellule_hauteur_total','G','');
+ $form->setRegroupe('cellule_fondcouleur_total','G','');
+ $form->setRegroupe('cellule_bordure_total','G','');
+ $form->setRegroupe('cellule_align_total','F','');
+ // moyenne
+ $form->setRegroupe('cellule_fond_moyenne','D',_("moyenne")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('cellule_fontaille_moyenne','G','');
+ $form->setRegroupe('cellule_hauteur_moyenne','G','');
+ $form->setRegroupe('cellule_fondcouleur_moyenne','G','');
+ $form->setRegroupe('cellule_bordure_moyenne','G','');
+ $form->setRegroupe('cellule_align_moyenne','F','');
+ // nbr
+ $form->setRegroupe('cellule_fond_nbr','D',_("nombre")."&nbsp;"._("enregistrement")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('cellule_fontaille_nbr','G','');
+ $form->setRegroupe('cellule_hauteur_nbr','G','');
+ $form->setRegroupe('cellule_fondcouleur_nbr','G','');
+ $form->setRegroupe('cellule_bordure_nbr','G','');
+ $form->setRegroupe('cellule_align_nbr','F','');
+ // operations
+ $form->setRegroupe('cellule_numerique','D',_("operations")."&nbsp;"._("du")."&nbsp;"._("tableau"), "startClosed");
+ $form->setRegroupe('cellule_total','G','');
+ $form->setRegroupe('cellule_moyenne','G','');
+ $form->setRegroupe('cellule_compteur','F','');
+
+ }
+
+ /**
+ *
+ */
+ function setGroupe(&$form, $maj) {
+
+ $form->setGroupe('om_collectivite','D');
+ $form->setGroupe('id','G');
+ $form->setGroupe('libelle','G');
+ $form->setGroupe('actif','F');
+
+ $form->setGroupe('titrehauteur','D');
+ $form->setGroupe('titrefont','G');
+ $form->setGroupe('titreattribut','F');
+
+ $form->setGroupe('titretaille','D');
+ $form->setGroupe('titrebordure','G');
+ $form->setGroupe('titrealign','F');
+
+ $form->setGroupe('titrefond','D');
+ $form->setGroupe('titrefondcouleur','G');
+ $form->setGroupe('titretextecouleur','F');
+
+ $form->setGroupe('intervalle_debut','D');
+ $form->setGroupe('intervalle_fin','F');
+ // entete
+ $form->setGroupe('entete_flag','D');
+ $form->setGroupe('entete_fond','F');
+ $form->setGroupe('entete_orientation','D');
+ $form->setGroupe('entete_hauteur','F');
+ $form->setGroupe('entetecolone_bordure','D');
+ $form->setGroupe('entetecolone_align','F');
+ $form->setGroupe('entete_fondcouleur','D');
+ $form->setGroupe('entete_textecouleur','F');
+ // data
+ $form->setGroupe('tableau_largeur','D');
+ $form->setGroupe('tableau_bordure','G');
+ $form->setGroupe('tableau_fontaille','F');
+
+ $form->setGroupe('bordure_couleur','D');
+ $form->setGroupe('se_fond1','G');
+ $form->setGroupe('se_fond2','F');
+ // cellules
+ $form->setGroupe('cellule_fond','D');
+ $form->setGroupe('cellule_hauteur','F');
+
+ $form->setGroupe('cellule_largeur','D');
+ $form->setGroupe('cellule_bordure_un','F');
+ $form->setGroupe('cellule_bordure','D');
+ $form->setGroupe('cellule_align','F');
+ // total
+ $form->setGroupe('cellule_fond_total','D');
+ $form->setGroupe('cellule_fontaille_total','F');
+ $form->setGroupe('cellule_hauteur_total','D');
+ $form->setGroupe('cellule_fondcouleur_total','F');
+ $form->setGroupe('cellule_bordure_total','D');
+ $form->setGroupe('cellule_align_total','F');
+ // moyenne
+ $form->setGroupe('cellule_fond_moyenne','D');
+ $form->setGroupe('cellule_fontaille_moyenne','F');
+ $form->setGroupe('cellule_hauteur_moyenne','D');
+ $form->setGroupe('cellule_fondcouleur_moyenne','F');
+ $form->setGroupe('cellule_bordure_moyenne','D');
+ $form->setGroupe('cellule_align_moyenne','F');
+ // nbr
+ $form->setGroupe('cellule_fond_nbr','D');
+ $form->setGroupe('cellule_fontaille_nbr','F');
+ $form->setGroupe('cellule_hauteur_nbr','D');
+ $form->setGroupe('cellule_fondcouleur_nbr','F');
+ $form->setGroupe('cellule_bordure_nbr','D');
+ $form->setGroupe('cellule_align_nbr','F');
+ // operations
+ $form->setGroupe('cellule_numerique','D');
+ $form->setGroupe('cellule_total','F');
+ $form->setGroupe('cellule_moyenne','D');
+ $form->setGroupe('cellule_compteur','F');
+
+ }
+
+ /**
+ *
+ */
+ function setLib(&$form, $maj) {
+
+ $form->setLib('titre',_('titre'));
+
+ $form->setLib('titrehauteur',_('hauteur'));
+ $form->setLib('titrefont',_('font'));
+ $form->setLib('titreattribut','');
+ $form->setLib('titretaille',_('taille'));
+ $form->setLib('titrebordure',_('bordure'));
+ $form->setLib('titrealign',_('align'));
+ $form->setLib('titrefondcouleur',_('fond'));
+ $form->setLib('titretextecouleur',_('texte'));
+ $form->setLib('intervalle_debut',_('intervalle')."&nbsp;"._('debut'));
+ $form->setLib('intervalle_fin',_('fin'));
+
+ $form->setLib('entete_flag',_('flag'));
+ $form->setLib('entete_fond',_('fin'));
+ $form->setLib('entete_orientation',_('orientation'));
+ $form->setLib('entete_hauteur',_('hauteur'));
+
+ $form->setLib('entetecolone_bordure',_('bordure'));
+ $form->setLib('entetecolone_align',_('align'));
+ $form->setLib('entete_fondcouleur',_('fond'));
+ $form->setLib('entete_textecouleur',_('couleur'));
+ // data
+ $form->setLib('tableau_largeur',_('largeur'));
+ $form->setLib('tableau_bordure',_('bordure'));
+ $form->setLib('tableau_fontaille',_('taille'));
+ $form->setLib('bordure_couleur',_('bordure'));
+ $form->setLib('se_fond1',_('fond')."&nbsp;"._('un'));
+ $form->setLib('se_fond2',_('fond')."&nbsp;"._('deux'));
+ // cellule
+ $form->setLib('cellule_fond','');
+ $form->setLib('cellule_hauteur',_('hauteur'));
+ $form->setLib('cellule_largeur',_('largeur'));
+ $form->setLib('cellule_bordure_un',_('bordure')."&nbsp;1&nbsp;"._('cellule'));
+ $form->setLib('cellule_bordure',_('bordure'));
+ $form->setLib('cellule_align',_('align'));
+ // total
+ $form->setLib('cellule_fond_total',_('fond')."&nbsp;"._('cellule'));
+ $form->setLib('cellule_fontaille_total',_('taille'));
+ $form->setLib('cellule_hauteur_total',_('hauteur'));
+ $form->setLib('cellule_fondcouleur_total',_('fond'));
+ $form->setLib('cellule_bordure_total',_('bordure'));
+ $form->setLib('cellule_align_total',_('align'));
+ // moyenne
+ $form->setLib('cellule_fond_moyenne',_('fond')."&nbsp;"._('cellule'));
+ $form->setLib('cellule_fontaille_moyenne',_('taille'));
+ $form->setLib('cellule_hauteur_moyenne',_('hauteur'));
+ $form->setLib('cellule_fondcouleur_moyenne',_('fond'));
+ $form->setLib('cellule_bordure_moyenne',_('bordure'));
+ $form->setLib('cellule_align_moyenne',_('align'));
+ // nbr
+ $form->setLib('cellule_fond_nbr',_('fond')."&nbsp;"._('cellule'));
+ $form->setLib('cellule_fontaille_nbr',_('taille'));
+ $form->setLib('cellule_hauteur_nbr',_('hauteur'));
+ $form->setLib('cellule_fondcouleur_nbr',_('fond'));
+ $form->setLib('cellule_bordure_nbr',_('bordure'));
+ $form->setLib('cellule_align_nbr',_('align'));
+ // operations
+ $form->setLib('cellule_numerique',_('numerique'));
+ $form->setLib('cellule_total',_('total'));
+ $form->setLib('cellule_moyenne',_('moyenne'));
+ $form->setLib('cellule_compteur',_('nombre'));
+
+ $form->setLib('om_sql',_('om_sql'));
+
+ }
+
+ /**
+ *
+ */
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) {
+ parent::setVal($form, $maj, $validation, $db, $DEBUG=null);
+ $this->maj=$maj;
+ if ($validation == 0) {
+ if ($maj == 0) {
+ $form->setVal('titre',_('Texte du titre'));
+ $form->setVal('titrefont','helvetica');
+ $form->setVal('titrehauteur',10);
+ $form->setVal('titrefond',0);
+ $form->setVal('titreattribut','B');
+ $form->setVal('titretaille',12);
+ $form->setVal('titrebordure',0);
+ $form->setVal('titrealign','L');
+
+ $form->setVal('titrefondcouleur','243-246-246');
+ $form->setVal('titretextecouleur','0-0-0');
+
+ $form->setVal('intervalle_debut',10);
+ $form->setVal('intervalle_fin',15);
+
+ $form->setVal('entete_flag',1);
+ $form->setVal('entete_fond',1);
+ $form->setVal('entete_orientation',"0|0|0");
+ $form->setVal('entete_hauteur',20);
+ $form->setVal('entetecolone_bordure',"TLB|LTB|LTBR");
+ $form->setVal('entetecolone_align',"C|C|C");
+ $form->setVal('entete_fondcouleur','195-224-169');
+ $form->setVal('entete_textecouleur','0-0-0');
+
+ $form->setVal('tableau_largeur',195);
+ $form->setVal('tableau_bordure',1);
+ $form->setVal('tableau_fontaille',10);
+
+ $form->setVal('bordure_couleur','0-0-0');
+ $form->setVal('se_fond1','243-243-246');
+ $form->setVal('se_fond2','255-255-255');
+
+ $form->setVal('cellule_fond',1);
+ $form->setVal('cellule_hauteur',10);
+ $form->setVal('cellule_largeur',"65|65|65");
+ $form->setVal('cellule_bordure_un',"LTBR|LTBR|LTBR");
+ $form->setVal('cellule_bordure',"LTBR|LTBR|LTBR");
+ $form->setVal('cellule_align',"L|L|C");
+
+ $form->setVal('cellule_fond_total',1);
+ $form->setVal('cellule_fontaille_total',10);
+ $form->setVal('cellule_hauteur_total',15);
+ $form->setVal('cellule_fondcouleur_total',"196-213-215");
+ $form->setVal('cellule_bordure_total',"TBL|TBL|LTBR");
+ $form->setVal('cellule_align_total',"L|L|C");
+
+ $form->setVal('cellule_fond_moyenne',1);
+ $form->setVal('cellule_fontaille_moyenne',10);
+ $form->setVal('cellule_hauteur_moyenne',15);
+ $form->setVal('cellule_fondcouleur_moyenne',"196-213-215");
+ $form->setVal('cellule_bordure_moyenne',"TBL|TBL|LTBR");
+ $form->setVal('cellule_align_moyenne',"L|L|C");
+
+ $form->setVal('cellule_fond_nbr',1);
+ $form->setVal('cellule_fontaille_nbr',10);
+ $form->setVal('cellule_hauteur_nbr',15);
+ $form->setVal('cellule_fondcouleur_nbr',"196-213-215");
+ $form->setVal('cellule_bordure_nbr',"TBL|TBL|LTBR");
+ $form->setVal('cellule_align_nbr',"L|L|C");
+
+ $form->setVal('cellule_numerique',"999|999|999");
+ $form->setVal('cellule_total',"0|0|0");
+ $form->setVal('cellule_moyenne',"0|0|0");
+ $form->setVal('cellule_compteur',"0|0|1");
+
+ $form->setVal('om_sql',"select ... \nfrom ... \nwhere ... = &idx");
+ }
+ }
+ }
+
+ function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$db, $DEBUG=null) {
+ $this->maj=$maj;
+ $this->retourformulaire=$retourformulaire;
+ if ($validation==0) {
+ if ($maj == 0){
+ $form->setVal('titre',_('Texte du titre'));
+ $form->setVal('titrefont','helvetica');
+ $form->setVal('titrehauteur',10);
+ $form->setVal('titrefond',0);
+ $form->setVal('titreattribut','B');
+ $form->setVal('titretaille',12);
+ $form->setVal('titrebordure',0);
+ $form->setVal('titrealign','L');
+
+ $form->setVal('titrefondcouleur','243-246-246');
+ $form->setVal('titretextecouleur','0-0-0');
+
+ $form->setVal('intervalle_debut',10);
+ $form->setVal('intervalle_fin',15);
+
+ $form->setVal('entete_flag',1);
+ $form->setVal('entete_fond',1);
+ $form->setVal('entete_orientation',"0|0|0");
+ $form->setVal('entete_hauteur',20);
+ $form->setVal('entetecolone_bordure',"TLB|LTB|LTBR");
+ $form->setVal('entetecolone_align',"C|C|C");
+ $form->setVal('entete_fondcouleur','195-224-169');
+ $form->setVal('entete_textecouleur','0-0-0');
+
+ $form->setVal('tableau_largeur',195);
+ $form->setVal('tableau_bordure',1);
+ $form->setVal('tableau_fontaille',10);
+
+ $form->setVal('bordure_couleur','0-0-0');
+ $form->setVal('se_fond1','243-243-246');
+ $form->setVal('se_fond2','255-255-255');
+
+ $form->setVal('cellule_fond',1);
+ $form->setVal('cellule_hauteur',10);
+ $form->setVal('cellule_largeur',"65|65|65");
+ $form->setVal('cellule_bordure_un',"LTBR|LTBR|LTBR");
+ $form->setVal('cellule_bordure',"LTBR|LTBR|LTBR");
+ $form->setVal('cellule_align',"L|L|C");
+
+ $form->setVal('cellule_fond_total',1);
+ $form->setVal('cellule_fontaille_total',10);
+ $form->setVal('cellule_hauteur_total',15);
+ $form->setVal('cellule_fondcouleur_total',"196-213-215");
+ $form->setVal('cellule_bordure_total',"TBL|TBL|LTBR");
+ $form->setVal('cellule_align_total',"L|L|C");
+
+ $form->setVal('cellule_fond_moyenne',1);
+ $form->setVal('cellule_fontaille_moyenne',10);
+ $form->setVal('cellule_hauteur_moyenne',15);
+ $form->setVal('cellule_fondcouleur_moyenne',"196-213-215");
+ $form->setVal('cellule_bordure_moyenne',"TBL|TBL|LTBR");
+ $form->setVal('cellule_align_moyenne',"L|L|C");
+
+ $form->setVal('cellule_fond_nbr',1);
+ $form->setVal('cellule_fontaille_nbr',10);
+ $form->setVal('cellule_hauteur_nbr',15);
+ $form->setVal('cellule_fondcouleur_nbr',"196-213-215");
+ $form->setVal('cellule_bordure_nbr',"TBL|TBL|LTBR");
+ $form->setVal('cellule_align_nbr',"L|L|C");
+
+ $form->setVal('cellule_numerique',"999|999|999");
+ $form->setVal('cellule_total',"0|0|0");
+ $form->setVal('cellule_moyenne',"0|0|0");
+ $form->setVal('cellule_compteur',"0|0|1");
+
+ $form->setVal('om_sql',"select ... \nfrom ... \nwhere ... = &idx");
+ $form->setVal($retourformulaire, $idxformulaire);
+ }}
+ }
+
+ /**
+ * verification sur existence d un etat deja actif pour la collectivite
+ */
+ function verifieractif(&$db, $val, $DEBUG,$id){
+ $sql = "select om_sousetat from ".DB_PREFIXE."om_sousetat where id ='".$val['id']."'";
+ $sql.= " and om_collectivite ='".$val['om_collectivite']."'";
+ $sql.= " and actif ='Oui'";
+ if($id!=']')
+ $sql.=" and om_sousetat !='".$id."'";
+ $res = $db->query($sql);
+ if($DEBUG==1) echo $sql;
+ if (database::isError($res))
+ die($res->getMessage(). " => Echec ".$sql);
+ else{
+ $nbligne=$res->numrows();
+ if ($nbligne>0){
+ $this->msg= $this->msg." ".$nbligne." "._("sousetat")." "._("existant").
+ " "._("actif")." ! "._("vous ne pouvez avoir qu un sousetat")." '".
+ $val['id']."' "._("actif")." "._("par collectivite");
+ $this->correct=False;
+ }
+ }
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_tdb.class.php
===================================================================
--- branches/1.x/obj/om_tdb.class.php (rev 0)
+++ branches/1.x/obj/om_tdb.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+//$Id$
+//gen openMairie le 07/04/2011 10:23
+require_once ("../gen/obj/om_tdb.class.php");
+
+class om_tdb extends om_tdb_gen {
+
+function om_tdb($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/om_utilisateur.class.php
===================================================================
--- branches/1.x/obj/om_utilisateur.class.php (rev 0)
+++ branches/1.x/obj/om_utilisateur.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,228 @@
+<?php
+//$Id$
+//gen openMairie le 15/10/2010 15:55
+require_once ("../gen/obj/om_utilisateur.class.php");
+
+class om_utilisateur extends om_utilisateur_gen {
+
+ function om_utilisateur($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ /**
+ * Cette methode permet de remplir le tableau associatif valF attribut de
+ * l'objet en vue de l'insertion des donnees dans la base.
+ *
+ * @param array $val Tableau associatif representant les valeurs du
+ * formulaire
+ *
+ * @return void
+ */
+
+ function setvalF($val) {
+ // version utilisateur.class liee a setVal et setValFormulaire
+ parent::setvalF($val);
+ if ($val['pwd']!="*****")
+ $this->valF['pwd'] = md5($val['pwd']);
+ else
+ unset ($this->valF['pwd']);
+ /* version openelec
+ if ($val['pwd'] == "")
+ $this->valF['pwd'] = "";
+ elseif ($val['pwd'] == $this->val[3])
+ $this->valF['pwd'] = $this->val[3];
+ else
+ $this->valF['pwd'] = md5 ($val['pwd']);
+ */
+ }
+
+ /**
+ * Cette methode est appelee lors de l'ajout d'un objet, elle permet
+ * d'effectuer des tests d'integrite sur la cle primaire pour verifier
+ * si la cle a bien ete saisie dans le formulaire et si l'objet ajoute
+ * n'existe pas deja dans la table pour en empecher l'ajout.
+ *
+ * @param array $val Tableau associatif representant les valeurs du
+ * formulaire
+ * @param object $db Objet Base de donnees
+ *
+ * @return void
+ */
+ function verifierAjout($val, &$db) {
+ // Si le login est vide alors on rejette l'enregistrement
+ if (trim($this->valF["login"]) == "") {
+ $this->correct = false;
+ $this->msg .= $this->form->lib["login"];
+ $this->msg .= _(" est obligatoire")."<br />";
+ }
+ // Si le test precedent a ete reussi alors on teste si le login
+ // n'existe pas deja dans la table
+ if ($this->correct == true) {
+ // Construction de la requete
+ $sql = "select count(*) from ".DB_PREFIXE.$this->table." ";
+ $sql .= "where login='".$val["login"]."'";
+ // Execution de la requete
+ $nb = $db->getone($sql);
+ if (database::isError($nb)) {
+ // Appel de la methode qui gere les erreurs
+ $this->erreur_db($res->getDebugInfo(), $res->getMessage(), '');
+ } else {
+ // Si le resultat de la requete renvoit un ou plusieurs
+ // enregistrements
+ if ($nb > 0) {
+ // On rejette l'enregistrement
+ $this->correct = false;
+ $this->msg .= _("Il existe deja un enregistrement avec cet identifiant, vous devez en choisir un autre")."<br />";
+ }
+ }
+ }
+ }
+
+ /**
+ * Cette methode est appelee lors de l'ajout ou de la modification d'un
+ * objet, elle permet d'effectuer des tests d'integrite sur les valeurs
+ * saisies dans le formulaire pour en empecher l'enregistrement.
+ *
+ * @return void
+ */
+ function verifier($val,&$db,$DEBUG) {
+ // Initialisation de l'attribut correct a true
+ $this->correct = true;
+ // Si la valeur est vide alors on rejette l'enregistrement
+ // *** liste
+ $field_required = array("om_profil", "login", "nom", "om_collectivite");
+ foreach($field_required as $field) {
+ if (trim($this->valF[$field]) == "") {
+ $this->correct = false;
+ $this->msg .= $this->form->lib[$field]." ";
+ $this->msg .= _("est obligatoire")."<br />";
+ }
+ }
+ // pwd en maj pas de valF si pas de modification du pwd
+ if ($val['pwd']==""){
+ $this->correct=false;
+ $this->msg= $this->msg._("pwd")."&nbsp;"._("est obligatoire")."<br />";
+ }
+ }
+ /**
+ * Cette methode est appelee lors de la suppression d'un objet, elle permet
+ * d'effectuer des tests pour verifier si l'objet supprime n'est pas cle
+ * secondaire dans une autre table pour en empecher la suppression.
+ *
+ * @param string $id Identifiant (cle primaire) de l'objet dans la base
+ * @param object $db Objet Base de donnees
+ * @param array $val Tableau associatif representant les valeurs du
+ * formulaire
+ * @param integer $DEBUG Mode debug :
+ * - 0 => Pas de Mode debug
+ * - 1 => Mode debug
+ *
+ * @return void
+ */
+ function cleSecondaire($id, &$db, $val, $DEBUG) {
+ // Initialisation de l'attribut correct a true
+ $this->correct = true;
+ //
+ $this->rechercheLogin($id, $db, $DEBUG);
+ // Si la suppression n'est pas possible, on ajoute un message clair
+ // pour l'utilisateur
+ if ($this->correct == false) {
+ $this->msg .= _("SUPPRESSION IMPOSSIBLE")."<br />";
+ }
+ }
+
+ /**
+ * Recherche si le login a supprimer est identique au login de
+ * l'utilisateur connecte
+ *
+ * @return void
+ */
+ function rechercheLogin($id, &$db, $DEBUG) {
+ //
+ $sql = "select * from om_utilisateur where om_utilisateur='".$id."'";
+ $res = $db->query($sql);
+ if (database::isError($res)) {
+ $this->erreur_db($res->getDebugInfo(), $res->getMessage(), "");
+ } else {
+ //
+ $row =& $res->fetchRow(DB_FETCHMODE_ASSOC);
+ if ($row['login'] == $_SESSION ['login']) {
+ $this->msg .= _("Vous ne pouvez pas supprimer votre utilisateur.")."<br/>";
+ $this->correct = false;
+ }
+ }
+ }
+
+ /**
+ * Parametrage du formulaire - Type des entrees de formulaire
+ *
+ * @param object $form Objet formulaire
+ * @param integer $maj Mode de mise a jour :
+ * - 0 => ajout
+ * - 1 => modification
+ * - 2 => suppression
+ *
+ * @return void
+ */
+ function setType(&$form, $maj) {
+ parent:: setType($form, $maj);
+ $form->setType("om_type", "hidden");
+ if ($maj < 2) { // ajouter et modifier
+ $form->setType("pwd", "password");
+ $form->setType("om_utilisateur", "hidden");
+ }
+ $form->setType("om_collectivite", "select");
+ }
+
+ function setTaille(&$form,$maj) {
+ parent::setTaille($form,$maj);
+ $form->setTaille('pwd',20);
+ }
+
+ function setOnchange(&$form,$maj){
+ // * mise en majuscule
+ // * Put in capital letter
+ parent::setOnchange($form,$maj);
+ $form->setOnchange("nom","this.value=this.value.toUpperCase()");
+ }
+
+ // si hors openelec
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null){
+ if ($maj == 1)
+ $form->setVal('pwd', "*****");
+ if ($validation==0) {
+ if ($maj == 0){
+ $form->setVal("om_type", "db");
+ }
+ }
+ }
+
+ function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire){
+ parent::setValsousformulaire($form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,$db,$DEBUG=null);
+ if ($validation==0) {
+ if ($maj == 0){
+ $form->setVal($retourformulaire, $idxformulaire);
+ $form->setVal("om_type", "db");
+ }else{
+ $form->setVal('pwd', "*****");
+ }
+ }
+ //$form->setVal('om_collectivite', 1);
+ }
+
+ function setGroupe(&$form,$maj){
+ $form->setGroupe('nom','D');
+ $form->setGroupe('email','F');
+ $form->setGroupe('login','D');
+ $form->setGroupe('pwd','F');
+ }
+
+ function setRegroupe(&$form,$maj){
+ $form->setRegroupe('nom','D'," "._("nom")." ");
+ $form->setRegroupe('email','G','');
+ $form->setRegroupe('login','G','');
+ $form->setRegroupe('pwd','F','');
+ }
+
+}// fin classe
+?>

Added: branches/1.x/obj/om_widget.class.php
===================================================================
--- branches/1.x/obj/om_widget.class.php (rev 0)
+++ branches/1.x/obj/om_widget.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,28 @@
+<?php
+//$Id$
+//gen openMairie le 07/04/2011 10:23
+require_once ("../gen/obj/om_widget.class.php");
+
+class om_widget extends om_widget_gen {
+
+ function om_widget($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ }// fin constructeur
+
+ function setTaille(&$form,$maj) {
+ parent::setTaille($form,$maj);
+ $form->setTaille('titre',40);
+ $form->setTaille('lien',80);
+ $form->setTaille('om_profil',4);
+ }
+
+ function setMax(&$form,$maj) {
+ parent::setMax($form,$maj);
+ $form->setMax('titre',40);
+ $form->setMax('lien',80);
+ $form->setMax('om_profil',4);
+ }
+
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/perimetre.class.php
===================================================================
--- branches/1.x/obj/perimetre.class.php (rev 0)
+++ branches/1.x/obj/perimetre.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,147 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 08:01
+require_once ("../gen/obj/perimetre.class.php");
+
+class perimetre extends perimetre_gen {
+
+
+ function perimetre($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+ $this->wkt=0;
+ }// fin constructeur
+
+ function setValF($val) {
+ parent::setValF($val);
+ if($val['voie']=='')
+ $this->valF['voie']=null;
+ if($val['libelle']=='')
+ $this->valF['libelle']=null;
+ if($val['longueur_exclusion_metre']=='')
+ $this->valF['longueur_exclusion_metre']=150;
+ if($val['numero_voie']=='')
+ $this->valF['numero_voie']=null;
+ if($val['complement']=='')
+ $this->valF['complement']=null;
+ if($val['libelle_voie']=='')
+ $this->valF['libelle_voie']=null;
+ if($val['complement_voie']=='')
+ $this->valF['complement_voie']=null;
+ if($val['geom']=='')
+ $this->valF['geom']= null;
+ else
+ if(substr($val['geom'],0,5)== "POINT"){
+ $this->wkt=1;
+ $this->valF['geom'] = null;
+ }else
+ $this->valF['geom'] = $val['geom'];
+
+ }
+
+ function setLib(&$form,$maj) {
+ parent::setLib($form,$maj);
+
+
+ $form->setLib('libelle',_('Libelle :'));
+ $form->setLib('longueur_exclusion_metre',_('Longueur Exclusion (en metre) :'));
+ $form->setLib('numero_voie',_('Numero Voie :'));
+ $form->setLib('complement',_('Complement :'));
+ $form->setLib('voie',_('Voie :'));
+ $form->setLib('libelle_voie',_('Libelle de Voie :'));
+ $form->setLib('complement_voie',_('Complement de Voie :'));
+
+
+ $form->setRegroupe('numero_voie','D',' '._('Adresse Perimetre').' ', "collapsible");
+ $form->setRegroupe('complement','G','');
+ $form->setRegroupe('voie','G','');
+ $form->setRegroupe('libelle_voie','G','');
+ $form->setRegroupe('complement_voie','F','');
+ }
+
+ function setType(&$form,$maj) {
+ parent::setType($form,$maj);
+
+ $form->setType('voie','hidden');
+ $form->setType('geom','hidden');
+ $form->setType('adresse_postale','httpclick');
+ }
+
+
+ function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('libelle',70);
+ $form->setTaille('longueur_exclusion_metre',4);
+ $form->setTaille('numero_voie',4);
+ $form->setTaille('complement',10);
+ $form->setTaille('voie',5);
+ $form->setTaille('libelle_voie',40);
+ $form->setTaille('complement_voie',40);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('libelle',70);
+ $form->setMax('longueur_exclusion_metre',4);
+ $form->setMax('numero_voie',4);
+ $form->setMax('complement',10);
+ $form->setMax('voie',5);
+ $form->setMax('libelle_voie',40);
+ $form->setMax('complement_voie',40);
+ }
+
+ function setOnchange(&$form,$maj) {
+ parent::setOnchange($form,$maj);
+ //javascript controle client
+ $form->setOnchange('cp_proprietaire','VerifNum(this)');
+ $form->setOnchange('cp_exploitant','VerifNum(this)');
+ $form->setOnchange("libelle_voie","this.value=this.value.toUpperCase()");
+ }
+
+ function setSelect(&$form, $maj,&$db,$debug) {
+ parent :: setSelect($form, $maj,$db,$debug);
+ if($maj<2){
+ //adresse_postale
+ $contenu=array();
+ $contenu[0]="<img src='../app/img/adresse_postale.png'>";
+ $form->setSelect("adresse_postale",$contenu);
+ }
+ }
+ function setVal(&$form, $maj, $validation, &$db, $DEBUG=null)
+ {
+ // bouton adresse postale
+ parent::setVal($form, $maj, $validation, $db, $DEBUG);
+ if (file_exists ("../dyn/var_point.inc"))
+ include ("../dyn/var_point.inc");
+ $form->setVal("adresse_postale","adresse_postale('f1',f1.libelle_voie.value,f1.numero_voie.value)");
+ // variables
+ $this->validation = $validation;
+ $this->form = $form;
+ }
+
+
+ function triggermodifierapres($id,&$db,$val,$DEBUG) {
+ if($this->wkt==1){
+ $this->sig_wkt($id,$db,$val,$DEBUG);
+ }
+ }
+
+ function triggerajouterapres($id,&$db,$val,$DEBUG) {
+ $id=$this->valF['perimetre']; // id n est pas valorise en ajout
+ if($this->wkt==1){
+ $this->sig_wkt($id,$db,$val,$DEBUG);
+ }
+ }
+
+ function sig_wkt($id,&$db,$val,$DEBUG){
+ // si wkt -> saisie en format binaire wkb pour postgre
+ $projection = $db -> getOne("select srid from geometry_columns where f_table_name='".$this->table."'");
+ $sql ="update ".$this->table." set geom =geometryfromtext('".$val["geom"]."', ".$projection." ) where ".$this->table." ='".$id."'";
+ $res = $db -> query($sql);
+ if (DB :: isError($res)){
+ die($res->getMessage()."erreur ".$sql);
+ }else{
+ $this->msg = $this->msg."&nbsp;"._("mis a jour format wkt vers wkb du geom ")."&nbsp;".$this->table."&nbsp;".$id;
+ }
+ }
+}
+?>
\ No newline at end of file

Added: branches/1.x/obj/terme.class.php
===================================================================
--- branches/1.x/obj/terme.class.php (rev 0)
+++ branches/1.x/obj/terme.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,26 @@
+<?php
+//$Id$
+//gen openMairie le 05/04/2011 07:31
+require_once ("../gen/obj/terme.class.php");
+
+class terme extends terme_gen {
+
+function terme($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('terme',4);
+ $form->setTaille('libelle',30);
+ }
+
+ function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('terme',4);
+ $form->setMax('libelle',30);
+ }
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/type_demande.class.php
===================================================================
--- branches/1.x/obj/type_demande.class.php (rev 0)
+++ branches/1.x/obj/type_demande.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,13 @@
+<?php
+//$Id$
+//gen openMairie le 18/04/2011 14:22
+require_once ("../gen/obj/type_demande.class.php");
+
+class type_demande extends type_demande_gen {
+
+function type_demande($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/type_licence.class.php
===================================================================
--- branches/1.x/obj/type_licence.class.php (rev 0)
+++ branches/1.x/obj/type_licence.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,24 @@
+<?php
+//$Id$
+//gen openMairie le 06/04/2011 12:22
+require_once ("../gen/obj/type_licence.class.php");
+
+class type_licence extends type_licence_gen {
+
+function type_licence($id,&$db,$debug) {
+ $this->constructeur($id,$db,$debug);
+}// fin constructeur
+
+function setTaille(&$form,$maj) {
+ //taille des champs affiches (text)
+ $form->setTaille('type_licence',4);
+ $form->setTaille('libelle',50);
+ }
+
+function setMax(&$form,$maj) {
+ //longueur max en saisie (text)
+ $form->setMax('type_licence',4);
+ $form->setMax('libelle',50);
+ }
+}// fin classe
+?>
\ No newline at end of file

Added: branches/1.x/obj/utils.class.php
===================================================================
--- branches/1.x/obj/utils.class.php (rev 0)
+++ branches/1.x/obj/utils.class.php 2019-04-25 12:44:59 UTC (rev 364)
@@ -0,0 +1,41 @@
+<?php
+/**
+ *
+ *
+ * @package openmairie_exemple
+ * @version SVN : $Id: utils.class.php 318 2010-12-06 12:16:35Z fmichon $
+ */
+
+/**
+ *
+ */
+require_once "../dyn/locales.inc.php";
+
+/**
+ *
+ */
+require_once "../dyn/include.inc.php";
+
+/**
+ *
+ */
+require_once "../dyn/debug.inc.php";
+
+/**
+ *
+ */
+(defined("PATH_OPENMAIRIE") ? "" : define("PATH_OPENMAIRIE", ""));
+
+/**
+ *
+ */
+require_once PATH_OPENMAIRIE."om_application.class.php";
+
+/**
+ *
+ */
+class utils extends application {
+
+
+} //fin class
+?>

Reply all
Reply to author
Forward
0 new messages