Code:
if (MAX_ALLOWED_FILE_SIZE >= $picfile_size)
{
if (in_array($picfile_type, $allowed_types))
{
if (is_uploaded_file($_FILES['picfile']['tmp_name']))
{

if (file_exists(DEST_PATH . $picfile_name))
{
$unique_id = time();
$picfile_name = $unique_id . '_' . $picfile_name;
}