3 require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
4 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
5 require_once("FormSOAP.class.php");
7 class C_FormSOAP
extends Controller
{
11 function C_FormSOAP($template_mod = "general") {
13 $this->template_mod
= $template_mod;
14 $this->template_dir
= dirname(__FILE__
) . "/templates/";
15 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
16 $this->assign("DONT_SAVE_LINK",$GLOBALS['form_exit_url']);
17 $this->assign("STYLE", $GLOBALS['style']);
20 function default_action() {
21 $form = new FormSOAP();
22 $this->assign("data",$form);
23 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
26 function view_action($form_id) {
27 if (is_numeric($form_id)) {
28 $form = new FormSOAP($form_id);
31 $form = new FormSOAP();
33 $dbconn = $GLOBALS['adodb']['db'];
34 $this->assign("data",$form);
35 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
38 function default_action_process() {
39 if ($_POST['process'] != "true")
41 $this->form
= new FormSOAP($_POST['id']);
42 parent
::populate_object($this->form
);
43 $this->form
->persist();
44 if ($GLOBALS['encounter'] == "") {
45 $GLOBALS['encounter'] = date("Ymd");
47 if (empty($_POST['id'])) {
48 addForm($GLOBALS['encounter'], "SOAP", $this->form
->id
, "soap2",
49 $GLOBALS['pid'], $_SESSION['userauthorized']);
50 $_POST['process'] = "";