<?php require "navigation.php"; $p = tryget("p", 1); $rs = new RecordSet($conn); $query_str = "SELECT course_id, name, teacher, description FROM courses WHERE avail = 1 "; $count_str = "SELECT count(*) FROM courses WHERE avail = 1"; $rs->nPageSize = 20; $rs->PageCount($count_str); $rs->SetPage($p); $query_str .= "ORDER BY course_id DESC"; $rs->dpQuery($query_str); $now = time(); ?> <h1><?php echo _("Current Courses"); ?> </h1> <table class="ui-widget tblcontainer ui-widget-content ui-corner-all" width="100%"> <thead > <tr class="ui-widget-header"> <th width="100"><?php echo _("ID"); ?> </th> <th width="300"><?php echo _("Name"); ?> </th> <th width="300"><?php echo _("Teacher");
function RejudgeAll(&$arg) { $pid = $arg['pid']; // if ($cid == 0 || $pid == 0) break; unset($arg['act']); global $conn; $rs = new RecordSet($conn); $rs->nPageSize = 10000; $rs->SetPage(0); $rs->dpQuery("SELECT sid, uid, pid, status FROM status WHERE pid='{$pid}' ORDER BY sid"); while ($rs->MoveNext()) { echo $rs->Fields["sid"] . "\t" . $rs->Fields["pid"] . "\n"; $queue = new QueueTbl(); $queue->detail["sid"] = $rs->Fields["sid"]; $queue->Add(); } }