$dirPath = BASE_DIR . $folder . '_1';
$name = explode('.', $file);
$extension = pathinfo($file, PATHINFO_EXTENSION);
$fileoriginal = BASE_DIR . $folder . $slash . $file;
$fileversion = $dirPath . $slash . $name[0] . '_1.' . $extension;
$olddata = array();
$data = file($fileversion);
foreach ($data as $number => $line) {
    array_push($olddata, $line);
}
$modified = array();
$newdata = array();
$data = file($fileoriginal);
foreach ($data as $number => $line) {
    array_push($newdata, " " . $line);
    if (!inside_array($line, $olddata, $number)) {
        array_push($modified, $line);
    }
}
for ($i = 0; $i < count($modified); $i++) {
    if (strchr($modified[$i], '=')) {
        parse($modified[$i], $i);
    }
}
for ($i = 0; $i < count($newdata); $i++) {
    if (strchr($newdata[$i], '=')) {
        parsenewdata($newdata[$i], $i);
    }
}
for ($i = 0; $i < count($assignment); $i++) {
    if (array_key_exists($assignment[$i], $weight)) {
$extension = pathinfo($file, PATHINFO_EXTENSION);
$fileoriginal = BASE_DIR . $folder . $slash . $file;
$fileversion = $dirPath . $slash . $name[0] . '_1.' . $extension;
// echo "<h1 class='page-header'>Dashboard</h1>
// 	<label>Filename : <i>".$file."</i></label><br>";
if (!file_exists($fileversion)) {
    die('Sorry we do not have any previous versions of the specified files to compare with.');
}
$olddata = array();
$data = file($fileversion);
foreach ($data as $number => $line) {
    array_push($olddata, str_replace('<', '&lt;', $line));
}
$modified = array();
$data = file($fileoriginal);
foreach ($data as $number => $line) {
    if (!inside_array(str_replace('<', '&lt;', $line), $olddata, $number)) {
        array_push($modified, str_replace('<', '&lt;', $line));
    }
}
echo "<code>";
if (count($modified) == 0) {
    die('No modifications since last build');
}
for ($i = 0; $i < count($modified); $i++) {
    echo $modifiedflag[$i] . ": " . $modified[$i] . "<br>";
    if (strchr($modified[$i], '=')) {
        parse($modified[$i]);
    }
}
echo "</code>";