Interim autoloaded library/classes via composer classmap, take 4. (#422)
[openemr.git] / interface / forms / soap / C_FormSOAP.class.php
blobdfc655f592ce27cf47f816635f9f6b81db8077d1
1 <?php
3 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
4 require_once("FormSOAP.class.php");
6 class C_FormSOAP extends Controller {
8 var $template_dir;
10 function __construct($template_mod = "general") {
11 parent::__construct();
12 $this->template_mod = $template_mod;
13 $this->template_dir = dirname(__FILE__) . "/templates/";
14 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
15 $this->assign("DONT_SAVE_LINK", $GLOBALS['form_exit_url']);
16 $this->assign("STYLE", $GLOBALS['style']);
19 function default_action() {
20 $form = new FormSOAP();
21 $this->assign("data",$form);
22 return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
25 function view_action($form_id) {
26 if (is_numeric($form_id)) {
27 $form = new FormSOAP($form_id);
29 else {
30 $form = new FormSOAP();
32 $dbconn = $GLOBALS['adodb']['db'];
34 $this->assign("data",$form);
36 return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
40 function default_action_process() {
41 if ($_POST['process'] != "true")
42 return;
43 $this->form = new FormSOAP($_POST['id']);
44 parent::populate_object($this->form);
46 $this->form->persist();
47 if ($GLOBALS['encounter'] == "") {
48 $GLOBALS['encounter'] = date("Ymd");
50 if(empty($_POST['id']))
52 addForm($GLOBALS['encounter'], "SOAP", $this->form->id, "soap", $GLOBALS['pid'], $_SESSION['userauthorized']);
53 $_POST['process'] = "";
55 return;