noalyss  Version-6.9.1.8
 All Data Structures Namespaces Files Functions Variables Pages
class_irelated_action.php
Go to the documentation of this file.
1 <?php
2 /*
3  * This file is part of NOALYSS.
4  *
5  * NOALYSS is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * NOALYSS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with NOALYSS; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 // Copyright Author Dany De Bontridder danydb@aevalys.eu
21 
22 /*!\file
23  * \brief Html Input
24  * - name is the name and id of the input
25  */
26 require_once NOALYSS_INCLUDE.'/lib/class_html_input.php';
28 {
29 
30  public function __construct($p_name='',$p_value='')
31  {
32  $this->name=$p_name;
33  $this->value=$p_value;
34  $this->amount_id=null;
35  $this->paid='';
36  $this->id=$p_name;
37  }
38  /*!\brief show the html input of the widget*/
39  public function input($p_name=null,$p_value=null)
40  {
41  $this->name=($p_name==null)?$this->name:$p_name;
42  $this->value=($p_value==null)?$this->value:$p_value;
43  if ( $this->readOnly==true) return $this->display();
44 
45  $this->id=($this->id=="")?$this->name:$this->id;
46 
47 
48  $r=sprintf("
49  <INPUT class=\"smallbutton\" TYPE=\"button\" onClick=\"search_action(".dossier::id().",'%s')\" value=\"?\">
50  <INPUT TYPE=\"text\" style=\"color:black;background:lightyellow;border:solid 1px grey;\" NAME=\"%s\" ID=\"%s\" VALUE=\"%s\" SIZE=\"8\" readonly>
51  <INPUT class=\"smallbutton\" TYPE=\"button\" onClick=\"$('%s').value=''\" value=\"X\">
52 
53  ",
54  $this->id,
55  $this->name,
56  $this->id,
57  $this->value,
58  $this->id
59  );
60  return $r;
61  }
62  /*!\brief print in html the readonly value of the widget*/
63  public function display()
64  {
65  $r=sprintf("<span><b>%s</b></span>",$this->value);
66  $r.=sprintf('<input type="hidden" name="%s" value="%s">', $this->name,$this->value);
67  return $r;
68 
69  }
70  static public function test_me()
71  {
72  }
73 }
$iconcerned amount_id
for($e=0;$e< count($array);$e++) $desc readOnly
$from_poste name
if(!isset($_REQUEST['p_jrn'])) else $Ledger id
class widget This class is used to create all the HTML INPUT TYPE and some specials which works with ...