if (preg_match('~^([^/]*)/admin$~', $tag, $m)) { header('Location: ' . BASE_URL . 'admin/?tag=' . urlencode($m[1])); } if (preg_match('~^([^/]*)/staff$~', $tag, $m)) { header('Location: ' . BASE_URL . 'staff/?tag=' . urlencode($m[1])); } if (is_numeric($tag)) { $tag = $db->getTagById($tag); if ($tag) { header('Location: ' . BASE_URL . urlencode($tag)); } else { header('Location: ' . BASE_URL); } exit; } $expected_tag = string_to_underscore_name($tag); if ($expected_tag != $tag) { header('Location: ' . BASE_URL . $expected_tag); exit; } else { $data = $db->getLicenseData($tag); if (!$data) { $msg = "No license found for '{$tag}'."; include 'browse.php'; exit; } } extract($data); $ill_any = max($ill_print, $ill_ariel, $ill_electronic); $nyaill_any = 'No'; if ($ill_any == 1) {
$id = $_POST['id']; $vendor = false; $consortium = false; if (isset($_POST['newvendor']) && ($vendorname = trim($_POST['newvendor']))) { $vendor = $db->cvUpdate('vendor', -1, $vendorname); } else { $vendor = $_POST['vendor']; } if (isset($_POST['newconsortium']) && ($consortiumname = trim($_POST['newconsortium']))) { $consortium - $db->cvUpdate('consortium', -1, $consortiumname); } else { $consortium = $_POST['consortium']; } $title = trim(pv('title')); //$tag=trim(pv('tag')); $tag = string_to_underscore_name($title); $e_reserves = pv('e_reserves', 0); $handouts = pv('handouts', 2); $images = pv('images', 2); $course_pack = pv('course_pack', 0); $durable_url = pv('durable_url', 0); $alumni_access = pv('alumni_access', 0); $ill_print = pv('ill_print', 0); $ill_electronic = pv('ill_electronic', 0); $ill_ariel = pv('ill_ariel', 0); $walk_in = pv('walk_in', 0); $research_private_study = pv('research_private_study', 0); $blackboard = pv('blackboard', 0); $perpetual_access = pv('perpetual_access', 0); $perpetual_access_note = pv('perpetual_access_note', ''); $sherpa_romeo = pv('sherpa_romeo', '');