Exemplo n.º 1
0
    ************************************************************************** -->
<script language="JavaScript" type="text/javascript">
<!--
function checkin(massCheckinFlg)
{
  document.checkinForm.massCheckin.value = massCheckinFlg;
  document.checkinForm.submit();
}
-->
</script>

<?php 
if (isset($_GET['barcode'])) {
    if (isset($_GET['mbrid']) and $_GET['mbrid']) {
        $memberQ = new MemberQuery();
        $mbr = $memberQ->get($_GET['mbrid']);
        echo '<p>';
        echo $loc->getText("Checked in %barcode% for ", array('barcode' => $_GET['barcode']));
        echo '<a href="../circ/mbr_view.php?mbrid=' . HURL($mbr->getMbrid()) . '&amp;reset=Y">';
        echo $loc->getText("%fname% %lname%", array('fname' => $mbr->getFirstName(), 'lname' => $mbr->getLastName()));
        echo '</a>.';
        echo '</p>';
        if (isset($_GET['late']) and $_GET['late']) {
            echo '<p><font class="error">' . $loc->getText("mbrViewOutHdr7") . ': ' . $_GET['late'] . '</font></p>';
        }
        $acctQ = new MemberAccountQuery();
        $balance = $acctQ->getBalance($mbr->getMbrid());
        $balMsg = "";
        if ($balance > 0) {
            $balText = moneyFormat($balance, 2);
            $balMsg = "<font class=\"error\">" . $loc->getText("mbrViewBalMsg", array("bal" => $balText)) . "</font><br><br>";
}
#****************************************************************************
#*  Loading a few domain tables into associative arrays
#****************************************************************************
$dmQ = new DmQuery();
$dmQ->connect();
$mbrClassifyDm = $dmQ->getAssoc("mbr_classify_dm");
$materialTypeDm = $dmQ->getAssoc("material_type_dm");
$materialImageFiles = $dmQ->getAssoc("material_type_dm", "image_file");
$dmQ->close();
#****************************************************************************
#*  Search database for member
#****************************************************************************
$mbrQ = new MemberQuery();
$mbrQ->connect();
$mbr = $mbrQ->get($mbrid);
$mbrQ->close();
#**************************************************************************
#*  Show member checkouts
#**************************************************************************
?>
<html>
<head>
<style type="text/css">
  <?php 
include "../css/style.php";
?>
</style>
<meta name="description" content="EspaBiblio Gestion de Bibliotecas">
<title>Carnet de <?php 
echo H($mbr->getFirstLastName());
Exemplo n.º 3
0
        $row_header = <<<INNERHTML
          <th style="width: 40%"><u>{$loc->getText($row[5])}</u></th>
          <th style="width: 23%"><u>{$loc->getText($row[6])}</u></th>
          <th style="width: 22%"><u>{$loc->getText($row[10])}</u></th>
          <th style="width: 15%; text-align: right;"><u>{$loc->getText($row[11])}</u></th>
INNERHTML;
        $html = '';
        $letters = array();
        $overdue_list = '';
        $mbrid = NULL;
        $oldmbrid = NULL;
        require_once '../classes/MemberQuery.php';
        $mbrQ = new MemberQuery();
        while ($row = $rpt->getTableRow($table)) {
            $row = array($row[5], $row[6], $row[10], $row[11], $row[2]);
            $mbr = $mbrQ->get(0 + array_pop($row));
            $mbrid = $mbr->getMbrid();
            if (!isset($oldmbrid)) {
                $oldmbrid = $mbrid;
            } else {
                if ($mbrid != $oldmbrid) {
                    $oldmbr = $mbrQ->get($oldmbrid);
                    $letters[] = getHtmlLetter($oldmbr, $row_header, $overdue_list);
                    $overdue_list = '';
                    $oldmbrid = $mbrid;
                }
            }
            $overdue_list .= <<<INNERHTML
        <tr>
          <td style="width: 40%">{$row['0']}</td>
          <td style="width: 23%">{$row['1']}</td>
Exemplo n.º 4
0
 function render($rpt)
 {
     list($rpt, $errs) = $rpt->variant_el(array('order_by' => 'member'));
     if (!empty($errs)) {
         Fatal::internalError('Unexpected report error');
     }
     $mbrQ = new MemberQuery();
     $lay = new Lay();
     $lay->pushFont('Helvetica', 10);
     $lay->container('Columns', array('margin-left' => '1in', 'margin-right' => '1in', 'margin-top' => '1in', 'margin-bottom' => '1in'));
     $mbr = NULL;
     $oldmbr = NULL;
     while ($row = $rpt->each()) {
         if ($row['mbrid'] != $oldmbr) {
             if ($oldmbr !== NULL) {
                 $lay->close();
                 $lay->container('Columns', array('margin-left' => '1in', 'margin-right' => '1in', 'margin-top' => '1in', 'margin-bottom' => '1in'));
             }
             $mbr = $mbrQ->get($row['mbrid']);
             $oldmbr = $row['mbrid'];
             $lay->container('Column', array('margin-left' => '3.25in'));
             $lay->container('TextLine');
             $lay->text(date('m/d/Y'));
             $lay->close();
             $lay->element('Spacer', array('height' => 14));
             $lines = array(OBIB_LIBRARY_NAME, '101 1st Street', 'Busytown, IA 11111-2222', 'phone: ' . OBIB_LIBRARY_PHONE, 'hours: ' . OBIB_LIBRARY_HOURS);
             foreach ($lines as $l) {
                 $lay->container('TextLine');
                 $lay->text($l);
                 $lay->close();
             }
             $lay->close();
             $lay->element('Spacer', array('height' => 14));
             $lay->container('TextLine');
             $lay->text($mbr->getFirstName() . ' ' . $mbr->getLastName());
             $lay->close();
             foreach (explode("\n", $mbr->getAddress()) as $l) {
                 $lay->container('TextLine');
                 $lay->text($l);
                 $lay->close();
             }
             $lay->element('Spacer', array('height' => 14));
             $lay->container('TextLine');
             $lay->text('Dear ' . $mbr->getFirstName() . ' ' . $mbr->getLastName() . ':');
             $lay->close();
             $lay->element('Spacer', array('height' => 9));
             $lay->container('Paragraph');
             $lay->container('TextLines');
             $lay->text('Our records show that the following library items ' . 'are checked out under your name and are past due.  Please ' . 'return them as soon as possible and pay any late fees due.');
             $lay->close();
             $lay->close();
             $lay->element('Spacer', array('height' => 28));
             $lay->container('TextLine');
             $lay->text('Sincerely,');
             $lay->close();
             $lay->element('Spacer', array('height' => 14));
             $lay->container('TextLine');
             $lay->text('The library staff at ' . OBIB_LIBRARY_NAME);
             $lay->close();
             $lay->element('Spacer', array('height' => 14));
             $lay->pushFont('Times-Italic', 12);
             $lay->container('Line');
             $lay->container('TextLine', array('width' => '1.5in', 'underline' => 1));
             $lay->text('Title');
             $lay->close();
             $lay->container('TextLine', array('width' => '1.5in', 'underline' => 1));
             $lay->text('Author');
             $lay->close();
             $lay->container('TextLine', array('width' => '1in', 'underline' => 1));
             $lay->text('Due Date');
             $lay->close();
             $lay->container('TextLine', array('width' => '0.75in', 'underline' => 1));
             $lay->text('Days Late');
             $lay->close();
             $lay->close();
             $lay->popFont();
         }
         $lay->container('Line');
         $lay->container('TextLine', array('width' => '1.5in'));
         $lay->text($row['title']);
         $lay->close();
         $lay->container('TextLine', array('width' => '1.5in'));
         $lay->text($row['author']);
         $lay->close();
         $lay->container('TextLine', array('width' => '1in'));
         $lay->text(date('m/d/y', strtotime($row['due_back_dt'])));
         $lay->close();
         $lay->container('TextLine', array('width' => '0.75in'));
         $lay->text($row['days_late']);
         $lay->close();
         $lay->close();
     }
     $lay->close();
     $lay->popFont();
     $lay->close();
 }
Exemplo n.º 5
0
require_once "../classes/Localize.php";
$loc = new Localize(OBIB_LOCALE, $tab);
#****************************************************************************
#*  Checking for post vars.  Go back to form if none found.
#****************************************************************************
if (count($_POST) == 0) {
    header("Location: ../circ/index.php");
    exit;
}
#****************************************************************************
#*  Validate data
#****************************************************************************
$mbrid = $_POST["mbrid"];
$mbrQ = new MemberQuery();
$mbrQ->connect();
$prev_mbr = $mbrQ->get($mbrid);
$schoolid = $prev_mbr->getSchoolId();
$prev_standard = $prev_mbr->getStandard();
$prev_grade = $prev_mbr->getGrade();
$mbr = new Member();
$mbr->setMbrid($_POST["mbrid"]);
$mbr->setBarcodeNmbr($_POST["barcodeNmbr"]);
$_POST["barcodeNmbr"] = $mbr->getBarcodeNmbr();
$mbr->setLastChangeUserid($_SESSION["userid"]);
$mbr->setLastName($_POST["lastName"]);
$_POST["lastName"] = $mbr->getLastName();
$mbr->setFirstName($_POST["firstName"]);
$_POST["firstName"] = $mbr->getFirstName();
$mbr->setAddress($_POST["address"]);
$_POST["address"] = $mbr->getAddress();
$mbr->setGender($_POST["gender"]);