/[libdata]/branches/paul_xx/admin/include/update.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/paul_xx/admin/include/update.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/paul/admin/include/update.php revision 68 by dpavlin, Thu Mar 18 19:24:54 2004 UTC branches/paul_xx/admin/include/update.php revision 69 by dpavlin, Thu Mar 18 20:01:09 2004 UTC
# Line 50  function purgePassword($staff_id){ Line 50  function purgePassword($staff_id){
50          if ($staff_id > 0) {          if ($staff_id > 0) {
51    
52                  $sql = "UPDATE staff SET password = NULL WHERE staff_id = " . $staff_id;                  $sql = "UPDATE staff SET password = NULL WHERE staff_id = " . $staff_id;
53                  if (mysql_tryquery ($sql)) printf("Successfully purged password for this staff account.");                  if (xx_tryquery ($sql)) printf("Successfully purged password for this staff account.");
54    
55          }          }
56          else printf("Staff ID not found.");          else printf("Staff ID not found.");
# Line 115  function updateCoursesub($campus_id, $ci Line 115  function updateCoursesub($campus_id, $ci
115                          . $campus_id                          . $campus_id
116                          . " WHERE coursesub_id ="                          . " WHERE coursesub_id ="
117                          . $coursesub_id;                          . $coursesub_id;
118                  if (mysql_tryquery ($sql)) printf("Successfully updated <b>%s</b> course subject.", $coursesub_display);                  if (xx_tryquery ($sql)) printf("Successfully updated <b>%s</b> course subject.", $coursesub_display);
119          }          }
120          else printf("%s", $err_msg);          else printf("%s", $err_msg);
121                    
# Line 178  function updateFaculty($faculty_email, $ Line 178  function updateFaculty($faculty_email, $
178                          . $faculty_account                          . $faculty_account
179                          . "' WHERE faculty_id ="                          . "' WHERE faculty_id ="
180                          . $faculty_id;                          . $faculty_id;
181                  if (mysql_tryquery ($sql)) printf("Successfully updated faculty person <b>%s</b>.", $faculty_name_display);                  if (xx_tryquery ($sql)) printf("Successfully updated faculty person <b>%s</b>.", $faculty_name_display);
182          }          }
183          else printf("%s", $err_msg);          else printf("%s", $err_msg);
184                    
# Line 240  function updateFeature($feature, $featur Line 240  function updateFeature($feature, $featur
240                          . $image_path                          . $image_path
241                          . "' WHERE feature_id ="                          . "' WHERE feature_id ="
242                          . $feature_id;                          . $feature_id;
243                  if (mysql_tryquery ($sql)) printf("Successfully updated <b>%s</b> feature.", $feature_display);                  if (xx_tryquery ($sql)) printf("Successfully updated <b>%s</b> feature.", $feature_display);
244          }          }
245          else printf("%s", $err_msg);          else printf("%s", $err_msg);
246    
# Line 297  function updateInfotype($infotype, $info Line 297  function updateInfotype($infotype, $info
297                          . $masterinfotype_id                          . $masterinfotype_id
298                          . " WHERE infotype_id = "                          . " WHERE infotype_id = "
299                          . $infotype_id;                          . $infotype_id;
300                  if (mysql_tryquery ($sql)) printf("Updated affected RQS relationships (if any).<BR>\n");                  if (xx_tryquery ($sql)) printf("Updated affected RQS relationships (if any).<BR>\n");
301    
302                  // Build the SQL                  // Build the SQL
303                  $sql = "UPDATE infotype SET infotype = '"                  $sql = "UPDATE infotype SET infotype = '"
# Line 308  function updateInfotype($infotype, $info Line 308  function updateInfotype($infotype, $info
308                          . $mastersubject_id                          . $mastersubject_id
309                          . " WHERE infotype_id ="                          . " WHERE infotype_id ="
310                          . $infotype_id;                          . $infotype_id;
311                  if (mysql_tryquery ($sql)) printf("Successfully updated <b>%s</b> information type.", $infotype_display);                  if (xx_tryquery ($sql)) printf("Successfully updated <b>%s</b> information type.", $infotype_display);
312          }          }
313          else printf("%s", $err_msg);          else printf("%s", $err_msg);
314    
# Line 384  function updateLibunit($head_staff_id, $ Line 384  function updateLibunit($head_staff_id, $
384                          . $head_staff_id                          . $head_staff_id
385                          . " WHERE libunit_id ="                          . " WHERE libunit_id ="
386                          . $libunit_id;                          . $libunit_id;
387                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
388                  formLibunit($libunit_id);                  formLibunit($libunit_id);
389          }          }
390                    
# Line 480  function updateLocation($address1, $addr Line 480  function updateLocation($address1, $addr
480                          . $telephone                          . $telephone
481                          . "' WHERE location_id ="                          . "' WHERE location_id ="
482                          . $location_id;                          . $location_id;
483                  if (mysql_tryquery ($sql)) printf("Successfully updated <b>%s</b> location.", $location_display);                  if (xx_tryquery ($sql)) printf("Successfully updated <b>%s</b> location.", $location_display);
484          }          }
485          else printf("%s", $err_msg);          else printf("%s", $err_msg);
486    
# Line 533  function updatePassword($password, $pass Line 533  function updatePassword($password, $pass
533                          . "') WHERE staff_id ="                          . "') WHERE staff_id ="
534                          . $staff_id;                          . $staff_id;
535    
536                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
537                  formStaff($staff_id);                  formStaff($staff_id);
538          }          }
539                    
# Line 650  function updateResource($annotation, $au Line 650  function updateResource($annotation, $au
650                          . "' WHERE resource_id = "                          . "' WHERE resource_id = "
651                          . $key_id;                          . $key_id;
652    
653                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
654                  formResource($key_id, 0, 0, '');                  formResource($key_id, 0, 0, '');
655          }          }
656    
# Line 737  function updateService($address1, $addre Line 737  function updateService($address1, $addre
737                          . "' WHERE service_id ="                          . "' WHERE service_id ="
738                          . $service_id;                          . $service_id;
739    
740                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
741                  formService($service_id);                  formService($service_id);
742                    
743          }          }
# Line 809  function updateSingleField($display, $di Line 809  function updateSingleField($display, $di
809                          . $key_field                          . $key_field
810                          . " = "                          . " = "
811                          . $key_id;                          . $key_id;
812                  if (mysql_tryquery ($sql)) printf("Successfully changed %s to <b>%s</b>.", $display, $newValue_display);                  if (xx_tryquery ($sql)) printf("Successfully changed %s to <b>%s</b>.", $display, $newValue_display);
813                    
814          }          }
815          else printf("%s", $err_msg);          else printf("%s", $err_msg);
# Line 894  function updateStaff($access_id, $first_ Line 894  function updateStaff($access_id, $first_
894                          . "' WHERE staff_id ="                          . "' WHERE staff_id ="
895                          . $staff_id;                          . $staff_id;
896    
897                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
898                  formStaff($staff_id);                  formStaff($staff_id);
899          }          }
900          else {          else {
# Line 963  function updateStyle($css_file, $footer_ Line 963  function updateStyle($css_file, $footer_
963                          . $header_file                          . $header_file
964                          . "' WHERE style_id ="                          . "' WHERE style_id ="
965                          . $style_id;                          . $style_id;
966                  if (mysql_tryquery ($sql)) printf("Successfully updated <b>%s</b> style.", $style_title_display);                  if (xx_tryquery ($sql)) printf("Successfully updated <b>%s</b> style.", $style_title_display);
967          }          }
968          else printf("%s", $err_msg);          else printf("%s", $err_msg);
969                    
# Line 1021  function updateSubject($subject, $subjec Line 1021  function updateSubject($subject, $subjec
1021                          . "', sublocation_id ="                          . "', sublocation_id ="
1022                          . $sublocation_id                          . $sublocation_id
1023                          . " WHERE subject_id = " . $subject_id;                          . " WHERE subject_id = " . $subject_id;
1024                  mysql_tryquery($sql);                  xx_tryquery($sql);
1025                  formSubject($subject_id);                  formSubject($subject_id);
1026          }          }
1027    
# Line 1095  function updateVendor($vendor, $vendor_d Line 1095  function updateVendor($vendor, $vendor_d
1095                          . $vendor_status                          . $vendor_status
1096                          . "' WHERE vendor_id ="                          . "' WHERE vendor_id ="
1097                          . $vendor_id;                          . $vendor_id;
1098                  if (mysql_tryquery ($sql)) printf("Successfully updated <b>%s</b> vendor.", $vendor_display);                  if (xx_tryquery ($sql)) printf("Successfully updated <b>%s</b> vendor.", $vendor_display);
1099          }          }
1100          else printf("%s", $err_msg);          else printf("%s", $err_msg);
1101    

Legend:
Removed from v.68  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.26