-
Notifications
You must be signed in to change notification settings - Fork 3
/
modify_log.inc.php
34 lines (29 loc) · 1.02 KB
/
modify_log.inc.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
33
34
<?php if (!defined('__HIDE_TEST__')) exit; /* zamezeni samostatneho vykonani */ ?>
<?
function private_SaveItemToModifyLog(&$action,&$table,&$description)
{ // don't call this function directly !
global $usr;
if($action == '' || $table == '' || $description == '')
return false;
$tstamp = time();
$author = $usr->account_id;
$sql_query = 'INSERT INTO '.TBL_MODLOG." (`timestamp`,`action`,`table`,`description`,`author`) VALUES ('$tstamp','$action','$table','$description',$author)";
$vysledek=query_db($sql_query);
return (($vysledek == null)?FALSE:TRUE);
}
function SaveItemToModifyLog_Add($table,$description)
{
$action = 'add';
return private_SaveItemToModifyLog($action,$table,$description);
}
function SaveItemToModifyLog_Edit($table,$description)
{
$action = 'edit';
return private_SaveItemToModifyLog($action,$table,$description);
}
function SaveItemToModifyLog_Delete($table,$description)
{
$action = 'delete';
return private_SaveItemToModifyLog($action,$table,$description);
}
?>