$location->setCity($_POST["city"]); $_POST["city"] = $location->getCity(); $location->setState($_POST["state"]); $_POST["state"] = $location->getState(); $location->setStaffid($_POST["staffid"]); $_POST["staffid"] = $location->getStaffid(); $location->setPincode($_POST["pincode"]); $_POST["pincode"] = $location->getPincode(); $location->setDays($_POST["days"]); $_POST["days"] = $location->getDays(); $location->setTime($_POST["time"]); $_POST["time"] = $location->getTime(); $location->setLatitude($_POST["latitude"]); $_POST["latitude"] = $location->getLatitude(); $location->setLongitude($_POST["longitude"]); $_POST["longitude"] = $location->getLongitude(); $locQ = new LocationQuery(); $locQ->connect(); #************************************************************************** #* Insert new library member #************************************************************************** $locationid = $locQ->insert($location); $locQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); $msg = $loc->getText("locNewSuccess"); header("Location: ../circ/loc_view.php?locationid=" . U($locationid) . "&reset=Y&msg=" . U($msg)); exit;
if (isset($_POST["page"])) { $currentPageNmbr = $_POST["page"]; } else { $currentPageNmbr = 1; } $searchType = $_POST["searchType"]; $searchText = trim($_POST["searchText"]); # remove redundant whitespace $searchText = preg_replace('/\\s+/', " ", $searchText); if ($searchType == "location") { $sType = OBIB_SEARCH_LOCATION; } #**************************************************************************** #* Search database #**************************************************************************** $lotQ = new LocationQuery(); $lotQ->setItemsPerPage(OBIB_ITEMS_PER_PAGE); $lotQ->connect(); $lotQ->execSearch($sType, $searchText, $currentPageNmbr); #************************************************************************** #* Show location view screen if only one result from location search query #************************************************************************** if ($sType == OBIB_SEARCH_LOCATION && $lotQ->getRowCount() == 1) { $lot = $lotQ->fetchLocation(); $lotQ->close(); header("Location: ../circ/loc_view.php?locationid=" . U($lot->getLocationid()) . "&reset=Y"); exit; } #************************************************************************** #* Show search results #**************************************************************************
<?php /* This file is part of a copyrighted work; it is distributed with NO WARRANTY. * See the file COPYRIGHT.html for more details. */ require_once "../functions/inputFuncs.php"; require_once "../classes/Location.php"; require_once "../classes/LocationQuery.php"; $locQ = new LocationQuery(); $locQ->connect(); $locations = $locQ->getLocations(); $allLocations = $locQ->getAssoc($locations); $locQ->close(); $fields = array("location" => inputField('select', 'locationid', $location->getLocationid(), NULL, $allLocations)); ?> <table class="primary"> <tr> <th colspan="2" valign="top" nowrap="yes" align="left"> <?php echo H($headerWording); ?> </td> </tr> <?php foreach ($fields as $title => $html) { ?> <tr> <td nowrap="true" class="primary" valign="top">
<?php printInputText("copyDesc", 40, 40, $postVars, $pageErrors); ?> </td> </tr> <tr> <td nowrap="true" class="primary" valign="top"> <?php echo $loc->getText("biblioCopyLocation"); ?> : </td> <td valign="top" class="primary"> <?php $locQ = new LocationQuery(); $locQ->connect(); $locations = $locQ->getLocations(); $locQ->close(); echo "<select name=\"location\""; echo ">\n"; foreach ($locations as $location) { echo "<option value=\"" . H($location->getLocationid()) . "\""; if ($copy->getLocationid() == $location->getLocationid()) { echo " selected"; } echo ">" . H($location->getAddressOne() . " - " . $location->getAddressTwo()) . "</option>\n"; } echo "</select>\n"; ?> </td>
*/ require_once "../shared/common.php"; $tab = "circulation"; $restrictToMbrAuth = TRUE; $nav = "locdelete"; require_once "../shared/logincheck.php"; require_once "../classes/Location.php"; require_once "../classes/LocationQuery.php"; require_once "../classes/BiblioSearchQuery.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); $locationid = $_GET["locationid"]; #**************************************************************************** #* Getting Location name #**************************************************************************** $locQ = new LocationQuery(); $locQ->connect(); $location = $locQ->get($locationid); $locQ->close(); $locationName = $location->getAddressOne() . " " . $location->getAddressTwo(); #**************************************************************************** #* Check to see if there are any books checked out #**************************************************************************** $biblioQ = new BiblioSearchQuery(); $biblioQ->connect(); if ($biblioQ->errorOccurred()) { $biblioQ->close(); displayErrorPage($biblioQ); } if (!$biblioQ->checkoutLocationQuery($locationid)) { $biblioQ->close();
$location->setLastChangeUserid($_SESSION["userid"]); $location->setStaffid($_POST["staffid"]); $_POST["staffid"] = $location->getStaffid(); $location->setCity($_POST["city"]); $_POST["city"] = $location->getCity(); $location->setState($_POST["state"]); $_POST["state"] = $location->getState(); $location->setPincode($_POST["pincode"]); $_POST["pincode"] = $location->getPincode(); $location->setDays($_POST["days"]); $_POST["days"] = $location->getDays(); $location->setTime($_POST["time"]); $_POST["time"] = $location->getTime(); $location->setLatitude($_POST["latitude"]); $_POST["latitude"] = $location->getLatitude(); $location->setLongitude($_POST["longitude"]); $_POST["longitude"] = $location->getLongitude(); #************************************************************************** #* Update library Location #************************************************************************** $locationQ = new LocationQuery(); $locationQ->update($location); $locationQ->close(); #************************************************************************** #* Destroy form values and errors #************************************************************************** unset($_SESSION["postVars"]); unset($_SESSION["pageErrors"]); $msg = $loc->getText("locEditSuccess"); header("Location: ../circ/loc_view.php?locationid=" . U($location->getLocationid()) . "&reset=Y&msg=" . U($msg)); exit;
if ($copyQ->getRowCount() == 0) { ?> <tr> <td valign="top" colspan="<?php echo H($copyCols); ?> " class="primary" colspan="2"> <?php echo $loc->getText("biblioViewNoCopies"); ?> </td> </tr> <?php } else { $row_class = "primary"; $locQ = new LocationQuery(); $locQ->connect(); while ($copy = $copyQ->fetchCopy()) { if ($copy->getLocationid() == 0) { $location = "Not assigned"; } else { $location = $locQ->getForBiblioCopy($copy->getLocationid()); } ?> <tr> <?php if ($tab == "cataloging") { ?> <td valign="top" class="<?php echo H($row_class); ?>
require_once "../shared/common.php"; $tab = "circulation"; $restrictToMbrAuth = TRUE; $nav = "deletedone"; $restrictInDemo = true; require_once "../shared/logincheck.php"; require_once "../classes/LocationQuery.php"; require_once "../functions/errorFuncs.php"; require_once "../classes/Localize.php"; $loc = new Localize(OBIB_LOCALE, $tab); $locationid = $_GET["locationid"]; $locationName = $_GET["name"]; #************************************************************************** #* Delete location #************************************************************************** $locationQ = new LocationQuery(); $locationQ->connect(); $locationQ->delete($locationid); $locationQ->close(); #************************************************************************** #* Show success page #************************************************************************** require_once "../shared/header.php"; echo $loc->getText("locDelSuccess", array("name" => $locationName)); ?> <br><br> <a href="../circ/loc_index.php"><?php echo $loc->getText("locDelReturn"); ?> </a> <?php