diff --git a/html/image/bg-submit2.gif b/html/image/bg-submit2.gif new file mode 100644 index 000000000..74666bcb2 Binary files /dev/null and b/html/image/bg-submit2.gif differ diff --git a/html/image/bg-submit3.gif b/html/image/bg-submit3.gif new file mode 100644 index 000000000..3020e7d29 Binary files /dev/null and b/html/image/bg-submit3.gif differ diff --git a/html/poste_pdf.php b/html/poste_pdf.php index 3a101a8a2..a80851f1b 100644 --- a/html/poste_pdf.php +++ b/html/poste_pdf.php @@ -44,7 +44,7 @@ $User->can_request(IMPPOSTE,0); extract($_GET); if ( isset ( $poste_fille) ){ //choisit de voir tous les postes - $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%'"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%' order by pcm_val"); } else $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text = '$poste_id'"); diff --git a/html/style-color.css b/html/style-color.css index dab9bab9d..42607865a 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -518,6 +518,7 @@ fieldset fieldset legend { select { border: 1px solid blue; margin:2px; +background-color:white; } @@ -771,4 +772,45 @@ cursor:inherit; font-color:blue; margin:1 2 1 2; } + td.tool { + border: 0; + + } +div.topmenu { + float:left; + width:100%; + +} + +h2.dossier { + color:white; + font-style: oblique; + +font-size:15px; +margin:0; +padding:0; +text-align:center; +} +a#anchorbutton { + font-size:10; + color:black; + text-decoration:none; + font-family: helvetica,arial,sans-serif; + background-color:#DFDFDF; + border-style: outset ; + border-color: blue ; + border-width:1; + padding:2 4 2 4; + cursor:pointer; + margin:1 2 1 2; + -moz-border-radius:2 2; + +} +a#anchorbutton :hover { + cursor:pointer; + background-color:white; + border-style: inset ; + font-color:blue; + margin:1 2 1 2; + } /* */ diff --git a/html/style-light.css b/html/style-light.css index 494b9cf73..1e3a4649b 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -90,9 +90,9 @@ h1.title { div.u_tmenu { position: float; - margin-top:1px; + margin-top:0px; width:100%; - background-color:#879ED4; + /* background-color:#879ED4; */ } @@ -104,7 +104,6 @@ div.u_subtmenu { } div.u_tmenu div.u_tool { - background-color:#879ED4; float:left; } @@ -753,10 +752,15 @@ cursor:inherit; .button { font-size:10; - color:black; + color:white; + font-weight: bold; + text-decoration:none; font-family: helvetica,arial,sans-serif; - background-color:#DFDFDF; + background-image: url("image/bg-submit3.gif"); + background-repeat: repeat-x; + background-position: left; + border-style: outset ; border-color: blue ; border-width:1; @@ -773,4 +777,50 @@ cursor:inherit; font-color:blue; margin:1 2 1 2; } + td.tool { + border: solid 1px gray; + + } +div.topmenu { + float:left; + width:100%; + +} + +h2.dossier { + color:darkblue; + font-style: italic; + +font-size:14px; +margin:0; +padding:0; +text-align:center; +} +a#anchorbutton { + font-size:10; + color:white; + font-weight: bold; + + text-decoration:none; + font-family: helvetica,arial,sans-serif; + background-image: url("image/bg-submit3.gif"); + background-repeat: repeat-x; + background-position: left; + + border-style: outset ; + border-color: blue ; + border-width:1; + padding:2 4 2 4; + cursor:pointer; + margin:1 2 1 2; + -moz-border-radius:2 2; + +} +a#anchorbutton:hover { + cursor:pointer; + background-color:white; + border-style: inset ; + font-color:blue; + margin:1 2 1 2; + } /* */ diff --git a/html/style.css b/html/style.css index 106666209..d8db757ed 100644 --- a/html/style.css +++ b/html/style.css @@ -17,14 +17,17 @@ table.result { color:blue; border:blue solid 1px; width:100%; + + } table.result th { font-weight:bold; font-family:helvetica,arial,sans-serif; - border-bottom:1px solid blue; + border-bottom:0; padding-left:10px; padding-right:10px; - background-color: silver; + background-color: #7CBBFF; + color:darkblue; } h2 { @@ -210,10 +213,7 @@ table.document th{ background-color:lightgrey; color:darkblue; } -table.result th{ - background-color:lightgrey; - color:darkblue; -} + span.error { color:black; background-color:red; @@ -523,6 +523,7 @@ fieldset fieldset legend { select { border: 1px solid blue; margin:2px; +background-color:white; } @@ -751,10 +752,17 @@ cursor:inherit; .button { font-size:10; - color:black; + color:white; + font-weight: bold; + text-decoration:none; font-family: helvetica,arial,sans-serif; - background-color:#DFDFDF; + background-image: url("image/bg-submit2.gif"); + background-repeat: repeat-x; + background-position: left; + text-decoration:none; + font-family: helvetica,arial,sans-serif; + border-style: outset ; border-color: blue ; border-width:1; @@ -771,4 +779,55 @@ cursor:inherit; font-color:blue; margin:1 2 1 2; } + td.tool { + border: 0; + + + } +div.topmenu { + float:left; + width:100%; + +} + +h2.dossier { + color:white; + font-style: italic; + +font-size:14px; +margin:0; +padding:0; +text-align:center; +} +a#anchorbutton { + font-size:10; + color:white; + font-weight: bold; + + text-decoration:none; + font-family: helvetica,arial,sans-serif; + background-image: url("image/bg-submit2.gif"); + background-repeat: repeat-x; + background-position: left; + text-decoration:none; + font-family: helvetica,arial,sans-serif; + + border-style: outset ; + border-color: blue ; + border-width:1; + padding:2 4 2 4; + cursor:pointer; + margin:1 2 1 2; + -moz-border-radius:2 2; + display:inline; + +} +a#anchorbutton:hover{ + cursor:pointer; + background-color:white; + border-style: inset ; + font-color:blue; + margin:1 2 1 2; +} + /* */ diff --git a/include/class_html_input.php b/include/class_html_input.php index 081c1771d..bc6b25c28 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -206,7 +206,7 @@ echo $string => {'prop':'1','prop2':'2','prop3':'3'}; *\return string with htmlcode */ static function button_anchor($p_label,$p_value,$p_name="") { - $r=sprintf(' %s', + $r=sprintf(' %s', $p_name, $p_value, $p_label); diff --git a/include/modele.inc.php b/include/modele.inc.php index fe53118cb..c2b23359c 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -118,8 +118,11 @@ if ( isset ($_POST["FMOD_NAME"]) ) { $Res=$cn_mod->exec_sql('delete from operation_analytique'); // TODO - // Nettoyage table quant_* + $Res=$cn_mod->exec_sql("truncate table jrn_rapt"); + $Res=$cn_mod->exec_sql("truncate table quant_fin"); + $Res=$cn_mod->exec_sql("truncate table quant_purchase"); + $Res=$cn_mod->exec_sql("truncate table quant_sold"); $Res=$cn_mod->exec_sql("truncate table import_tmp"); // Reset the closed periode $Res=$cn_mod->exec_sql("update parm_periode set p_closed='f'"); diff --git a/include/pref.inc.php b/include/pref.inc.php index 5275b3301..66127a54d 100644 --- a/include/pref.inc.php +++ b/include/pref.inc.php @@ -36,11 +36,7 @@ echo '
'; if ( isset($_POST['pass_1']) && strlen(trim($_POST['pass_1'])) != 0 ) { if ($_POST['pass_1'] != $_POST['pass_2'] ) { - ?> - -exec_sql("create database ".$name." encoding='utf8'"); $args=" --no-owner -d $name ".$_FILES['file']['tmp_name']; - $status=passthru(PG_RESTORE.$args); - echo '

Restauration réussie du dossier '.$lname.'

'; - + exec(PG_RESTORE.$args); + $test=new Database($id); + if ( $test->exist_table('version') ){ + echo '

Restauration réussie du dossier '.$lname.'

'; + $test->close(); + } else { + $test->close(); + echo '

Problème lors de la restauration '.$lname.'

'; + $cn->exec_sql('delete from ac_dossier where dos_id=$1',array($id)); + $cn->exec_sql('drop database '.$name); + exit(); + } $new_cn=new Database($id); $new_cn->apply_patch($name,0); @@ -131,7 +140,18 @@ if ( isset ($_REQUEST['sa'] )) { $args=" -d $name ".$_FILES['file']['tmp_name']; $status=exec(PG_RESTORE.$args); - echo '

Restauration réussie du modèle '.$lname.'

'; + $test=new Database($id,'mod'); + if ( $test->exist_table('version') ){ + echo '

Restauration réussie du dossier '.$lname.'

'; + $test->close(); + } else { + $test->close(); + echo '

Problème lors de la restauration '.$lname.'

'; + $cn->exec_sql('delete from modeledef where mod_id=$1',array($id)); + $cn->exec_sql('drop database '.$name); + exit(); + } + $new_cn=new Database($id,'mod'); $new_cn->apply_patch($name,0); diff --git a/include/user_menu.php b/include/user_menu.php index 70684b867..58754878c 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -202,7 +202,7 @@ function ShowMenuCompta($p_high="") $str_dossier=dossier::get(); $r=""; $r.=menu_tool("compta.php"); - $r.='
'; + $r.='
'; $r.=$result; $r.='
'; @@ -431,7 +431,7 @@ function menu_tool($p_from) { $r.= '
'; $r.= '
'; - $r.= "

Dossier : ".h(dossier::name())."

"; + $r.= "

Dossier : ".h(dossier::name())."

"; $r.= '
'; $r.= '
'; if ( $p_from == 'compta') $view='E'; @@ -465,13 +465,13 @@ function menu_tool($p_from) { $r.=''; continue; } - $r.= ''. + $r.= ''. ''.$col['label'].''. ''; } } - $r.=''; + $r.=''; $r.= ''. _('Recherche').''; $r.='';