} if(!move_uploaded_file($_FILES['Filedata']['tmp_name'], CC_FB_UPLOADS_DIRECTORY . "/$basename". CC_FB_UPLOADS_EXTENSION . "$i$extension")) { printMessage('File Upload Failed', "We're sorry but we were unable to upload your file. Please " . 'contact your server administrator.'); } chmod(CC_FB_UPLOADS_DIRECTORY . "/$basename$i$extension", 0777); } /** * Prints a message to the screen. * * Prints an HTML-formatted message to the screen that also contains * the current PHP version number the server is running, the current * version number and release date of this script as well as the * current version number and release date of the version of CoffeeCup * Flash Form Builder that generated this script. * * NOTE: This function stops execution of the script. * * @param string $title the title of the page * @param string $message the message to print to the screen */ function printMessage($title = null, $message = null) { // If the user has provided a title, format it for HTML if($title !== null) { $title = htmlentities($title, ENT_QUOTES); $page_title = "$title - "; $title = "

$title

"; } // If the user has provided a message, formit it for HTML if($message !== null) { $message = '

' . htmlentities($message, ENT_QUOTES) . '

'; } die( << {$page_title}CoffeeCup Form Builder $title $message

PHP Version: EOHTML . PHP_VERSION . '

Sendmail Path: ' . ini_get('sendmail_path') . '
Sendmail From: ' . ini_get('sendmail_from') . '
SMTP: ' . ini_get('SMTP') . '
SMTP Port: ' . ini_get('smtp_port') . '

MySQL: ' . (extension_loaded('mysql') ? 'Installed' : 'Not Installed') . '

File Uploads: ' . (ini_get('file_uploads') ? 'On' : 'Off') . '
File Uploads Max Size: ' . ini_get('upload_max_filesize') . '
Post Max Size: ' . ini_get('post_max_size') . '

Software Version: ' . CC_FB_VERSION . '
Software Last Updated: ' . CC_FB_LAST_UPDATED . '

Script Version: ' . CC_FB_SCRIPT_VERSION . '
Script Last Updated: ' . CC_FB_SCRIPT_LAST_UPDATED . '

' . << EOHTML ); }