if (!file_exists(dirname($file))) {
mkdir(dirname($file),0700,true);
}
+
// Remove all the password from logs...
$p = empty($_POST) ? array() : $_POST;
foreach(array('passwd', 'password', 'passwd2', 'password2') as $rm) {
$p['passwd'] = '******';
}
}
-
+ $i=0;
+ $files = array();
+ foreach ($_FILES as $k=>$f){
+ if (empty($f['tmp_name']) || !file_exists($f['tmp_name'])) {
+ continue;
+ }
+ $i++;
+ $files[$k] = $f;
+ $files[$k]['tmp_name'] = $this->id . '.file_'. $i.'.jpg';
+ $nf = $ff->Pman['event_log_dir']. '/'. $this->id . ".file_$i.jpg";
+ if (!copy($f['tmp_name'], $nf)) {
+ print_r("failed to copy {$f['tmp_name']}...\n");
+ }
+ }
+
file_put_contents($file, json_encode(array(
'REQUEST_URI' => empty($_SERVER['REQUEST_URI']) ? 'cli' : $_SERVER['REQUEST_URI'],
'GET' => empty($_GET) ? array() : $_GET,
'POST' =>$p,
+ 'FILES' => $files,
)));
+
}