/[openfoncier]/trunk/obj/instruction.class.php
ViewVC logotype

Diff of /trunk/obj/instruction.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 121 by fraynaud, Thu Sep 8 10:31:23 2011 UTC revision 123 by fraynaud, Sun Sep 11 20:24:32 2011 UTC
# Line 338  class instruction extends instruction_ge Line 338  class instruction extends instruction_ge
338          }          }
339      }      }
340            
341        function regle($regle){
342            $temp = explode ("+",$regle);
343            echo '/'.$regle.sizeof($temp);
344            if(sizeof($temp)==1)
345                if($temp[0]=="archive_date_depot")
346                    return $this->$regle;
347                else
348                    return $this->valF[$regle];
349            else{
350                if($temp[0]=="archive_date_depot")
351                    if(is_numeric($temp[1]))
352                        return  $this->moisdate($this->$temp[0], $temp[1]);  
353                    else
354                        return  $this->moisdate($this->$temp[0], $this->valF[$temp[1]]);
355                if(is_numeric($temp[1]))
356                    return $this->moisdate($this->valF[$temp[0]], $temp[1]);
357                else              
358                   return  $this->moisdate($this->valF[$temp[0]], $this->valF[$temp[1]]);
359            }
360        }
361        
362        
363        
364      // ==================================================================      // ==================================================================
365      // valeur dossier  apres modification   [values dossier after action]      // valeur dossier  apres modification   [values dossier after action]
366      // ==================================================================      // ==================================================================
# Line 345  class instruction extends instruction_ge Line 368  class instruction extends instruction_ge
368          // mise a null au lieu de "" / voir compatibilite mysql          // mise a null au lieu de "" / voir compatibilite mysql
369          // voir parametrage CU en dur          // voir parametrage CU en dur
370          // voir parametrage des actions en dur          // voir parametrage des actions en dur
371          $param=0;          $param=1;
372                    
373          if($param==1){          if($param==1){
374          $sql="select * from action where action = '".$this->valF['action']."'";          $sql="select * from action where action = '".$this->valF['action']."'";
# Line 354  class instruction extends instruction_ge Line 377  class instruction extends instruction_ge
377              die($res->getMessage());              die($res->getMessage());
378          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){
379              if($row['regle_etat']!=''){              if($row['regle_etat']!=''){
380                  $valF['etat']= $this->valF[$row['regle_etat']];                  $valF['etat']= $this->regle($row['regle_etat']);
381              }              }
382              if($row['regle_delai']!=''){              if($row['regle_delai']!=''){
383                  $valF['delai']= $this->valF[$row['regle_delai']];                  $valF['delai']= $this->regle($row['regle_delai']);
384              }              }
385              if($row['regle_accord_tacite']!=''){              if($row['regle_accord_tacite']!=''){
386                  $valF['accord_tacite']= $this->valF[$row['regle_accord_tacite']];                  $valF['accord_tacite']= $this->regle($row['regle_accord_tacite']);
387              }              }
388              if($row['regle_date_limite']!=''){              if($row['regle_date_limite']!=''){
389                  $temp = explode ("+",$row['regle_date_limite']);                  $valF['date_limite']= $this->regle($row['regle_date_limite']);
390                  //if(substr($row['temp'],0,7)=='archive')              }
391                  if(isnumeric($temp[1]))              if($row['regle_date_complet']!=''){
392                      $valF['date_limite']= $this->moisdate($this->valF[$temp[0]],                  $valF['date_complet']= $this->regle($row['regle_date_complet']);
393                                                            $temp[1]);                            }
394                  else              if($row['regle_date_notification_delai']!=''){
395                      $valF['date_limite']= $this->moisdate($this->valF[$temp[0]],                  $valF['date_notification_delai']= $this->regle($row['regle_date_notification_delai']);
396                                                            $this->valF[$temp[1]]);              }
             }      
397          }          }
398          }else{          }else{
399                    
# Line 478  class instruction extends instruction_ge Line 500  class instruction extends instruction_ge
500          }// end switch          }// end switch
501          } // end param          } // end param
502          // mise à jour dossier [modify dossier]          // mise à jour dossier [modify dossier]
503            print_r($valF);
504          if($valF!=""){          if($valF!=""){
505              $cle= " dossier = '".$this->valF['dossier']."'";              $cle= " dossier = '".$this->valF['dossier']."'";
506              $res1= $db->autoExecute('dossier',$valF,DB_AUTOQUERY_UPDATE,$cle);              $res1= $db->autoExecute('dossier',$valF,DB_AUTOQUERY_UPDATE,$cle);

Legend:
Removed from v.121  
changed lines
  Added in v.123

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26