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

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

branches/paul/admin/include/subject_builder.php revision 68 by dpavlin, Thu Mar 18 19:24:54 2004 UTC branches/paul_xx/admin/include/subject_builder.php revision 69 by dpavlin, Thu Mar 18 20:01:09 2004 UTC
# Line 44  function assignSubOtherSub($subject_id_a Line 44  function assignSubOtherSub($subject_id_a
44                          . " AND othersub_id = "                          . " AND othersub_id = "
45                          . $subject_id_array[$subscript];                          . $subject_id_array[$subscript];
46    
47                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
48                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
49    
50                          $sql = "INSERT INTO sub_othersub (subject_id, othersub_id) VALUES ("                          $sql = "INSERT INTO sub_othersub (subject_id, othersub_id) VALUES ("
51                                  . $subject_id                                  . $subject_id
52                                  . ", "                                  . ", "
53                                  . $subject_id_array[$subscript]                                  . $subject_id_array[$subscript]
54                                  . ")";                                  . ")";
55                          mysql_tryquery($sql);                          xx_tryquery($sql);
56                                                    
57                  } // other subject not already assigned                  } // other subject not already assigned
58    
# Line 83  function assignSubPage($page_id_array, $ Line 83  function assignSubPage($page_id_array, $
83                          . " AND page_id = "                          . " AND page_id = "
84                          . $page_id_array[$subscript];                          . $page_id_array[$subscript];
85    
86                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
87                  if (mysql_num_rows($rs) == 0) {                  if (xx_num_rows($rs) == 0) {
88    
89                          $sql = "INSERT INTO sub_page (subject_id, page_id) VALUES ("                          $sql = "INSERT INTO sub_page (subject_id, page_id) VALUES ("
90                                  . $subject_id                                  . $subject_id
91                                  . ", "                                  . ", "
92                                  . $page_id_array[$subscript]                                  . $page_id_array[$subscript]
93                                  . ")";                                  . ")";
94                          mysql_tryquery($sql);                          xx_tryquery($sql);
95                                                    
96                  } // page not already assigned                  } // page not already assigned
97    
# Line 120  function deleteSubjectBuilder($infotype_ Line 120  function deleteSubjectBuilder($infotype_
120                  . $resource_id . " AND subject_id = "                  . $resource_id . " AND subject_id = "
121                  . $subject_id . " AND infotype_id = "                  . $subject_id . " AND infotype_id = "
122                  . $infotype_id;                  . $infotype_id;
123          mysql_tryquery($sql);          xx_tryquery($sql);
124    
125          header("Location: subject_builder.phtml?subject_id=" . $subject_id);          header("Location: subject_builder.phtml?subject_id=" . $subject_id);
126    
# Line 146  function deleteSubOtherSub($key_list_arr Line 146  function deleteSubOtherSub($key_list_arr
146                          . $subject_id                          . $subject_id
147                          . " AND othersub_id = "                          . " AND othersub_id = "
148                          . $key_list_array[$element];                          . $key_list_array[$element];
149                  mysql_tryquery($sql);                  xx_tryquery($sql);
150          }          }
151                    
152          header("Location: subject_builder.phtml?subject_id=" . $subject_id);          header("Location: subject_builder.phtml?subject_id=" . $subject_id);
# Line 172  function deleteSubPage($key_list_array, Line 172  function deleteSubPage($key_list_array,
172                          . $subject_id                          . $subject_id
173                          . " AND page_id = "                          . " AND page_id = "
174                          . $key_list_array[$element];                          . $key_list_array[$element];
175                  mysql_tryquery($sql);                  xx_tryquery($sql);
176          }          }
177                    
178          header("Location: subject_builder.phtml?subject_id=" . $subject_id);          header("Location: subject_builder.phtml?subject_id=" . $subject_id);
# Line 204  function insertSubjectBuilder($highlight Line 204  function insertSubjectBuilder($highlight
204    
205                  // Find the default information type for this resource                  // Find the default information type for this resource
206                  $sql = "SELECT infotype_id FROM resource WHERE resource_id = " . $resource_id;                  $sql = "SELECT infotype_id FROM resource WHERE resource_id = " . $resource_id;
207                  $rs = mysql_tryquery($sql);                  $rs = xx_tryquery($sql);
208                  $row = mysql_fetch_array ($rs, MYSQL_ASSOC);                  $row = xx_fetch_array ($rs, xx_ASSOC);
209                  $infotype_id = $row["infotype_id"];                  $infotype_id = $row["infotype_id"];
210    
211                  // Check to see if it's already there.                  // Check to see if it's already there.
# Line 241  function insertSubjectBuilder($highlight Line 241  function insertSubjectBuilder($highlight
241                                  . ", "                                  . ", "
242                                  . $highlighted                                  . $highlighted
243                                  . ")";                                  . ")";
244                          mysql_tryquery($sql);                          xx_tryquery($sql);
245    
246                  }                  }
247    
# Line 264  function rqsPublish($subject_id){ Line 264  function rqsPublish($subject_id){
264    
265          $sql = "UPDATE subject SET rqs_published = '1' WHERE subject_id = "          $sql = "UPDATE subject SET rqs_published = '1' WHERE subject_id = "
266                  . $subject_id;                  . $subject_id;
267          mysql_tryquery($sql);          xx_tryquery($sql);
268    
269          header("Location: subject_builder.phtml?subject_id=" . $subject_id);          header("Location: subject_builder.phtml?subject_id=" . $subject_id);
270  }  }
# Line 282  function rqsUnpublish($subject_id){ Line 282  function rqsUnpublish($subject_id){
282    
283          $sql = "UPDATE subject SET rqs_published = '0' WHERE subject_id = "          $sql = "UPDATE subject SET rqs_published = '0' WHERE subject_id = "
284                  . $subject_id;                  . $subject_id;
285          mysql_tryquery($sql);          xx_tryquery($sql);
286    
287          header("Location: subject_builder.phtml?subject_id=" . $subject_id);          header("Location: subject_builder.phtml?subject_id=" . $subject_id);
288  }  }
# Line 302  function updateRQSUpdate($sess_staff_acc Line 302  function updateRQSUpdate($sess_staff_acc
302                  . $sess_staff_account                  . $sess_staff_account
303                  . "' WHERE subject_id = "                  . "' WHERE subject_id = "
304                  . $subject_id;                  . $subject_id;
305          mysql_tryquery($sql);          xx_tryquery($sql);
306  }  }
307    
308    
# Line 332  function updateSubjectBuilder($descripti Line 332  function updateSubjectBuilder($descripti
332                  . " OR infotype_id = "                  . " OR infotype_id = "
333                  . $infotype_id                  . $infotype_id
334                  . ")";                  . ")";
335          mysql_tryquery($sql);          xx_tryquery($sql);
336                                    
337          // If the user opted for default resource description, void out the incoming $description;          // If the user opted for default resource description, void out the incoming $description;
338          if ($descr_default == 1) $description = "";          if ($descr_default == 1) $description = "";
# Line 360  function updateSubjectBuilder($descripti Line 360  function updateSubjectBuilder($descripti
360                          . "', '"                          . "', '"
361                          . $description                          . $description
362                          . "')";                          . "')";
363          mysql_tryquery($sql);          xx_tryquery($sql);
364    
365          header("Location: subject_builder.phtml?subject_id=" . $subject_id . "#" . $resource_id);          header("Location: subject_builder.phtml?subject_id=" . $subject_id . "#" . $resource_id);
366  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.26