forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete_autosave.php
32 lines (26 loc) · 1.17 KB
/
delete_autosave.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
////////////////////////////////////////////////////////////////////
// Form: Psychiatrisch Onderzoek - Delete Autosave
// Package: remove autosaved form - Dutch specific form
// Created by: Larry Lart
// Version: 1.0 - 29-03-2008
////////////////////////////////////////////////////////////////////
//local includes
include_once("../../globals.php");
/////////////////
// here we check to se if there was an autosave version prior to the real save - hack!
$vectAutosave = sqlQuery( "SELECT id, autosave_flag, autosave_datetime FROM form_psychiatrisch_onderzoek
WHERE pid = ".$_SESSION["pid"].
" AND groupname='".$_SESSION["authProvider"].
"' AND user='".$_SESSION["authUser"]."' AND
authorized=$userauthorized AND activity=1
AND autosave_flag=1
ORDER by id DESC limit 1" );
if( $vectAutosave['autosave_flag'] == 1 )
{
$strSql = "DELETE from form_psychiatrisch_onderzoek
WHERE id = ".$vectAutosave['id'].";";
sqlQuery( $strSql );
}
//echo "debug :: form was deleted... sql=$strSql";
?>