<?php
//$Id$ 
//gen openMairie le 13/01/2016 11:20

require_once ("../obj/om_dbform.class.php");

class inscription_gen extends om_dbform {
    var $table="inscription";
    var $clePrimaire="inscription";
    var $typeCle="N";
    var $required_field=array(
        "domicile_ville_insee",
        "inscription",
        "mere_naissance_ville_insee",
        "naissance_ville_insee",
        "pere_naissance_ville_insee",
        "residence_ville_insee"
    );
    var $retourformulaire;

    function setvalF($val) {
        //affectation valeur formulaire
        if (!is_numeric($val['inscription'])) {
            $this->valF['inscription'] = ""; // -> requis
        } else {
            $this->valF['inscription'] = $val['inscription'];
        }
        if ($val['date_inscription'] != "") {
            $this->valF['date_inscription'] = $this->dateDB($val['date_inscription']);
        } else {
            $this->valF['date_inscription'] = NULL;
        }
        /*
        if ($val['liste'] == 1 || $val['liste'] == "t" || $val['liste'] == "Oui") {
            $this->valF['liste'] = true;
        } else {
            $this->valF['liste'] = false;
        }
        */
        if ($val['nom'] == "") {
            $this->valF['nom'] = NULL;
        } else {
            $this->valF['nom'] = $val['nom'];
        }
        if ($val['prenoms'] == "") {
            $this->valF['prenoms'] = NULL;
        } else {
            $this->valF['prenoms'] = $val['prenoms'];
        }
        if ($val['nom_usage'] == "") {
            $this->valF['nom_usage'] = NULL;
        } else {
            $this->valF['nom_usage'] = $val['nom_usage'];
        }
        if ($val['sexe'] == "") {
            $this->valF['sexe'] = NULL;
        } else {
            $this->valF['sexe'] = $val['sexe'];
        }
        if ($val['naissance_date'] != "") {
            $this->valF['naissance_date'] = $this->dateDB($val['naissance_date']);
        } else {
            $this->valF['naissance_date'] = NULL;
        }
        if ($val['naissance_ville'] == "") {
            $this->valF['naissance_ville'] = NULL;
        } else {
            $this->valF['naissance_ville'] = $val['naissance_ville'];
        }
        if ($val['naissance_ville_cp'] == "") {
            $this->valF['naissance_ville_cp'] = NULL;
        } else {
            $this->valF['naissance_ville_cp'] = $val['naissance_ville_cp'];
        }
        $this->valF['naissance_ville_insee'] = $val['naissance_ville_insee'];
        if ($val['naissance_pays'] == "") {
            $this->valF['naissance_pays'] = NULL;
        } else {
            $this->valF['naissance_pays'] = $val['naissance_pays'];
        }
        if ($val['naissance_ville_etr'] == "") {
            $this->valF['naissance_ville_etr'] = NULL;
        } else {
            $this->valF['naissance_ville_etr'] = $val['naissance_ville_etr'];
        }
        if ($val['pere_nom'] == "") {
            $this->valF['pere_nom'] = NULL;
        } else {
            $this->valF['pere_nom'] = $val['pere_nom'];
        }
        if ($val['pere_prenoms'] == "") {
            $this->valF['pere_prenoms'] = NULL;
        } else {
            $this->valF['pere_prenoms'] = $val['pere_prenoms'];
        }
        if ($val['pere_naissance_date'] != "") {
            $this->valF['pere_naissance_date'] = $this->dateDB($val['pere_naissance_date']);
        } else {
            $this->valF['pere_naissance_date'] = NULL;
        }
        if ($val['pere_naissance_pays'] == "") {
            $this->valF['pere_naissance_pays'] = NULL;
        } else {
            $this->valF['pere_naissance_pays'] = $val['pere_naissance_pays'];
        }
        if ($val['pere_naissance_ville'] == "") {
            $this->valF['pere_naissance_ville'] = NULL;
        } else {
            $this->valF['pere_naissance_ville'] = $val['pere_naissance_ville'];
        }
        if ($val['pere_naissance_ville_cp'] == "") {
            $this->valF['pere_naissance_ville_cp'] = NULL;
        } else {
            $this->valF['pere_naissance_ville_cp'] = $val['pere_naissance_ville_cp'];
        }
        $this->valF['pere_naissance_ville_insee'] = $val['pere_naissance_ville_insee'];
        if ($val['pere_naissance_ville_etr'] == "") {
            $this->valF['pere_naissance_ville_etr'] = NULL;
        } else {
            $this->valF['pere_naissance_ville_etr'] = $val['pere_naissance_ville_etr'];
        }
        if ($val['pere_nationalite'] == "") {
            $this->valF['pere_nationalite'] = NULL;
        } else {
            $this->valF['pere_nationalite'] = $val['pere_nationalite'];
        }
        if ($val['mere_nom'] == "") {
            $this->valF['mere_nom'] = NULL;
        } else {
            $this->valF['mere_nom'] = $val['mere_nom'];
        }
        if ($val['mere_prenoms'] == "") {
            $this->valF['mere_prenoms'] = NULL;
        } else {
            $this->valF['mere_prenoms'] = $val['mere_prenoms'];
        }
        if ($val['mere_naissance_date'] != "") {
            $this->valF['mere_naissance_date'] = $this->dateDB($val['mere_naissance_date']);
        } else {
            $this->valF['mere_naissance_date'] = NULL;
        }
        if ($val['mere_naissance_pays'] == "") {
            $this->valF['mere_naissance_pays'] = NULL;
        } else {
            $this->valF['mere_naissance_pays'] = $val['mere_naissance_pays'];
        }
        if ($val['mere_naissance_ville'] == "") {
            $this->valF['mere_naissance_ville'] = NULL;
        } else {
            $this->valF['mere_naissance_ville'] = $val['mere_naissance_ville'];
        }
        if ($val['mere_naissance_ville_cp'] == "") {
            $this->valF['mere_naissance_ville_cp'] = NULL;
        } else {
            $this->valF['mere_naissance_ville_cp'] = $val['mere_naissance_ville_cp'];
        }
        $this->valF['mere_naissance_ville_insee'] = $val['mere_naissance_ville_insee'];
        if ($val['mere_naissance_ville_etr'] == "") {
            $this->valF['mere_naissance_ville_etr'] = NULL;
        } else {
            $this->valF['mere_naissance_ville_etr'] = $val['mere_naissance_ville_etr'];
        }
        if ($val['mere_nationalite'] == "") {
            $this->valF['mere_nationalite'] = NULL;
        } else {
            $this->valF['mere_nationalite'] = $val['mere_nationalite'];
        }
        if ($val['nationalite2'] == "") {
            $this->valF['nationalite2'] = NULL;
        } else {
            $this->valF['nationalite2'] = $val['nationalite2'];
        }
        if ($val['convention_international'] == "") {
            $this->valF['convention_international'] = NULL;
        } else {
            $this->valF['convention_international'] = $val['convention_international'];
        }
        if ($val['domicile_adr1'] == "") {
            $this->valF['domicile_adr1'] = NULL;
        } else {
            $this->valF['domicile_adr1'] = $val['domicile_adr1'];
        }
        if ($val['domicile_adr2'] == "") {
            $this->valF['domicile_adr2'] = NULL;
        } else {
            $this->valF['domicile_adr2'] = $val['domicile_adr2'];
        }
        if ($val['domicile_adr3'] == "") {
            $this->valF['domicile_adr3'] = NULL;
        } else {
            $this->valF['domicile_adr3'] = $val['domicile_adr3'];
        }
        if ($val['domicile_ville'] == "") {
            $this->valF['domicile_ville'] = NULL;
        } else {
            $this->valF['domicile_ville'] = $val['domicile_ville'];
        }
        if ($val['domicile_ville_cp'] == "") {
            $this->valF['domicile_ville_cp'] = NULL;
        } else {
            $this->valF['domicile_ville_cp'] = $val['domicile_ville_cp'];
        }
        $this->valF['domicile_ville_insee'] = $val['domicile_ville_insee'];
        if ($val['domicile_pays'] == "") {
            $this->valF['domicile_pays'] = NULL;
        } else {
            $this->valF['domicile_pays'] = $val['domicile_pays'];
        }
        if ($val['domicile_ville_etr'] == "") {
            $this->valF['domicile_ville_etr'] = NULL;
        } else {
            $this->valF['domicile_ville_etr'] = $val['domicile_ville_etr'];
        }
        if ($val['residence_adr1'] == "") {
            $this->valF['residence_adr1'] = NULL;
        } else {
            $this->valF['residence_adr1'] = $val['residence_adr1'];
        }
        if ($val['residence_adr2'] == "") {
            $this->valF['residence_adr2'] = NULL;
        } else {
            $this->valF['residence_adr2'] = $val['residence_adr2'];
        }
        if ($val['residence_adr3'] == "") {
            $this->valF['residence_adr3'] = NULL;
        } else {
            $this->valF['residence_adr3'] = $val['residence_adr3'];
        }
        if ($val['residence_ville'] == "") {
            $this->valF['residence_ville'] = NULL;
        } else {
            $this->valF['residence_ville'] = $val['residence_ville'];
        }
        if ($val['residence_ville_cp'] == "") {
            $this->valF['residence_ville_cp'] = NULL;
        } else {
            $this->valF['residence_ville_cp'] = $val['residence_ville_cp'];
        }
        $this->valF['residence_ville_insee'] = $val['residence_ville_insee'];
        if ($val['residence_pays'] == "") {
            $this->valF['residence_pays'] = NULL;
        } else {
            $this->valF['residence_pays'] = $val['residence_pays'];
        }
        if ($val['residence_ville_etr'] == "") {
            $this->valF['residence_ville_etr'] = NULL;
        } else {
            $this->valF['residence_ville_etr'] = $val['residence_ville_etr'];
        }
        if (!is_numeric($val['fratrie'])) {
            $this->valF['fratrie'] = NULL;
        } else {
            $this->valF['fratrie'] = $val['fratrie'];
        }
        if ($val['situation_familiale'] == "") {
            $this->valF['situation_familiale'] = NULL;
        } else {
            $this->valF['situation_familiale'] = $val['situation_familiale'];
        }
        if (!is_numeric($val['enfants'])) {
            $this->valF['enfants'] = NULL;
        } else {
            $this->valF['enfants'] = $val['enfants'];
        }
        if ($val['pupille'] == "") {
            $this->valF['pupille'] = NULL;
        } else {
            $this->valF['pupille'] = $val['pupille'];
        }
        if ($val['situation_scolaire'] == "") {
            $this->valF['situation_scolaire'] = NULL;
        } else {
            $this->valF['situation_scolaire'] = $val['situation_scolaire'];
        }
        if ($val['diplome'] == "") {
            $this->valF['diplome'] = NULL;
        } else {
            $this->valF['diplome'] = $val['diplome'];
        }
        if ($val['specialite'] == "") {
            $this->valF['specialite'] = NULL;
        } else {
            $this->valF['specialite'] = $val['specialite'];
        }
        if ($val['profession'] == "") {
            $this->valF['profession'] = NULL;
        } else {
            $this->valF['profession'] = $val['profession'];
        }
        if ($val['exemption'] == "") {
            $this->valF['exemption'] = NULL;
        } else {
            $this->valF['exemption'] = $val['exemption'];
        }
        if ($val['telephone_fixe'] == "") {
            $this->valF['telephone_fixe'] = NULL;
        } else {
            $this->valF['telephone_fixe'] = $val['telephone_fixe'];
        }
        if ($val['telephone_portable'] == "") {
            $this->valF['telephone_portable'] = NULL;
        } else {
            $this->valF['telephone_portable'] = $val['telephone_portable'];
        }
        if ($val['mail'] == "") {
            $this->valF['mail'] = NULL;
        } else {
            $this->valF['mail'] = $val['mail'];
        }
        if ($val['transmission'] != "") {
            $this->valF['transmission'] = $this->dateDB($val['transmission']);
        } else {
            $this->valF['transmission'] = NULL;
        }
    }

    //=================================================
    //cle primaire automatique [automatic primary key]
    //==================================================

    function setId(&$db) {
    //numero automatique
        $this->valF[$this->clePrimaire] = $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
    }

    //==========================
    // Formulaire  [form]
    //==========================

    function setType(&$form,$maj) {
        //type
        if ($maj==0){ //ajout
            $form->setType('inscription','hidden');// cle automatique
            if($this->retourformulaire=='')
                $form->setType('date_inscription','date');
            else
                $form->setType('date_inscription','date2');
            $form->setType('liste','checkbox');
            $form->setType('nom','text');
            $form->setType('prenoms','text');
            $form->setType('nom_usage','text');
            $form->setType('sexe','text');
            if($this->retourformulaire=='')
                $form->setType('naissance_date','date');
            else
                $form->setType('naissance_date','date2');
            $form->setType('naissance_ville','text');
            $form->setType('naissance_ville_cp','text');
            $form->setType('naissance_ville_insee','text');
            $form->setType('naissance_pays','text');
            $form->setType('naissance_ville_etr','text');
            $form->setType('pere_nom','text');
            $form->setType('pere_prenoms','text');
            if($this->retourformulaire=='')
                $form->setType('pere_naissance_date','date');
            else
                $form->setType('pere_naissance_date','date2');
            $form->setType('pere_naissance_pays','text');
            $form->setType('pere_naissance_ville','text');
            $form->setType('pere_naissance_ville_cp','text');
            $form->setType('pere_naissance_ville_insee','text');
            $form->setType('pere_naissance_ville_etr','text');
            $form->setType('pere_nationalite','text');
            $form->setType('mere_nom','text');
            $form->setType('mere_prenoms','text');
            if($this->retourformulaire=='')
                $form->setType('mere_naissance_date','date');
            else
                $form->setType('mere_naissance_date','date2');
            $form->setType('mere_naissance_pays','text');
            $form->setType('mere_naissance_ville','text');
            $form->setType('mere_naissance_ville_cp','text');
            $form->setType('mere_naissance_ville_insee','text');
            $form->setType('mere_naissance_ville_etr','text');
            $form->setType('mere_nationalite','text');
            $form->setType('nationalite2','text');
            $form->setType('convention_international','text');
            $form->setType('domicile_adr1','text');
            $form->setType('domicile_adr2','text');
            $form->setType('domicile_adr3','text');
            $form->setType('domicile_ville','text');
            $form->setType('domicile_ville_cp','text');
            $form->setType('domicile_ville_insee','text');
            $form->setType('domicile_pays','text');
            $form->setType('domicile_ville_etr','text');
            $form->setType('residence_adr1','text');
            $form->setType('residence_adr2','text');
            $form->setType('residence_adr3','text');
            $form->setType('residence_ville','text');
            $form->setType('residence_ville_cp','text');
            $form->setType('residence_ville_insee','text');
            $form->setType('residence_pays','text');
            $form->setType('residence_ville_etr','text');
            $form->setType('fratrie','text');
            $form->setType('situation_familiale','text');
            $form->setType('enfants','text');
            $form->setType('pupille','text');
            $form->setType('situation_scolaire','text');
            $form->setType('diplome','text');
            $form->setType('specialite','text');
            $form->setType('profession','text');
            $form->setType('exemption','text');
            $form->setType('telephone_fixe','text');
            $form->setType('telephone_portable','text');
            $form->setType('mail','text');
            if($this->retourformulaire=='')
                $form->setType('transmission','date');
            else
                $form->setType('transmission','date2');
        }// fin ajout
        if ($maj==1){ //modifier
            $form->setType('inscription','hiddenstatic');
            if($this->retourformulaire=='')
                $form->setType('date_inscription','date');
            else
                $form->setType('date_inscription','date2');
            $form->setType('liste','checkbox');
            $form->setType('nom','text');
            $form->setType('prenoms','text');
            $form->setType('nom_usage','text');
            $form->setType('sexe','text');
            if($this->retourformulaire=='')
                $form->setType('naissance_date','date');
            else
                $form->setType('naissance_date','date2');
            $form->setType('naissance_ville','text');
            $form->setType('naissance_ville_cp','text');
            $form->setType('naissance_ville_insee','text');
            $form->setType('naissance_pays','text');
            $form->setType('naissance_ville_etr','text');
            $form->setType('pere_nom','text');
            $form->setType('pere_prenoms','text');
            if($this->retourformulaire=='')
                $form->setType('pere_naissance_date','date');
            else
                $form->setType('pere_naissance_date','date2');
            $form->setType('pere_naissance_pays','text');
            $form->setType('pere_naissance_ville','text');
            $form->setType('pere_naissance_ville_cp','text');
            $form->setType('pere_naissance_ville_insee','text');
            $form->setType('pere_naissance_ville_etr','text');
            $form->setType('pere_nationalite','text');
            $form->setType('mere_nom','text');
            $form->setType('mere_prenoms','text');
            if($this->retourformulaire=='')
                $form->setType('mere_naissance_date','date');
            else
                $form->setType('mere_naissance_date','date2');
            $form->setType('mere_naissance_pays','text');
            $form->setType('mere_naissance_ville','text');
            $form->setType('mere_naissance_ville_cp','text');
            $form->setType('mere_naissance_ville_insee','text');
            $form->setType('mere_naissance_ville_etr','text');
            $form->setType('mere_nationalite','text');
            $form->setType('nationalite2','text');
            $form->setType('convention_international','text');
            $form->setType('domicile_adr1','text');
            $form->setType('domicile_adr2','text');
            $form->setType('domicile_adr3','text');
            $form->setType('domicile_ville','text');
            $form->setType('domicile_ville_cp','text');
            $form->setType('domicile_ville_insee','text');
            $form->setType('domicile_pays','text');
            $form->setType('domicile_ville_etr','text');
            $form->setType('residence_adr1','text');
            $form->setType('residence_adr2','text');
            $form->setType('residence_adr3','text');
            $form->setType('residence_ville','text');
            $form->setType('residence_ville_cp','text');
            $form->setType('residence_ville_insee','text');
            $form->setType('residence_pays','text');
            $form->setType('residence_ville_etr','text');
            $form->setType('fratrie','text');
            $form->setType('situation_familiale','text');
            $form->setType('enfants','text');
            $form->setType('pupille','text');
            $form->setType('situation_scolaire','text');
            $form->setType('diplome','text');
            $form->setType('specialite','text');
            $form->setType('profession','text');
            $form->setType('exemption','text');
            $form->setType('telephone_fixe','text');
            $form->setType('telephone_portable','text');
            $form->setType('mail','text');
            if($this->retourformulaire=='')
                $form->setType('transmission','date');
            else
                $form->setType('transmission','date2');
        }// fin modifier
        if ($maj==2){ //supprimer
            $form->setType('inscription','hiddenstatic');
            $form->setType('date_inscription','hiddenstatic');
            $form->setType('liste','hiddenstatic');
            $form->setType('nom','hiddenstatic');
            $form->setType('prenoms','hiddenstatic');
            $form->setType('nom_usage','hiddenstatic');
            $form->setType('sexe','hiddenstatic');
            $form->setType('naissance_date','hiddenstatic');
            $form->setType('naissance_ville','hiddenstatic');
            $form->setType('naissance_ville_cp','hiddenstatic');
            $form->setType('naissance_ville_insee','hiddenstatic');
            $form->setType('naissance_pays','hiddenstatic');
            $form->setType('naissance_ville_etr','hiddenstatic');
            $form->setType('pere_nom','hiddenstatic');
            $form->setType('pere_prenoms','hiddenstatic');
            $form->setType('pere_naissance_date','hiddenstatic');
            $form->setType('pere_naissance_pays','hiddenstatic');
            $form->setType('pere_naissance_ville','hiddenstatic');
            $form->setType('pere_naissance_ville_cp','hiddenstatic');
            $form->setType('pere_naissance_ville_insee','hiddenstatic');
            $form->setType('pere_naissance_ville_etr','hiddenstatic');
            $form->setType('pere_nationalite','hiddenstatic');
            $form->setType('mere_nom','hiddenstatic');
            $form->setType('mere_prenoms','hiddenstatic');
            $form->setType('mere_naissance_date','hiddenstatic');
            $form->setType('mere_naissance_pays','hiddenstatic');
            $form->setType('mere_naissance_ville','hiddenstatic');
            $form->setType('mere_naissance_ville_cp','hiddenstatic');
            $form->setType('mere_naissance_ville_insee','hiddenstatic');
            $form->setType('mere_naissance_ville_etr','hiddenstatic');
            $form->setType('mere_nationalite','hiddenstatic');
            $form->setType('nationalite2','hiddenstatic');
            $form->setType('convention_international','hiddenstatic');
            $form->setType('domicile_adr1','hiddenstatic');
            $form->setType('domicile_adr2','hiddenstatic');
            $form->setType('domicile_adr3','hiddenstatic');
            $form->setType('domicile_ville','hiddenstatic');
            $form->setType('domicile_ville_cp','hiddenstatic');
            $form->setType('domicile_ville_insee','hiddenstatic');
            $form->setType('domicile_pays','hiddenstatic');
            $form->setType('domicile_ville_etr','hiddenstatic');
            $form->setType('residence_adr1','hiddenstatic');
            $form->setType('residence_adr2','hiddenstatic');
            $form->setType('residence_adr3','hiddenstatic');
            $form->setType('residence_ville','hiddenstatic');
            $form->setType('residence_ville_cp','hiddenstatic');
            $form->setType('residence_ville_insee','hiddenstatic');
            $form->setType('residence_pays','hiddenstatic');
            $form->setType('residence_ville_etr','hiddenstatic');
            $form->setType('fratrie','hiddenstatic');
            $form->setType('situation_familiale','hiddenstatic');
            $form->setType('enfants','hiddenstatic');
            $form->setType('pupille','hiddenstatic');
            $form->setType('situation_scolaire','hiddenstatic');
            $form->setType('diplome','hiddenstatic');
            $form->setType('specialite','hiddenstatic');
            $form->setType('profession','hiddenstatic');
            $form->setType('exemption','hiddenstatic');
            $form->setType('telephone_fixe','hiddenstatic');
            $form->setType('telephone_portable','hiddenstatic');
            $form->setType('mail','hiddenstatic');
            $form->setType('transmission','hiddenstatic');
        }//fin supprimer
        if ($maj==3){ //consulter
            $form->setType('inscription','static');
            $form->setType('date_inscription','datestatic');
            $form->setType('liste','checkboxstatic');
            $form->setType('nom','static');
            $form->setType('prenoms','static');
            $form->setType('nom_usage','static');
            $form->setType('sexe','static');
            $form->setType('naissance_date','datestatic');
            $form->setType('naissance_ville','static');
            $form->setType('naissance_ville_cp','static');
            $form->setType('naissance_ville_insee','static');
            $form->setType('naissance_pays','static');
            $form->setType('naissance_ville_etr','static');
            $form->setType('pere_nom','static');
            $form->setType('pere_prenoms','static');
            $form->setType('pere_naissance_date','datestatic');
            $form->setType('pere_naissance_pays','static');
            $form->setType('pere_naissance_ville','static');
            $form->setType('pere_naissance_ville_cp','static');
            $form->setType('pere_naissance_ville_insee','static');
            $form->setType('pere_naissance_ville_etr','static');
            $form->setType('pere_nationalite','static');
            $form->setType('mere_nom','static');
            $form->setType('mere_prenoms','static');
            $form->setType('mere_naissance_date','datestatic');
            $form->setType('mere_naissance_pays','static');
            $form->setType('mere_naissance_ville','static');
            $form->setType('mere_naissance_ville_cp','static');
            $form->setType('mere_naissance_ville_insee','static');
            $form->setType('mere_naissance_ville_etr','static');
            $form->setType('mere_nationalite','static');
            $form->setType('nationalite2','static');
            $form->setType('convention_international','static');
            $form->setType('domicile_adr1','static');
            $form->setType('domicile_adr2','static');
            $form->setType('domicile_adr3','static');
            $form->setType('domicile_ville','static');
            $form->setType('domicile_ville_cp','static');
            $form->setType('domicile_ville_insee','static');
            $form->setType('domicile_pays','static');
            $form->setType('domicile_ville_etr','static');
            $form->setType('residence_adr1','static');
            $form->setType('residence_adr2','static');
            $form->setType('residence_adr3','static');
            $form->setType('residence_ville','static');
            $form->setType('residence_ville_cp','static');
            $form->setType('residence_ville_insee','static');
            $form->setType('residence_pays','static');
            $form->setType('residence_ville_etr','static');
            $form->setType('fratrie','static');
            $form->setType('situation_familiale','static');
            $form->setType('enfants','static');
            $form->setType('pupille','static');
            $form->setType('situation_scolaire','static');
            $form->setType('diplome','static');
            $form->setType('specialite','static');
            $form->setType('profession','static');
            $form->setType('exemption','static');
            $form->setType('telephone_fixe','static');
            $form->setType('telephone_portable','static');
            $form->setType('mail','static');
            $form->setType('transmission','datestatic');
        }//fin consulter
    }

    function setOnchange(&$form,$maj) {
    //javascript controle client
        $form->setOnchange('inscription','VerifNum(this)');
        $form->setOnchange('date_inscription','fdate(this)');
        $form->setOnchange('naissance_date','fdate(this)');
        $form->setOnchange('pere_naissance_date','fdate(this)');
        $form->setOnchange('mere_naissance_date','fdate(this)');
        $form->setOnchange('fratrie','VerifNum(this)');
        $form->setOnchange('enfants','VerifNum(this)');
        $form->setOnchange('transmission','fdate(this)');
    }
    /**
     * Methode setTaille
     */
    function setTaille(&$form, $maj) {
        $form->setTaille("inscription", 20);
        $form->setTaille("date_inscription", 10);
        $form->setTaille("liste", 1);
        $form->setTaille("nom", 30);
        $form->setTaille("prenoms", 30);
        $form->setTaille("nom_usage", 30);
        $form->setTaille("sexe", 10);
        $form->setTaille("naissance_date", 10);
        $form->setTaille("naissance_ville", 30);
        $form->setTaille("naissance_ville_cp", 10);
        $form->setTaille("naissance_ville_insee", 10);
        $form->setTaille("naissance_pays", 10);
        $form->setTaille("naissance_ville_etr", 30);
        $form->setTaille("pere_nom", 30);
        $form->setTaille("pere_prenoms", 30);
        $form->setTaille("pere_naissance_date", 10);
        $form->setTaille("pere_naissance_pays", 10);
        $form->setTaille("pere_naissance_ville", 30);
        $form->setTaille("pere_naissance_ville_cp", 10);
        $form->setTaille("pere_naissance_ville_insee", 10);
        $form->setTaille("pere_naissance_ville_etr", 30);
        $form->setTaille("pere_nationalite", 10);
        $form->setTaille("mere_nom", 30);
        $form->setTaille("mere_prenoms", 30);
        $form->setTaille("mere_naissance_date", 10);
        $form->setTaille("mere_naissance_pays", 10);
        $form->setTaille("mere_naissance_ville", 30);
        $form->setTaille("mere_naissance_ville_cp", 10);
        $form->setTaille("mere_naissance_ville_insee", 10);
        $form->setTaille("mere_naissance_ville_etr", 30);
        $form->setTaille("mere_nationalite", 10);
        $form->setTaille("nationalite2", 10);
        $form->setTaille("convention_international", 10);
        $form->setTaille("domicile_adr1", 30);
        $form->setTaille("domicile_adr2", 30);
        $form->setTaille("domicile_adr3", 30);
        $form->setTaille("domicile_ville", 30);
        $form->setTaille("domicile_ville_cp", 10);
        $form->setTaille("domicile_ville_insee", 10);
        $form->setTaille("domicile_pays", 10);
        $form->setTaille("domicile_ville_etr", 30);
        $form->setTaille("residence_adr1", 30);
        $form->setTaille("residence_adr2", 30);
        $form->setTaille("residence_adr3", 30);
        $form->setTaille("residence_ville", 30);
        $form->setTaille("residence_ville_cp", 10);
        $form->setTaille("residence_ville_insee", 10);
        $form->setTaille("residence_pays", 10);
        $form->setTaille("residence_ville_etr", 30);
        $form->setTaille("fratrie", 6);
        $form->setTaille("situation_familiale", 10);
        $form->setTaille("enfants", 6);
        $form->setTaille("pupille", 10);
        $form->setTaille("situation_scolaire", 10);
        $form->setTaille("diplome", 10);
        $form->setTaille("specialite", 10);
        $form->setTaille("profession", 10);
        $form->setTaille("exemption", 10);
        $form->setTaille("telephone_fixe", 10);
        $form->setTaille("telephone_portable", 10);
        $form->setTaille("mail", 30);
        $form->setTaille("transmission", 10);
    }

    /**
     * Methode setMax
     */
    function setMax(&$form, $maj) {
        $form->setMax("inscription", 20);
        $form->setMax("date_inscription", 10);
        $form->setMax("liste", 1);
        $form->setMax("nom", 32);
        $form->setMax("prenoms", 40);
        $form->setMax("nom_usage", 32);
        $form->setMax("sexe", 1);
        $form->setMax("naissance_date", 10);
        $form->setMax("naissance_ville", 40);
        $form->setMax("naissance_ville_cp", 5);
        $form->setMax("naissance_ville_insee", 5);
        $form->setMax("naissance_pays", 5);
        $form->setMax("naissance_ville_etr", 32);
        $form->setMax("pere_nom", 32);
        $form->setMax("pere_prenoms", 40);
        $form->setMax("pere_naissance_date", 10);
        $form->setMax("pere_naissance_pays", 5);
        $form->setMax("pere_naissance_ville", 40);
        $form->setMax("pere_naissance_ville_cp", 5);
        $form->setMax("pere_naissance_ville_insee", 5);
        $form->setMax("pere_naissance_ville_etr", 32);
        $form->setMax("pere_nationalite", 5);
        $form->setMax("mere_nom", 32);
        $form->setMax("mere_prenoms", 40);
        $form->setMax("mere_naissance_date", 10);
        $form->setMax("mere_naissance_pays", 5);
        $form->setMax("mere_naissance_ville", 40);
        $form->setMax("mere_naissance_ville_cp", 5);
        $form->setMax("mere_naissance_ville_insee", 5);
        $form->setMax("mere_naissance_ville_etr", 32);
        $form->setMax("mere_nationalite", 5);
        $form->setMax("nationalite2", 5);
        $form->setMax("convention_international", 1);
        $form->setMax("domicile_adr1", 38);
        $form->setMax("domicile_adr2", 38);
        $form->setMax("domicile_adr3", 38);
        $form->setMax("domicile_ville", 40);
        $form->setMax("domicile_ville_cp", 5);
        $form->setMax("domicile_ville_insee", 5);
        $form->setMax("domicile_pays", 5);
        $form->setMax("domicile_ville_etr", 32);
        $form->setMax("residence_adr1", 38);
        $form->setMax("residence_adr2", 38);
        $form->setMax("residence_adr3", 38);
        $form->setMax("residence_ville", 40);
        $form->setMax("residence_ville_cp", 5);
        $form->setMax("residence_ville_insee", 5);
        $form->setMax("residence_pays", 5);
        $form->setMax("residence_ville_etr", 32);
        $form->setMax("fratrie", 6);
        $form->setMax("situation_familiale", 1);
        $form->setMax("enfants", 6);
        $form->setMax("pupille", 1);
        $form->setMax("situation_scolaire", 2);
        $form->setMax("diplome", 2);
        $form->setMax("specialite", 3);
        $form->setMax("profession", 6);
        $form->setMax("exemption", 1);
        $form->setMax("telephone_fixe", 10);
        $form->setMax("telephone_portable", 10);
        $form->setMax("mail", 40);
        $form->setMax("transmission", 10);
    }


    function setLib(&$form,$maj) {
    //libelle des champs
        $form->setLib('inscription',_('inscription'));
        $form->setLib('date_inscription',_('date_inscription'));
        $form->setLib('liste',_('liste'));
        $form->setLib('nom',_('nom'));
        $form->setLib('prenoms',_('prenoms'));
        $form->setLib('nom_usage',_('nom_usage'));
        $form->setLib('sexe',_('sexe'));
        $form->setLib('naissance_date',_('naissance_date'));
        $form->setLib('naissance_ville',_('naissance_ville'));
        $form->setLib('naissance_ville_cp',_('naissance_ville_cp'));
        $form->setLib('naissance_ville_insee',_('naissance_ville_insee'));
        $form->setLib('naissance_pays',_('naissance_pays'));
        $form->setLib('naissance_ville_etr',_('naissance_ville_etr'));
        $form->setLib('pere_nom',_('pere_nom'));
        $form->setLib('pere_prenoms',_('pere_prenoms'));
        $form->setLib('pere_naissance_date',_('pere_naissance_date'));
        $form->setLib('pere_naissance_pays',_('pere_naissance_pays'));
        $form->setLib('pere_naissance_ville',_('pere_naissance_ville'));
        $form->setLib('pere_naissance_ville_cp',_('pere_naissance_ville_cp'));
        $form->setLib('pere_naissance_ville_insee',_('pere_naissance_ville_insee'));
        $form->setLib('pere_naissance_ville_etr',_('pere_naissance_ville_etr'));
        $form->setLib('pere_nationalite',_('pere_nationalite'));
        $form->setLib('mere_nom',_('mere_nom'));
        $form->setLib('mere_prenoms',_('mere_prenoms'));
        $form->setLib('mere_naissance_date',_('mere_naissance_date'));
        $form->setLib('mere_naissance_pays',_('mere_naissance_pays'));
        $form->setLib('mere_naissance_ville',_('mere_naissance_ville'));
        $form->setLib('mere_naissance_ville_cp',_('mere_naissance_ville_cp'));
        $form->setLib('mere_naissance_ville_insee',_('mere_naissance_ville_insee'));
        $form->setLib('mere_naissance_ville_etr',_('mere_naissance_ville_etr'));
        $form->setLib('mere_nationalite',_('mere_nationalite'));
        $form->setLib('nationalite2',_('nationalite2'));
        $form->setLib('convention_international',_('convention_international'));
        $form->setLib('domicile_adr1',_('domicile_adr1'));
        $form->setLib('domicile_adr2',_('domicile_adr2'));
        $form->setLib('domicile_adr3',_('domicile_adr3'));
        $form->setLib('domicile_ville',_('domicile_ville'));
        $form->setLib('domicile_ville_cp',_('domicile_ville_cp'));
        $form->setLib('domicile_ville_insee',_('domicile_ville_insee'));
        $form->setLib('domicile_pays',_('domicile_pays'));
        $form->setLib('domicile_ville_etr',_('domicile_ville_etr'));
        $form->setLib('residence_adr1',_('residence_adr1'));
        $form->setLib('residence_adr2',_('residence_adr2'));
        $form->setLib('residence_adr3',_('residence_adr3'));
        $form->setLib('residence_ville',_('residence_ville'));
        $form->setLib('residence_ville_cp',_('residence_ville_cp'));
        $form->setLib('residence_ville_insee',_('residence_ville_insee'));
        $form->setLib('residence_pays',_('residence_pays'));
        $form->setLib('residence_ville_etr',_('residence_ville_etr'));
        $form->setLib('fratrie',_('fratrie'));
        $form->setLib('situation_familiale',_('situation_familiale'));
        $form->setLib('enfants',_('enfants'));
        $form->setLib('pupille',_('pupille'));
        $form->setLib('situation_scolaire',_('situation_scolaire'));
        $form->setLib('diplome',_('diplome'));
        $form->setLib('specialite',_('specialite'));
        $form->setLib('profession',_('profession'));
        $form->setLib('exemption',_('exemption'));
        $form->setLib('telephone_fixe',_('telephone_fixe'));
        $form->setLib('telephone_portable',_('telephone_portable'));
        $form->setLib('mail',_('mail'));
        $form->setLib('transmission',_('transmission'));
    }

    //==================================
    // 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
?>