60 |
if ($staff_id > 0) { |
if ($staff_id > 0) { |
61 |
$sql = "UPDATE staff SET password = NULL WHERE staff_id = " . $staff_id; |
$sql = "UPDATE staff SET password = NULL WHERE staff_id = " . $staff_id; |
62 |
|
|
63 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
64 |
$problem = 1; |
$problem = 1; |
65 |
sql_err($sql); |
sql_err($sql); |
66 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
67 |
bailout(); |
bailout(); |
68 |
} |
} |
69 |
else { |
else { |
70 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
71 |
printf("Purged password successfully for this staff account.<br><BR>\n"); |
printf("Purged password successfully for this staff account.<br><BR>\n"); |
72 |
} |
} |
73 |
|
|
139 |
. " WHERE coursesub_id =" |
. " WHERE coursesub_id =" |
140 |
. $coursesub_id; |
. $coursesub_id; |
141 |
|
|
142 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
143 |
sql_err($sql); |
sql_err($sql); |
144 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
145 |
bailout(); |
bailout(); |
146 |
} |
} |
147 |
else { |
else { |
148 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
149 |
printf("Updated <b>%s</b> course subject.<BR><BR>\n", $coursesub_display); |
printf("Updated <b>%s</b> course subject.<BR><BR>\n", $coursesub_display); |
150 |
} |
} |
151 |
} |
} |
222 |
. "' WHERE faculty_id =" |
. "' WHERE faculty_id =" |
223 |
. $faculty_id; |
. $faculty_id; |
224 |
|
|
225 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
226 |
sql_err($sql); |
sql_err($sql); |
227 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
228 |
bailout(); |
bailout(); |
229 |
} |
} |
230 |
else { |
else { |
231 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
232 |
printf("Successfully updated Faculty <b>%s</b><BR><BR>\n", $faculty_name_display); |
printf("Successfully updated Faculty <b>%s</b><BR><BR>\n", $faculty_name_display); |
233 |
} |
} |
234 |
} |
} |
300 |
. "' WHERE feature_id =" |
. "' WHERE feature_id =" |
301 |
. $feature_id; |
. $feature_id; |
302 |
|
|
303 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
304 |
sql_err($sql); |
sql_err($sql); |
305 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
306 |
bailout(); |
bailout(); |
307 |
} |
} |
308 |
else { |
else { |
309 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
310 |
printf("Updated <b>%s</b> feature.<BR><BR>\n", $feature_display); |
printf("Updated <b>%s</b> feature.<BR><BR>\n", $feature_display); |
311 |
} |
} |
312 |
} |
} |
373 |
. " WHERE infotype_id = " |
. " WHERE infotype_id = " |
374 |
. $infotype_id; |
. $infotype_id; |
375 |
|
|
376 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
377 |
$err_code = 1; |
$err_code = 1; |
378 |
sql_err($sql); |
sql_err($sql); |
379 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
380 |
bailout(); |
bailout(); |
381 |
} |
} |
382 |
else { |
else { |
383 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
384 |
printf("Updated affected RQS relationships (if any)<BR>\n"); |
printf("Updated affected RQS relationships (if any)<BR>\n"); |
385 |
} |
} |
386 |
} |
} |
398 |
. " WHERE infotype_id =" |
. " WHERE infotype_id =" |
399 |
. $infotype_id; |
. $infotype_id; |
400 |
|
|
401 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
402 |
$err_code = 1; |
$err_code = 1; |
403 |
sql_err($sql); |
sql_err($sql); |
404 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
405 |
bailout(); |
bailout(); |
406 |
} |
} |
407 |
else { |
else { |
408 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
409 |
printf("Updated Information Type to <b>%s</b>.<BR><BR>\n", $infotype_display); |
printf("Updated Information Type to <b>%s</b>.<BR><BR>\n", $infotype_display); |
410 |
} |
} |
411 |
|
|
490 |
. " WHERE libunit_id =" |
. " WHERE libunit_id =" |
491 |
. $libunit_id; |
. $libunit_id; |
492 |
|
|
493 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
494 |
sql_err($sql); |
sql_err($sql); |
495 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
496 |
bailout(); |
bailout(); |
497 |
} |
} |
498 |
else { |
else { |
499 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
500 |
|
|
501 |
// Call the libunit form back |
// Call the libunit form back |
502 |
formLibunit($con, $libunit_id); |
formLibunit($con, $libunit_id); |
605 |
. "' WHERE location_id =" |
. "' WHERE location_id =" |
606 |
. $location_id; |
. $location_id; |
607 |
|
|
608 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
609 |
sql_err($sql); |
sql_err($sql); |
610 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
611 |
bailout(); |
bailout(); |
612 |
} |
} |
613 |
else { |
else { |
614 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
615 |
printf("Updated Location to <b>%s</b>.<BR><BR>\n", $location_display); |
printf("Updated Location to <b>%s</b>.<BR><BR>\n", $location_display); |
616 |
} |
} |
617 |
} |
} |
667 |
. "') WHERE staff_id =" |
. "') WHERE staff_id =" |
668 |
. $staff_id; |
. $staff_id; |
669 |
|
|
670 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
671 |
sql_err($sql); |
sql_err($sql); |
672 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
673 |
bailout(); |
bailout(); |
674 |
} |
} |
675 |
else { |
else { |
676 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
677 |
|
|
678 |
// Call the staff form back |
// Call the staff form back |
679 |
formStaff($con, $staff_id); |
formStaff($con, $staff_id); |
760 |
// printf("sql was: %s<br><br>\n", $sql); |
// printf("sql was: %s<br><br>\n", $sql); |
761 |
|
|
762 |
// Edit the record |
// Edit the record |
763 |
mysql_query ("LOCK TABLE resource WRITE", $con); |
xx_query ("LOCK TABLE resource WRITE", $con); |
764 |
if (!mysql_query($sql, $con)){ |
if (!xx_query($sql, $con)){ |
765 |
sql_err($con); |
sql_err($con); |
766 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
767 |
bailout(); |
bailout(); |
768 |
} |
} |
769 |
else { |
else { |
770 |
mysql_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
771 |
formResource($con, $key_id, 0, 0, ''); |
formResource($con, $key_id, 0, 0, ''); |
772 |
} |
} |
773 |
|
|
847 |
. "' WHERE service_id =" |
. "' WHERE service_id =" |
848 |
. $service_id; |
. $service_id; |
849 |
|
|
850 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
851 |
sql_err($sql); |
sql_err($sql); |
852 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
853 |
bailout(); |
bailout(); |
854 |
} |
} |
855 |
else { |
else { |
856 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
857 |
|
|
858 |
// Call the service form back |
// Call the service form back |
859 |
formService($con, $service_id); |
formService($con, $service_id); |
939 |
. " = " |
. " = " |
940 |
. $key_id; |
. $key_id; |
941 |
|
|
942 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
943 |
sql_err($sql); |
sql_err($sql); |
944 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
945 |
bailout(); |
bailout(); |
946 |
} |
} |
947 |
else { |
else { |
948 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
949 |
printf("%s successfully changed to <b>%s</b>.\n", $display, $newValue_display); |
printf("%s successfully changed to <b>%s</b>.\n", $display, $newValue_display); |
950 |
} |
} |
951 |
|
|
1034 |
. "' WHERE staff_id =" |
. "' WHERE staff_id =" |
1035 |
. $staff_id; |
. $staff_id; |
1036 |
|
|
1037 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
1038 |
sql_err($sql); |
sql_err($sql); |
1039 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
1040 |
bailout(); |
bailout(); |
1041 |
} |
} |
1042 |
else { |
else { |
1043 |
// Success. Call formStaff back. |
// Success. Call formStaff back. |
1044 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
1045 |
formStaff($con, $staff_id); |
formStaff($con, $staff_id); |
1046 |
} |
} |
1047 |
} |
} |
1122 |
. "' WHERE style_id =" |
. "' WHERE style_id =" |
1123 |
. $style_id; |
. $style_id; |
1124 |
|
|
1125 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
1126 |
sql_err($sql); |
sql_err($sql); |
1127 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
1128 |
bailout(); |
bailout(); |
1129 |
} |
} |
1130 |
else { |
else { |
1131 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
1132 |
printf("Successfully updated <b>%s</b> style.", $style_title_display); |
printf("Successfully updated <b>%s</b> style.", $style_title_display); |
1133 |
} |
} |
1134 |
} |
} |
1191 |
. $sublocation_id |
. $sublocation_id |
1192 |
. " WHERE subject_id = " . $subject_id; |
. " WHERE subject_id = " . $subject_id; |
1193 |
|
|
1194 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
1195 |
sql_err($sql); |
sql_err($sql); |
1196 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
1197 |
bailout(); |
bailout(); |
1198 |
} |
} |
1199 |
else { |
else { |
1200 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
1201 |
formSubject($con, $subject_id); |
formSubject($con, $subject_id); |
1202 |
} // updated subject |
} // updated subject |
1203 |
|
|