23 var $pagesize; // for printing
25 var $query_size; // table pager page length
27 function user_prefs(&$user)
30 $this->language = $user["language"];
31 language::set_language($this->language);
33 $this->qty_dec = $user["qty_dec"];
34 $this->price_dec = $user["prices_dec"];
35 $this->exrate_dec = $user["rates_dec"];
36 $this->percent_dec = $user["percent_dec"];
38 $this->show_gl_info = $user["show_gl"];
39 $this->show_codes = $user["show_codes"];
40 $this->date_format = $user["date_format"];
41 $this->date_sep = $user["date_sep"];
42 $this->tho_sep = $user["tho_sep"];
43 $this->dec_sep = $user["dec_sep"];
44 $this->theme = $user["theme"];
45 $this->pagesize = $user["page_size"];
46 $this->show_hints = $user["show_hints"];
47 $this->print_profile = $user["print_profile"];
48 $this->rep_popup = $user["rep_popup"];
49 $this->query_size = $user["query_size"];
54 return $this->language;
59 return $this->qty_dec;
64 return $this->price_dec;
69 return $this->exrate_dec;
72 function percent_dec()
74 return $this->percent_dec;
77 function show_gl_info()
79 return $this->show_gl_info;
84 return $this->show_codes;
87 function date_format()
89 return $this->date_format;
94 return $this->date_sep;
97 function date_display()
100 $sep = $dateseps[$this->date_sep];
101 if ($this->date_format == 0)
102 return "m".$sep."d".$sep."Y";
103 elseif ($this->date_format == 1)
104 return "d".$sep."m".$sep."Y";
106 return "Y".$sep."m".$sep."d";
111 return $this->tho_sep;
116 return $this->dec_sep;
124 function get_pagesize()
126 return $this->pagesize;
129 function show_hints()
131 return $this->show_hints;
134 function print_profile()
136 return $this->print_profile;
141 return $this->rep_popup;
144 function query_size()
146 return $this->query_size;
149 function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes)
151 $this->price_dec = $price_dec;
152 $this->qty_dec = $qty_dec;
153 $this->exrate_dec = $exrate_dec;
154 $this->percent_dec = $percent_dec;
155 $this->show_gl_info = $showgl;
156 $this->show_codes = $showcodes;
159 function set_format($date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize)
161 $this->date_format = $date_format;
162 $this->date_sep = $date_sep;
163 $this->tho_sep = $tho_sep;
164 $this->dec_sep = $dec_sep;
165 $this->theme = $theme;
166 $this->pagesize = $pagesize;