Ejemplo n.º 1
0
    }
    if (DENORM_TABLES) {
        $conn->query("TRUNCATE TABLE NX_COURSE");
    } else {
        $conn->query("TRUNCATE TABLE SECTION");
    }
    $conn->query("TRUNCATE TABLE TIMESLOT");
    echo "Extracting new data for {$disp_semester}..{$lineEnd}";
    if (!IS_CLI) {
        echo "<a href='" . SOURCE_URL . "'>";
    }
    echo SOURCE_URL;
    if (!IS_CLI) {
        echo "</a>";
    }
    echo "..{$lineEnd}";
    echo "last update: {$last_update}{$lineEnd}{$lineEnd}";
    $hashes = dumpCourseInfo();
    $schedule_hash = md5(implode("/", $hashes));
} catch (Exception $e) {
    echo "Exception: {$e}";
}
//$doc = readPage("http://www.njit.edu/registrar/schedules/courses/fall/index_list.html");
//echo $doc->saveHTML();
//dumpCourseInfo_new();
if (!IS_CLI) {
    ?>
</body>
</html>
<?php 
}
Ejemplo n.º 2
0
    $conn->query("UPDATE TERMINFO SET updating = TRUE, incomplete = TRUE WHERE active = TRUE");
    if (SCRAPE_COURSES) {
        $conn->query("TRUNCATE TABLE COURSE");
    }
    if (DENORM_TABLES) {
        $conn->query("TRUNCATE TABLE NX_COURSE");
    } else {
        $conn->query("TRUNCATE TABLE SECTION");
    }
    $conn->query("TRUNCATE TABLE TIMESLOT");
    echo "Extracting new data for {$row['1']}..{$lineEnd}";
    if (!IS_CLI) {
        echo "<a href='" . SOURCE_URL . "'>";
    }
    echo SOURCE_URL;
    if (!IS_CLI) {
        echo "</a>";
    }
    echo "..{$lineEnd}";
    echo "last update: {$last_update}{$lineEnd}{$lineEnd}";
    dumpCourseInfo();
} catch (Exception $e) {
    echo "Exception: {$e}";
}
//$doc = readPage("http://www.njit.edu/registrar/schedules/courses/fall/index_list.html");
//echo $doc->saveHTML();
//dumpCourseInfo_new();
?>
</body>
</html>