Ejemplo n.º 1
0
        ?>
&amp;tab=<?php 
        echo HURL($tab);
        ?>
">
      <img src="../images/<?php 
        echo HURL($materialImageFiles[$biblio->getMaterialCd()]);
        ?>
" width="20" height="20" border="0" align="bottom" alt="<?php 
        echo H($materialTypeDm[$biblio->getMaterialCd()]);
        ?>
"></a>
    </td>
    <td nowrap="true" class="primary" valign="top" align="center" rowspan="2">
      <?php 
        $bfq = new BiblioFieldQuery();
        $bfq->execSelect($biblio->getBibid());
        $flds = $bfq->fetchField();
        if ($flds->_fieldData) {
            $filepath = "../pictures/" . $flds->_fieldData;
            $title = H($biblio->getTitle());
            if ($thumbpath = make_thumbnail($filepath, array('width' => 200))) {
                ?>
      <a href="<?php 
                echo $filepath;
                ?>
" title="<?php 
                echo $title;
                ?>
" target="_blank"><img src="<?php 
                echo $thumbpath;
require_once "../classes/BiblioField.php";
require_once "../classes/BiblioFieldQuery.php";
require_once "../classes/Localize.php";
$loc = new Localize(OBIB_LOCALE, $tab);
$postVars = array();
$pageErrors = array();
if (isset($_GET["bibid"])) {
    $bibid = $_GET["bibid"];
    if (!isset($_GET['fieldid'])) {
        Fatal::internalError('no fieldid set');
    }
    $fieldid = $_GET["fieldid"];
    #****************************************************************************
    #*  Reading database for subfield values
    #****************************************************************************
    $fieldQ = new BiblioFieldQuery();
    $fieldQ->connect();
    if ($fieldQ->errorOccurred()) {
        $fieldQ->close();
        displayErrorPage($fieldQ);
    }
    $field = $fieldQ->doQuery($bibid, $fieldid);
    if ($fieldQ->errorOccurred()) {
        $fieldQ->close();
        displayErrorPage($fieldQ);
    }
    $fieldQ->close();
    $postVars["bibid"] = $bibid;
    $postVars["fieldid"] = $bibid;
    $postVars["tag"] = $field->getTag();
    $postVars["ind1Cd"] = $field->getInd1Cd();
 function insert($copy)
 {
     // jalg multi 5-7-2015 ALX
     # checking for duplicate barcode number
     $dupBarcode = $this->_dupBarcode($copy->getBarcodeNmbr());
     if ($this->errorOccurred()) {
         return false;
     }
     if ($dupBarcode) {
         $this->_errorOccurred = true;
         $this->_error = $this->_loc->getText("biblioCopyQueryErr2", array("barcodeNmbr" => $copy->getBarcodeNmbr()));
         return false;
     }
     $bibid = $copy->getBibid();
     $sql = $this->mkSQL("insert into biblio_copy values (%N" . ",null, now(), %Q, %S, %Q, sysdate() " . ",%S , %S, 0)", $copy->getBibid(), $copy->getCopyDesc(), $copy->getBarcodeNmbr(), $copy->getStatusCd(), $copy->getDueBackDt(), $copy->getMbrid());
     $ret = $this->act($sql);
     //, $this->_loc->getText("biblioCopyQueryErr3"));
     if (!$ret) {
         return $ret;
     }
     $copyid = $this->getInsertID();
     $copy->setCopyid($copyid);
     $this->setCustomFields($bibid, $copyid, $copy->_custom);
     if (!empty($copy->_usMARC_hold)) {
         //echo '<h3> insert hold tags '.json_encode($copy->_usMARC_hold).'</h3>';
         BiblioFieldQuery::insertFields($bibid, $copyid, $copy->_usMARC_hold, $this);
     }
     return $ret;
 }