/[openfoncier]/trunk/app/num_dossier.php
ViewVC logotype

Annotation of /trunk/app/num_dossier.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 88 - (hide annotations)
Thu Aug 25 09:59:07 2011 UTC (13 years, 5 months ago) by fraynaud
File size: 4596 byte(s)
Réorganisation du dossier spécifique de l'application

1 fraynaud 88 <?php
2     // $Id: num_dossier.php,v 1.7 2010-07-27 09:31:00 fraynaud Exp $
3     /*
4     version 3.0.0
5     la compatibilite mysql est a remettre en place
6     */
7    
8    
9     require_once "../obj/utils.class.php";
10     $f = new utils(NULL, "registre", _("remise a 0"), "ico_dossier.png", "dossier");
11     $description = _("Attention ce traitement remet a 0 les registres.")."<br>";
12     $description .= _("Traitement a realiser en debut d'annee.");
13     $f->displayDescription($description);
14     // Paramétrage ===============================================================
15     $DEBUG=0;
16     // GET ========================================================================
17     if (isset ($_GET['validation'])){
18     $validation=$_GET['validation'];
19     }else{
20     $validation=0;
21     }
22     if (isset ($_GET['idx'])){
23     $idx=$_GET['idx'];
24     }else{
25     $idx=0;
26     }
27    
28     // =============================================================================
29     // validation = 0
30     // =============================================================================
31     if($validation==0){
32     $validation=1;
33     echo "<form method=\"POST\" action=\"num_dossier.php?validation=".$validation."\" name=f1>";
34     echo "<br><br><input type='submit' value='remise a 0' ><br><br>";
35     echo "</form>";
36     }else { // ===================== mise a jour =================================
37     // numerotation
38     include "../dyn/var.inc";
39     //$valF=array();
40     echo "<br><br>";
41     $valF['id']=0;
42     if($numero_unique==1){
43     $sql1="ALTER SEQUENCE dossier_seq RESTART WITH 1";
44     $res1=$f->db->query($sql1);
45     /*
46     $res1= $db->autoExecute("dossier_seq",$valF,DB_AUTOQUERY_UPDATE);
47     if (DB :: isError($res1)){
48     echo $res1->getDebugInfo()." ".$res1->getMessage()."<br>";
49     }else{
50     echo "<center><font size='2'><b>"._("remise_a_0_compteur")." "._("reussie")." - "._("le_prochain")." "._("dossier")." "._("portera_no_1")."</b></font>";
51     }
52     */
53     }else{ // pas de numero unique
54     $sql1="ALTER SEQUENCE dossier_pc_seq RESTART WITH 1";
55     $res1=$f->db->query($sql1);
56     $f->isDatabaseError($res1);
57     $sql1="ALTER SEQUENCE dossier_pd_seq RESTART WITH 1";
58     $res1=$f->db->query($sql1);
59     $f->isDatabaseError($res1);
60     $sql1="ALTER SEQUENCE dossier_pa_seq RESTART WITH 1";
61     $res1=$f->db->query($sql1);
62     $f->isDatabaseError($res1);
63     $sql1="ALTER SEQUENCE dossier_dp_seq RESTART WITH 1";
64     $res1=$f->db->query($sql1);
65     $f->isDatabaseError($res1);
66     $sql1="ALTER SEQUENCE dossier_cu_seq RESTART WITH 1";
67     $res1=$f->db->query($sql1);
68     $f->isDatabaseError($res1);
69     echo _("traitement realise");
70     /*
71     $res1= $db->autoExecute("dossier_PC_seq",$valF,DB_AUTOQUERY_UPDATE);
72     if (DB :: isError($res1)){
73     echo "<br>".$res1->getDebugInfo()." ".$res1->getMessage()."<br>";
74     }else{
75     echo "<center><font size='2'><b>"._("remise_a_0_compteur")." "._("reussie")." - "._("le_prochain")." "._("PC*")." "._("portera_no_1")."</b></font>";
76     }
77     $res2= $db->autoExecute("dossier_PD_seq",$valF,DB_AUTOQUERY_UPDATE);
78     if (DB :: isError($res2)){
79     echo "<br>".$res2->getDebugInfo()." ".$res2->getMessage()."<br>";
80     }else{
81     echo "<center><font size='2'><b>"._("remise_a_0_compteur")." "._("reussie")." - "._("le_prochain")." "._("PD*")." "._("portera_no_1")."</b></font>";
82     }
83     $res3= $db->autoExecute("dossier_PA_seq",$valF,DB_AUTOQUERY_UPDATE);
84     if (DB :: isError($res3)){
85     echo "<br>".$res3->getDebugInfo()." ".$res3->getMessage()."<br>";
86     }else{
87     echo "<center><font size='2'><b>"._("remise_a_0_compteur")." "._("reussie")." - "._("le_prochain")." "._("PA*")." "._("portera_no_1")."</b></font>";
88     }
89     $res4= $db->autoExecute("dossier_DP_seq",$valF,DB_AUTOQUERY_UPDATE);
90     if (DB :: isError($res4)){
91     echo "<br>".$res4->getDebugInfo()." ".$res4->getMessage()."<br>";
92     }else{
93     echo "<center><font size='2'><b>"._("remise_a_0_compteur")." "._("reussie")." - "._("le_prochain")." "._("DP*")." "._("portera_no_1")."</b></font>";
94     }
95     $res5= $db->autoExecute("dossier_CU_seq",$valF,DB_AUTOQUERY_UPDATE);
96     if (DB :: isError($res5)){
97     echo "<br>".$res5->getDebugInfo()." ".$res5->getMessage()."<br>";
98     }else{
99     echo "<center><font size='2'><b>"._("remise_a_0_compteur")." "._("reussie")." - "._("le_prochain")." "._("CU*")." "._("portera_no_1")."</b></font>";
100    
101     }
102     */
103     }
104     }//validation
105     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26