Location: PHPKode > projects > SENAYAN Library Automation > senayan3-stable5/admin/modules/circulation/loan.php


    Code and Programming : ARIE NUGRAHA (hide@address.com)
    Design and Database : HENDRO WICAKSONO (hide@address.com)

SENAYAN Library Automation System
Copyright (C) 2007

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program (GPL License.txt); if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


/* loan list iframe content */

// start the session

require '../../../sysconfig.inc.php';
require SIMBIO_BASE_DIR.'simbio_GUI/form_maker/simbio_form_table_AJAX.inc.php';
require SIMBIO_BASE_DIR.'simbio_GUI/template_parser/simbio_template_parser.inc.php';
require SIMBIO_BASE_DIR.'simbio_GUI/table/simbio_table.inc.php';
require SIMBIO_BASE_DIR.'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR.'simbio_DB/simbio_dbop.inc.php';
require SIMBIO_BASE_DIR.'simbio_UTILS/simbio_date.inc.php';

// start the output buffering

// check if there is member ID
if (isset($_SESSION['memberID'])) {
    $memberID = trim($_SESSION['memberID']);
    <!--item loan form-->
    <table style="width: 100%; background: #CCCCCC;" cellpadding="5" cellspacing="0">
        <td valign='top'>
        <form name="itemLoan" id="loanForm" action="circulation_action.php" method="post" style="display: inline;">
            <?php echo lang_mod_circ_loan_field_insert_barcode; ?> :
            <input type="text" id="tempLoanID" name="tempLoanID" />
            <input type="submit" value="<?php echo lang_mod_circ_loan_button_loan; ?>" class="button" />
    <script type="text/javascript">
    // focus item code/barcode text field
    <!--item loan form end-->
    // make a list of temporary loan if there is any
    if (count($_SESSION['temp_loan']) > 0) {
        // create table object
        $temp_loan_list = new simbio_table();
        $temp_loan_list->table_attr = "align='center' style='width: 100%;' cellpadding='3' cellspacing='0'";
        $temp_loan_list->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
        $temp_loan_list->highlight_row = true;
        // table header
        $headers = array(lang_mod_circ_tblheader_remove,  lang_mod_circ_tblheader_item_code, lang_mod_circ_tblheader_title, lang_mod_circ_tblheader_loan_date, lang_mod_circ_tblheader_due_date);
        // row number init
        $row = 1;
        foreach ($_SESSION['temp_loan'] as $temp_loan_list_data) {
            // alternate the row color
            $row_class = ($row%2 == 0)?'alterCell':'alterCell2';

            // remove link
            $remove_link = '<a href="circulation_action.php?removeID='.$temp_loan_list_data['item_code'].'" title="Remove this item">'
                .'<img src="'.SENAYAN_WEB_ROOT_DIR.'admin/'.$sysconf['admin_template']['dir'].'/'.$sysconf['admin_template']['theme'].'/trash.png" border="0" alt="Remove" /></a>';
            // row colums array
            $fields = array(

            // append data to table row
            // set the HTML attributes
            $temp_loan_list->setCellAttr($row, null, "valign='top' class='$row_class'");
            $temp_loan_list->setCellAttr($row, 0, "valign='top' align='center' class='$row_class' style='width: 5%;'");
            $temp_loan_list->setCellAttr($row, 1, "valign='top' class='$row_class' style='width: 10%;'");
            $temp_loan_list->setCellAttr($row, 2, "valign='top' class='$row_class' style='width: 60%;'");


        echo $temp_loan_list->printTable();


// get the buffered content
$main_content = ob_get_clean();

// create the template object
$template = new simbio_template_parser(SENAYAN_BASE_DIR.'admin/'.$sysconf['admin_template']['dir'].'/'.$sysconf['admin_template']['theme'].'/page_tpl.html');
// page title
$page_title = 'Member Loan List';

// assign content to markers
$template->assign('<!--PAGE_TITLE-->', $page_title);
$template->assign('<!--CSS-->', SENAYAN_WEB_ROOT_DIR.'admin/'.$sysconf['admin_template']['css']);
$template->assign('<!--JS_INCLUDE-->', '<script type="text/javascript" src="'.JS_WEB_ROOT_DIR.'prototype.js"></script>'.
    "\n".'<script type="text/javascript" src="'.JS_WEB_ROOT_DIR.'gui.js"></script>');
$template->assign('<!--MAIN_CONTENT-->', $main_content);

// print out the template

Return current item: SENAYAN Library Automation