/[libdata]/branches/paul_xx/admin/include/insert.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/insert.php

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

branches/paul/admin/include/insert.php revision 68 by dpavlin, Thu Mar 18 19:24:54 2004 UTC branches/paul_xx/admin/include/insert.php revision 69 by dpavlin, Thu Mar 18 20:01:09 2004 UTC
# Line 81  function insertCoursesub($campus_id, $ci Line 81  function insertCoursesub($campus_id, $ci
81                          . ")";                          . ")";
82                    
83                  // Write the new row to the database                  // Write the new row to the database
84                  if (mysql_tryquery($sql)) printf("Added Course Subject <b>%s</b>.", $coursesub_display);                  if (xx_tryquery($sql)) printf("Added Course Subject <b>%s</b>.", $coursesub_display);
85          }          }
86          else printf("%s", $err_msg);          else printf("%s", $err_msg);
87                    
# Line 145  function insertFaculty($faculty_email, $ Line 145  function insertFaculty($faculty_email, $
145                          . "')";                          . "')";
146    
147                  // Write the new row to the database                  // Write the new row to the database
148                  if (mysql_tryquery($sql)) printf("Added <b>%s</b> to the faculty table.", $faculty_name_display);                  if (xx_tryquery($sql)) printf("Added <b>%s</b> to the faculty table.", $faculty_name_display);
149          }          }
150                    
151          else printf("%s", $err_msg);          else printf("%s", $err_msg);
# Line 206  function insertFeature($feature, $image_ Line 206  function insertFeature($feature, $image_
206                          . "')";                          . "')";
207                    
208                  // Write the new row to the database                  // Write the new row to the database
209                  if (mysql_tryquery($sql)) printf("Added Feature <b>%s</b>.", $feature_display);                  if (xx_tryquery($sql)) printf("Added Feature <b>%s</b>.", $feature_display);
210    
211          }          }
212          else printf("%s", $err_msg);          else printf("%s", $err_msg);
# Line 267  function insertInfotype($infotype, $mast Line 267  function insertInfotype($infotype, $mast
267                          . ")";                          . ")";
268                                    
269                  // Write the new row to the database                  // Write the new row to the database
270                  if (mysql_tryquery($sql)) printf("Added Information Type <b>%s</b>.", $infotype_display);                  if (xx_tryquery($sql)) printf("Added Information Type <b>%s</b>.", $infotype_display);
271          }          }
272          else printf("%s", $err_msg);          else printf("%s", $err_msg);
273                    
# Line 342  function insertLibunit($head_staff_id, $ Line 342  function insertLibunit($head_staff_id, $
342                          . ")";                          . ")";
343                                    
344                  // Write the new row to the database                  // Write the new row to the database
345                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
346                  $libunit_id = mysql_insert_id();                  $libunit_id = xx_insert_id();
347                  formLibunit($libunit_id);                  formLibunit($libunit_id);
348          }          }
349          else {          else {
# Line 438  function insertLocation($address1, $addr Line 438  function insertLocation($address1, $addr
438                          . "')";                          . "')";
439    
440                  // Write the new row to the database                  // Write the new row to the database
441                  if (mysql_tryquery($sql)) printf("Added <b>%s</b> location.", $location_display);                  if (xx_tryquery($sql)) printf("Added <b>%s</b> location.", $location_display);
442    
443          }          }
444          else printf("%s", $err_msg);          else printf("%s", $err_msg);
# Line 547  function insertResource($annotation, $au Line 547  function insertResource($annotation, $au
547                          . "')";                          . "')";
548    
549                  // Write the new record to the database                  // Write the new record to the database
550                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
551                  $resource_id = mysql_insert_id();                  $resource_id = xx_insert_id();
552    
553                  // Now set up this resource with its first mastersubject                  // Now set up this resource with its first mastersubject
554                  // Note that id#1 = N/A and id#2 = (All) are not used here.                  // Note that id#1 = N/A and id#2 = (All) are not used here.
# Line 559  function insertResource($annotation, $au Line 559  function insertResource($annotation, $au
559                                  . $mastersubject_id                                  . $mastersubject_id
560                                  . ")";                                  . ")";
561                          // Write the new res_mastersubject to the database                          // Write the new res_mastersubject to the database
562                          mysql_tryquery ($sql);                          xx_tryquery ($sql);
563                  }                  }
564    
565                  // Call the formResource page back, in case user wants to edit further                  // Call the formResource page back, in case user wants to edit further
# Line 652  function insertService($address1, $addre Line 652  function insertService($address1, $addre
652                          . "')";                          . "')";
653                                    
654                  // Write the new row to the database                  // Write the new row to the database
655                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
656                  $service_id = mysql_insert_id();                  $service_id = xx_insert_id();
657                  formService($service_id);                  formService($service_id);
658          }          }
659    
# Line 723  function insertSingleField($display, $fi Line 723  function insertSingleField($display, $fi
723                          . $newValue                          . $newValue
724                          . "')";                          . "')";
725    
726                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
727                  $new_id = mysql_insert_id();                  $new_id = xx_insert_id();
728                  printf("%s <b>%s</b> successfully added.", $display, $newValue_display);                  printf("%s <b>%s</b> successfully added.", $display, $newValue_display);
729          }          }
730          else printf ("%s", $err_msg);          else printf ("%s", $err_msg);
# Line 809  function insertStaff($access_id, $first_ Line 809  function insertStaff($access_id, $first_
809                          . "')";                          . "')";
810                                    
811                  // Write the new row to the database                  // Write the new row to the database
812                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
813                  $staff_id = mysql_insert_id();                  $staff_id = xx_insert_id();
814                                    
815                  // Call staff form back                  // Call staff form back
816                  formStaff($staff_id);                  formStaff($staff_id);
# Line 884  function insertStyle($css_file, $footer_ Line 884  function insertStyle($css_file, $footer_
884                          . "')";                          . "')";
885                                    
886                  // Write the new row to the database                  // Write the new row to the database
887                  if (mysql_tryquery($sql)) printf("Added <b>%s</b> style.", $style_title_display);                  if (xx_tryquery($sql)) printf("Added <b>%s</b> style.", $style_title_display);
888          }          }
889          else printf("%s", $err_msg);          else printf("%s", $err_msg);
890                    
# Line 942  function insertSubject($sess_staff_accou Line 942  function insertSubject($sess_staff_accou
942                          . ", now(), '"                          . ", now(), '"
943                          . $sess_staff_account                          . $sess_staff_account
944                          . "')";                          . "')";
945                  mysql_tryquery ($sql);                  xx_tryquery ($sql);
946                  $subject_id = mysql_insert_id();                  $subject_id = xx_insert_id();
947    
948                  // Insert this staff person as an assigned staff member to this subject                  // Insert this staff person as an assigned staff member to this subject
949                  $sql = "INSERT INTO sub_staff (subject_id, staff_id) VALUES ("                  $sql = "INSERT INTO sub_staff (subject_id, staff_id) VALUES ("
# Line 951  function insertSubject($sess_staff_accou Line 951  function insertSubject($sess_staff_accou
951                          . ", "                          . ", "
952                          . $sess_staff_id                          . $sess_staff_id
953                          . ")";                          . ")";
954                  mysql_tryquery($sql);                                            xx_tryquery($sql);                              
955                  formSubject($subject_id);                  formSubject($subject_id);
956          }          }
957    
# Line 1022  function insertVendor($vendor, $vendor_d Line 1022  function insertVendor($vendor, $vendor_d
1022                          . "', '"                          . "', '"
1023                          . $vendor_status                          . $vendor_status
1024                          . "')";                          . "')";
1025                  if (mysql_tryquery($sql)) printf("Added Vendor <b>%s</b>.", $vendor_display);                  if (xx_tryquery($sql)) printf("Added Vendor <b>%s</b>.", $vendor_display);
1026    
1027          }          }
1028          else printf("%s", $err_msg);          else printf("%s", $err_msg);

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

  ViewVC Help
Powered by ViewVC 1.1.26