This commit is contained in:
lars 2019-05-01 22:22:58 +02:00
commit 8e65e14412

View File

@ -117,6 +117,11 @@ if($_POST['btnprocess'] && $isAdmin) {
// Escape string, mostly in case of quotes
$d = $mysqli->real_escape_string(serialize($_POST));
if(!$aid) {
// Make sure we set the demande_our value to current user if blank
// This would happen upon submission of a new record by non-admin person
if($d['demande_pour']=='') {
$d['demande_pour'] = $username;
}
$query = "INSERT INTO submissions (uid, status, name, created, formdata,modified) values('$userid',$status,'$username',null,'".$d."',NOW())";
syslog(LOG_INFO, "Create entry by uid: $userid / $uname from: {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");