noalyss Version-10
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();$('box_search_card').setStyle({'z-index':get_next_layer()})");
28 echo '<div id="box_search_card" style="display:none;width:20rem;padding:0" class="inner_box">';
29 echo HtmlInput::title_box(_('Recherche de fiches'), "box_search_card","hide");
30 echo '<p class="info p-1" >';
31 echo _("Donnez une partie du nom, prénom, de la description, du poste comptable, du n° de TVA,quick code ... "
32 . " de la fiche" ) ;
33 echo '</p>';
34 echo '<p class="p-1">';
35 echo $search_card->input();
36 echo '</p>';
37 $create_card_js='onclick="select_card_type({});"';
38 echo '<ul class="aligned-block">';
39
40 echo '<li>'.
41 HtmlInput::button_anchor(_("Chercher"),"javascript:void(0)","",$search_card_js,'button').
42 '</li>';
43
44 echo '<li>'.
45 HtmlInput::button_anchor(_("Créer fiche"),"javascript:void(0)","",$create_card_js,'button').
46 '</li>';
47
48 echo '<li>'.
49 HtmlInput::button_hide("box_search_card").
50 '</li>';
51 echo '</ul>';
52 echo '</div>';
53endif;
54
55
56if ( $cn->get_value("select count(*) from profile join profile_user using (p_id)
57 where user_name=$1 and with_direct_form=true",array($_SESSION[SESSION_KEY.'g_user'])) ==1):
58?>
59 <div id="direct">
60 <form method="get" onsubmit="return document.getElementById('ac').value.trim()!='';">
61 <?php echo $http->request('ac',"string", '')?>
62 <?php echo Dossier::hidden()?>
63 <?php
64
65 $direct=new IText('ac');
66 $direct->style='class="input_text"';
67 $direct->placeholder=_('Accès direct ou menu');
68 $direct->value='';
69 $direct->size=20;
70 echo $direct->input();
71 $gDossier=dossier::id();
72 ?>
73 <div id="ac_choices" class="autocomplete" style="width:150px;z-index:1"></div>
74 <?php
75 echo HtmlInput::submit('go',_('Aller'));
76 ?>
77
78 </form>
79 <script>
80
81 try {
82 new Ajax.Autocompleter("ac","ac_choices","direct.php?gDossier=<?php echo $gDossier?>",
83 {paramName:"acs",minChars:1,indicator:null,
84 callback:null,
85 afterUpdateElement:null});} catch (e){$('info_div').innerHTML=e.message;};
86 </script>
87 </div>
88<?php
89endif;?>
90
91 </div>
92
93 <div id="module">
94 <div class="d-none d-md-block">
95 <ul class="nav nav-pills nav-fill flex-row" >
96 <?php
97 foreach ($amodule as $row):
98 $js="";
99 $style="";
100 if ( $row['me_code']=='new_line')
101 {
102 echo '</ul>';
103 echo '<ul class="nav nav-pills nav-fill flex-row" >';
104 continue;
105 }
106 $style="nav-item-module nav-item-slide";
107 if ($row['me_code']==$selected_module)
108 {
109 $style='nav-item-active';
110 }
111 if ( $row['me_url']!='')
112 {
113 $url=$row['me_url'];
114 }
115 elseif ($row['me_javascript'] != '')
116 {
117 $url="javascript:void(0)";
118 $js_dossier=noalyss_str_replace('<DOSSIER>', Dossier::id(), $row['me_javascript']);
119 $js=sprintf(' onclick="%s"',$js_dossier);
120 }
121 else
122 {
123 $url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
124 }
125 ?>
126 <li class="<?php echo $style?>">
127 <a class="nav-link" href="<?php echo $url?>" title="<?php echo _($row['me_description']??' '); ?>" <?php echo $js?> ><?php echo gettext($row['me_menu'])?></a>
128 </li>
129 <?php
131 ?>
132 </ul>
133
134 </div>
135 <div class="d-md-none navbar-light" >
136 <button id="showmodule" class="navbar-toggler" onclick="toggleHideShow('navbarToggleExternalContent','showmodule')">
137 <span class="navbar-toggler-icon"></span>
138 </button>
139 <div style="display:none;position:absolute;top:2px;left:2px;z-index:10" id="navbarToggleExternalContent">
140 <ul class="nav nav-pills nav-fill flex-column bg-dark" >
141 <?php
142 foreach ($amodule as $row):
143 $js="";
145
146 $style="nav-item-module ";
147 if ( $row['me_code']=='new_line')
148 {
149 continue;
150 }
151 if ($row['me_code']==$selected_module)
152 {
153 $style='nav-item-active';
154 }
155 if ( $row['me_url']!='')
156 {
157 $url=$row['me_url'];
158 }
159 elseif ($row['me_javascript'] != '')
160 {
161 $url="javascript:void(0)";
162 $js_dossier=noalyss_str_replace('<DOSSIER>', Dossier::id(), $row['me_javascript']);
163 $js=sprintf(' onclick="%s"',$js_dossier);
164 }
165 else
166 {
167 $url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code'];
168 }
169 ?>
170 <li class="<?php echo $style?>">
171 <a class="nav-link" href="<?php echo $url?>" title="<?php echo _($row['me_description']??"-")?>" <?php echo $js?> ><?php echo gettext($row['me_menu'])?></a>
172 </li>
173 <?php
175 ?>
176 </ul>
177 </div>
178
179 </div>
180
181</div>
182</div>
183<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 Text member :
static card($p_js)
$anc_filter title
if( $delta< 0) elseif( $delta==0)
$create_card_js
Definition module.php:37
$search_card_js
Definition module.php:26