58 |
$problem = 0; |
$problem = 0; |
59 |
|
|
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 = ?"; |
62 |
|
|
63 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $staff_id)){ |
64 |
$problem = 1; |
$problem = 1; |
65 |
sql_err($sql); |
sql_err($sql); |
66 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
94 |
|
|
95 |
// Need for display/uniqueness |
// Need for display/uniqueness |
96 |
$coursesub_display = $coursesub; |
$coursesub_display = $coursesub; |
|
$coursesub_search = textSearchmySQL($coursesub); |
|
97 |
|
|
98 |
// Check to see if already exists |
// Check to see if already exists |
99 |
$exists = recordCount($con, "coursesub", "coursesub", $coursesub_search, "A"); |
$exists = recordCount($con, "coursesub", "coursesub", $coursesub_search, "A"); |
121 |
// Perform the update only if no errors encountered |
// Perform the update only if no errors encountered |
122 |
if ($err_code == 0) { |
if ($err_code == 0) { |
123 |
|
|
|
// Clean up strings |
|
|
$coursesub = textInmySQL($coursesub); |
|
|
$coursesub_descr = textInmySQL($coursesub_descr); |
|
|
$cip_code = textInmySQL($cip_code); |
|
|
|
|
124 |
// Build the SQL |
// Build the SQL |
125 |
$sql = "UPDATE coursesub SET coursesub = '" |
$sql = "UPDATE coursesub SET coursesub = ?, coursesub_descr = ?, cip_code = ?, campus_id = ? WHERE coursesub_id = ?"; |
|
. $coursesub |
|
|
. "', coursesub_descr ='" |
|
|
. $coursesub_descr |
|
|
. "', cip_code = '" |
|
|
. $cip_code |
|
|
. "', campus_id = " |
|
|
. $campus_id |
|
|
. " WHERE coursesub_id =" |
|
|
. $coursesub_id; |
|
126 |
|
|
127 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $coursesub, $coursesub_descr, $cip_code, $campus_id, $coursesub_id)){ |
128 |
sql_err($sql); |
sql_err($sql); |
129 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
130 |
bailout(); |
bailout(); |
189 |
|
|
190 |
if ($err_code == 0 ) { |
if ($err_code == 0 ) { |
191 |
|
|
|
// Clean up strings |
|
|
if (strlen($faculty_lastname) > 0) $faculty_lastname = textInmySQL($faculty_lastname); |
|
|
if (strlen($faculty_firstname) > 0) $faculty_firstname = textInmySQL($faculty_firstname); |
|
|
if (strlen($faculty_email) > 0) $faculty_email = textInmySQL($faculty_email); |
|
|
if (strlen($faculty_account) > 0) $faculty_account = textInmySQL($faculty_account); |
|
|
|
|
192 |
// Build the SQL |
// Build the SQL |
193 |
$sql = "UPDATE faculty SET faculty_lastname = '" |
$sql = "UPDATE faculty SET faculty_lastname = ?, faculty_firstname = ?, faculty_email = ?, faculty_account = ? WHERE faculty_id = ?"; |
|
. $faculty_lastname |
|
|
. "', faculty_firstname ='" |
|
|
. $faculty_firstname |
|
|
. "', faculty_email ='" |
|
|
. $faculty_email |
|
|
. "', faculty_account ='" |
|
|
. $faculty_account |
|
|
. "' WHERE faculty_id =" |
|
|
. $faculty_id; |
|
194 |
|
|
195 |
if (!xx_query ($sql, $con)){ |
if (!xx_query ($sql,$faculty_lastname,$faculty_firstname,$faculty_account,$faculty_email,$faculty_id)){ |
196 |
sql_err($sql); |
sql_err($sql); |
197 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
198 |
bailout(); |
bailout(); |
226 |
|
|
227 |
// Need for display/uniqueness |
// Need for display/uniqueness |
228 |
$feature_display = $feature; |
$feature_display = $feature; |
|
$feature_search = textSearchmySQL($feature); |
|
229 |
|
|
230 |
// Check to see if already exists |
// Check to see if already exists |
231 |
$exists = recordCount($con, "feature", "feature", $feature_search, "A"); |
$exists = recordCount($con, "feature", "feature", $feature_search, "A"); |
254 |
// Perform the update only if no errors encountered |
// Perform the update only if no errors encountered |
255 |
if ($err_code == 0) { |
if ($err_code == 0) { |
256 |
|
|
|
// Clean up strings |
|
|
$feature = textInmySQL($feature); |
|
|
$image_alt = textInmySQL($image_alt); |
|
|
$image_path = textInmySQL($image_path); |
|
|
|
|
257 |
// Build the SQL |
// Build the SQL |
258 |
$sql = "UPDATE feature SET feature = '" |
$sql = "UPDATE feature SET feature = ?, image_alt = ?, image_path = ? WHERE feature_id = ?"; |
|
. $feature |
|
|
. "', image_alt ='" |
|
|
. $image_alt |
|
|
. "', image_path ='" |
|
|
. $image_path |
|
|
. "' WHERE feature_id =" |
|
|
. $feature_id; |
|
259 |
|
|
260 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $feature, $image_alt, $image_path, $feature_id)){ |
|
sql_err($sql); |
|
261 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
262 |
bailout(); |
bailout(); |
263 |
} |
} |
291 |
|
|
292 |
// Need for display/uniqueness purposes |
// Need for display/uniqueness purposes |
293 |
$infotype_display = $infotype; |
$infotype_display = $infotype; |
|
$infotype_search = textSearchmySQL($infotype); |
|
294 |
|
|
295 |
// Check to see if already exists |
// Check to see if already exists |
296 |
$exists = recordCount($con, "infotype", "infotype", $infotype_search, "A"); |
$exists = recordCount($con, "infotype", "infotype", $infotype_search, "A"); |
318 |
// Proceed if no errors encountered |
// Proceed if no errors encountered |
319 |
if ($err_code == 0) { |
if ($err_code == 0) { |
320 |
|
|
|
// Clean up strings |
|
|
$infotype = textInmySQL($infotype); |
|
|
|
|
|
|
|
321 |
// First, update affected RQS relationships |
// First, update affected RQS relationships |
322 |
$sql = "UPDATE res_sub_infotype SET masterinfotype_id = " |
$sql = "UPDATE res_sub_infotype SET masterinfotype_id = ? WHERE infotype_id = ?"; |
323 |
. $masterinfotype_id |
|
324 |
. " WHERE infotype_id = " |
if (!xx_prepare_execute($sql, $masterinfotype_id, $infotype_id)){ |
|
. $infotype_id; |
|
|
|
|
|
if (!xx_query ($sql, $con)){ |
|
325 |
$err_code = 1; |
$err_code = 1; |
|
sql_err($sql); |
|
326 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
327 |
bailout(); |
bailout(); |
328 |
} |
} |
336 |
if ($err_code == 0) { |
if ($err_code == 0) { |
337 |
|
|
338 |
// Build the SQL |
// Build the SQL |
339 |
$sql = "UPDATE infotype SET infotype = '" |
$sql = "UPDATE infotype SET infotype = ?, masterinfotype_id = ?, mastersubject_id = ? WHERE infotype_id = ?"; |
|
. $infotype |
|
|
. "', masterinfotype_id =" |
|
|
. $masterinfotype_id |
|
|
. ", mastersubject_id =" |
|
|
. $mastersubject_id |
|
|
. " WHERE infotype_id =" |
|
|
. $infotype_id; |
|
340 |
|
|
341 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $infotype, $masterinfotype_id, $mastersubject_id, $infotype_id)){ |
342 |
$err_code = 1; |
$err_code = 1; |
|
sql_err($sql); |
|
343 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
344 |
bailout(); |
bailout(); |
345 |
} |
} |
381 |
// Need for display/uniqueness purposes |
// Need for display/uniqueness purposes |
382 |
$libunit_display = $libunit; |
$libunit_display = $libunit; |
383 |
$libunit_abbrev_display = $libunit_abbrev; |
$libunit_abbrev_display = $libunit_abbrev; |
|
$libunit_search = textSearchmySQL($libunit); |
|
|
$libunit_abbrev_search = textSearchmySQL($libunit_abbrev); |
|
384 |
|
|
385 |
// Check to see if libunit already exists |
// Check to see if libunit already exists |
386 |
$exists = recordCount($con, "libunit", "libunit", $libunit_search, "A"); |
$exists = recordCount($con, "libunit", "libunit", $libunit_search, "A"); |
414 |
// Add only if no errors encountered |
// Add only if no errors encountered |
415 |
if ($err_code == 0) { |
if ($err_code == 0) { |
416 |
|
|
|
if (strlen($libunit) > 0) $libunit = textInmySQL($libunit); |
|
|
if (strlen($libunit_abbrev) > 0) $libunit_abbrev = textInmySQL($libunit_abbrev); |
|
|
|
|
417 |
// Build the SQL |
// Build the SQL |
418 |
$sql = "UPDATE libunit SET libunit = '" |
$sql = "UPDATE libunit SET libunit = ?, libunit_abbrev = ?, head_staff_id = ? WHERE libunit_id = ?"; |
|
. $libunit |
|
|
. "', libunit_abbrev ='" |
|
|
. $libunit_abbrev |
|
|
. "', head_staff_id =" |
|
|
. $head_staff_id |
|
|
. " WHERE libunit_id =" |
|
|
. $libunit_id; |
|
419 |
|
|
420 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $libunit, $libunit_abbrev, $head_staff_id, $libunit_id)){ |
|
sql_err($sql); |
|
421 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
422 |
bailout(); |
bailout(); |
423 |
} |
} |
461 |
|
|
462 |
// Need for display/uniqueness purposes |
// Need for display/uniqueness purposes |
463 |
$location_display = $location; |
$location_display = $location; |
|
$location_search = textSearchmySQL($location); |
|
464 |
|
|
465 |
// Check to see if already exists |
// Check to see if already exists |
466 |
$exists = recordCount($con, "location", "location", $location_search, "A"); |
$exists = recordCount($con, "location", "location", $location_search, "A"); |
488 |
// Perform the update only if no errors encountered |
// Perform the update only if no errors encountered |
489 |
if ($err_code == 0) { |
if ($err_code == 0) { |
490 |
|
|
|
// Clean up strings |
|
|
if (strlen($location) > 0) $location = textInmySQL($location); |
|
|
if (strlen($location_descr) > 0) $location_descr = textInmySQL($location_descr); |
|
|
if (strlen($campus) > 0) $campus = textInmySQL($campus); |
|
|
if (strlen($address1) > 0) $address1 = textInmySQL($address1); |
|
|
if (strlen($address2) > 0) $address2 = textInmySQL($address2); |
|
|
if (strlen($address3) > 0) $address3 = textInmySQL($address3); |
|
|
if (strlen($address4) > 0) $address4 = textInmySQL($address4); |
|
|
if (strlen($telephone) > 0) $telephone = textInmySQL($telephone); |
|
|
if (strlen($mainURL) > 0) $mainURL = textInmySQL($mainURL); |
|
|
if (strlen($referenceURL) > 0) $referenceURL = textInmySQL($referenceURL); |
|
|
if (strlen($mapURL) > 0) $mapURL = textInmySQL($mapURL); |
|
|
if (strlen($hoursURL) > 0) $hoursURL = textInmySQL($hoursURL); |
|
|
|
|
491 |
// Build the SQL |
// Build the SQL |
492 |
$sql = "UPDATE location SET location = '" |
$sql = "UPDATE location SET location = ?, location_descr = ?, campus = ?, |
493 |
. $location |
address1 = ?, address2 = ?, address3 = ?, address4 = ?, |
494 |
. "', location_descr ='" |
mainURL = ?, hoursURL = ?, referenceURL = ?, mapURL = ?, |
495 |
. $location_descr |
telephone = ? WHERE location_id = ?"; |
496 |
. "', campus ='" |
|
497 |
. $campus |
if (!xx_prepare_execute($sql, |
498 |
. "', address1 ='" |
$location,$location_descr,$campus, |
499 |
. $address1 |
$address1,$address2,$address3,$address4, |
500 |
. "', address2 ='" |
$mainURL,$hoursURL,$referenceURL,$mapURL, |
501 |
. $address2 |
$telephone,$location_id)){ |
|
. "', address3 ='" |
|
|
. $address3 |
|
|
. "', address4 ='" |
|
|
. $address4 |
|
|
. "', mainURL ='" |
|
|
. $mainURL |
|
|
. "', hoursURL ='" |
|
|
. $hoursURL |
|
|
. "', referenceURL ='" |
|
|
. $referenceURL |
|
|
. "', mapURL ='" |
|
|
. $mapURL |
|
|
. "', telephone ='" |
|
|
. $telephone |
|
|
. "' WHERE location_id =" |
|
|
. $location_id; |
|
|
|
|
|
if (!xx_query ($sql, $con)){ |
|
|
sql_err($sql); |
|
502 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
503 |
bailout(); |
bailout(); |
504 |
} |
} |
554 |
if ($err_code == 0) { |
if ($err_code == 0) { |
555 |
|
|
556 |
// Build the SQL |
// Build the SQL |
557 |
$sql = "UPDATE staff SET password = password('" |
$sql = "UPDATE staff SET password = password(?) WHERE staff_id = ?"; |
|
. $password |
|
|
. "') WHERE staff_id =" |
|
|
. $staff_id; |
|
558 |
|
|
559 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $password, $staff_id)){ |
560 |
sql_err($sql); |
sql_err($sql); |
561 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
562 |
bailout(); |
bailout(); |
597 |
$edition, $infotype_id, $key_id, $other_title, $pub_date, $publisher, $sess_staff_account, |
$edition, $infotype_id, $key_id, $other_title, $pub_date, $publisher, $sess_staff_account, |
598 |
$sources_indexed, $title, $url) { |
$sources_indexed, $title, $url) { |
599 |
|
|
|
// Clean up strings |
|
|
if (strlen($annotation) > 0) $annotation = textInmySQL($annotation); |
|
|
if (strlen($author) > 0) $author = textInmySQL($author); |
|
|
if (strlen($call_no) > 0) $call_no = textInmySQL($call_no); |
|
|
if (strlen($cat_num) > 0) $cat_num = textInmySQL($cat_num); |
|
|
if (strlen($coverage_detail) > 0) $coverage_detail = textInmySQL($coverage_detail); |
|
|
if (strlen($edition) > 0) $edition = textInmySQL($edition); |
|
|
if (strlen($other_title) > 0) $other_title = textInmySQL($other_title); |
|
|
if (strlen($pub_date) > 0) $pub_date = textInmySQL($pub_date); |
|
|
if (strlen($publisher) > 0) $publisher = textInmySQL($publisher); |
|
|
if (strlen($sources_indexed) > 0) $sources_indexed = textInmySQL($sources_indexed); |
|
|
if (strlen($title)> 0) $title = textInmySQL($title); |
|
|
if (strlen($url) > 0) $url = textInmySQL($url); |
|
|
|
|
600 |
// Set up SQL |
// Set up SQL |
601 |
$sql = "UPDATE resource SET annotation = '" |
$sql = "UPDATE resource SET |
602 |
. $annotation |
annotation = ?, author = ?, call_no = ?, cat_num = ?, coverage_detail = ?, |
603 |
. "', author = '" |
date_modified = now(), edition = ?, infotype_id = ?, other_title = ?, pub_date = ?, publisher = ?, |
604 |
. $author |
sources_indexed = ?, title = ?, url = ?, vendor_id = ?, account_modified = ? WHERE resource_id = ?"; |
|
. "', call_no = '" |
|
|
. $call_no |
|
|
. "', cat_num = '" |
|
|
. $cat_num |
|
|
. "', coverage_detail = '" |
|
|
. $coverage_detail |
|
|
. "', date_modified = now() " |
|
|
. ", edition = '" |
|
|
. $edition |
|
|
. "', infotype_id = " |
|
|
. $infotype_id |
|
|
. ", other_title = '" |
|
|
. $other_title |
|
|
. "', pub_date = '" |
|
|
. $pub_date |
|
|
. "', publisher = '" |
|
|
. $publisher |
|
|
. "', sources_indexed = '" |
|
|
. $sources_indexed |
|
|
. "', title = '" |
|
|
. $title |
|
|
. "', url = '" |
|
|
. $url |
|
|
. "', vendor_id = '" |
|
|
. $vendor_id |
|
|
. "', account_modified = '" |
|
|
. $sess_staff_account |
|
|
. "' WHERE resource_id = " |
|
|
. $key_id; |
|
605 |
|
|
606 |
// printf("sql was: %s<br><br>\n", $sql); |
// printf("sql was: %s<br><br>\n", $sql); |
607 |
|
|
608 |
// Edit the record |
// Edit the record |
609 |
xx_query ("LOCK TABLE resource WRITE", $con); |
xx_query ("LOCK TABLE resource WRITE", $con); |
610 |
if (!xx_query($sql, $con)){ |
if (!xx_prepare_execute($sql, |
611 |
sql_err($con); |
$annotation, $author, $call_no, $cat_num, $coverage_detail, |
612 |
|
$edition, $infotype_id, $other_title, $pub_date, $publisher, |
613 |
|
$sources_indexed, $title, $url, $vendor_id, $sess_staff_account, $key_id)) { |
614 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
615 |
bailout(); |
bailout(); |
616 |
} |
} |
657 |
|
|
658 |
if ($err_code == 0) { |
if ($err_code == 0) { |
659 |
|
|
|
// Clean up strings |
|
|
if (strlen($address1) > 0) $address1 = textInmySQL($address1); |
|
|
if (strlen($address2) > 0) $address2 = textInmySQL($address2); |
|
|
if (strlen($address3) > 0) $address3 = textInmySQL($address3); |
|
|
if (strlen($address4) > 0) $address4 = textInmySQL($address4); |
|
|
if (strlen($email) > 0) $email = textInmySQL($email); |
|
|
if (strlen($fax) > 0) $fax = textInmySQL($fax); |
|
|
if (strlen($service) > 0) $service = textInmySQL($service); |
|
|
if (strlen($serviceDescr) > 0) $serviceDescr = textInmySQL($serviceDescr); |
|
|
if (strlen($serviceURL) > 0) $serviceURL = textInmySQL($serviceURL); |
|
|
if (strlen($telephone) > 0) $telephone = textInmySQL($telephone); |
|
|
|
|
660 |
// Build the SQL |
// Build the SQL |
661 |
$sql = "UPDATE service SET service = '" |
$sql = "UPDATE service SET service = ?, serviceDescr = ?, |
662 |
. $service |
address1 = ?, address2 = ?, address3 = ?, address4 = ?, |
663 |
. "', serviceDescr ='" |
serviceURL = ?, email = ?, fax = ?, telephone = ?, nonaff = ? WHERE service_id = ?"; |
664 |
. $serviceDescr |
|
665 |
. "', address1 ='" |
if (!xx_prepare_execute($sql, $service, $serviceDescr, |
666 |
. $address1 |
$address1, $address2, $address3, $address4, |
667 |
. "', address2 ='" |
$serviceURL, $email, $fax, $telephone, $nonaff, $service_id)){ |
|
. $address2 |
|
|
. "', address3 ='" |
|
|
. $address3 |
|
|
. "', address4 ='" |
|
|
. $address4 |
|
|
. "', serviceURL ='" |
|
|
. $serviceURL |
|
|
. "', email ='" |
|
|
. $email |
|
|
. "', fax ='" |
|
|
. $fax |
|
|
. "', telephone ='" |
|
|
. $telephone |
|
|
. "', nonaff = '" |
|
|
. $nonaff |
|
|
. "' WHERE service_id =" |
|
|
. $service_id; |
|
|
|
|
|
if (!xx_query ($sql, $con)){ |
|
668 |
sql_err($sql); |
sql_err($sql); |
669 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
670 |
bailout(); |
bailout(); |
742 |
if ($err_code == 0) { |
if ($err_code == 0) { |
743 |
|
|
744 |
$newValue_display = $newValue; |
$newValue_display = $newValue; |
|
$newValue = textInmySQL($newValue); |
|
745 |
|
|
746 |
// Build the SQL |
// Build the SQL |
747 |
$sql = "UPDATE " |
$sql = "UPDATE ! SET ! = ? WHERE ! = ?"; |
|
. $table |
|
|
. " SET " |
|
|
. $display_field |
|
|
. " = '" |
|
|
. $newValue |
|
|
. "' WHERE " |
|
|
. $key_field |
|
|
. " = " |
|
|
. $key_id; |
|
748 |
|
|
749 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $table, $display_field, $newValue, $key_field, $key_id)){ |
750 |
sql_err($sql); |
sql_err($sql); |
751 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
752 |
bailout(); |
bailout(); |
826 |
if (strlen($staff_email) > 0) $staff_email = textInmySQL($staff_email); |
if (strlen($staff_email) > 0) $staff_email = textInmySQL($staff_email); |
827 |
|
|
828 |
// Build the SQL |
// Build the SQL |
829 |
$sql = "UPDATE staff SET access_id = " |
$sql = "UPDATE staff SET access_id = ?, first_name = ?, last_name = ?, stafftitle_id = ?, staff_account = ?, staff_email = ? WHERE staff_id = ?"; |
|
. $access_id |
|
|
. ", first_name ='" |
|
|
. $first_name |
|
|
. "', last_name ='" |
|
|
. $last_name |
|
|
. "', stafftitle_id = " |
|
|
. $stafftitle_id |
|
|
. ", staff_account = '" |
|
|
. $staff_account |
|
|
. "', staff_email = '" |
|
|
. $staff_email |
|
|
. "' WHERE staff_id =" |
|
|
. $staff_id; |
|
830 |
|
|
831 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $access_id, $first_name, $last_name, $stafftitle_id, $staff_account, $staff_email, $staff_id)){ |
832 |
sql_err($sql); |
sql_err($sql); |
833 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
834 |
bailout(); |
bailout(); |
905 |
if (strlen($style_title) > 0) $style_title = textInmySQL($style_title); |
if (strlen($style_title) > 0) $style_title = textInmySQL($style_title); |
906 |
|
|
907 |
// Build the SQL |
// Build the SQL |
908 |
$sql = "UPDATE style SET style_title = '" |
$sql = "UPDATE style SET style_title = ?, css_file = ?, footer_file = ?, header_file = ? WHERE style_id = ?"; |
|
. $style_title |
|
|
. "', css_file ='" |
|
|
. $css_file |
|
|
. "', footer_file ='" |
|
|
. $footer_file |
|
|
. "', header_file ='" |
|
|
. $header_file |
|
|
. "' WHERE style_id =" |
|
|
. $style_id; |
|
909 |
|
|
910 |
if (!xx_query ($sql, $con)){ |
if (!xx_prepare_execute($sql, $style_title, $css_file, $footer_file, $header_file, $style_id)){ |
911 |
sql_err($sql); |
sql_err($sql); |
912 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
913 |
bailout(); |
bailout(); |
968 |
if (strlen($subject_descr) > 0) $subject_descr = textInmySQL($subject_descr); |
if (strlen($subject_descr) > 0) $subject_descr = textInmySQL($subject_descr); |
969 |
|
|
970 |
// Build the SQL |
// Build the SQL |
971 |
$sql = "UPDATE subject SET subject = '" |
$sql = "UPDATE subject SET subject = ?, subject_descr = ?, sublocation_id = ? WHERE subject_id = ?"; |
|
. $subject |
|
|
. "', subject_descr = '" |
|
|
. $subject_descr |
|
|
. "', sublocation_id =" |
|
|
. $sublocation_id |
|
|
. " WHERE subject_id = " . $subject_id; |
|
972 |
|
|
973 |
if (!xx_query ($sql, $con)){ |
if (!xx_query ($sql, $subject, $subject_descr, $sublocation_id, $subject_id)){ |
974 |
sql_err($sql); |
sql_err($sql); |
975 |
xx_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
976 |
bailout(); |
bailout(); |