fixed issue with hardcode location for ie specific ajax_calendar_ie.css, removed...
[openemr.git] / contrib / forms / leg_length / C_FormLegLength.class.php
blobd6f2bc30de694a98807ce5f50d603932782b020b
1 <?php
2 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
8 require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
9 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
10 require_once("FormLegLength.class.php");
12 class C_FormLegLength extends Controller {
14 var $template_dir;
16 function C_FormLegLength($template_mod = "general") {
17 parent::Controller();
18 $this->template_mod = $template_mod;
19 $this->template_dir = dirname(__FILE__) . "/templates/";
20 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
21 $this->assign("DONT_SAVE_LINK",$GLOBALS['form_exit_url']);
22 $this->assign("STYLE", $GLOBALS['style']);
25 function default_action() {
26 $form = new FormLegLength();
27 $this->assign("data",$form);
28 return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
31 function view_action($form_id) {
32 if (is_numeric($form_id)) {
33 $form = new FormLegLength($form_id);
35 else {
36 $form = new FormLegLength();
38 $dbconn = $GLOBALS['adodb']['db'];
39 $this->assign("data",$form);
40 return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
43 function default_action_process() {
44 if ($_POST['process'] != "true")
45 return;
46 $this->form = new FormLegLength($_POST['id']);
47 parent::populate_object($this->form);
48 $this->form->persist();
49 if ($GLOBALS['encounter'] == "") {
50 $GLOBALS['encounter'] = date("Ymd");
52 if (empty($_POST['id'])) {
53 addForm($GLOBALS['encounter'], "Extremities measurements", $this->form->id, "leg_length",
54 $GLOBALS['pid'], $_SESSION['userauthorized']);
55 $_POST['process'] = "";
57 return;