1 |
<?php |
<?php |
2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 13/02/2013 14:41 |
//gen openMairie le 13/02/2013 15:07 |
4 |
|
|
5 |
require_once ("../obj/om_dbform.class.php"); |
require_once ("../obj/om_dbform.class.php"); |
6 |
|
|
20 |
} else { |
} else { |
21 |
$this->valF['donnees_techniques'] = $val['donnees_techniques']; |
$this->valF['donnees_techniques'] = $val['donnees_techniques']; |
22 |
} |
} |
23 |
if (!is_numeric($val['dossier_instruction'])) { |
if ($val['dossier_instruction'] == "") { |
24 |
$this->valF['dossier_instruction'] = NULL; |
$this->valF['dossier_instruction'] = NULL; |
25 |
} else { |
} else { |
26 |
$this->valF['dossier_instruction'] = $val['dossier_instruction']; |
$this->valF['dossier_instruction'] = $val['dossier_instruction']; |
1187 |
//type |
//type |
1188 |
if ($maj==0){ //ajout |
if ($maj==0){ //ajout |
1189 |
$form->setType('donnees_techniques','hidden');// cle automatique |
$form->setType('donnees_techniques','hidden');// cle automatique |
1190 |
$form->setType('dossier_instruction','text'); |
|
1191 |
|
if($this->retourformulaire=='dossier' |
1192 |
|
and $form->val['dossier_instruction'] == $this->getParameter('idxformulaire')) { |
1193 |
|
$form->setType('dossier_instruction','selecthiddenstatic'); |
1194 |
|
} else { |
1195 |
|
$form->setType('dossier_instruction','select'); |
1196 |
|
} |
1197 |
|
|
1198 |
if($this->retourformulaire=='lot' |
if($this->retourformulaire=='lot' |
1199 |
and $form->val['lot'] == $this->getParameter('idxformulaire')) { |
and $form->val['lot'] == $this->getParameter('idxformulaire')) { |
1439 |
}// fin ajout |
}// fin ajout |
1440 |
if ($maj==1){ //modifier |
if ($maj==1){ //modifier |
1441 |
$form->setType('donnees_techniques','hiddenstatic'); |
$form->setType('donnees_techniques','hiddenstatic'); |
1442 |
$form->setType('dossier_instruction','text'); |
|
1443 |
|
if($this->retourformulaire=='dossier' |
1444 |
|
and $form->val['dossier_instruction'] == $this->getParameter('idxformulaire')) { |
1445 |
|
$form->setType('dossier_instruction','selecthiddenstatic'); |
1446 |
|
} else { |
1447 |
|
$form->setType('dossier_instruction','select'); |
1448 |
|
} |
1449 |
|
|
1450 |
if($this->retourformulaire=='lot' |
if($this->retourformulaire=='lot' |
1451 |
and $form->val['lot'] == $this->getParameter('idxformulaire')) { |
and $form->val['lot'] == $this->getParameter('idxformulaire')) { |
1691 |
}// fin modifier |
}// fin modifier |
1692 |
if ($maj==2){ //supprimer |
if ($maj==2){ //supprimer |
1693 |
$form->setType('donnees_techniques','hiddenstatic'); |
$form->setType('donnees_techniques','hiddenstatic'); |
1694 |
$form->setType('dossier_instruction','hiddenstatic'); |
$form->setType('dossier_instruction','selectstatic'); |
1695 |
$form->setType('lot','selectstatic'); |
$form->setType('lot','selectstatic'); |
1696 |
$form->setType('interv_id','hiddenstatic'); |
$form->setType('interv_id','hiddenstatic'); |
1697 |
$form->setType('am_lotiss','hiddenstatic'); |
$form->setType('am_lotiss','hiddenstatic'); |
1922 |
}//fin supprimer |
}//fin supprimer |
1923 |
if ($maj==3){ //consulter |
if ($maj==3){ //consulter |
1924 |
$form->setType('donnees_techniques','static'); |
$form->setType('donnees_techniques','static'); |
1925 |
$form->setType('dossier_instruction','static'); |
$form->setType('dossier_instruction','selectstatic'); |
1926 |
$form->setType('lot','selectstatic'); |
$form->setType('lot','selectstatic'); |
1927 |
$form->setType('interv_id','static'); |
$form->setType('interv_id','static'); |
1928 |
$form->setType('am_lotiss','checkboxstatic'); |
$form->setType('am_lotiss','checkboxstatic'); |
2156 |
function setOnchange(&$form,$maj) { |
function setOnchange(&$form,$maj) { |
2157 |
//javascript controle client |
//javascript controle client |
2158 |
$form->setOnchange('donnees_techniques','VerifNum(this)'); |
$form->setOnchange('donnees_techniques','VerifNum(this)'); |
|
$form->setOnchange('dossier_instruction','VerifNum(this)'); |
|
2159 |
$form->setOnchange('lot','VerifNum(this)'); |
$form->setOnchange('lot','VerifNum(this)'); |
2160 |
$form->setOnchange('interv_id','VerifNum(this)'); |
$form->setOnchange('interv_id','VerifNum(this)'); |
2161 |
$form->setOnchange('am_carav_duree','VerifNum(this)'); |
$form->setOnchange('am_carav_duree','VerifNum(this)'); |
2293 |
*/ |
*/ |
2294 |
function setTaille(&$form, $maj) { |
function setTaille(&$form, $maj) { |
2295 |
$form->setTaille("donnees_techniques", 11); |
$form->setTaille("donnees_techniques", 11); |
2296 |
$form->setTaille("dossier_instruction", 11); |
$form->setTaille("dossier_instruction", 20); |
2297 |
$form->setTaille("lot", 11); |
$form->setTaille("lot", 11); |
2298 |
$form->setTaille("interv_id", 11); |
$form->setTaille("interv_id", 11); |
2299 |
$form->setTaille("am_lotiss", 1); |
$form->setTaille("am_lotiss", 1); |
2528 |
*/ |
*/ |
2529 |
function setMax(&$form, $maj) { |
function setMax(&$form, $maj) { |
2530 |
$form->setMax("donnees_techniques", 11); |
$form->setMax("donnees_techniques", 11); |
2531 |
$form->setMax("dossier_instruction", 11); |
$form->setMax("dossier_instruction", 20); |
2532 |
$form->setMax("lot", 11); |
$form->setMax("lot", 11); |
2533 |
$form->setMax("interv_id", 11); |
$form->setMax("interv_id", 11); |
2534 |
$form->setMax("am_lotiss", 1); |
$form->setMax("am_lotiss", 1); |
2998 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
2999 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
3000 |
|
|
3001 |
|
// dossier_instruction |
3002 |
|
$this->init_select($form, $db, $maj, $debug, "dossier_instruction", |
3003 |
|
$sql_dossier_instruction, $sql_dossier_instruction_by_id, false); |
3004 |
|
|
3005 |
// lot |
// lot |
3006 |
$this->init_select($form, $db, $maj, $debug, "lot", |
$this->init_select($form, $db, $maj, $debug, "lot", |
3007 |
$sql_lot, $sql_lot_by_id, false); |
$sql_lot, $sql_lot_by_id, false); |
3014 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
3015 |
$this->retourformulaire = $retourformulaire; |
$this->retourformulaire = $retourformulaire; |
3016 |
if($validation == 0) { |
if($validation == 0) { |
3017 |
|
if($retourformulaire =='dossier') |
3018 |
|
$form->setVal('dossier_instruction', $idxformulaire); |
3019 |
if($retourformulaire =='lot') |
if($retourformulaire =='lot') |
3020 |
$form->setVal('lot', $idxformulaire); |
$form->setVal('lot', $idxformulaire); |
3021 |
}// fin validation |
}// fin validation |