44 |
. " AND othersub_id = " |
. " AND othersub_id = " |
45 |
. $subject_id_array[$subscript]; |
. $subject_id_array[$subscript]; |
46 |
|
|
47 |
$rs = mysql_query($sql); |
$rs = xx_query($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 |
53 |
. $subject_id_array[$subscript] |
. $subject_id_array[$subscript] |
54 |
. ")"; |
. ")"; |
55 |
|
|
56 |
if (!mysql_query($sql, $con)){ |
if (!xx_query($sql, $con)){ |
57 |
sql_err($con); |
sql_err($con); |
58 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
59 |
bailout(); |
bailout(); |
60 |
} // bad write |
} // bad write |
61 |
else { |
else { |
62 |
mysql_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
63 |
|
|
64 |
} // good write of sub_othersub |
} // good write of sub_othersub |
65 |
|
|
92 |
. " AND page_id = " |
. " AND page_id = " |
93 |
. $page_id_array[$subscript]; |
. $page_id_array[$subscript]; |
94 |
|
|
95 |
$rs = mysql_query($sql); |
$rs = xx_query($sql); |
96 |
if (mysql_num_rows($rs) == 0) { |
if (xx_num_rows($rs) == 0) { |
97 |
|
|
98 |
$sql = "INSERT INTO sub_page (subject_id, page_id) VALUES (" |
$sql = "INSERT INTO sub_page (subject_id, page_id) VALUES (" |
99 |
. $subject_id |
. $subject_id |
101 |
. $page_id_array[$subscript] |
. $page_id_array[$subscript] |
102 |
. ")"; |
. ")"; |
103 |
|
|
104 |
if (!mysql_query($sql, $con)){ |
if (!xx_query($sql, $con)){ |
105 |
sql_err($con); |
sql_err($con); |
106 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
107 |
bailout(); |
bailout(); |
108 |
} // bad write |
} // bad write |
109 |
else { |
else { |
110 |
mysql_query("UNLOCK TABLES", $con); |
xx_query("UNLOCK TABLES", $con); |
111 |
|
|
112 |
} // good write of sub_page |
} // good write of sub_page |
113 |
|
|
139 |
. $subject_id . " AND infotype_id = " |
. $subject_id . " AND infotype_id = " |
140 |
. $infotype_id; |
. $infotype_id; |
141 |
|
|
142 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
143 |
sql_err($sql); |
sql_err($sql); |
144 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
145 |
bailout(); |
bailout(); |
146 |
} |
} |
147 |
else { |
else { |
148 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
149 |
} |
} |
150 |
|
|
151 |
header("Location: subject_builder.phtml?subject_id=" . $subject_id); |
header("Location: subject_builder.phtml?subject_id=" . $subject_id); |
174 |
. $key_list_array[$element]; |
. $key_list_array[$element]; |
175 |
|
|
176 |
// Failed |
// Failed |
177 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
178 |
sql_err($sql); |
sql_err($sql); |
179 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
180 |
bailout(); |
bailout(); |
181 |
} |
} |
182 |
|
|
183 |
// Succeeded |
// Succeeded |
184 |
else { |
else { |
185 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
186 |
} |
} |
187 |
} |
} |
188 |
|
|
211 |
. $key_list_array[$element]; |
. $key_list_array[$element]; |
212 |
|
|
213 |
// Failed |
// Failed |
214 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
215 |
sql_err($sql); |
sql_err($sql); |
216 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
217 |
bailout(); |
bailout(); |
218 |
} |
} |
219 |
|
|
220 |
// Succeeded |
// Succeeded |
221 |
else { |
else { |
222 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
223 |
} |
} |
224 |
} |
} |
225 |
|
|
252 |
|
|
253 |
// Find the default information type for this resource |
// Find the default information type for this resource |
254 |
$sql = "SELECT infotype_id FROM resource WHERE resource_id = " . $resource_id; |
$sql = "SELECT infotype_id FROM resource WHERE resource_id = " . $resource_id; |
255 |
$rs = mysql_query($sql, $con); |
$rs = xx_query($sql, $con); |
256 |
$row = mysql_fetch_array ($rs); |
$row = xx_fetch_array ($rs); |
257 |
$infotype_id = $row["infotype_id"]; |
$infotype_id = $row["infotype_id"]; |
258 |
|
|
259 |
// Check to see if it's already there. |
// Check to see if it's already there. |
293 |
// Debugging |
// Debugging |
294 |
// printf("sql was: %s<BR>", $sql); |
// printf("sql was: %s<BR>", $sql); |
295 |
|
|
296 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
297 |
sql_err($sql); |
sql_err($sql); |
298 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
299 |
bailout(); |
bailout(); |
300 |
} |
} |
301 |
else { |
else { |
302 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
303 |
} |
} |
304 |
|
|
305 |
} |
} |
325 |
. $subject_id; |
. $subject_id; |
326 |
|
|
327 |
// Failed |
// Failed |
328 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
329 |
sql_err($sql); |
sql_err($sql); |
330 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
331 |
bailout(); |
bailout(); |
332 |
} |
} |
333 |
|
|
334 |
// Succeeded |
// Succeeded |
335 |
else { |
else { |
336 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
337 |
} |
} |
338 |
|
|
339 |
header("Location: subject_builder.phtml?subject_id=" . $subject_id); |
header("Location: subject_builder.phtml?subject_id=" . $subject_id); |
354 |
. $subject_id; |
. $subject_id; |
355 |
|
|
356 |
// Failed |
// Failed |
357 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
358 |
sql_err($sql); |
sql_err($sql); |
359 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
360 |
bailout(); |
bailout(); |
361 |
} |
} |
362 |
|
|
363 |
// Succeeded |
// Succeeded |
364 |
else { |
else { |
365 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
366 |
} |
} |
367 |
|
|
368 |
header("Location: subject_builder.phtml?subject_id=" . $subject_id); |
header("Location: subject_builder.phtml?subject_id=" . $subject_id); |
385 |
. $subject_id; |
. $subject_id; |
386 |
|
|
387 |
// Failed |
// Failed |
388 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
389 |
sql_err($sql); |
sql_err($sql); |
390 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
391 |
bailout(); |
bailout(); |
392 |
} |
} |
393 |
|
|
394 |
// Succeeded |
// Succeeded |
395 |
else { |
else { |
396 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
397 |
} |
} |
398 |
} |
} |
399 |
|
|
425 |
. $infotype_id |
. $infotype_id |
426 |
. ")"; |
. ")"; |
427 |
|
|
428 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
429 |
sql_err($sql); |
sql_err($sql); |
430 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
431 |
bailout(); |
bailout(); |
432 |
} |
} |
433 |
else { |
else { |
434 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
435 |
} |
} |
436 |
|
|
437 |
// 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; |
461 |
. $description |
. $description |
462 |
. "')"; |
. "')"; |
463 |
|
|
464 |
if (!mysql_query ($sql, $con)){ |
if (!xx_query ($sql, $con)){ |
465 |
sql_err($sql); |
sql_err($sql); |
466 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
467 |
bailout(); |
bailout(); |
468 |
} |
} |
469 |
else { |
else { |
470 |
mysql_query ("UNLOCK TABLES", $con); |
xx_query ("UNLOCK TABLES", $con); |
471 |
} |
} |
472 |
|
|
473 |
header("Location: subject_builder.phtml?subject_id=" . $subject_id . "#" . $resource_id); |
header("Location: subject_builder.phtml?subject_id=" . $subject_id . "#" . $resource_id); |