3 require_once($GLOBALS['fileroot'] . "/library/forms.inc");
4 require_once("FormSOAP.class.php");
6 class C_FormSOAP
extends Controller
11 function __construct($template_mod = "general")
13 parent
::__construct();
14 $this->template_mod
= $template_mod;
15 $this->template_dir
= dirname(__FILE__
) . "/templates/";
16 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
17 $this->assign("DONT_SAVE_LINK", $GLOBALS['form_exit_url']);
18 $this->assign("STYLE", $GLOBALS['style']);
21 function default_action()
23 $form = new FormSOAP();
24 $this->assign("data", $form);
25 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
28 function view_action($form_id)
30 if (is_numeric($form_id)) {
31 $form = new FormSOAP($form_id);
33 $form = new FormSOAP();
36 $dbconn = $GLOBALS['adodb']['db'];
38 $this->assign("data", $form);
40 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
43 function default_action_process()
45 if ($_POST['process'] != "true") {
49 $this->form
= new FormSOAP($_POST['id']);
50 parent
::populate_object($this->form
);
52 $this->form
->persist();
53 if ($GLOBALS['encounter'] == "") {
54 $GLOBALS['encounter'] = date("Ymd");
57 if (empty($_POST['id'])) {
58 addForm($GLOBALS['encounter'], "SOAP", $this->form
->id
, "soap", $GLOBALS['pid'], $_SESSION['userauthorized']);
59 $_POST['process'] = "";