Server Configuration Issue: could not create directory : $dirname"; exit_wrapper(); } $docfile = $pathname.$fname; $tempname = UPLOAD_DIR.$fullfilename; //d("Attempting to move $tempname to $docfile"); if(file_exists($tempname)) { if (!copy($tempname, $docfile)) { echo "
Server Configuration Issue: Could not write the file to the directory: $dirname$fname"; exit_wrapper(); } } else { echo "
The file $fname no longer exists in the uploaded directory."; exit_wrapper(); } if(file_exists($docfile)) unlink($tempname); else { echo "
Server Configuration Issue: Could not write file $fname to directory $dirname"; exit_wrapper(); } $sql = "insert into tbldesktoplog ( desktoplogfullfilename, desktoploguserfilename, desktoplogtimestamp, documentid) values ( '".db_col($fullfilename)."', '".db_col($fname)."', now(), $maxdocid)"; db_exec($sql,1); //The following code was added to try and reduce sql time and the possiblity of update_documents_uploaded causing duplicate keys //because it can be ran for desktop for the whole company and in property_viewedit for property in the same company at the same time. MAC if($_POST['submittype']['propertydocument'] && db_number($_POST['propertyid'])) update_documents_uploaded_property($_POST['propertyid']); else update_documents_uploaded(); return; }