Additional Sql-injection functions and techniques for escaping;
[openemr.git] / interface / forms / note / save.php
blobc206c7b417c90173c4ec9f6b5e0ff560613a62db
1 <!-- Work/School Note Form created by Nikolai Vitsyn: 2004/02/13 and update 2005/03/30
2 Copyright (C) Open Source Medical Software
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
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -->
18 <?php
20 $fake_register_globals=false;
21 $sanitize_all_escapes=true;
23 include_once("../../globals.php");
24 include_once("$srcdir/api.inc");
25 include_once("$srcdir/forms.inc");
27 /*
28 * name of the database table associated with this form
30 $table_name = "form_note";
32 if ($encounter == "") $encounter = date("Ymd");
34 if ($_GET["mode"] == "new") {
35 $newid = formSubmit($table_name, $_POST, $_GET["id"], $userauthorized);
36 addForm($encounter, "Work/School Note", $newid, "note", $pid, $userauthorized);
38 elseif ($_GET["mode"] == "update") {
39 $success = formUpdate($table_name, $_POST, $_GET["id"], $userauthorized);
41 $_SESSION["encounter"] = $encounter;
42 formHeader("Redirecting....");
43 formJump();
44 formFooter();