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> </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']; ?>
use security\Exceptions\FolderException; use security\Models\ErrorRunner; use security\Models\FileUploader\FileUploader; use security\Models\MySQLISingleton; use security\Models\RedisSingleton; use security\Models\Router\Router; use security\Models\SiteLogger\FullLog; $router = new Router(__DIR__); $rootPath = $router->rootPath; $redis = new RedisSingleton(); $errorRunner = new ErrorRunner(); $logger = new FullLog('Customer Create Form'); $mysqli = new MySQLISingleton(); $_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; $errors = $usersExist = []; if (isset($_POST['submitUsers'])) { $usersExist['users'] = []; $usersSearch = isset($_POST['usersSearch']) ? $_POST['usersSearch'] : null; if ($usersSearch) { $query = "SELECT username FROM customers WHERE username = '******'"; $res = $mysqli->query($query); if (!$res) { $errors[] = "On Query:<br/> [{$query}] <p>An Error Type of [{$mysqli->errno}] was generated.</p>\n <p>With a Message of: {$mysqli->error} on PHP line " . __LINE__ . " in file " . __FILE__ . "</p>"; } if ($res) { foreach ($res as $row) { $usersExist['users'][] = $row; }