3 and (is_dir($dir . '/' . $value) == false)) {
$output .= 'Filename: ' . $value . '
';
$filecontent = file_get_contents($dir . '/' . $value);
$listcontent = str_replace(array(
"\r",
"\n"
), '
', $filecontent); //tring to replace end of lines with brs for html
$output .= 'FILE CONTENT
';
$r = 1;
//processing each line of the file into a new row in wpg_files table
if (isset($_POST['InsertFileContent'])) {
$lines = new SplFileObject($dir . '/' . $value);
//and then execute a sql query here
$table = 'wpg_files';
foreach ($lines as $newconcert) {
$output .= '