style='resize:vertical;'/></textarea>
                    </div>
                </div>
                <input type="hidden" id='MAX_FILE_SIZE' name="MAX_FILE_SIZE" value="<?php 
echo $max;
?>
">
                <div class='col-sm-10 col-sm-offset-2 bg-info' id='fileUploadMessages'>
                    <h3>Special Upload Instructions:</h3>
                    <p>If you have a long list of instructions you need to upload, you can do so here.</p>
                    <p>Up to <?php 
echo $_SESSION['maxfiles'];
?>
 files can be uploaded simultaneously.</p>
                    <p>Each file should be no more than <?php 
echo FileUploader::convertFromBytes($max);
?>
.</p>
                    <p>Combined total should not exceed <?php 
echo $_SESSION['displaymax'];
?>
.</p>
                    <p>&nbsp;</p>
                </div>
                <div class="form-group">
                    <label for="filename" class="col-sm-2 control-label">Select Files:</label>
                    <span class='file-input btn btn-default btn-file' style='margin-top:1rem;margin-left:1rem;'>
                        <input type="file" class='' name="filename[]" id="filename" multiple
                        data-maxfiles="<?php 
echo $_SESSION['maxfiles'];
?>
    $logger->serverData();
    // increment the blacklister by one.
    $logger->addWarning("Someone is repeatedly visiting the create new customer account, this is their {$_SESSION['visits']}.  Potential abuse.");
    $blacklist->blackList();
}
if ($blacklist->isBlackListed()) {
    // Again, this is an incredibly weak protection.
    $logger->addError("This IP has been flagged as abusive.");
    foreach ($blacklist->IP as $badIP) {
        $logger->addError("badIP at {$badIP}");
    }
    die("This account has been flagged as abusive.");
}
$_SESSION['maxfiles'] = ini_get('max_file_uploads');
$_SESSION['postmax'] = FileUploader::convertToBytes(ini_get('post_max_size'));
$_SESSION['displaymax'] = FileUploader::convertFromBytes($_SESSION['postmax']);
$max = 200 * 1024;
$username = $email = $address = $phone = $city = $state = $countrycode = $zip = $instructions = $hasPassword = null;
$errorList = '';
if (!empty($error)) {
    $errorList .= "<div id='inlineErrorHolder' class='alert alert-danger'\n            role='alert'><div id='inlineErrorContent'>{$error}</div></div>";
}
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . "partials/customers/createNewCustomerMain.php";
require_once dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . "partials/footer.php";
?>
<script type="text/javascript" src="<?php 
echo $jsPath;
?>
customerCreate.js"></script>
</body>
</html>
        if (strlen($sanitizedEmail) !== strlen($email)) {
            $errors[] = "Email appears suspicious.";
        }
        $mailLog = dirname(dirname(dirname(__DIR__))) . '/logs/mail.log';
        if (!file_exists($mailLog)) {
            touch($mailLog);
        }
        $send = mail($to, $subject, $message, $headers);
        if (!$send) {
            $errors[] = "Unable to send message.";
        }
    }
    if (isset($_FILES) && !empty($_FILES['filename'])) {
        $destination = dirname(dirname(__DIR__)) . '/uploads/';
        try {
            $upload = new FileUploader($destination);
            $upload->setMaxSize($max);
            $upload->allowAllTypes();
            $upload->setNotTrusted();
            $upload->upload();
            $results = $upload->getMessages();
        } catch (FolderException $e) {
            $errors[] = $e->getMessage();
        }
    }
    $fileError = error_get_last();
    if (!empty($fileError)) {
        $errors[] = $error['message'];
    }
}
$errorList = $userList = $resultList = '';
 public function setUploads()
 {
     $destination = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'public/uploads/';
     try {
         $upload = new FileUploader($destination, $this->customerData['files']);
         $upload->setMaxSize($this->customerData['MAX_FILE_SIZE']);
         $upload->upload();
         $result = $upload->getMessages();
         $result = implode($result);
         $this->logger->addInfo($result);
         $this->data['r'] = ['uploadResults' => $result];
     } catch (FolderException $e) {
         $this->errors[] = $e->getMessage();
     }
     $error = error_get_last();
     if (!empty($error)) {
         $this->errors['type'] = $error['type'];
         $this->errors['message'] = $error['message'];
         $this->errors['file'] = $error['file'];
         $this->errors['line'] = $error['line'];
     }
     if (!empty($this->errors)) {
         $this->errorRunner->runErrors($this->errors);
     }
 }