2 //------------Forms generated from formsWiz
3 include_once("../../globals.php");
4 include_once("$srcdir/api.inc");
5 include_once("$srcdir/forms.inc");
6 foreach ($_POST as $k => $var) {
7 $_POST[$k] = mysql_escape_string($var);
11 $encounter = date("Ymd");
12 if ($_GET["mode"] == "new"){
13 $newid = formSubmit("form_vision", $_POST, $_GET["id"], $userauthorized);
14 addForm($encounter, "Vision", $newid, "vision", $pid, $userauthorized);
15 }elseif ($_GET["mode"] == "update") {
16 sqlInsert("update form_vision set pid = {$_SESSION["pid
"]},groupname='".$_SESSION["authProvider"]."',user='".$_SESSION["authUser"]."',authorized=$userauthorized,activity=1, date = NOW(), od_k1='".$_POST["od_k1"]."', od_k1_axis='".$_POST["od_k1_axis"]."', od_k2='".$_POST["od_k2"]."', od_k2_axis='".$_POST["od_k2_axis"]."', od_testing_status='".$_POST["od_testing_status"]."', os_k1='".$_POST["os_k1"]."', os_k1_axis='".$_POST["os_k1_axis"]."', os_k2='".$_POST["os_k2"]."', os_k2_axis='".$_POST["os_k2_axis"]."', os_testing_status='".$_POST["os_testing_status"]."', additional_notes='".$_POST["additional_notes"]."' where id=$id");
18 $_SESSION["encounter"] = $encounter;
19 formHeader("Redirecting....");