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

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

branches/paul/admin/include/assign.php revision 68 by dpavlin, Thu Mar 18 19:24:54 2004 UTC branches/paul_xx/admin/include/assign.php revision 69 by dpavlin, Thu Mar 18 20:01:09 2004 UTC
# Line 41  function assignLibunitStaff($staff_id_ar Line 41  function assignLibunitStaff($staff_id_ar
41                  // Check to make sure that the staff isn't already assigned                  // Check to make sure that the staff isn't already assigned
42                  $sql = "SELECT * FROM libunit_staff WHERE libunit_id = " . $libunit_id .                  $sql = "SELECT * FROM libunit_staff WHERE libunit_id = " . $libunit_id .
43                  " AND staff_id = " . $staff_id_array[$subscript];                  " AND staff_id = " . $staff_id_array[$subscript];
44                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
45                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
46                    
47                          $sql = "INSERT INTO libunit_staff (libunit_id, staff_id) VALUES ("                          $sql = "INSERT INTO libunit_staff (libunit_id, staff_id) VALUES ("
48                                  . $libunit_id                                  . $libunit_id
# Line 50  function assignLibunitStaff($staff_id_ar Line 50  function assignLibunitStaff($staff_id_ar
50                                  . $staff_id_array[$subscript]                                  . $staff_id_array[$subscript]
51                                  . ")";                                  . ")";
52                    
53                          mysql_tryquery($sql);                          xx_tryquery($sql);
54                                                    
55                  } // staff not already assigned                  } // staff not already assigned
56    
# Line 82  function assignResFeature($feature_id_ar Line 82  function assignResFeature($feature_id_ar
82                          . " AND feature_id = "                          . " AND feature_id = "
83                          . $feature_id_array[$subscript];                          . $feature_id_array[$subscript];
84    
85                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
86                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
87                    
88                          $sql = "INSERT INTO res_feature (resource_id, feature_id) VALUES ("                          $sql = "INSERT INTO res_feature (resource_id, feature_id) VALUES ("
89                                  . $resource_id                                  . $resource_id
# Line 91  function assignResFeature($feature_id_ar Line 91  function assignResFeature($feature_id_ar
91                                  . $feature_id_array[$subscript]                                  . $feature_id_array[$subscript]
92                                  . ")";                                  . ")";
93    
94                          mysql_tryquery($sql);                          xx_tryquery($sql);
95                                                    
96                  } // feature not already assigned                  } // feature not already assigned
97    
# Line 123  function assignResLoc($location_id_array Line 123  function assignResLoc($location_id_array
123                          . " AND location_id = "                          . " AND location_id = "
124                          . $location_id_array[$subscript];                          . $location_id_array[$subscript];
125    
126                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
127                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
128    
129                          $sql = "INSERT INTO res_loc (resource_id, location_id) VALUES ("                          $sql = "INSERT INTO res_loc (resource_id, location_id) VALUES ("
130                                  . $resource_id                                  . $resource_id
# Line 132  function assignResLoc($location_id_array Line 132  function assignResLoc($location_id_array
132                                  . $location_id_array[$subscript]                                  . $location_id_array[$subscript]
133                                  . ")";                                  . ")";
134    
135                          mysql_tryquery($sql);                          xx_tryquery($sql);
136    
137                  } // location not already assigned                  } // location not already assigned
138    
# Line 164  function assignResMastersubject($masters Line 164  function assignResMastersubject($masters
164                          . " AND mastersubject_id = "                          . " AND mastersubject_id = "
165                          . $mastersubject_id_array[$subscript];                          . $mastersubject_id_array[$subscript];
166                                    
167                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
168                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
169    
170                          $sql = "INSERT INTO res_mastersubject (resource_id, mastersubject_id) VALUES ("                          $sql = "INSERT INTO res_mastersubject (resource_id, mastersubject_id) VALUES ("
171                                  . $resource_id                                  . $resource_id
# Line 173  function assignResMastersubject($masters Line 173  function assignResMastersubject($masters
173                                  . $mastersubject_id_array[$subscript]                                  . $mastersubject_id_array[$subscript]
174                                  . ")";                                  . ")";
175                    
176                          mysql_tryquery($sql);                          xx_tryquery($sql);
177    
178                  } // mastersubject not already assigned                  } // mastersubject not already assigned
179    
# Line 205  function assignServLoc($location_id_arra Line 205  function assignServLoc($location_id_arra
205                          . " AND location_id = "                          . " AND location_id = "
206                          . $location_id_array[$subscript];                          . $location_id_array[$subscript];
207    
208                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
209                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
210                    
211                          $sql = "INSERT INTO serv_loc (service_id, location_id) VALUES ("                          $sql = "INSERT INTO serv_loc (service_id, location_id) VALUES ("
212                                  . $service_id                                  . $service_id
# Line 214  function assignServLoc($location_id_arra Line 214  function assignServLoc($location_id_arra
214                                  . $location_id_array[$subscript]                                  . $location_id_array[$subscript]
215                                  . ")";                                  . ")";
216    
217                          mysql_tryquery($sql);                          xx_tryquery($sql);
218                                                    
219                  } // location not already assigned                  } // location not already assigned
220    
# Line 246  function assignServServtype($servicetype Line 246  function assignServServtype($servicetype
246                          . " AND servicetype_id = "                          . " AND servicetype_id = "
247                          . $servicetype_id_array[$subscript];                          . $servicetype_id_array[$subscript];
248    
249                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
250                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
251    
252                          $sql = "INSERT INTO serv_servtype (service_id, servicetype_id) VALUES ("                          $sql = "INSERT INTO serv_servtype (service_id, servicetype_id) VALUES ("
253                                  . $service_id                                  . $service_id
# Line 255  function assignServServtype($servicetype Line 255  function assignServServtype($servicetype
255                                  . $servicetype_id_array[$subscript]                                  . $servicetype_id_array[$subscript]
256                                  . ")";                                  . ")";
257    
258                          mysql_tryquery($sql);                          xx_tryquery($sql);
259                                                    
260                  } // servicetype not already assigned                  } // servicetype not already assigned
261    
# Line 289  function assignStaffLibunit($libunit_id_ Line 289  function assignStaffLibunit($libunit_id_
289                          . " AND libunit_id = "                          . " AND libunit_id = "
290                          . $libunit_id_array[$subscript];                          . $libunit_id_array[$subscript];
291    
292                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
293                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
294    
295                          $sql = "INSERT INTO libunit_staff (libunit_id, staff_id) VALUES ("                          $sql = "INSERT INTO libunit_staff (libunit_id, staff_id) VALUES ("
296                                  . $libunit_id_array[$subscript]                                  . $libunit_id_array[$subscript]
# Line 298  function assignStaffLibunit($libunit_id_ Line 298  function assignStaffLibunit($libunit_id_
298                                  . $staff_id                                  . $staff_id
299                                  . ")";                                  . ")";
300                    
301                          mysql_tryquery($sql);                          xx_tryquery($sql);
302                                                    
303                  } // assignment didn't already exist                  } // assignment didn't already exist
304    
# Line 330  function assignStaffSub($staff_id, $subj Line 330  function assignStaffSub($staff_id, $subj
330                          . " AND subject_id = "                          . " AND subject_id = "
331                          . $subject_id_array[$subscript];                          . $subject_id_array[$subscript];
332    
333                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
334                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
335    
336                          $sql = "INSERT INTO sub_staff (subject_id, staff_id) VALUES ("                          $sql = "INSERT INTO sub_staff (subject_id, staff_id) VALUES ("
337                                  . $subject_id_array[$subscript]                                  . $subject_id_array[$subscript]
# Line 339  function assignStaffSub($staff_id, $subj Line 339  function assignStaffSub($staff_id, $subj
339                                  . $staff_id                                  . $staff_id
340                                  . ")";                                  . ")";
341    
342                          mysql_tryquery($sql);                          xx_tryquery($sql);
343                                                    
344                  } // assignment didn't already exist                  } // assignment didn't already exist
345    
# Line 371  function assignSubCoursesub($coursesub_i Line 371  function assignSubCoursesub($coursesub_i
371                          . " AND coursesub_id = "                          . " AND coursesub_id = "
372                          . $coursesub_id_array[$subscript];                          . $coursesub_id_array[$subscript];
373    
374                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
375                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
376    
377                          $sql = "INSERT INTO sub_coursesub (subject_id, coursesub_id) VALUES ("                          $sql = "INSERT INTO sub_coursesub (subject_id, coursesub_id) VALUES ("
378                                  . $subject_id                                  . $subject_id
# Line 380  function assignSubCoursesub($coursesub_i Line 380  function assignSubCoursesub($coursesub_i
380                                  . $coursesub_id_array[$subscript]                                  . $coursesub_id_array[$subscript]
381                                  . ")";                                  . ")";
382    
383                          mysql_tryquery($sql);                          xx_tryquery($sql);
384                                                    
385                  } // coursesub not already assigned                  } // coursesub not already assigned
386    
# Line 412  function assignSubLoc($location_id_array Line 412  function assignSubLoc($location_id_array
412                          . " AND location_id = "                          . " AND location_id = "
413                          . $location_id_array[$subscript];                          . $location_id_array[$subscript];
414    
415                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
416                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
417    
418                          $sql = "INSERT INTO sub_loc (subject_id, location_id) VALUES ("                          $sql = "INSERT INTO sub_loc (subject_id, location_id) VALUES ("
419                                  . $subject_id                                  . $subject_id
# Line 421  function assignSubLoc($location_id_array Line 421  function assignSubLoc($location_id_array
421                                  . $location_id_array[$subscript]                                  . $location_id_array[$subscript]
422                                  . ")";                                  . ")";
423    
424                          mysql_tryquery($sql);                          xx_tryquery($sql);
425                                                    
426                  } // location not already assigned                  } // location not already assigned
427    
# Line 453  function assignSubMaster($mastersubject_ Line 453  function assignSubMaster($mastersubject_
453                          . " AND mastersubject_id = "                          . " AND mastersubject_id = "
454                          . $mastersubject_id_array[$subscript];                          . $mastersubject_id_array[$subscript];
455    
456                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
457                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
458    
459                          $sql = "INSERT INTO sub_mastersubject (subject_id, mastersubject_id) VALUES ("                          $sql = "INSERT INTO sub_mastersubject (subject_id, mastersubject_id) VALUES ("
460                                  . $subject_id                                  . $subject_id
# Line 462  function assignSubMaster($mastersubject_ Line 462  function assignSubMaster($mastersubject_
462                                  . $mastersubject_id_array[$subscript]                                  . $mastersubject_id_array[$subscript]
463                                  . ")";                                  . ")";
464    
465                          mysql_tryquery($sql);                          xx_tryquery($sql);
466                                                    
467                  } // location not already assigned                  } // location not already assigned
468    
# Line 494  function assignSubStaff($staff_id_array, Line 494  function assignSubStaff($staff_id_array,
494                          . " AND staff_id = "                          . " AND staff_id = "
495                          . $staff_id_array[$subscript];                          . $staff_id_array[$subscript];
496    
497                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
498                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
499    
500                          $sql = "INSERT INTO sub_staff (subject_id, staff_id) VALUES ("                          $sql = "INSERT INTO sub_staff (subject_id, staff_id) VALUES ("
501                                  . $subject_id                                  . $subject_id
# Line 503  function assignSubStaff($staff_id_array, Line 503  function assignSubStaff($staff_id_array,
503                                  . $staff_id_array[$subscript]                                  . $staff_id_array[$subscript]
504                                  . ")";                                  . ")";
505    
506                          mysql_tryquery($sql);                          xx_tryquery($sql);
507                  }                  }
508    
509          } // array of staff id's          } // array of staff id's

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

  ViewVC Help
Powered by ViewVC 1.1.26