Ejemplo n.º 1
0
function main()
{
    global $SIDU;
    $conn = $SIDU['conn'][$SIDU[0]];
    $link = @explode(',', $_GET['id']);
    echo "<form id='dataTab' name='dataTab' action='db.php?id={$SIDU['0']},{$SIDU['1']},{$SIDU['2']},{$SIDU['3']},{$SIDU['4']},{$SIDU['5']},{$SIDU['6']}' method='post'><input type='hidden' id='objcmd' name='objcmd'/>";
    @tab_tool();
    //these 4 can be merged
    if ($link[3] == 'r') {
        @main_tab($SIDU, $link, $conn);
    } elseif ($link[3] == 'v') {
        @main_view($SIDU, $link, $conn);
    } elseif ($link[3] == 'S' && $conn[1] == 'pg') {
        @main_seq($SIDU, $link, $conn);
    } elseif ($link[3] == 'f' && $conn[1] == 'pg') {
        @main_func($SIDU, $link, $conn);
    } else {
        @main_db($SIDU, $link, $conn);
    }
    echo "</form><div id='DBseek' class='blobDiv' style='display:none'><div class='box'>\n", @html_img("img/tool-close.gif", "Close - Fn+F", "class='right' onclick=\"showHide('DBseek')\""), "\n<b>", @lang(1414), ":</b><br/>search table name, column name, comment, oid\n<br/>Search func name, def, comment, oid<br/>-- available in next release</div></div>";
}
Ejemplo n.º 2
0
							}
</style>
<?php 
use App\Department;
use App\Schedule;
use App\Time_table;
if (isset($_GET['depart'])) {
    $department = Department::where('code', $_GET['depart'])->first();
    $weekdays = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday');
    $scheduledata = Schedule::where('department_code', $department->code);
    if ($scheduledata->exists()) {
        echo "<h1>Department: " . $department->code . "</h1><br>";
    }
    foreach ($weekdays as $a) {
        //echo "<h2>Routine for: ".strtoupper($a)."</h2><br>";
        main_func($a, $department);
    }
    echo "<br><br>";
} else {
    echo "<h1> Hello " . $username . "  </h1>";
    $totalschedules = count(Schedule::all());
    $totaltimetables = count(Time_table::all());
    if ($totalschedules > 0 && $totaltimetables != $totalschedules) {
        echo "<p> You have <strong><nu>new update(s)</nu></strong>. The following are departments that have been recently updated: </p><br>";
        $departs = Department::orderby('code')->get();
        foreach ($departs as $depart) {
            $schedulecount = count(Schedule::where('department_code', $depart->code)->get());
            if ($schedulecount > 0) {
                $timetablecount = count(Time_table::where('department_code', $depart->code)->get());
                if ($schedulecount != $timetablecount) {
                    ?>