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 |
|
|
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 |
|
|
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 |
|
|
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); |
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); |
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. |
241 |
. ", " |
. ", " |
242 |
. $highlighted |
. $highlighted |
243 |
. ")"; |
. ")"; |
244 |
mysql_tryquery($sql); |
xx_tryquery($sql); |
245 |
|
|
246 |
} |
} |
247 |
|
|
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 |
} |
} |
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 |
} |
} |
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 |
|
|
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 = ""; |
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 |
} |
} |