noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
module.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?>
5<div id="top">
6 <div id="dossier">
7 <?php echo h(dossier::name())?>
8 </div>
9 <div style="clear:both;"></div>
10 <div class="name">
11
12<?php
13$http=new HttpInput();
14if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
15 where user_name=$1 and with_calc=true",array($_SESSION[SESSION_KEY.'g_user'])) ==1):
16 echo '<div id="calc">';
17 echo IButton::show_calc();
18echo '</div>';
20
21// show search card
22if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
23 where user_name=$1 and with_search_card=1",array($_SESSION[SESSION_KEY.'g_user'])) ==1):
24 $search_card=new IText('card_search');
25 $search_card->css_size='97%';
26 $search_card_js=sprintf('onclick="boxsearch_card(\'%d\')"',dossier::id());
27 echo Icon_Action::card( "$('box_search_card').show()");
28 echo '<div id="box_search_card" style="display:none;width:20rem" class="inner_box">';
29 echo HtmlInput::title_box(_("recherche"), "box_search_card","hide");
30 echo _('Recherche de fiche');
31 echo '<p class="info">';
32 echo _("Donnez une partie du nom, prénom, de la description, du poste comptable, du n° de TVA,quick code ... "
33 . " de la fiche" ) ;
34 echo '</p>';
35 echo '<p class="ml-1">';
36 echo $search_card->input();
37 echo '</p>';
38 $create_card_js='onclick="select_card_type({});"';
39 echo '<ul class="aligned-block">';
40
41 echo '<li>'.
42 HtmlInput::button_anchor(_("Chercher"),"javascript:void(0)","",$search_card_js,'button').
43 '</li>';
44
45 echo '<li>'.
46 HtmlInput::button_anchor(_("Créer fiche"),"javascript:void(0)","",$create_card_js,'button').
47 '</li>';
48
49 echo '<li>'.
50 HtmlInput::button_hide("box_search_card").
51 '</li>';
52 echo '</ul>';
53 echo '</div>';
54endif;
55
56
57if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
58 where user_name=$1 and with_direct_form=true",array($_SESSION[SESSION_KEY.'g_user'])) ==1):
59?>
60 <div id="direct">
61 <form method="get" onsubmit="return document.getElementById('ac').value.trim()!='';">
62 <?php echo $http->request('ac',"string", '')?>
63 <?php echo Dossier::hidden()?>
64 <?php
65
66 $direct=new IText('ac');
67 $direct->style='class="input_text"';
68 $direct->placeholder=_('Accès direct ou menu');
69 $direct->value='';
70 $direct->size=20;
71 echo $direct->input();
72 $gDossier=dossier::id();
73 ?>
74 <div id="ac_choices" class="autocomplete" style="width:150px;z-index:1"></div>
75 <?php
76 echo HtmlInput::submit('go',_('Aller'));
77 ?>
78
79 </form>
80 <script>
81
82 try {
83 new Ajax.Autocompleter("ac","ac_choices","direct.php?gDossier=<?php echo $gDossier?>",
84 {paramName:"acs",minChars:1,indicator:null,
85 callback:null,
86 afterUpdateElement:null});} catch (e){$('info_div').innerHTML=e.message;};
87 </script>
88 </div>
89<?php
90endif;?>
91
92 </div>
93
94 <div id="module">
95 <div class="d-none d-md-block">
96 <ul class="nav nav-pills nav-fill flex-row" >
97 <?php
98 foreach ($amodule as $row):
99 $js="";
100 $style="";
101 if ( $row['me_code']=='new_line')
102 {
103 echo '</ul>';
104 echo '<ul class="nav nav-pills nav-fill flex-row" >';
105 continue;
106 }
107 $style="nav-item-module nav-item-slide";
108 if ($row['me_code']==$selected_module)
109 {
110 $style='nav-item-active';
111 }
112 if ( $row['me_url']!='')
113 {
114 $url=$row['me_url'];
115 }
116 elseif ($row['me_javascript'] != '')
117 {
118 $url="javascript:void(0)";
119 $js_dossier=noalyss_str_replace('<DOSSIER>', Dossier::id(), $row['me_javascript']);
120 $js=sprintf(' onclick="%s"',$js_dossier);
121 }
122 else
123 {
124 $url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
125 }
126 ?>
127 <li class="<?php echo $style?>">
128 <a class="nav-link" href="<?php echo $url?>" title="<?php echo _($row['me_description']??''); ?>" <?php echo $js?> ><?php echo gettext($row['me_menu'])?></a>
129 </li>
130 <?php
132 ?>
133 </ul>
134
135 </div>
136 <div class="d-md-none navbar-light" >
137 <button id="showmodule" class="navbar-toggler" onclick="toggleHideShow('navbarToggleExternalContent','showmodule')">
138 <span class="navbar-toggler-icon"></span>
139 </button>
140 <div style="display:none;position:absolute;top:2px;left:2px;z-index:10" id="navbarToggleExternalContent">
141 <ul class="nav nav-pills nav-fill flex-column bg-dark" >
142 <?php
143 foreach ($amodule as $row):
144 $js="";
146
147 $style="nav-item-module ";
148 if ( $row['me_code']=='new_line')
149 {
150 continue;
151 }
152 if ($row['me_code']==$selected_module)
153 {
154 $style='nav-item-active';
155 }
156 if ( $row['me_url']!='')
157 {
158 $url=$row['me_url'];
159 }
160 elseif ($row['me_javascript'] != '')
161 {
162 $url="javascript:void(0)";
163 $js_dossier=noalyss_str_replace('<DOSSIER>', Dossier::id(), $row['me_javascript']);
164 $js=sprintf(' onclick="%s"',$js_dossier);
165 }
166 else
167 {
168 $url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
169 }
170 ?>
171 <li class="<?php echo $style?>">
172 <a class="nav-link" href="<?php echo $url?>" title="<?php echo _($row['me_description']??"")?>" <?php echo $js?> ><?php echo gettext($row['me_menu'])?></a>
173 </li>
174 <?php
176 ?>
177 </ul>
178 </div>
179
180 </div>
181
182</div>
183</div>
184<div style="clear:both;"></div>
span($p_string, $p_extra='')
Definition ac_common.php:43
noalyss_str_replace($search, $replace, $string)
if(isset($tot['tva'][$a]))($tot['tva'][$a])?></td ><?php else endforeach
h( $row[ 'oa_description'])
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
$opd_description style
_("actif, passif,charge,...")
manage the http input (get , post, request) and extract from an array
static show_calc()
Html Input.
static card($p_js)
$anc_filter title
if( $delta< 0) elseif( $delta==0)
$create_card_js
Definition module.php:38
$search_card_js
Definition module.php:26