Пример #1
0
        $copyQ->close();
        displayErrorPage($copyQ);
    }
    $_POST["barcodeNmbr"] = sprintf("%0" . $nzeros . "s", $bibid) . $CopyNmbr;
}
#****************************************************************************
#*  Validate data
#****************************************************************************
$bibid = $_POST["bibid"];
$copy = new BiblioCopy();
$copy->setBibid($bibid);
$copy->setCopyDesc($_POST["copyDesc"]);
$_POST["copyDesc"] = $copy->getCopyDesc();
$copy->setBarcodeNmbr($_POST["barcodeNmbr"]);
$_POST["barcodeNmbr"] = $copy->getBarcodeNmbr();
$copy->setLocationid($_POST["location"]);
$_POST["location"] = $copy->getCopyDesc();
$dmQ = new DmQuery();
$dmQ->connect();
$customFields = $dmQ->getAssoc('biblio_copy_fields_dm');
$dmQ->close();
foreach ($customFields as $name => $title) {
    if (isset($_REQUEST['custom_' . $name])) {
        $copy->setCustom($name, $_REQUEST['custom_' . $name]);
    }
}
$validBarco = $_POST["validBarco"];
$validData = $copy->validateData($validBarco);
if (!$validData) {
    $pageErrors["barcodeNmbr"] = $copy->getBarcodeNmbrError();
    $_SESSION["postVars"] = $_POST;
Пример #2
0
 function _mkObj($array)
 {
     $copy = new BiblioCopy();
     $copy->setBibid($array["bibid"]);
     $copy->setCopyid($array["copyid"]);
     $copy->setCreateDt($array["create_dt"]);
     $copy->setCopyDesc($array["copy_desc"]);
     $copy->setBarcodeNmbr($array["barcode_nmbr"]);
     $copy->setStatusCd($array["status_cd"]);
     $copy->setLocationid($array["locationid"]);
     $copy->setStatusBeginDt($array["status_begin_dt"]);
     $copy->setDueBackDt($array["due_back_dt"]);
     $copy->setDaysLate($array["days_late"]);
     $copy->setMbrid($array["mbrid"]);
     $copy->setRenewalCount($array["renewal_count"]);
     $copy->_custom = $this->getCustomFields($array['bibid'], $array['copyid']);
     return $copy;
 }