186 |
$lu_sql = "SELECT libunit_id FROM libunit |
$lu_sql = "SELECT libunit_id FROM libunit |
187 |
WHERE head_staff_id = " |
WHERE head_staff_id = " |
188 |
. $sess_staff_id; |
. $sess_staff_id; |
189 |
$lu_rs = mysql_query($lu_sql, $con); |
$lu_rs = xx_query($lu_sql, $con); |
190 |
|
|
191 |
$lu_string = "ls.libunit_id IN ("; |
$lu_string = "ls.libunit_id IN ("; |
192 |
$first_element = 0; |
$first_element = 0; |
193 |
|
|
194 |
// Concatenate the IN clause |
// Concatenate the IN clause |
195 |
while ($lu_row = mysql_fetch_array ($lu_rs)) { |
while ($lu_row = xx_fetch_array ($lu_rs)) { |
196 |
$libunit_id = $lu_row["libunit_id"]; |
$libunit_id = $lu_row["libunit_id"]; |
197 |
//printf("libunit id was: %d<BR><BR>", $libunit_id); |
//printf("libunit id was: %d<BR><BR>", $libunit_id); |
198 |
|
|
239 |
// Run the authorized page query if not DBA level |
// Run the authorized page query if not DBA level |
240 |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
241 |
|
|
242 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
243 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
244 |
|
|
245 |
// Collect the access information |
// Collect the access information |
246 |
$auth_page = $row["auth_page"]; |
$auth_page = $row["auth_page"]; |
313 |
. $sess_staff_account |
. $sess_staff_account |
314 |
. "'"; |
. "'"; |
315 |
|
|
316 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
317 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
318 |
|
|
319 |
// Collect the access information |
// Collect the access information |
320 |
$auth_resource = $row["auth_resource"]; |
$auth_resource = $row["auth_resource"]; |
408 |
. $sess_staff_account |
. $sess_staff_account |
409 |
. "'"; |
. "'"; |
410 |
|
|
411 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
412 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
413 |
|
|
414 |
// Collect the access information |
// Collect the access information |
415 |
$auth_resource = $row["auth_resource"]; |
$auth_resource = $row["auth_resource"]; |
524 |
$lu_sql = "SELECT libunit_id FROM libunit |
$lu_sql = "SELECT libunit_id FROM libunit |
525 |
WHERE head_staff_id = " |
WHERE head_staff_id = " |
526 |
. $sess_staff_id; |
. $sess_staff_id; |
527 |
$lu_rs = mysql_query($lu_sql, $con); |
$lu_rs = xx_query($lu_sql, $con); |
528 |
|
|
529 |
$lu_string = "ls.libunit_id IN ("; |
$lu_string = "ls.libunit_id IN ("; |
530 |
$first_element = 0; |
$first_element = 0; |
531 |
|
|
532 |
// Concatenate the IN clause |
// Concatenate the IN clause |
533 |
while ($lu_row = mysql_fetch_array ($lu_rs)) { |
while ($lu_row = xx_fetch_array ($lu_rs)) { |
534 |
$libunit_id = $lu_row["libunit_id"]; |
$libunit_id = $lu_row["libunit_id"]; |
535 |
//printf("libunit id was: %d<BR><BR>", $libunit_id); |
//printf("libunit id was: %d<BR><BR>", $libunit_id); |
536 |
|
|
579 |
// Run the authorized subject query if not DBA level |
// Run the authorized subject query if not DBA level |
580 |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
581 |
|
|
582 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
583 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
584 |
|
|
585 |
// Collect the access information |
// Collect the access information |
586 |
$auth_subject = $row["auth_subject"]; |
$auth_subject = $row["auth_subject"]; |
612 |
a comma-separated list of results. |
a comma-separated list of results. |
613 |
**********************************************************/ |
**********************************************************/ |
614 |
function commaList($con, $displayField, $sql){ |
function commaList($con, $displayField, $sql){ |
615 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
616 |
|
|
617 |
$first = 1; |
$first = 1; |
618 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
619 |
$result = $row[$displayField]; |
$result = $row[$displayField]; |
620 |
if ($first == 1) { |
if ($first == 1) { |
621 |
$first = 0; |
$first = 0; |
665 |
// Order the display |
// Order the display |
666 |
$sql .= " ORDER BY " . $field_display; |
$sql .= " ORDER BY " . $field_display; |
667 |
|
|
668 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
669 |
|
|
670 |
printf("<td><b>Description</b></td>"); |
printf("<td><b>Description</b></td>"); |
671 |
printf("<td><b>Key</b></td></tr>"); |
printf("<td><b>Key</b></td></tr>"); |
672 |
|
|
673 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
674 |
$field_display_item = $row[$field_display]; |
$field_display_item = $row[$field_display]; |
675 |
$field_value_item = $row[$field_value]; |
$field_value_item = $row[$field_value]; |
676 |
printf("<tr><td>" |
printf("<tr><td>" |
705 |
. $subject_id |
. $subject_id |
706 |
. " AND sp.page_id = p.page_id ORDER BY p.page_title"; |
. " AND sp.page_id = p.page_id ORDER BY p.page_title"; |
707 |
|
|
708 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
709 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
710 |
$page_id = $row["page_id"]; |
$page_id = $row["page_id"]; |
711 |
$page_title = $row["page_title"]; |
$page_title = $row["page_title"]; |
712 |
|
|
742 |
$sql = "SELECT * from staff " . $omit . |
$sql = "SELECT * from staff " . $omit . |
743 |
" ORDER BY last_name, first_name"; |
" ORDER BY last_name, first_name"; |
744 |
|
|
745 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
746 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
747 |
$last_name = $row["last_name"]; |
$last_name = $row["last_name"]; |
748 |
$first_name = $row["first_name"]; |
$first_name = $row["first_name"]; |
749 |
$staff_id = $row["staff_id"]; |
$staff_id = $row["staff_id"]; |
841 |
$lu_sql = "SELECT libunit_id FROM libunit |
$lu_sql = "SELECT libunit_id FROM libunit |
842 |
WHERE head_staff_id = " |
WHERE head_staff_id = " |
843 |
. $sess_staff_id; |
. $sess_staff_id; |
844 |
$lu_rs = mysql_query($lu_sql, $con); |
$lu_rs = xx_query($lu_sql, $con); |
845 |
|
|
846 |
$lu_string = "ls.libunit_id IN ("; |
$lu_string = "ls.libunit_id IN ("; |
847 |
$first_element = 0; |
$first_element = 0; |
848 |
|
|
849 |
// Concatenate the IN clause |
// Concatenate the IN clause |
850 |
while ($lu_row = mysql_fetch_array ($lu_rs)) { |
while ($lu_row = xx_fetch_array ($lu_rs)) { |
851 |
$libunit_id = $lu_row["libunit_id"]; |
$libunit_id = $lu_row["libunit_id"]; |
852 |
|
|
853 |
if ($first_element == 0) { |
if ($first_element == 0) { |
894 |
// Run the authorized page query if not DBA level |
// Run the authorized page query if not DBA level |
895 |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
896 |
|
|
897 |
$page_rs = mysql_query($page_sql, $con); |
$page_rs = xx_query($page_sql, $con); |
898 |
|
|
899 |
while ($page_row = mysql_fetch_array ($page_rs)) { |
while ($page_row = xx_fetch_array ($page_rs)) { |
900 |
|
|
901 |
// Collect the page information |
// Collect the page information |
902 |
$page_id = $page_row["page_id"]; |
$page_id = $page_row["page_id"]; |
991 |
$lu_sql = "SELECT libunit_id FROM libunit |
$lu_sql = "SELECT libunit_id FROM libunit |
992 |
WHERE head_staff_id = " |
WHERE head_staff_id = " |
993 |
. $sess_staff_id; |
. $sess_staff_id; |
994 |
$lu_rs = mysql_query($lu_sql, $con); |
$lu_rs = xx_query($lu_sql, $con); |
995 |
|
|
996 |
$lu_string = "ls.libunit_id IN ("; |
$lu_string = "ls.libunit_id IN ("; |
997 |
$first_element = 0; |
$first_element = 0; |
998 |
|
|
999 |
// Concatenate the IN clause |
// Concatenate the IN clause |
1000 |
while ($lu_row = mysql_fetch_array ($lu_rs)) { |
while ($lu_row = xx_fetch_array ($lu_rs)) { |
1001 |
$libunit_id = $lu_row["libunit_id"]; |
$libunit_id = $lu_row["libunit_id"]; |
1002 |
printf("libunit id was: %d<BR><BR>", $libunit_id); |
printf("libunit id was: %d<BR><BR>", $libunit_id); |
1003 |
|
|
1044 |
// Run the authorized page query if not DBA level |
// Run the authorized page query if not DBA level |
1045 |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
1046 |
|
|
1047 |
$page_rs = mysql_query($page_sql, $con); |
$page_rs = xx_query($page_sql, $con); |
1048 |
|
|
1049 |
while ($page_row = mysql_fetch_array ($page_rs)) { |
while ($page_row = xx_fetch_array ($page_rs)) { |
1050 |
|
|
1051 |
// Collect the page information |
// Collect the page information |
1052 |
$page_id = $page_row["page_id"]; |
$page_id = $page_row["page_id"]; |
1127 |
$lu_sql = "SELECT libunit_id FROM libunit |
$lu_sql = "SELECT libunit_id FROM libunit |
1128 |
WHERE head_staff_id = " |
WHERE head_staff_id = " |
1129 |
. $sess_staff_id; |
. $sess_staff_id; |
1130 |
$lu_rs = mysql_query($lu_sql, $con); |
$lu_rs = xx_query($lu_sql, $con); |
1131 |
|
|
1132 |
$lu_string = "ls.libunit_id IN ("; |
$lu_string = "ls.libunit_id IN ("; |
1133 |
$first_element = 0; |
$first_element = 0; |
1134 |
|
|
1135 |
// Concatenate the IN clause |
// Concatenate the IN clause |
1136 |
while ($lu_row = mysql_fetch_array ($lu_rs)) { |
while ($lu_row = xx_fetch_array ($lu_rs)) { |
1137 |
$libunit_id = $lu_row["libunit_id"]; |
$libunit_id = $lu_row["libunit_id"]; |
1138 |
printf("libunit id was: %d<BR><BR>", $libunit_id); |
printf("libunit id was: %d<BR><BR>", $libunit_id); |
1139 |
|
|
1178 |
// Run the authorized page query if not DBA level |
// Run the authorized page query if not DBA level |
1179 |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
if ($sess_access_level >= 20 && $sess_access_level < 1000) { |
1180 |
|
|
1181 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1182 |
|
|
1183 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1184 |
|
|
1185 |
// Collect the page information |
// Collect the page information |
1186 |
$subject_id = $row["subject_id"]; |
$subject_id = $row["subject_id"]; |
1219 |
FROM course |
FROM course |
1220 |
ORDER BY course_concat"; |
ORDER BY course_concat"; |
1221 |
|
|
1222 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1223 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1224 |
$page_id = $row["page_id"]; |
$page_id = $row["page_id"]; |
1225 |
$course_concat = $row["course_concat"]; |
$course_concat = $row["course_concat"]; |
1226 |
|
|
1256 |
. " ORDER BY coursesub_descr"; |
. " ORDER BY coursesub_descr"; |
1257 |
|
|
1258 |
// Fetch the values |
// Fetch the values |
1259 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1260 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1261 |
$coursesub = $row["coursesub"]; |
$coursesub = $row["coursesub"]; |
1262 |
$coursesub_id = $row["coursesub_id"]; |
$coursesub_id = $row["coursesub_id"]; |
1263 |
$coursesub_descr = $row["coursesub_descr"]; |
$coursesub_descr = $row["coursesub_descr"]; |
1303 |
$sql .= " ORDER BY coursesub_descr"; |
$sql .= " ORDER BY coursesub_descr"; |
1304 |
|
|
1305 |
// Fetch the values |
// Fetch the values |
1306 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1307 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1308 |
$coursesub = $row["coursesub"]; |
$coursesub = $row["coursesub"]; |
1309 |
$coursesub_id = $row["coursesub_id"]; |
$coursesub_id = $row["coursesub_id"]; |
1310 |
$coursesub_descr = $row["coursesub_descr"]; |
$coursesub_descr = $row["coursesub_descr"]; |
1343 |
FROM faculty |
FROM faculty |
1344 |
ORDER BY faculty_lastname, faculty_firstname, faculty_account"; |
ORDER BY faculty_lastname, faculty_firstname, faculty_account"; |
1345 |
|
|
1346 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1347 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1348 |
$faculty_id = $row["faculty_id"]; |
$faculty_id = $row["faculty_id"]; |
1349 |
$faculty_lastname = $row["faculty_lastname"]; |
$faculty_lastname = $row["faculty_lastname"]; |
1350 |
$faculty_firstname = $row["faculty_firstname"]; |
$faculty_firstname = $row["faculty_firstname"]; |
1384 |
. $omit |
. $omit |
1385 |
. " ORDER BY faculty_lastname, faculty_firstname"; |
. " ORDER BY faculty_lastname, faculty_firstname"; |
1386 |
|
|
1387 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1388 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1389 |
$faculty_id = $row["faculty_id"]; |
$faculty_id = $row["faculty_id"]; |
1390 |
$faculty_lastname = $row["faculty_lastname"]; |
$faculty_lastname = $row["faculty_lastname"]; |
1391 |
$faculty_firstname = $row["faculty_firstname"]; |
$faculty_firstname = $row["faculty_firstname"]; |
1426 |
. $limit |
. $limit |
1427 |
. " ORDER BY faculty_lastname, faculty_firstname"; |
. " ORDER BY faculty_lastname, faculty_firstname"; |
1428 |
|
|
1429 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1430 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1431 |
$faculty_id = $row["faculty_id"]; |
$faculty_id = $row["faculty_id"]; |
1432 |
$faculty_lastname = $row["faculty_lastname"]; |
$faculty_lastname = $row["faculty_lastname"]; |
1433 |
$faculty_firstname = $row["faculty_firstname"]; |
$faculty_firstname = $row["faculty_firstname"]; |
1477 |
. " ORDER BY " |
. " ORDER BY " |
1478 |
. $field_display; |
. $field_display; |
1479 |
|
|
1480 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1481 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1482 |
$field_display_item = $row[$field_display]; |
$field_display_item = $row[$field_display]; |
1483 |
if (strlen($field_display_item) > 40) $field_display_item = substr($field_display_item, 0, 39) . "..."; |
if (strlen($field_display_item) > 40) $field_display_item = substr($field_display_item, 0, 39) . "..."; |
1484 |
$field_value_item = $row[$field_value]; |
$field_value_item = $row[$field_value]; |
1523 |
. $where |
. $where |
1524 |
. " ORDER BY " |
. " ORDER BY " |
1525 |
. $field_display; |
. $field_display; |
1526 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1527 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1528 |
$field_display_item = $row[$field_display]; |
$field_display_item = $row[$field_display]; |
1529 |
if (strlen($field_display_item) > 40) $field_display_item = substr($field_display_item, 0, 39) . "..."; |
if (strlen($field_display_item) > 40) $field_display_item = substr($field_display_item, 0, 39) . "..."; |
1530 |
$field_value_item = $row[$field_value]; |
$field_value_item = $row[$field_value]; |
1575 |
// Debugging |
// Debugging |
1576 |
//printf("sql was: %s<BR>", $sql); |
//printf("sql was: %s<BR>", $sql); |
1577 |
|
|
1578 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1579 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1580 |
$field_display_item = $row[$field_display]; |
$field_display_item = $row[$field_display]; |
1581 |
$field_value_item = $row[$field_value]; |
$field_value_item = $row[$field_value]; |
1582 |
if (strlen($field_display_item) > 50) $field_display_item = substr($field_display_item, 0, 49) . "..."; |
if (strlen($field_display_item) > 50) $field_display_item = substr($field_display_item, 0, 49) . "..."; |
1625 |
// Build the string. Start with the "(N/A)" and the "(ALL)" master subjects. |
// Build the string. Start with the "(N/A)" and the "(ALL)" master subjects. |
1626 |
$masterstring = "(1, 2 "; |
$masterstring = "(1, 2 "; |
1627 |
|
|
1628 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1629 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1630 |
$mastersubject_id = $row["mastersubject_id"]; |
$mastersubject_id = $row["mastersubject_id"]; |
1631 |
$masterstring .= ", " . $mastersubject_id; |
$masterstring .= ", " . $mastersubject_id; |
1632 |
} |
} |
1641 |
" ORDER BY mi.masterinfotype"; |
" ORDER BY mi.masterinfotype"; |
1642 |
printf("sql was: %s<br>", $sql); |
printf("sql was: %s<br>", $sql); |
1643 |
|
|
1644 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1645 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1646 |
$masterinfotype = $row["masterinfotype"]; |
$masterinfotype = $row["masterinfotype"]; |
1647 |
$infotype_id = $row["infotype_id"]; |
$infotype_id = $row["infotype_id"]; |
1648 |
$infotype = $row["infotype"]; |
$infotype = $row["infotype"]; |
1686 |
. $page_id |
. $page_id |
1687 |
. " AND s.staff_id > 1 AND ps.staff_id = s.staff_id ORDER BY last_name, first_name, staff_account"; |
. " AND s.staff_id > 1 AND ps.staff_id = s.staff_id ORDER BY last_name, first_name, staff_account"; |
1688 |
|
|
1689 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1690 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1691 |
$staff_id = $row["staff_id"]; |
$staff_id = $row["staff_id"]; |
1692 |
$last_name = $row["last_name"]; |
$last_name = $row["last_name"]; |
1693 |
$first_name = $row["first_name"]; |
$first_name = $row["first_name"]; |
1726 |
. $page_id |
. $page_id |
1727 |
. " AND s.subject_id > 1 AND ps.subject_id = s.subject_id ORDER BY s.subject"; |
. " AND s.subject_id > 1 AND ps.subject_id = s.subject_id ORDER BY s.subject"; |
1728 |
|
|
1729 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1730 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1731 |
$subject_id = $row["subject_id"]; |
$subject_id = $row["subject_id"]; |
1732 |
$subject = $row["subject"]; |
$subject = $row["subject"]; |
1733 |
|
|
1798 |
// Debugging |
// Debugging |
1799 |
// printf("sql was: %s<BR>", $sql); |
// printf("sql was: %s<BR>", $sql); |
1800 |
|
|
1801 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1802 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1803 |
$resource_id = $row["resource_id"]; |
$resource_id = $row["resource_id"]; |
1804 |
$title = $row["title"]; |
$title = $row["title"]; |
1805 |
//$author = $row["author"]; |
//$author = $row["author"]; |
1856 |
// Debugging |
// Debugging |
1857 |
// printf("sql was: %s<BR>", $sql); |
// printf("sql was: %s<BR>", $sql); |
1858 |
|
|
1859 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1860 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1861 |
$service = $row["service"]; |
$service = $row["service"]; |
1862 |
$service_id = $row["service_id"]; |
$service_id = $row["service_id"]; |
1863 |
if (strlen($service) > 50) $service = substr($service, 0, 49) . "..."; |
if (strlen($service) > 50) $service = substr($service, 0, 49) . "..."; |
1890 |
FROM staff |
FROM staff |
1891 |
ORDER BY last_name, first_name, staff_account"; |
ORDER BY last_name, first_name, staff_account"; |
1892 |
|
|
1893 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1894 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1895 |
$staff_id = $row["staff_id"]; |
$staff_id = $row["staff_id"]; |
1896 |
$last_name = $row["last_name"]; |
$last_name = $row["last_name"]; |
1897 |
$first_name = $row["first_name"]; |
$first_name = $row["first_name"]; |
1929 |
. $omit |
. $omit |
1930 |
. " ORDER BY last_name, first_name"; |
. " ORDER BY last_name, first_name"; |
1931 |
|
|
1932 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1933 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1934 |
$last_name = $row["last_name"]; |
$last_name = $row["last_name"]; |
1935 |
$first_name = $row["first_name"]; |
$first_name = $row["first_name"]; |
1936 |
$staff_id = $row["staff_id"]; |
$staff_id = $row["staff_id"]; |
1965 |
|
|
1966 |
// Build the SQL |
// Build the SQL |
1967 |
$sql = "SELECT * from staff WHERE staff_id > 1 ORDER BY last_name, first_name"; |
$sql = "SELECT * from staff WHERE staff_id > 1 ORDER BY last_name, first_name"; |
1968 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
1969 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
1970 |
$last_name = $row["last_name"]; |
$last_name = $row["last_name"]; |
1971 |
$first_name = $row["first_name"]; |
$first_name = $row["first_name"]; |
1972 |
$staff_id = $row["staff_id"]; |
$staff_id = $row["staff_id"]; |
2007 |
. "'"; |
. "'"; |
2008 |
|
|
2009 |
$faculty_id = 0; |
$faculty_id = 0; |
2010 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2011 |
|
|
2012 |
// Concatenate the NOT IN clause |
// Concatenate the NOT IN clause |
2013 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2014 |
if ($faculty_id == 0) $faculty_id = $row["faculty_id"]; |
if ($faculty_id == 0) $faculty_id = $row["faculty_id"]; |
2015 |
} |
} |
2016 |
|
|
2043 |
. " AND subject_id = " |
. " AND subject_id = " |
2044 |
. $subject_id; |
. $subject_id; |
2045 |
|
|
2046 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2047 |
$rowcount = mysql_num_rows($rs); |
$rowcount = xx_num_rows($rs); |
2048 |
if ($rowcount >= 1){ |
if ($rowcount >= 1){ |
2049 |
$rowcount = 1; |
$rowcount = 1; |
2050 |
} |
} |
2081 |
. $subject_id |
. $subject_id |
2082 |
. " AND infotype_id = 1"; |
. " AND infotype_id = 1"; |
2083 |
|
|
2084 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2085 |
$rowcount = mysql_num_rows($rs); |
$rowcount = xx_num_rows($rs); |
2086 |
if ($rowcount == 1){ |
if ($rowcount == 1){ |
2087 |
$rowcount = 1; |
$rowcount = 1; |
2088 |
} |
} |
2125 |
. "=" |
. "=" |
2126 |
. $limit_id; |
. $limit_id; |
2127 |
|
|
2128 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2129 |
$rowcount = mysql_num_rows($rs); |
$rowcount = xx_num_rows($rs); |
2130 |
if ($rowcount >= 1){ |
if ($rowcount >= 1){ |
2131 |
$rowcount = 1; |
$rowcount = 1; |
2132 |
} |
} |
2183 |
. " = " |
. " = " |
2184 |
. $static_value; |
. $static_value; |
2185 |
|
|
2186 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2187 |
|
|
2188 |
// Concatenate the NOT IN clause |
// Concatenate the NOT IN clause |
2189 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2190 |
$in_element = $row[$in_field]; |
$in_element = $row[$in_field]; |
2191 |
|
|
2192 |
if ($first_element == 0) { |
if ($first_element == 0) { |
2232 |
. $resource_id |
. $resource_id |
2233 |
. " AND rl.location_id = l.location_id ORDER BY location"; |
. " AND rl.location_id = l.location_id ORDER BY location"; |
2234 |
|
|
2235 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2236 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2237 |
$location = $row["location"]; |
$location = $row["location"]; |
2238 |
if ($first == 1) { |
if ($first == 1) { |
2239 |
$first = 0; |
$first = 0; |
2264 |
function lookupFaculty($con, $faculty_id){ |
function lookupFaculty($con, $faculty_id){ |
2265 |
$sql = "SELECT faculty_firstname, faculty_lastname FROM faculty WHERE faculty_id = " |
$sql = "SELECT faculty_firstname, faculty_lastname FROM faculty WHERE faculty_id = " |
2266 |
. $faculty_id; |
. $faculty_id; |
2267 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2268 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
2269 |
$faculty_lastname = $row["faculty_lastname"]; |
$faculty_lastname = $row["faculty_lastname"]; |
2270 |
$faculty_firstname = $row["faculty_firstname"]; |
$faculty_firstname = $row["faculty_firstname"]; |
2271 |
|
|
2310 |
. "='" |
. "='" |
2311 |
. $key_value |
. $key_value |
2312 |
. "'"; |
. "'"; |
2313 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2314 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
2315 |
if (mysql_num_rows($rs) == 1) $result = $row[$desc_field]; |
if (xx_num_rows($rs) == 1) $result = $row[$desc_field]; |
2316 |
else $result = ""; |
else $result = ""; |
2317 |
|
|
2318 |
return $result; |
return $result; |
2338 |
|
|
2339 |
$sql = "SELECT first_name, last_name FROM staff WHERE staff_id = " |
$sql = "SELECT first_name, last_name FROM staff WHERE staff_id = " |
2340 |
. $staff_id; |
. $staff_id; |
2341 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2342 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
2343 |
$last_name = $row["last_name"]; |
$last_name = $row["last_name"]; |
2344 |
$first_name = $row["first_name"]; |
$first_name = $row["first_name"]; |
2345 |
|
|
2387 |
. $table |
. $table |
2388 |
. " ORDER BY " |
. " ORDER BY " |
2389 |
. $field_display; |
. $field_display; |
2390 |
$rd_rs = mysql_query($rd_sql, $con); |
$rd_rs = xx_query($rd_sql, $con); |
2391 |
while ($rd_row = mysql_fetch_array ($rd_rs)) { |
while ($rd_row = xx_fetch_array ($rd_rs)) { |
2392 |
$field_display_item = $rd_row[$field_display]; |
$field_display_item = $rd_row[$field_display]; |
2393 |
$field_value_item = $rd_row[$field_value]; |
$field_value_item = $rd_row[$field_value]; |
2394 |
printf("<input type='radio' name='" |
printf("<input type='radio' name='" |
2454 |
} |
} |
2455 |
|
|
2456 |
// Open the query and take a row count |
// Open the query and take a row count |
2457 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2458 |
$count = mysql_num_rows($rs); |
$count = xx_num_rows($rs); |
2459 |
|
|
2460 |
return $count; |
return $count; |
2461 |
} |
} |
2516 |
// Order the display |
// Order the display |
2517 |
$sql .= " ORDER BY coursesub_descr"; |
$sql .= " ORDER BY coursesub_descr"; |
2518 |
|
|
2519 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2520 |
|
|
2521 |
// Initialize row counter |
// Initialize row counter |
2522 |
$rowcount = 0; |
$rowcount = 0; |
2523 |
|
|
2524 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2525 |
$coursesub_id = $row["coursesub_id"]; |
$coursesub_id = $row["coursesub_id"]; |
2526 |
$coursesub = Trim($row["coursesub"]); |
$coursesub = Trim($row["coursesub"]); |
2527 |
$coursesub_descr = Trim($row["coursesub_descr"]); |
$coursesub_descr = Trim($row["coursesub_descr"]); |
2590 |
// Order the display |
// Order the display |
2591 |
$sql .= " ORDER BY faculty_lastname, faculty_firstname"; |
$sql .= " ORDER BY faculty_lastname, faculty_firstname"; |
2592 |
|
|
2593 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2594 |
|
|
2595 |
// Row counter |
// Row counter |
2596 |
$rowcount = 0; |
$rowcount = 0; |
2597 |
|
|
2598 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2599 |
$faculty_id = $row["faculty_id"]; |
$faculty_id = $row["faculty_id"]; |
2600 |
$faculty_firstname = Trim($row["faculty_firstname"]); |
$faculty_firstname = Trim($row["faculty_firstname"]); |
2601 |
$faculty_lastname = Trim($row["faculty_lastname"]); |
$faculty_lastname = Trim($row["faculty_lastname"]); |
2688 |
// Order the display |
// Order the display |
2689 |
$sql .= " ORDER BY " . $display_field; |
$sql .= " ORDER BY " . $display_field; |
2690 |
|
|
2691 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2692 |
|
|
2693 |
printf("<table width=\"60%%\" border = \"1\" >\n"); |
printf("<table width=\"60%%\" border = \"1\" >\n"); |
2694 |
printf("<tr><td class=\"cellPlain\">Description</td>\n"); |
printf("<tr><td class=\"cellPlain\">Description</td>\n"); |
2697 |
|
|
2698 |
$rowcount = 0; |
$rowcount = 0; |
2699 |
|
|
2700 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2701 |
$field_display_item = $row[$display_field]; |
$field_display_item = $row[$display_field]; |
2702 |
$field_value_item = (int) Trim($row[$key_field]); |
$field_value_item = (int) Trim($row[$key_field]); |
2703 |
|
|
2779 |
// Order the display |
// Order the display |
2780 |
$sql .= " ORDER BY last_name, first_name"; |
$sql .= " ORDER BY last_name, first_name"; |
2781 |
|
|
2782 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2783 |
|
|
2784 |
$rowcount = 0; |
$rowcount = 0; |
2785 |
|
|
2786 |
while ($row = mysql_fetch_array ($rs)) { |
while ($row = xx_fetch_array ($rs)) { |
2787 |
$first_name = Trim($row["first_name"]); |
$first_name = Trim($row["first_name"]); |
2788 |
$last_name = Trim($row["last_name"]); |
$last_name = Trim($row["last_name"]); |
2789 |
$staff_account = $row["staff_account"]; |
$staff_account = $row["staff_account"]; |
2850 |
**********************************************************/ |
**********************************************************/ |
2851 |
|
|
2852 |
function statQuery($con, $sql){ |
function statQuery($con, $sql){ |
2853 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
2854 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
2855 |
|
|
2856 |
// We should be getting only a single row. |
// We should be getting only a single row. |
2857 |
if (mysql_num_rows($rs) == 1) $result = $row["COUNT(*)"]; |
if (xx_num_rows($rs) == 1) $result = $row["COUNT(*)"]; |
2858 |
else $result = "UNKNOWN"; |
else $result = "UNKNOWN"; |
2859 |
|
|
2860 |
return $result; |
return $result; |