noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
html_input.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21// Copyright Author Dany De Bontridder danydb@aevalys.eu
22
23/*! \file
24 * \brief This class is used to create all the HTML INPUT TYPE
25 */
26
27/*!
28 * \brief class widget This class is used to create all the HTML INPUT TYPE
29 * and some specials which works with javascript like
30 * js_search.
31 *
32 * special value
33 * js_search and js_search_only :you need to add a span widget the name
34 * of the js_* widget + '_label' , the member extra contains cred,deb to
35 * filter the search of cred of deb of a jrn or contains a string with
36 * a list of frd_id.
37 * Possible type
38 * $type
39 * - TEXT
40 * - HIDDEN
41 * - BUTTON in this->js you have the javascript code
42 * - SELECT the options are passed via this->value, this array is
43 * build thanks the make_array function, each array (of the
44 * array) aka row must contains a field value and a field label
45 * - PASSWORD
46 * - CHECKBOX
47 * - RADIO
48 * - TEXTAREA
49 * - RICHTEXT
50 * - FILE
51 * - SPAN
52 */
53#[AllowDynamicProperties]
55{
56
57 var $type; /*!< $type type of the widget */
58 var $name; /*!< $name field NAME of the INPUT */
59 var $value; /*!< $value what the INPUT contains */
60 var $readOnly; /*!< $readonly true : we cannot change value */
61 var $size; /*!< $size size of the input */
62 var $selected; /*!< $selected for SELECT RADIO and CHECKBOX the selected value */
63 var $table; /*!< $table =1 add the table tag */
64 var $label; /*!< $label the question before the input */
65 var $disabled; /*!< $disabled poss. value == true or nothing, to disable INPUT */
66 var $extra; /*!< $extra different usage, it depends of the $type */
67 var $extra2; /*!< $extra2 different usage,
68 it depends of the $type */
69 var $javascript; /*!< $javascript is the javascript to add to the widget */
70 var $ctrl; /*!<$ctrl is the control to update (see js_search_card_control) */
73 var $width;
74 var $heigh;
76 var $id;
77 var $style;
79 var $placeholder; /*< $placeholder string in the INPUT Text */
80
81 function __construct($p_name="", $p_value="", $p_id="")
82 {
83 $this->name=$p_name;
84 $this->readOnly=false;
85 $this->size=20;
86 $this->width=50;
87 $this->heigh=20;
88 $this->value=$p_value;
89 $this->selected="";
90 $this->table=0;
91 $this->disabled=false;
92 $this->javascript="";
93 $this->extra="";
94 $this->extra2="all";
95 $this->attribute=array();
96 $this->id=$p_id;
97 $this->require=false;
98 }
99
100 function setReadOnly($p_read)
101 {
102 $this->readOnly=$p_read;
103 }
104 /**
105 * @return string HTML placeholder attribut
106 */
107 public function get_placeholder()
108 {
109 return $this->placeholder;
110 }
111
112 /**
113 * @brief set HTML placeholder attribut
114 * @param string $placeholder
115 */
117 {
118 $this->placeholder = $placeholder;
119 return $this;
120 }
121
122 /*!
123 * \brief add an HTML attribute for the INPUT field
124 * \param $p_name name of the parameter
125 * \param $p_value default value of this parameter
126 */
127
128 public function set_attribute($p_name, $p_value)
129 {
130 $this->attribute[]=array($p_name, $p_value);
131 $this->$p_name=$p_value;
132 }
133
134 /**
135 * @brief Set the value of input (IText, INum,...)
136 * @param string $p_string
137 */
138 function set_value($p_string)
139 {
140 $this->value=$p_string;
141 }
142
143 /**
144 * @brief Return the value of input (IText, INum,...)
145 */
146 function get_value()
147 {
148 return $this->value;
149 }
150
151 /**
152 * @brief you can add attribute to this in javascript
153 * this function is a wrapper and create a script (in js) to modify
154 * "this" (in javascript) with the value of obj->attribute from PHP.
155 * @see build_javascript_attribute() include the string in the DOM Element instead of in a piece of code
156 * @return string : return string with the javascript code
157 */
158 public function get_js_attr()
159 {
160 require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
161 $attr="";
162 if (count($this->attribute)==0)
163 return "";
164
165 /* Add properties at the widget */
166 for ($i=0; $i<count($this->attribute); $i++)
167 {
168 list($name, $value)=$this->attribute[$i];
169 $tmp1=sprintf("$('%s').%s='%s';", $this->id, $name, $value);
170 $attr.=$tmp1;
171 }
173 return $attr;
174 }
175
176 /**
177 *@brief Make a JSON object, this method create a javascript object
178 * with the attribute set, it returns a javascript string with the object
179 * @param $p_name : name of the object, can be null. If the name is not null, return
180 * $p_name={} otherwise only the object {}
181 * @return javascript string with the object
182 * @note: there is not check on the key->value, so you could need to escape
183 * special char as quote, single-quote...
184 * @deprecated
185 * @code
186 $a=new IButton()
187 $a->set_attribute('prop','1');
188 $a->set_attribute('prop','2');
189 $a->set_attribute('prop','3');
190 $string = $a->make_object('property');
191 echo $string => property={'prop':'1','prop2':'2','prop3':'3'};
192 $string = $a->make_object(null);
193 echo $string => {'prop':'1','prop2':'2','prop3':'3'};
194 @endcode
195 */
196 public function make_object_deprecated($p_name=null)
197 {
198 $name=($p_name!=null)?$p_name.'=':'';
199 if (count($this->attribute)==0)
200 return $name."{}";
201 $ret=$name."{";
202 $and='';
203
204 for ($i=0; $i<count($this->attribute); $i++)
205 {
206 list($name, $value)=$this->attribute[$i];
207 $tmp1=sprintf($and."'%s':'%s'", $name, $value);
208 $ret.=$tmp1;
209 $and=',';
210 }
211
212 $ret.='}';
213 return $ret;
214 }
215
216 //#####################################################################
217 /* Debug
218 */
219 function __toString()
220 {
221 $r= "Type ".$this->type."<br>";
222 $r.= "name ".$this->name."<br>";
223 $r.= "value".$this->value."<br>";
224 $readonly=(isset($this->readOnly) && $this->readOnly==false)?"false":"true";
225 $r.= "read only".$readonly."<br>";
226 return $r;
227 }
228
229 static function submit($p_name, $p_value, $p_javascript="",
230 $p_class="smallbutton")
231 {
232
233 return '<INPUT TYPE="SUBMIT" class="'.$p_class.'" NAME="'.$p_name.'" ID="'.$p_name.'_submit_id" VALUE="'.$p_value.'" '.$p_javascript.'>';
234 }
235
236 static function button($p_name, $p_value, $p_javascript="",
237 $p_class="smallbutton")
238 {
239
240 return '<INPUT TYPE="button" class="'.$p_class.'" NAME="'.$p_name.'" ID="'.$p_name.'" VALUE="'.$p_value.'" '.$p_javascript.'>';
241 }
242
243 static function reset($p_value,$p_class="smallbutton")
244 {
245 return '<INPUT TYPE="RESET" class="'.$p_class.'" VALUE="'.$p_value.'">';
246 }
247
248 static function hidden($p_name, $p_value, $p_id="")
249 {
250 if ($p_id=="")
251 $p_id=$p_name;
252 if ( DEBUGNOALYSS > 2) {
253 return '<span style="font-size:80%;color:blue;background-color:lightgoldenrodyellow">'.
254 $p_id .
255 '= <INPUT TYPE="text" id="'.strip_tags($p_id).'" NAME="'.$p_name.'" VALUE="'.strip_tags($p_value??"").'" style="color:blue;font-size:80%">'.
256 '</span>';
257 }else
258 return '<INPUT TYPE="hidden" id="'.strip_tags($p_id).'" NAME="'.$p_name.'" VALUE="'.strip_tags($p_value??"").'">';
259 }
260
261 static function extension()
262 {
263 return self::hidden('plugin_code', $_REQUEST['plugin_code']);
264 }
265
266 /*!\brief create a button with a ref
267 * \param $p_label the text
268 * \param $p_value the location of the window,
269 * \param $p_name the id of the span (button will be "btn".$p_name
270 * \param $p_javascript javascript for this button, needed to add the event : onclick,...
271 * \return string with htmlcode
272 */
273
274 static function button_anchor($p_label, $p_value, $p_name="",
275 $p_javascript="", $p_class="smallbutton")
276 {
277 $href="";
278 if ($p_value!="")
279 $href=sprintf(' href ="%s" ', $p_value);
280 $r=sprintf('<span id="%s" > <A class="'.$p_class.'" id="btn%s" style="display:inline-block;" %s %s >%s</A></span>',
281 $p_name, $p_name,$href, $p_javascript, $p_label);
282 return $r;
283 }
284 /**
285 * @deprecated since version 7.0
286 * @see Icon_Action::warnbulle
287 * @param type $p_comment
288 * @return string
289 */
290 static function warnbulle($p_comment)
291 {
292 throw new Exception("DEPRECATED");
293 }
294
295 static function errorbulle($p_comment)
296 {
297 global $g_failed;
298 if ( $p_comment == "") return "";
299 $r=sprintf('<A HREF="#" tabindex="-1" style="display:inline;color:red;background-color:transparent;padding-left:4px;padding-right:4px;text-decoration:none;" onmouseover="displayBulle(\'%s\')" onclick="displayBulle(\'%s\')" onmouseout="hideBulle(0)"> %s </A>',
300 $p_comment, $p_comment, $g_failed);
301 return $r;
302 }
303
304 /**
305 * @brief return a string containing the html code for calling the modifyOperation
306 */
307 static function detail_op($p_jr_id, $p_mesg)
308 {
309 return sprintf('<A class="detail" style="text-decoration:underline;display:inline" HREF="javascript:modifyOperation(%d,%d)">%s</A>',
310 $p_jr_id, dossier::id(), $p_mesg);
311 }
312
313 /**
314 * @brief return an anchor to view the detail of an action
315 * @param $ag_id
316 * @param $p_mesg
317 * @param $p_modify let you modify an operation
318 *
319 */
320 static function detail_action($ag_id, $p_mesg, $p_modify=1)
321 {
322 return sprintf('<A class="detail" style="text-decoration:underline;display:inline" HREF="javascript:view_action(%d,%d,%d)">%s</A>',
323 $ag_id, dossier::id(), $p_modify, $p_mesg);
324 }
325
326 /**
327 * @brief return a string containing the html code for calling the modifyModeleDocument
328 * @deprecated since 9.3.0.6
329 */
330 static function detail_modele_document_deprecated($p_id, $p_mesg)
331 {
332 return sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:modifyModeleDocument(%d,%d)">%s</A>',
333 $p_id, dossier::id(), $p_mesg);
334 }
335
336 /**
337 *@brief return a string containing the html code for calling the removeStock
338 */
339 static function remove_stock($p_id, $p_mesg)
340 {
341 return sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:removeStock(%d,%d)">%s</A>',
342 $p_id, dossier::id(), $p_mesg);
343 }
344
345 /**
346 *@brief display a div with the history of the card
347 */
348 static function history_card($f_id, $p_mesg, $p_style="",$p_exercice="")
349 {
350 global $g_user;
351 if ( $p_exercice=="") {
352 $p_exercice=$g_user->get_exercice();
353 }
354 $view_history=sprintf('<A class="detail" style="text-decoration:underline;%s" HREF="javascript:view_history_card(\'%s\',\'%s\',\'%s\')" >%s</A>',
355 $p_style, $f_id, dossier::id(),$p_exercice, $p_mesg);
356 return $view_history;
357 }
358
359 /**
360 *@brief display a div with the history of the card
361 * @param int $f_id fiche.f_id
362 * @param string $p_mesg string to display
363 * @param int $p_exercice exercice of the history
364 */
365 static function history_card_button($f_id, $p_mesg,$p_exercice="")
366 {
367 static $e=0;
368 $e++;
369 global $g_user;
370 if ( $p_exercice=="") {
371 $p_exercice=$g_user->get_exercice();
372 }
373 $js=sprintf('onclick="view_history_card(\'%s\',\'%s\',\'%s\')"', $f_id,
374 dossier::id(),$p_exercice);
375 $view_history=HtmlInput::button("hcb".$e, $p_mesg, $js);
376 return $view_history;
377 }
378 /**
379 *@brief display a div with the history of the card
380 * @param int $f_id fiche.f_id
381 * @param string $p_mesg string to display
382 * @param int $p_exercice exercice of the history
383 */
384 static function followup_card_button($f_id, $p_mesg)
385 {
386 global $g_user;
387 $js=sprintf('onclick="view_followup_card(\'%s\',\'%s\')"', $f_id,
388 dossier::id());
389 $view_followup=HtmlInput::button(uniqid("fu"), $p_mesg, $js);
390 return $view_followup;
391 }
392
393
394
395 /**
396 * @brief display a div with the history of the account
397 * @param string $p_account accounting
398 * @param string $p_mesg string to display
399 * @param string $p_style extra code for HTML
400 * @param int $p_exercice exercice of the history
401 */
402 static function history_account($p_account, $p_mesg, $p_style="",$p_exercice="")
403 {
404 global $g_user;
405 if ( $p_exercice=="") {
406 $p_exercice=$g_user->get_exercice();
407 }
408 $view_history=sprintf('<A class="detail" style="text-decoration:underline;%s" HREF="javascript:view_history_account(\'%s\',\'%s\',\'%s\')" >%s</A>',
409 $p_style, $p_account, dossier::id(),$p_exercice, $p_mesg);
410 return $view_history;
411 }
412 /**
413 * @brief display a div with the history of the analytic account
414 * @param int $p_account po_id
415 * @param string $p_mesg string to display
416 * @param string $p_style extra code for HTML
417 * @param int $p_exercice exercice of the history
418 */
419 static function history_anc_account($p_account, $p_mesg, $p_style="",$p_exercice="")
420 {
421 global $g_user;
422 if ( $p_exercice=="") {
423 $p_exercice=$g_user->get_exercice();
424 }
425 $view_history=sprintf('<A class="detail" style="text-decoration:underline;%s" HREF="javascript:view_history_anc_account(\'%s\',\'%s\',\'%s\')" >%s</A>',
426 $p_style, $p_account, dossier::id(),$p_exercice, $p_mesg);
427 return $view_history;
428 }
429
430 /**
431 * @brief create a hidden plus button to select the cat of ledger
432 * @note the selected value is stored in the array p_cat
433 */
434 static function select_cat($array_cat)
435 {
436 ob_start();
437 $ledger=new ISmallButton('l');
438 $ledger->label=_("Catégorie");
439 $ledger->javascript=" show_cat_choice()";
440 echo $ledger->input();
441
442 /* create a hidden div for the ledger */
443 echo '<div id="div_cat">';
444 echo '<h2 class="info">'._('Choix des categories').'</h2>';
445 $selected=(isset($_GET['r_cat']))?$_GET['r_cat']:null;
446
447 echo '<ul>';
448 for ($e=0; $e<count($array_cat); $e++)
449 {
451 $re=new ICheckBox('r_cat['.$e.']', $row['cat']);
452
453 if ($selected!=null&&isset($selected[$e]))
454 {
455 $re->selected=true;
456 }
457 echo '<li style="list-style-type: none;">'.$re->input().$row['name'].'('.$row['cat'].')</li>';
458 }
459 echo '</ul>';
460 $hide=new IButton('l2');
461 $hide->label=_("Valider");
462 $hide->javascript=" hide_cat_choice() ";
463 echo $hide->input();
464
465 echo '</div>';
466 $r=ob_get_contents();
467 ob_end_clean();
468 return $r;
469 }
470
471 static function display_periode($p_id)
472 {
473 $r=sprintf('<a href="javascript:void(0)" onclick="display_periode(%d,%d)">Modifier</a>',
474 dossier::id(), $p_id);
475 return $r;
476 }
477
478 /**
479 * @brief close button for the HTML popup
480 * @see add_div modify_operation
481 * @param $div_name is the name of the div to remove
482 */
483 static function button_close($div_name,$class='smallbutton')
484 {
485 $a=new IButton('Fermer');
486 $a->label=_("Fermer");
487 $a->class=$class;
488 $a->javascript="removeDiv('".$div_name."')";
489 $html=$a->input();
490
491 return $html;
492 }
493
494 /**
495 * @brief Hide the HTML popup
496 * @param type $div_name
497 * @return type
498 */
499 static function button_hide($div_name,$class='smallbutton')
500 {
501 $a=new IButton('Fermer');
502 $a->label=_("Fermer");
503 $a->class=$class;
504 $a->javascript="$('".$div_name."').hide()";
505 $html=$a->input();
506
507 return $html;
508 }
509
510 /**
511 * @brief Return a html string with an anchor which close the inside popup. (top-right corner)
512 * @param name of the DIV to close
513 * @deprecated
514 * @see Icon_Action::close
515 */
516 static function anchor_close($div, $p_js="")
517 {
518 throw new Exception("DEPRECATED");
519 }
520
521 /**
522 * @brief Anchor Html with javascript
523 * @param $action action action to perform (message) without onclick
524 * @param $javascript javascript to execute
525 * @param $id is the DOM element id
526 * @param $p_class CSS class of the button
527 * @param $p_symbole raw symbole to add to the action message
528 */
529 static function anchor_action($action, $javascript, $id=NULL,
530 $p_class="button", $p_symbole="")
531 {
532 if ($id==NULL)
533 {
534 $id=uniqid("xx");
535 }
536 $r="";
537 $r.='<a id="'.$id.'" href="javascript:void(0)" class="'.$p_class.'" onclick="'.$javascript.'">'.$p_symbole.h($action).'</a>';
538 return $r;
539 }
540
541 /**
542 * @brief button Html with javascript
543 * @param $action action action to perform (message) without onclick
544 * @param $javascript javascript to execute
545 * @param $id is the DOM element id
546 * @param $p_class CSS class of the button
547 * @param $p_symbole raw symbole to add to the action message
548 */
549 static function button_action($action, $javascript, $id=NULL,
550 $p_class="button", $p_symbole="")
551 {
552 if ($id==NULL)
553 {
554 $id=uniqid("xx");
555 }
556 $r="";
557 $r.='<input type="button" id="'.$id.'" class="'.$p_class.'" onclick="'.$javascript.'" value="'.$p_symbole.h($action).'">';
558 return $r;
559 }
560
561 /**
562 * @brief Image to click ,
563 * @param string $p_image filename of the image under image/
564 * @param string $p_js javascript when the image is clicked
565 * @param string $p_message Message
566 */
567 static function image_click($p_image, $p_js, $p_message, $p_class="")
568 {
569 $ret=sprintf('<a class="nav %s" style="display:inline" title="%s"><img src="image/%s" onclick="%s"></a>',
570 $p_class, $p_message, $p_image, $p_js);
571 return $ret;
572 }
573
574 /**
575 * @brief button Html image
576 * @param $javascript javascript to execute
577 * @param $id id of the button
578 * @param $class class of the button
579 * @param $p_image image
580 */
581 static function button_image($javascript, $id="xx",
582 $p_class='class="button"', $p_image="")
583 {
584 if ($id=="xx")
585 {
586 $id=uniqid("xx");
587 }
588 $r="";
589 $r.='<image id="'.$id.'" '.$p_class.' onclick="'.$javascript.'" src="'.$p_image.'" />';
590 return $r;
591 }
592
593 /**
594 * @brief Return a html string with an anchor to hide a div, put it in the right corner
595 * @param $action action action to perform (message)
596 * @param $javascript javascript
597 * @note not protected against html
598 * @see Icon_Action::hide
599 * @deprecated
600 *
601 */
603 {
604 throw new Exception("DEPRECATED");
605 }
606
607 /**
608 * Javascript to print the current window
609 */
610 static function print_window()
611 {
612 $r='';
613 $r.=HtmlInput::button('print', _('Imprimer'), 'onclick="window.print();"');
614 return $r;
615 }
616
617 /**
618 * @brief show the detail of a card
619 */
620 static function card_detail($p_qcode, $pname='', $p_style="",
621 $p_nohistory=false,$nofollowup=false)
622 {
623 if ($pname !=='') {$pname='<span class="v-large">('.$pname.')</span>';}
624 $r="";
625 $histo=($p_nohistory==true)?' ,nohistory:1':"";
626 $followup=($nofollowup==true)?' ,nofollowup:1':"";
627 $r.=sprintf('<a href="javascript:void(0)" %s class="detail" onclick="fill_ipopcard({qcode:\'%s\' %s %s})">%s %s</a>',
628 $p_style, $p_qcode, $histo,$followup,$p_qcode,$pname);
629 return $r;
630 }
631
632 /**
633 * @brief transform request data to hidden
634 * @param $array is an of indices
635 * @param $request name of the superglobal $_POST $_GET $_REQUEST(default)
636 * @return html string with the hidden data
637 */
638 static function array_to_hidden($array, $global_array)
639 {
640
641 $r="";
642
643 if (count($global_array)==0)
644 return '';
645 foreach ($array as $a)
646 {
647 if (isset($global_array [$a]))
648 if (is_array($global_array[$a])==false)
649 {
650 $r.=HtmlInput::hidden($a, $global_array [$a]);
651 }
652 else
653 {
654 if (count($global_array[$a])>0)
655 {
656 foreach ($global_array[$a] as $value)
657 {
659 }
660 }
661 }
662 }
663
664 return $r;
665 }
666 /**
667 * @brief Transform a double array as a HTML string with hidden html value
668 * array has the formarray ["name"]="x",array['value']="y") the key name will be the hidden input name;
669 * @param double $array
670 */
672 {
673 if (empty ($array)) return "";
674 $r="";
675 foreach ( $array as $key=>$value) {
677 }
678 return $r;
679 }
680 /**
681 * @brief transform a json to hidden
682 * @param json $p_json
683 */
684 static function json_to_hidden($p_json)
685 {
686 $aJson=json_decode($p_json);
687 foreach ($aJson as $key=> $value)
688 {
689 echo HtmlInput::hidden($key, $value);
690 }
691 }
692
693 /**
694 * @brief transform $_GET data to hidden
695 * @param $array is an of indices
696 * @see HtmlInput::request_to_hidden
697 * @return html string with the hidden data
698 */
699 static function get_to_hidden($array)
700 {
701 $r=self::array_to_hidden($array, $_GET);
702 return $r;
703 }
704
705 /**
706 * transform $_POST data to hidden
707 * @param $array is an of indices
708 * @see HtmlInput::request_to_hidden
709 * @return html string with the hidden data
710 */
711 static function post_to_hidden($array)
712 {
713 $r=self::array_to_hidden($array, $_POST);
714 return $r;
715 }
716
717 /**
718 * transform $_REQUEST data to hidden
719 * @param $array is an of indices
720 * @see HtmlInput::request_to_hidden
721 * @return html string with the hidden data
722 */
723 static function request_to_hidden(array $array)
724 {
725 $r=self::array_to_hidden($array, $_REQUEST);
726 return $r;
727 }
728
729 /**
730 * transform request data to string
731 * @param $array is an of indices
732 * @param $request name of the superglobal $_POST $_GET $_REQUEST(default)
733 * @return html string with the string data
734 */
735 static function array_to_string($array, $global_array, $start="?")
736 {
737
738 $r="";
739
740 if (count($global_array)==0)
741 return '';
742 $and="";
743 foreach ($array as $a)
744 {
745 if (isset($global_array [$a]))
746 {
747 if (is_array($global_array[$a])==false)
748 {
749 $r.=$and."$a=".$global_array [$a];
750 }
751 else
752 {
753 for ($i=0; $i<count($global_array[$a]); $i++)
754 {
755 $r.=$and."$a"."[]=".$global_array[$a][$i];
756 $and="&amp;";
757 }
758 }
759 }
760 $and="&amp;";
761 }
762 if (trim ($r) != "") $r=$start.$r;
763 return $r;
764 }
765
766 /**
767 * transform $_GET data to string
768 * @param $array is an of indices
769 * @see HtmlInput::request_to_string
770 * @return html string with the string data
771 */
772 static function get_to_string($array, $start="?")
773 {
774 $r=self::array_to_string($array, $_GET, $start);
775 return $r;
776 }
777
778 /**
779 * transform $_POST data to string
780 * @param $array is an of indices
781 * @see HtmlInput::request_to_string
782 * @return html string with the string data
783 */
784 static function post_to_string($array)
785 {
786 $r=self::array_to_string($array, $_POST);
787 return $r;
788 }
789
790 /**
791 * transform $_REQUEST data to string
792 * @param $array is an of indices
793 * @see HtmlInput::request_to_string
794 * @return html string with the string data
795 */
796 static function request_to_string($array, $start="?")
797 {
798 $r=self::array_to_string($array, $_REQUEST, $start);
799 return $r;
800 }
801
802 /**
803 * generate an unique id for a widget,
804 * @param $p_prefix prefix
805 * @see HtmlInput::IDate
806 * @return string with a unique id
807 */
808 static function generate_id($p_prefix)
809 {
810 $r=sprintf('%s_%d', $p_prefix, mt_rand(0, 999999));
811 return $r;
812 }
813
814 /**
815 * return default if the value if the value doesn't exist in the array
816 * @param $ind string the index to check
817 * @param $default string the value to return
818 * @param $array array the array
819 */
820 static function default_value($ind, $default, $array)
821 {
822 if (!isset($array[$ind]))
823 {
824 return $default;
825 }
826 return $array[$ind];
827 }
828
829 /**
830 * return default if the value if the value doesn't exist in $_GET
831 * use HttpInput instead
832 * @see HttpInput
833 * @deprecated
834 * @param $ind name of the variable
835 * @param type $default
836 * @return type
837 */
838 static function default_value_get($ind, $default)
839 {
840 if (!isset($_GET[$ind]))
841 {
842 return $default;
843 }
844 return $_GET[$ind];
845 }
846
847 /**
848 * return default if the value if the value doesn't exist in $_POST
849 * use HttpInput instead
850 * @see HttpInput
851 * @deprecated
852 * @param $ind name of the variable
853 * @param type $default
854 * @return type
855 */
856 static function default_value_post($ind, $default)
857 {
858 if (!isset($_POST[$ind]))
859 {
860 return $default;
861 }
862 return $_POST[$ind];
863 }
864
865 /**
866 * return default if the value if the value doesn't exist in $_REQUEST
867 * use HttpInput instead
868 * @see HttpInput
869 * @deprecated
870 * @param $ind name of the variable
871 * @param type $default
872 * @return type
873 */
874 static function default_value_request($ind, $default)
875 {
876 if (!isset($_REQUEST[$ind]))
877 {
878 return $default;
879 }
880 return $_REQUEST[$ind];
881 }
882
883 /**
884 * @brief Title for boxes, you can customize the symbol thanks symbol with
885 * the mode "custom"
886 * @param string $p_name Title
887 * @param string $div element id, except for mode none or custom
888 * @param string $p_mod hide , close , zoom , custom or none, with
889 * custom , the $name contains all the code
890 * @param string $p_js contains the javascript if mod = "custom" or "zoom" contains button + code
891 * @param char $p_draggable , y = yes n = no ,if set to yes the box will be draggable
892 * @return type
893 */
894 static function title_box($p_name, $p_div, $p_mod="close", $p_js="",
895 $p_draggable="n",$p_enlarge='n',$raw="",$refresh='')
896 {
897 $p_div=strip_tags($p_div);
898 $r='<div class="bxbutton">';
899
900 // If draggable : display a icon to unpin and move the dialog box
901 if ($p_draggable=="y")
902 {
903 $r.=Icon_Action::draggable($p_div);
904 }
905 if ( $p_enlarge=='y') {
906 $r.=Icon_Action::full_size($p_div);
907 }
908 if ( $refresh != '') {
909 $r.=Icon_Action::refresh(uniqid(), $refresh);
910 }
911 if ($p_mod=='close')
912 {
913 $r.=Icon_Action::close($p_div, $p_js);
914 }
915 elseif ($p_mod=='zoom')
916 {
917 $r.=Icon_Action::zoom($p_div,$p_js);
918 }
919 elseif ($p_mod=='hide')
920 {
921 $r.=Icon_Action::hide("&#xe816;", "$('$p_div').hide();$p_js");
922 }
923 elseif ($p_mod=='custom')
924 {
925 $r.='<span id="span_'.$p_div.'" style="float:right;margin-right:5px">'.$p_js."</span>";
926 }
927 elseif ($p_mod=='none')
928 {
929 $r.="";
930 }
931 else
932 {
933 throw new Exception(__FILE__.":".__LINE__._("Paramètre invalide p_mod = '$p_mod'"));
934 }
935
936
937 $r.='</div>';
938 $r.=h2($p_name, ' class="title" ',$raw);
939
940 return $r;
941 }
942
943 /**
944 * @brief let you create only a link and set an id on it.
945 * After create a javascript for getting the event
946 * onclick = function() {...}
947 * @param type $p_text Text to display
948 * @param type $p_id id of the link
949 * @param type $type title of the link
950 * @code
951 * echo HtmlInput::anchor_empty('go','go_id');
952 * <script>$("go_id").onclick=function (e) { ...}</script>
953 * @endcode
954 */
955 static function anchor_empty($p_text, $p_id, $p_title="")
956 {
957 $p_url="javascript:void(0)";
958 $str=sprintf('<a id="%s" href="javascript:void(0)" class="line" title="%s">%s</a>',
959 $p_id, $p_title, $p_text);
960 return $str;
961 }
962
963 /**
964 * @brief Return a simple LINK with a url or a javascript
965 * if $p_js is not null then p_url will be javascript:void(0)
966 * we don't add the event onclick. You must give p_url OR p_js
967 * default CSS class=line
968 * @param string $p_text text of the anchor
969 * @param string $p_url url
970 * @param string $p_js javascript
971 * @param string $p_style is the visuable effect (class, style...)
972 * @param string $p_title Title
973 * @param array $p_attribute javascript attribute to add to the anchor, CAUTION special chars will be translated(see htmlspecialchars function)
974 * @see h()
975 */
976 static function anchor($p_text, $p_url="", $p_js="",
977 $p_style=' class="line" ', $p_title="click", array $p_attribute=[])
978 {
979 if ($p_js!="")
980 {
981 $p_url='href="javascript:void(0)"';
982 } else {
983 $p_url=sprintf('href="%s"',$p_url);
984 }
985 $str_javascript_attr=build_javascript_attribute($p_attribute);
986 $str=sprintf('<a %s %s %s %s title="%s">%s</a>', $str_javascript_attr,$p_style, $p_url, $p_js, $p_title,$p_text);
987 return $str;
988 }
989
990 /**
991 * @brief Create an ISelect object containing the available repository for reading
992 * or writing
993 * @remark $g_user global.
994 *
995 * @param $p_cn db object
996 * @param $p_name name of the select
997 * @param $p_mode is 'R' for reading, 'W' for writinh
998 * @return ISelect
999 * @throws Exception if p_mode is wrong
1000 */
1001 static function select_stock($p_cn, $p_name, $p_mode)
1002 {
1003 global $g_user;
1004 if (!in_array($p_mode, array('R', 'W')))
1005 {
1006 throw new Exception(__FILE__.":".__LINE__." $p_mode invalide");
1007 }
1008 $profile=$g_user->get_profile();
1009 $sel=new ISelect($p_name);
1010
1011 if ($p_mode=='W')
1012 {
1013 $sel->value=$p_cn->make_array("
1014 select r_id,r_name
1015 from stock_repository join profile_sec_repository using (r_id)
1016 where
1017 ur_right='W' and p_id=".sql_string($profile).
1018 " order by 2");
1019 return $sel;
1020 }
1021 if ($p_mode=='R')
1022 {
1023 $sel->value=$p_cn->make_array("
1024 select r_id,r_name
1025 from stock_repository join profile_sec_repository using (r_id)
1026 where
1027 p_id=".sql_string($profile).
1028 " order by 2");
1029 return $sel;
1030 }
1031 }
1032 /**
1033 * @brief filter the rows in a table and keep the colored row in alternance
1034 * @param dom_id $p_table_id table
1035 * @param string $p_col , column to search example 0,1,2
1036 * @param int $start_row row to always keep (header)
1037 * @param string $p_name name of the input field
1038 * @param string $domid domid containing the second filter, it could be an HIDDEN, TEXT, SELECT field
1039 * @return string HTML
1040 */
1041 static function filter_table_DOM($p_table_id, $p_col, $start_row, $p_name
1042 ,$domid)
1043 {
1044
1045 $r="
1046 <span>
1047 <span class=\"icon\" >&#xf50d;</span>
1048 <input id=\"lk_".$p_table_id."\" name=\"$p_name\" autocomplete=\"off\" class=\"input_text\" name=\"filter\" onkeyup=\"filter_table(this, '$p_table_id','$p_col',$start_row ,'$domid')\" type=\"text\" placeholder=\""._("Filtre rapide")."\">
1049 <input type=\"button\" class=\"smallbutton\" onclick=\"$('lk_".$p_table_id."').value='';filter_table($('lk_".$p_table_id."'), '$p_table_id','$p_col',$start_row,'$domid' );\" value=\"X\">
1050 </span>
1051 ";
1052 $r.=' <span class="notice" style="display:none" id="info_'.$p_table_id.'"></span>';
1053 return $r;
1054 }
1055
1056 /**
1057 * @brief filter the rows in a table and keep the colored row in alternance
1058 * @param dom_id $p_table_id table
1059 * @param string $p_col , column to search example 0,1,2
1060 * @param int $start_row row to always keep (header)
1061 * @param string $p_name name of the input field
1062 * @param string $p_old_value search value sent by $_GET (or $_REQUEST)
1063 * @return string HTML
1064 */
1065 static function filter_table_form($p_table_id, $p_col, $start_row, $p_name,
1066 $p_old_value)
1067 {
1068 $r="
1069 <span>
1070 <span class=\"icon\" >&#xf50d;</span>
1071 <input id=\"lk_".$p_table_id."\" name=\"$p_name\" value=\"$p_old_value\"autocomplete=\"off\" class=\"input_text\" name=\"filter\" onkeyup=\"filter_table(this, '$p_table_id','$p_col',$start_row )\" type=\"text\" placeholder=\""._("Filtre rapide")."\">
1072 <input type=\"button\" class=\"smallbutton\" onclick=\"$('lk_".$p_table_id."').value='';filter_table($('lk_".$p_table_id."'), '$p_table_id','$p_col',$start_row );\" value=\"X\">
1073 </span>
1074 ";
1075 $r.=' <span class="notice" style="display:none" id="info_'.$p_table_id.'"></span>';
1076 return $r;
1077 }
1078 /**
1079 * @brief filter the rows in a table and keep the colored row in alternance
1080 * @param dom_id $p_table_id table
1081 * @param string $p_col , column to search example 0,1,2
1082 * @param int $start_row row to always keep (header)
1083 * @return string HTML
1084 */
1085 static function filter_table($p_table_id, $p_col, $start_row)
1086 {
1087 $r="
1088 <span>
1089 <span class=\"icon\" >&#xf50d;</span>
1090
1091 <input id=\"lk_".$p_table_id."\" autocomplete=\"off\" class=\"input_text\" name=\"filter\" onkeyup=\"filter_table(this, '$p_table_id','$p_col',$start_row )\" type=\"text\" placeholder=\""._("Filtre rapide")."\">
1092 <input type=\"button\" class=\"smallbutton\" onclick=\"$('lk_".$p_table_id."').value='';filter_table($('lk_".$p_table_id."'), '$p_table_id','$p_col',$start_row );\" value=\"X\">
1093 </span>
1094 ";
1095 $r.=' <span class="notice" style="display:none" id="info_'.$p_table_id.'"></span>';
1096 return $r;
1097 }
1098 /**
1099 * @brief Display a field for searching an element in a list, the searchable text must be in an element with the className search-content
1100 * @param string $p_list_id DOM ID of the list (ul or ol)
1101 * @code
1102
1103 <ul id="xx">
1104 <li><span class="search-content"> Content used for searching</span> Content not used for search </li>
1105 <li><span class="search-content"> Content used for searching</span> <a href="">Content not used for search</a> </li>
1106 <li><span class="search-content"> Content used for searching</span> Content not used for search </li>
1107 <li><a href=""><span class="search-content"> Content used for searching</span> </a></li>
1108 <ul>
1109 *
1110 * @endcode
1111 * @return string
1112 */
1113 static function filter_list($p_list_id)
1114 {
1115 $r="<span>";
1116 $r.='<span class=" icon">&#xf50d;</span>';
1117 $r.=sprintf('<input id="search_%s" type="TEXT" class="input_text" name="filter_list%s" placeholder="%s" onkeyup="filter_list(this,\'%s\')">',
1118 $p_list_id,$p_list_id,_("Recherche"),$p_list_id);
1119
1120 $r.=sprintf('<input type="button" class="smallbutton" onclick="$(\'search_%s\').value=\'\';filter_list(\'search_%s\',\'%s\')" value="x">',$p_list_id,$p_list_id,$p_list_id);
1121 $r.='</span>';
1122 return $r;
1123 }
1124
1125 static function show_reconcile($p_div, $let, $span="")
1126 {
1127 $r='<A style="color:red;text-decoration:underline" href="javascript:void(0)" onclick="show_reconcile(\''.$p_div.'\',\''.$let.'\')">'.$let.$span.'</A>';
1128 return $r;
1129 }
1130
1131 /**
1132 * Zoom the calendar
1133 * @param type $obj objet json for the javascript
1134 * @see calendar_zoom in noalyss_script.js
1135 */
1136 static function calendar_zoom($obj)
1137 {
1138 $button=new ISmallButton("calendar", _("Calendrier"));
1139 $button->javascript="calendar_zoom($obj)";
1140 return $button->input();
1141 }
1142
1143 /**
1144 *
1145 * @param type $p_array indice
1146 * - div div name
1147 * - type ALL, VEN, ACH or ODS
1148 * - all_type 1 yes 0 no
1149 *
1150 */
1151 static function button_choice_ledger($p_array)
1152 {
1153 extract($p_array, EXTR_SKIP);
1154 $bledger_param=json_encode(array(
1155 'dossier'=>$_REQUEST['gDossier'],
1156 'type'=>$type,
1157 'all_type'=>$all_type,
1158 'div'=>$div,
1159 'class'=>'inner_box'
1160 ));
1161
1162 $bledger_param=noalyss_str_replace('"', "'", $bledger_param);
1163 $bledger=new ISmallButton('l');
1164 $bledger->label=_("choix des journaux");
1165 $bledger->javascript=" show_ledger_choice($bledger_param)";
1166 $f_ledger=$bledger->input();
1167 $hid_jrn="";
1168 if (isset($_REQUEST[$div.'nb_jrn']))
1169 {
1170 for ($i=0; $i<$_REQUEST[$div.'nb_jrn']; $i++)
1171 {
1172 if (isset($_REQUEST[$div."r_jrn"][$i]))
1173 $hid_jrn.=HtmlInput::hidden($div.'r_jrn['.$i.']',
1174 $_REQUEST[$div."r_jrn"][$i]);
1175 }
1176 $hid_jrn.=HtmlInput::hidden($div.'nb_jrn',
1177 $_REQUEST[$div.'nb_jrn']);
1178 } else
1179 {
1180 $hid_jrn=HtmlInput::hidden($div.'nb_jrn', 0);
1181 }
1182 echo $f_ledger;
1183 echo '<span id="ledger_id'.$div.'">';
1184 echo $hid_jrn;
1185 echo '</span>';
1186 }
1187
1188 /**
1189 * @brief Returns HTML code for displaying a icon with a link to a receipt document from
1190 * the ledger
1191 * @param $p_jr_id jrn.jr_id
1192 * @param $p_name name in the link , if the name is empty then we show the icon
1193 * @return nothing or HTML Code for a link to the document
1194 */
1195 static function show_receipt_document($p_jr_id, $p_name="")
1196 {
1197 $cn=\Dossier::connect();
1198 $image=$p_name;
1199
1200 // Check the jr_id has a receipt document
1201 $array=$cn->get_array('select jr_def_id,jr_pj_name,jr_grpt_id from jrn where jr_id=$1',
1202 array($p_jr_id));
1203 if (count($array)==0)
1204 return "";
1205 if ($array[0]['jr_pj_name']=="")
1206 return "";
1207 $str_dossier=Dossier::get();
1208
1209 // Name is empty then use an image
1210 if ($p_name=="")
1211 {
1212 $image='<IMG style="width:24px;height:24px;border:0px" SRC="image/documents.png" title="'.h($array[0]['jr_pj_name']).'" >';
1213 }
1214
1215 // Build the url
1216 $href=http_build_query(array('gDossier'=>Dossier::id(), 'jr_id'=>$p_jr_id,
1217 'act'=>'RAW:receipt'));
1218
1219 $r=sprintf('<A class="mtitle line" HREF="export.php?%s">%s</A>', $href,
1220 $image);
1221 return $r;
1222 }
1223
1224 /**
1225 *
1226 * @param type $p_operation_jr_id action_gestion_operation.ago_id
1227 */
1228 static function button_action_remove_operation($p_operation)
1229 {
1230 $rmOperation=sprintf("confirm_box(null,'"._('Voulez-vous effacer cette relation ')."',function () {remove_operation('%s','%s');});",
1231 dossier::id(), $p_operation);
1232 $js=Icon_Action::trash("acop".$p_operation, $rmOperation);
1233 return $js;
1234 }
1235
1236
1237
1238 static function button_action_add()
1239 {
1240 $dossier=Dossier::id();
1241 $js=HtmlInput::button_action(_('Nouvel événement'),
1242 'action_add('.$dossier.')', 'xx', 'smallbutton');
1243 return $js;
1244 }
1245
1246 /**
1247 * @brief Insert attribute inside a INPUT TYPE, these attribute can be retrieved
1248 * in javascript with element.getAttribute or changed with element.setAttribute
1249 * example insert my_attribute into a checkbox <input type="checkbox" "my_attribute"="XX">
1250 * @return string to insert into the HTML node
1251 *
1252 */
1253 function get_node_attribute()
1254 {
1255 $r="";
1256 $nb_attribute=count($this->attribute);
1257 for ($i=0; $i<$nb_attribute; $i++)
1258 {
1259 $r.=sprintf(' %s="%s" ', $this->attribute[$i][0],
1260 htmlentities($this->attribute[$i][1]));
1261 }
1262 return $r;
1263 }
1264
1265}
h2($p_string, $p_class="", $raw="")
Definition ac_common.php:68
sql_string($p_string)
Fix the problem with the quote char for the database.
global $g_user
if no group available , then stop
$ag_id
$href
Definition adm.inc.php:31
catch(Exception $e) $obj
if(headers_sent() &&DEBUGNOALYSS > 0) $html
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
$select selected
$ret javascript
$name size
$_REQUEST['ac']
$array_cat
$from_poste name
_("actif, passif,charge,...")
for($i=0;$i<=6;$i++) $ind
Definition calendar.php:55
$_GET['qcode']
$class
Display the Plugin and for each profile were it is installed or not.
class widget This class is used to create all the HTML INPUT TYPE and some specials which works with ...
static followup_card_button($f_id, $p_mesg)
display a div with the history of the card
static get_to_string($array, $start="?")
transform $_GET data to string
static detail_action($ag_id, $p_mesg, $p_modify=1)
return an anchor to view the detail of an action
static history_account($p_account, $p_mesg, $p_style="", $p_exercice="")
display a div with the history of the account
set_placeholder($placeholder)
set HTML placeholder attribut
static history_card_button($f_id, $p_mesg, $p_exercice="")
display a div with the history of the card
static button_hide($div_name, $class='smallbutton')
Hide the HTML popup.
static default_value_request($ind, $default)
return default if the value if the value doesn't exist in $_REQUEST use HttpInput instead
static button_image($javascript, $id="xx", $p_class='class="button"', $p_image="")
button Html image
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
set_attribute($p_name, $p_value)
add an HTML attribute for the INPUT field
static default_value_get($ind, $default)
return default if the value if the value doesn't exist in $_GET use HttpInput instead
static detail_op($p_jr_id, $p_mesg)
return a string containing the html code for calling the modifyOperation
static select_stock($p_cn, $p_name, $p_mode)
Create an ISelect object containing the available repository for reading or writing.
static request_to_hidden(array $array)
transform $_REQUEST data to hidden
__construct($p_name="", $p_value="", $p_id="")
static remove_stock($p_id, $p_mesg)
return a string containing the html code for calling the removeStock
static filter_table($p_table_id, $p_col, $start_row)
filter the rows in a table and keep the colored row in alternance
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
set_value($p_string)
Set the value of input (IText, INum,...)
static generate_id($p_prefix)
generate an unique id for a widget,
static extension()
static request_to_string($array, $start="?")
transform $_REQUEST data to string
setReadOnly($p_read)
static default_value($ind, $default, $array)
return default if the value if the value doesn't exist in the array
static print_window()
Javascript to print the current window.
make_object_deprecated($p_name=null)
Make a JSON object, this method create a javascript object with the attribute set,...
static card_detail($p_qcode, $pname='', $p_style="", $p_nohistory=false, $nofollowup=false)
show the detail of a card
static anchor($p_text, $p_url="", $p_js="", $p_style=' class="line" ', $p_title="click", array $p_attribute=[])
Return a simple LINK with a url or a javascript if $p_js is not null then p_url will be javascript:vo...
static button_action($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
button Html with javascript
static warnbulle($p_comment)
static reset($p_value, $p_class="smallbutton")
static anchor_close($div, $p_js="")
Return a html string with an anchor which close the inside popup.
get_value()
Return the value of input (IText, INum,...)
static hidden($p_name, $p_value, $p_id="")
static history_anc_account($p_account, $p_mesg, $p_style="", $p_exercice="")
display a div with the history of the analytic account
static filter_table_DOM($p_table_id, $p_col, $start_row, $p_name, $domid)
filter the rows in a table and keep the colored row in alternance
static button_anchor($p_label, $p_value, $p_name="", $p_javascript="", $p_class="smallbutton")
create a button with a ref
static calendar_zoom($obj)
Zoom the calendar.
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n', $raw="", $refresh='')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static array_to_string($array, $global_array, $start="?")
transform request data to string
static errorbulle($p_comment)
static simple_array_to_hidden($array)
Transform a double array as a HTML string with hidden html value array has the formarray ["name"]="x"...
static post_to_string($array)
transform $_POST data to string
static history_card($f_id, $p_mesg, $p_style="", $p_exercice="")
display a div with the history of the card
static array_to_hidden($array, $global_array)
transform request data to hidden
static show_reconcile($p_div, $let, $span="")
static get_to_hidden($array)
transform $_GET data to hidden
static anchor_hide($action, $javascript)
Return a html string with an anchor to hide a div, put it in the right corner.
static image_click($p_image, $p_js, $p_message, $p_class="")
Image to click ,.
static display_periode($p_id)
static select_cat($array_cat)
create a hidden plus button to select the cat of ledger
static json_to_hidden($p_json)
transform a json to hidden
static filter_list($p_list_id)
Display a field for searching an element in a list, the searchable text must be in an element with th...
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
static post_to_hidden($array)
transform $_POST data to hidden
get_js_attr()
you can add attribute to this in javascript this function is a wrapper and create a script (in js) to...
static anchor_action($action, $javascript, $id=NULL, $p_class="button", $p_symbole="")
Anchor Html with javascript.
static detail_modele_document_deprecated($p_id, $p_mesg)
return a string containing the html code for calling the modifyModeleDocument
static filter_table_form($p_table_id, $p_col, $start_row, $p_name, $p_old_value)
filter the rows in a table and keep the colored row in alternance
static anchor_empty($p_text, $p_id, $p_title="")
let you create only a link and set an id on it.
static default_value_post($ind, $default)
return default if the value if the value doesn't exist in $_POST use HttpInput instead
Html Input.
Html Input.
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
static close($p_div)
Return a html string with an anchor which close the inside popup.
static draggable($p_div)
Display a icon for fix or move a div.
static refresh($p_id, $javascript)
static zoom($p_div, $p_javascript)
Display a icon for zooming.
static hide($action, $javascript)
Return a html string with an anchor to hide a div, put it in the right corner.
static full_size($p_div)
$all table
$anc_filter placeholder
global $g_failed
$_POST['ac']
Definition do.php:323
$icard readOnly
build_javascript_attribute($pa_attribute)
build a string with the attribute that javascript can use , that string must be included in a DOM ele...
create_script($p_string)
create the HTML for adding the script tags around of the script
$all disabled
if( $delta< 0) elseif( $delta==0)
$poste extra
$p_exercice
$desc heigh
$desc width