Fixes for restoreSession logic. (#4378)
[openemr.git] / controllers / C_PracticeSettings.class.php
blobc91bf9b0875a22bed8bd2dfb5f0d09c47b30a63f
1 <?php
3 class C_PracticeSettings extends Controller
6 var $template_mod;
8 var $direction;
10 function __construct($template_mod = "general")
12 parent::__construct();
13 $this->template_mod = $template_mod;
14 $this->assign("FORM_ACTION", $GLOBALS['webroot'] . "/controller.php?" . attr($_SERVER['QUERY_STRING']));
15 $this->assign("TOP_ACTION", $GLOBALS['webroot'] . "/controller.php?" . "practice_settings" . "&");
16 $this->assign("STYLE", $GLOBALS['style']);
17 $this->direction = ($GLOBALS['_SESSION']['language_direction'] == 'rtl') ? 'right' : 'left';
20 function default_action($display = "")
22 $this->assign("display", $display);
23 $this->assign("direction", $this->direction);
24 $this->display($GLOBALS['template_dir'] . "practice_settings/" . $this->template_mod . "_list.html");
27 function pharmacy_action($arg)
29 $c = new Controller();
31 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
32 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
33 //and value passing
35 $fga = func_get_args();
37 $fga = array_slice($fga, 1);
38 $args = array_merge(array("pharmacy" => "", $arg => ""), $fga);
39 $this->assign("direction", $this->direction);
40 $display = $c->act($args);
41 $this->assign("ACTION_NAME", xl("Pharmacies"));
42 $this->default_action($display);
45 function insurance_company_action($arg)
47 $c = new Controller();
49 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
50 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
51 //and value passing
53 $fga = func_get_args();
55 $fga = array_slice($fga, 1);
56 $args = array_merge(array("insurance_company" => "", $arg => ""), $fga);
58 $display = $c->act($args);
59 $this->assign("direction", $this->direction);
60 $this->assign("ACTION_NAME", xl("Insurance Companies"));
61 $this->default_action($display);
64 function insurance_numbers_action($arg)
66 $c = new Controller();
68 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
69 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
70 //and value passing
72 $fga = func_get_args();
74 $fga = array_slice($fga, 1);
75 $args = array_merge(array("insurance_numbers" => "", $arg => ""), $fga);
77 $display = $c->act($args);
79 $this->assign("ACTION_NAME", xl("Insurance Numbers"));
80 $this->assign("direction", $this->direction);
81 $this->default_action($display);
84 function document_action($arg)
86 $c = new Controller();
88 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
89 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
90 //and value passing
92 $fga = func_get_args();
94 $fga = array_slice($fga, 1);
95 $args = array_merge(array("document" => "", $arg => ""), $fga);
97 $display = $c->act($args);
99 $this->assign("ACTION_NAME", xl("Documents"));
100 $this->assign("direction", $this->direction);
101 $this->default_action($display);
104 function document_category_action($arg)
106 $c = new Controller();
108 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
109 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
110 //and value passing
112 $fga = func_get_args();
114 $fga = array_slice($fga, 1);
115 $args = array_merge(array("document_category" => "", $arg => ""), $fga);
117 $display = $c->act($args);
119 $this->assign("ACTION_NAME", xl("Documents"));
120 $this->assign("direction", $this->direction);
121 $this->default_action($display);
124 function x12_partner_action($arg)
126 $c = new Controller();
128 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
129 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
130 //and value passing
132 $fga = func_get_args();
134 $fga = array_slice($fga, 1);
135 $args = array_merge(array("x12_partner" => "", $arg => ""), $fga);
137 $display = $c->act($args);
139 $this->assign("ACTION_NAME", xl("X12 Partners"));
140 $this->assign("direction", $this->direction);
141 $this->default_action($display);
145 function hl7_action($arg)
147 $c = new Controller();
149 //this dance is so that the controller system which only cares about the name part of the first two arguments get what it wants
150 //and the rest gets passed as normal argument values, really this all goes back to workarounds for problems with call_user_func
151 //and value passing
153 $fga = func_get_args();
154 $fga = array_slice($fga, 1);
155 $args = array_merge(array("hl7" => "", $arg => ""), $fga);
156 $display = $c->act($args);
157 $this->assign("ACTION_NAME", xl("HL7 Viewer"));
158 $this->assign("direction", $this->direction);
159 $this->default_action($display);