template = "template"; $this->module = "circ"; $this->module_name = $msg[5]; $this->alert_url = $base_path."/ajax.php?module=ajax&categ=alert¤t_alert=".$this->module; parent::__construct(); } public function get_quick_params_form(){ global $msg, $pmb_transferts_actif, $pmb_printer_name; $html= ""; if(SESSrights & PREF_AUTH) { $html= "

".$msg['dashboard_quick_actions']."

"; $html.= $this->get_user_param_form("deflt2docs_location"); if($pmb_transferts_actif=="1")$html.= $this->get_user_param_form("deflt_docs_location"); $html.= $this->get_user_param_form("deflt_cashdesk"); $html.= $this->get_user_param_form("deflt_resas_location"); if (substr($pmb_printer_name,0,9) == 'raspberry') { $html.= $this->get_user_param_form("deflt_printer"); } $html.="
"; } return $html; } public function save_quick_params(){ $query = "update users set "; $update=array(); foreach($_POST as $key => $value){ switch($key){ case "deflt2docs_location": case "deflt_docs_location": case "param_allloc": case "deflt_cashdesk": case "deflt_resas_location": case "deflt_printer": global ${$key}; $update[] = $key."='".$value."'"; break; } } if(count($update)){ $query.=implode(", ",$update)." where userid=".SESSuserid; $result = pmb_mysql_query($query); return $result; } return true; } }