New Event Pick Place Pick Chair
Edit Event
   
DeleteEventItem is not yet supported
\n"; } if ($Action == 'EventEdit') { // Form Submission check FILES and then EventFormFields TraceProgram(__FILE__, __FUNCTION__, __LINE__, ""); $success = ReadTableData($EventPath, $EventFormFields, $evData); TraceProgram(__FILE__, __FUNCTION__, __LINE__, "ReadTableData: $success"); TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($evData, true)); foreach ($CleanFiles as $fileKey => $fileInfo) { TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileKey, true)); TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Check ". print_r($fileInfo, true)); if (in_array($fileInfo['type'], array_keys($allowedTypes))) { $basename = basename($fileInfo['name']); $filename = $fileKey . $allowedTypes[$fileInfo['type']]; if ($EventFormFields[$fileKey]['FieldType'] == 'pix') { $targetFile = $EventPath . '/' . $filename; $un = $EventPath . '/' . $fileKey . ".*"; TraceProgram(__FILE__, __FUNCTION__, __LINE__, "unlink $un"); deleteFilesWithWildcard($EventPath, $fileKey . ".*"); TraceProgram(__FILE__, __FUNCTION__, __LINE__, "target $targetFile"); if (!is_uploaded_file($fileInfo['tmp_name']) || !@copy($fileInfo['tmp_name'], $targetFile)) { $err = error_get_last(); TraceProgram(__FILE__, __FUNCTION__, __LINE__, $err); } else { $FormData[$fileKey] = $filename; $formSubmission = true; } @unlink($fileInfo['tmp_name']); } else { TraceProgram(__FILE__, __FUNCTION__, __LINE__, "$basename not legitimate for a pix upload"); } } else { TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Nothing to upload"); } } TraceProgram(__FILE__, __FUNCTION__, __LINE__, print_r($CleanRequestData, true)); foreach ($CleanRequestData as $key => $value) { //TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Request[$key] = '$value'"); if (isset($EventFormFields[$key])) { TraceProgram(__FILE__, __FUNCTION__, __LINE__, "Request[$key] = '$value'"); $FormData[$key] = $value; $formSubmission = true; } } } if ($formSubmission && $ProgramDate != '') { TraceProgram(__FILE__, __FUNCTION__, __LINE__, ""); SaveTableData($EventPath, $EventFormFields, $FormData); MoveFiles($UploadPath, $EventPath); } $success = ReadTableData($EventPath, $EventFormFields, $FormData); TraceProgram(__FILE__, __FUNCTION__, __LINE__, "ReadTableData: " . ($success) ? 'success' : 'fail'); EmitHTMLStart("Event Editor"); EmitBodyStart(); EmitPageHeader("Event Editor"); ?>