Beispiel #1
0
             $Res = $cn->exec_sql("delete from modeledef where mod_id=" . $l_id);
             exit;
         }
     }
 }
 // if $mod_name != null
 $cn_mod = new Database($l_id, 'mod');
 // Clean some tables
 $Res = $cn_mod->exec_sql("select distinct jr_pj from jrn where jr_pj is not null ");
 if (Database::num_row($Res) != 0) {
     $a_lob = Database::fetch_all($Res);
     for ($i = 0; $i < count($a_lob); $i++) {
         $cn_mod->lo_unlink($a_lob[$i]['jr_pj']);
     }
 }
 Extension::clean($cn_mod);
 $Res = $cn_mod->exec_sql("truncate table centralized");
 $Res = $cn_mod->exec_sql("truncate table jrn cascade");
 $Res = $cn_mod->exec_sql("delete from del_jrn");
 $Res = $cn_mod->exec_sql("delete from del_jrnx");
 $Res = $cn_mod->exec_sql("truncate table  jrnx cascade ");
 $Res = $cn_mod->exec_sql("truncate table  todo_list cascade ");
 $Res = $cn_mod->exec_sql("delete from del_action");
 $Res = $cn_mod->exec_sql("delete from profile_user");
 $Res = $cn_mod->exec_sql("delete from jnt_letter");
 $Res = $cn_mod->exec_sql('delete from operation_analytique');
 //	Reset the closed periode
 $Res = $cn_mod->exec_sql("update parm_periode set p_closed='f'");
 $Res = $cn_mod->exec_sql('delete from jrn_periode');
 $Res = $cn_mod->exec_sql(' insert into jrn_periode(p_id,jrn_def_id,status) ' . ' select p_id,jrn_def_id,\'OP\' ' . ' from ' . ' parm_periode cross join jrn_def');
 // Reset Sequence