noalyss Version-9
lettering.gestion.inc.php
Go to the documentation of this file.
1<?php
2//This file is part of NOALYSS and is under GPL
3//see licence.txt
4
5if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
6global $g_user;
7echo '<div class="content">';
9echo '<div id="search">';
10echo '<FORM METHOD="GET">';
11echo dossier::hidden();
12echo HtmlInput::hidden('ac',$http->request('ac'));
13echo HtmlInput::hidden('sb',$http->request('sb'));
14echo HtmlInput::hidden('sc',$http->request('sc'));
15echo HtmlInput::hidden('f_id',$http->request('f_id'));
16
17echo '<table width="50%">';
18
19// limit of the year
20$exercice=$g_user->get_exercice();
22list($first_per,$last_per)=$periode->get_limit($exercice);
23
24$start=new IDate('start');
25$start->value=(isset($_GET['start']))?$http->get('start'):$first_per->first_day();
26$r=td(_('Date début'));
27$r.=td($start->input());
28echo tr($r);
29
30$end=new IDate('end');
31$end->value=(isset($_GET['end']))?$_GET['end']:$last_per->last_day();
32$r=td(_('Date fin'));
33$r.=td($end->input());
34echo tr($r);
35
36// type of lettering : all, lettered, not lettered
37$sel=new ISelect('type_let');
38$sel->value=array(
39 array('value'=>0,'label'=>_('Toutes opérations')),
40 array('value'=>1,'label'=>_('Opérations lettrées')),
41 array('value'=>2,'label'=>_('Opérations NON lettrées'))
42 );
43if (isset($_GET['type_let'])) $sel->selected=$http->get('type_let');
44else $sel->selected=1;
45
46$r= td("Filtre ").
47 td($sel->input());
48
49echo tr($r);
50echo '</table>';
51echo '<br>';
52echo HtmlInput::submit("seek",_('Recherche'));
53echo '</FORM>';
54echo '</div>';
55//if (! isset($_REQUEST['seek'])) exit;
56echo '<hr>';
57//--------------------------------------------------------------------------------
58// record the data
59//--------------------------------------------------------------------------------
60if ( isset($_POST['record']))
61{
63 $letter->save($_POST);
64}
65//--------------------------------------------------------------------------------
66// Show the result
67//--------------------------------------------------------------------------------
68if ( isset($_GET['start']) && isset($_GET['end']))
69 {
70 if ( isDate($http->get('start') ) == null || isDate($http->get ('end') ) == null )
71 {
72 echo alert(_('Date malformée, désolé'));
73 return;
74 }
75 }
76echo '<div id="list">';
78$quick_code=$fiche->get_quick_code();
80$letter->set_parameter('quick_code',$quick_code);
81$letter->set_parameter('start',$start->value);
82$letter->set_parameter('end',$end->value);
83
84if ( $sel->selected == 0 )
85 echo $letter->show_list('all');
86if ( $sel->selected == 1 )
87 echo $letter->show_list('letter');
88if ( $sel->selected == 2 )
89 echo $letter->show_list('unletter');
90
91echo '</div>';
92echo '<div id="detail" style="display:none">';
93echo 'Un instant...';
94echo '<IMG SRC=image/loading.gif>';
95echo '</div>';
96echo '</div>';
97?>
isDate($p_date)
Definition: ac_common.php:236
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
alert($p_msg, $buffer=false)
alert in javascript
Definition: ac_common.php:738
$_REQUEST['ac']
$_GET['qcode']
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Definition: fiche.class.php:38
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
manage the http input (get , post, request) and extract from an array
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Definition: idate.class.php:34
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
only for operation retrieved thanks a account (jrnx.j_poste) manage the accounting entries for a give...
only for operation retrieved thanks a quick_code manage the accounting entries for a given card
For the periode tables parm_periode and jrn_periode.
$_POST['ac']
Definition: do.php:310
global $g_user