onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'loan AS l
    LEFT JOIN member AS m ON l.member_id=m.member_id
    LEFT JOIN item AS i ON l.item_code=i.item_code
    LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('m.member_id AS \'' . __('Member ID') . '\'', 'm.member_name AS \'' . __('Member Name') . '\'', 'l.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', 'l.loan_date AS \'' . __('Loan Date') . '\'', 'l.due_date AS \'' . __('Due Date') . '\'', 'l.is_return AS \'' . __('Loan Status') . '\'');
    $reportgrid->setSQLorder('l.loan_date DESC');
    $criteria = 'm.member_id IS NOT NULL ';
    if (isset($_GET['id_name']) and !empty($_GET['id_name'])) {
        $id_name = $dbs->escape_string($_GET['id_name']);
        $criteria .= ' AND (m.member_id LIKE \'%' . $id_name . '%\' OR m.member_name LIKE \'%' . $id_name . '%\')';
    }
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%') AND";
            }
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'loan AS l
    LEFT JOIN member AS m ON l.member_id=m.member_id
    LEFT JOIN item AS i ON l.item_code=i.item_code
    LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('m.member_id AS \'' . lang_mod_membership_field_member_id . '\'', 'm.member_name AS \'' . lang_mod_membership_field_name . '\'', 'l.item_code AS \'' . lang_mod_biblio_item_field_itemcode . '\'', 'b.title AS \'' . lang_mod_biblio_field_title . '\'', 'l.loan_date AS \'' . lang_mod_circ_tblheader_loan_date . '\'', 'l.due_date AS \'' . lang_mod_circ_tblheader_due_date . '\'', 'l.is_return AS \'' . lang_mod_biblio_item_common_status_description . '\'');
    $reportgrid->setSQLorder('l.loan_date DESC');
    $criteria = 'm.member_id IS NOT NULL ';
    if (isset($_GET['id_name']) and !empty($_GET['id_name'])) {
        $id_name = $dbs->escape_string($_GET['id_name']);
        $criteria .= ' AND (m.member_id LIKE \'%' . $id_name . '%\' OR m.member_name LIKE \'%' . $id_name . '%\')';
    }
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%') AND";
            }
Example #3
0
    </div>
    </form>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'user AS u';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('u.realname AS \'' . __('Real Name') . '\'', 'u.username AS \'' . __('Login Username') . '\'', 'u.user_id AS \'' . __('Bibliography Data Entry') . '\'', 'u.user_id AS \'' . __('Item Data Entry') . '\'', 'u.user_id AS \'' . __('Member Data Entry') . '\'', 'u.user_id AS \'' . __('Circulation Tasks') . '\'');
    $reportgrid->setSQLorder('realname ASC');
    // is there any search
    $criteria = 'user_id IS NOT NULL ';
    $reportgrid->setSQLCriteria($criteria);
    $start_date = '2000-01-01';
    if (isset($_GET['startDate'])) {
        $start_date = $_GET['startDate'];
    }
    $until_date = date('Y-m-d');
    if (isset($_GET['untilDate'])) {
        $until_date = $_GET['untilDate'];
    }
    // callbacks
    function showBiblioEntries($obj_db, $array_data)
Example #4
0
    </form>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'member AS m
        LEFT JOIN loan AS l ON m.member_id=l.member_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('m.member_id AS \'' . __('Member ID') . '\'');
    $reportgrid->setSQLorder('l.due_date DESC');
    $reportgrid->sql_group_by = 'm.member_id';
    $overdue_criteria = ' (l.is_lent=1 AND l.is_return=0 AND TO_DAYS(due_date) < TO_DAYS(\'' . date('Y-m-d') . '\')) ';
    // is there any search
    if (isset($_GET['id_name']) and $_GET['id_name']) {
        $keyword = $dbs->escape_string(trim($_GET['id_name']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' (';
            foreach ($words as $word) {
                $concat_sql .= " (m.member_id LIKE '%{$word}%' OR m.member_name LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
" style="margin-top: 9px; margin-left: 5px; margin-right: 5px;"
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'reserve AS r
        LEFT JOIN biblio AS b ON r.biblio_id=b.biblio_id
        LEFT JOIN member AS m ON r.member_id=m.member_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('r.item_code AS \'' . lang_mod_biblio_item_field_itemcode . '\'', 'b.title AS \'' . lang_mod_biblio_field_title . '\'', 'm.member_name AS \'' . lang_mod_membership_field_name . '\'', 'r.reserve_date AS \'' . lang_mod_circ_tblheader_reserve_date . '\'');
    $reportgrid->setSQLorder('r.reserve_date DESC');
    // is there any search
    $criteria = 'r.reserve_id IS NOT NULL ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'item AS i
        LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
        LEFT JOIN mst_coll_type AS ct ON i.coll_type_id=ct.coll_type_id
        LEFT JOIN mst_item_status AS s ON i.item_status_id=s.item_status_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('i.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', 'ct.coll_type_name AS \'' . __('Collection Type') . '\'', 's.item_status_name AS \'' . __('Item Status') . '\'', 'b.call_number AS \'' . __('Call Number') . '\'', 'i.biblio_id');
    $reportgrid->setSQLorder('b.title ASC');
    // is there any search
    $criteria = 'b.biblio_id IS NOT NULL ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%' OR b.isbn_issn LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
    </form>
    </div>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader reportHeader"><span id="pagingBox"></span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'stock_take_item AS i';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('item_code AS \'' . __('Item Code') . '\'', 'title AS \'' . __('Title') . '\'', 'gmd_name AS \'' . __('GMD') . '\'', 'classification AS \'' . __('Classification') . '\'', 'coll_type_name AS \'' . __('Collection Type') . '\'', 'call_number AS \'' . __('Call Number') . '\'');
    $reportgrid->setSQLorder('title ASC');
    // is there any search
    $criteria = 'status=\'m\' ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%' OR b.isbn_issn LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'reserve AS r
        LEFT JOIN biblio AS b ON r.biblio_id=b.biblio_id
        LEFT JOIN member AS m ON r.member_id=m.member_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('r.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', 'm.member_name AS \'' . __('Member Name') . '\'', 'r.reserve_date AS \'' . __('Reserve Date') . '\'');
    $reportgrid->setSQLorder('r.reserve_date DESC');
    // is there any search
    $criteria = 'r.reserve_id IS NOT NULL ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
Example #9
0
    ?>
" style="margin-top: 9px; margin-left: 5px; margin-right: 5px;"
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'item AS i
        LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('i.item_code AS \'' . lang_mod_biblio_item_field_itemcode . '\'', 'b.title AS \'' . lang_mod_biblio_field_title . '\'', '\'01\' AS \'' . lang_sys_common_month_short_01 . '\'', '\'02\' AS \'' . lang_sys_common_month_short_02 . '\'', '\'03\' AS \'' . lang_sys_common_month_short_03 . '\'', '\'04\' AS \'' . lang_sys_common_month_short_04 . '\'', '\'05\' AS \'' . lang_sys_common_month_short_05 . '\'', '\'06\' AS \'' . lang_sys_common_month_short_06 . '\'', '\'07\' AS \'' . lang_sys_common_month_short_07 . '\'', '\'08\' AS \'' . lang_sys_common_month_short_08 . '\'', '\'09\' AS \'' . lang_sys_common_month_short_09 . '\'', '\'10\' AS \'' . lang_sys_common_month_short_10 . '\'', '\'11\' AS \'' . lang_sys_common_month_short_11 . '\'', '\'12\' AS \'' . lang_sys_common_month_short_12 . '\'');
    $reportgrid->setSQLorder('b.title ASC');
    // is there any search
    $criteria = 'b.biblio_id IS NOT NULL ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%' OR b.isbn_issn LIKE '{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
Example #10
0
    echo lang_mod_reporting_form_button_print;
    ?>
" style="margin-top: 9px; margin-left: 5px; margin-right: 5px;"
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'user AS u';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('u.realname AS \'' . lang_sys_user_field_realname . '\'', 'u.username AS \'' . lang_sys_user_field_login_username . '\'', 'u.user_id AS \'' . lang_mod_report_staffactivity_tblheader_bibliography . '\'', 'u.user_id AS \'' . lang_mod_report_staffactivity_tblheader_items . '\'', 'u.user_id AS \'' . lang_mod_report_staffactivity_tblheader_members . '\'', 'u.user_id AS \'' . lang_mod_report_staffactivity_tblheader_circulation . '\'');
    $reportgrid->setSQLorder('realname ASC');
    // is there any search
    $criteria = 'user_id IS NOT NULL ';
    $reportgrid->setSQLCriteria($criteria);
    $start_date = '2000-01-01';
    if (isset($_GET['startDate'])) {
        $start_date = $_GET['startDate'];
    }
    $until_date = date('Y-m-d');
    if (isset($_GET['untilDate'])) {
        $until_date = $_GET['untilDate'];
    }
    // callbacks
    function showBiblioEntries($obj_db, $array_data)
    echo lang_mod_reporting_form_button_print;
    ?>
" style="margin-top: 9px; margin-left: 5px; margin-right: 5px;"
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'member AS m LEFT JOIN loan AS l ON m.member_id=l.member_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('m.member_id AS \'' . lang_mod_membership_field_member_id . '\'');
    $reportgrid->setSQLorder('l.due_date DESC');
    $reportgrid->sql_group_by = 'm.member_id';
    $overdue_criteria = ' (l.is_lent=1 AND l.is_return=0) ';
    // is there any search
    if (isset($_GET['id_name']) and $_GET['id_name']) {
        $keyword = $dbs->escape_string(trim($_GET['id_name']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' (';
            foreach ($words as $word) {
                $concat_sql .= " (m.member_id LIKE '%{$word}%' OR m.member_name LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
Example #12
0
    ?>
" style="margin-top: 9px; margin-left: 5px; margin-right: 5px;"
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'member AS m
        LEFT JOIN mst_member_type AS mt ON m.member_type_id=mt.member_type_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('m.member_id AS \'' . lang_mod_membership_field_member_id . '\'', 'm.member_name AS \'' . lang_mod_membership_field_name . '\'', 'mt.member_type_name AS \'' . lang_mod_membership_field_membership_type . '\'');
    $reportgrid->setSQLorder('member_name ASC');
    // is there any search
    $criteria = 'm.member_id IS NOT NULL ';
    if (isset($_GET['member_type']) and !empty($_GET['member_type'])) {
        $mtype = intval($_GET['member_type']);
        $criteria .= ' AND m.member_type_id=' . $mtype;
    }
    if (isset($_GET['id_name']) and !empty($_GET['id_name'])) {
        $id_name = $dbs->escape_string($_GET['id_name']);
        $criteria .= ' AND (m.member_id LIKE \'%' . $id_name . '%\' OR m.member_name LIKE \'%' . $id_name . '%\')';
    }
    if (isset($_GET['gender']) and $_GET['gender'] != 'ALL') {
        $gender = intval($_GET['gender']);
        $criteria .= ' AND m.gender=' . $gender;
Example #13
0
    </form>
    </div>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'user AS u';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('u.realname AS \'' . __('Real Name') . '\'', 'u.username AS \'' . __('Login Username') . '\'', 'u.user_id AS \'' . __('Bibliography Data Entry') . '\'', 'u.user_id AS \'' . __('Item Data Entry') . '\'', 'u.user_id AS \'' . __('Member Data Entry') . '\'', 'u.user_id AS \'' . __('Peminjaman') . '\'', 'u.user_id AS \'' . __('Pengembalian') . '\'', 'u.user_id AS \'' . __('Perpanjang') . '\'');
    $reportgrid->setSQLorder('realname ASC');
    // is there any search
    $criteria = 'user_id IS NOT NULL ';
    $reportgrid->setSQLCriteria($criteria);
    $start_date = '2000-01-01';
    if (isset($_GET['startDate'])) {
        $start_date = $_GET['startDate'];
    }
    $until_date = date('Y-m-d');
    if (isset($_GET['untilDate'])) {
        $until_date = $_GET['untilDate'];
    }
    // callbacks
    function showBiblioEntries($obj_db, $array_data)
Example #14
0
    </form>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'item AS i
        LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('i.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', '\'01\' AS \'' . __('Jan') . '\'', '\'02\' AS \'' . __('Feb') . '\'', '\'03\' AS \'' . __('Mar') . '\'', '\'04\' AS \'' . __('Apr') . '\'', '\'05\' AS \'' . __('May') . '\'', '\'06\' AS \'' . __('Jun') . '\'', '\'07\' AS \'' . __('Jul') . '\'', '\'08\' AS \'' . __('Aug') . '\'', '\'09\' AS \'' . __('Sep') . '\'', '\'10\' AS \'' . __('Oct') . '\'', '\'11\' AS \'' . __('Nov') . '\'', '\'12\' AS \'' . __('Dec') . '\'');
    $reportgrid->setSQLorder('b.title ASC');
    // is there any search
    $criteria = 'b.biblio_id IS NOT NULL ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%' OR b.isbn_issn LIKE '{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'visitor_count AS vc
        LEFT JOIN (member AS m LEFT JOIN mst_member_type AS mt ON m.member_type_id=mt.member_type_id)
        ON vc.member_id=m.member_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('IF(vc.member_id IS NOT NULL, vc.member_id, \'NON-MEMBER\')  AS \'' . __('Member ID') . '\'', 'vc.member_name AS \'' . __('Visitor Name') . '\'', 'IF(mt.member_type_name IS NOT NULL, mt.member_type_name, \'NON-MEMBER\') AS \'' . __('Membership Type') . '\'', 'vc.institution AS \'' . __('Institution') . '\'', 'vc.checkin_date AS \'' . __('Visit Date') . '\'');
    $reportgrid->setSQLorder('vc.member_id ASC');
    // is there any search
    $criteria = 'vc.visitor_id IS NOT NULL ';
    if (isset($_GET['member_type']) and !empty($_GET['member_type'])) {
        $mtype = $_GET['member_type'];
        if (intval($mtype) < 0) {
            $criteria .= ' AND (vc.member_id IS NULL OR vc.member_id=\'\')';
        } else {
            if (intval($mtype) > 0) {
                $criteria .= ' AND mt.member_type_id=' . $mtype;
            }
        }
    }
    if (isset($_GET['id_name']) and !empty($_GET['id_name'])) {
Example #16
0
    <input type="hidden" name="reportView" value="true" />
    </div>
    </form>
	</div>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('b.biblio_id', 'b.title AS \'' . __('Title') . '\'', 'COUNT(item_id) AS \'' . __('Copies') . '\'', 'pl.place_name AS \'' . __('Publishing Place') . '\'', 'pb.publisher_name AS \'' . __('Publisher') . '\'', 'b.isbn_issn AS \'' . __('ISBN/ISSN') . '\'', 'b.call_number AS \'' . __('Call Number') . '\'');
    $reportgrid->setSQLorder('b.title ASC');
    $reportgrid->invisible_fields = array(0);
    // is there any search
    $criteria = 'bsub.biblio_id IS NOT NULL ';
    $outer_criteria = 'b.biblio_id > 0 ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (bsub.title LIKE '%{$word}%' OR bsub.isbn_issn LIKE '%{$word}%') AND";
            }
            // remove the last AND
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'item AS i
        LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
        LEFT JOIN mst_coll_type AS ct ON i.coll_type_id=ct.coll_type_id
        LEFT JOIN mst_item_status AS s ON i.item_status_id=s.item_status_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('i.item_code AS \'' . lang_mod_biblio_item_field_itemcode . '\'', 'b.title AS \'' . lang_mod_biblio_field_title . '\'', 'ct.coll_type_name AS \'' . lang_mod_masterfile_colltype_form_field_colltype . '\'', 's.item_status_name AS \'' . lang_mod_biblio_item_field_item_status . '\'', 'b.call_number AS \'' . lang_mod_biblio_field_call_number . '\'', 'i.biblio_id');
    $reportgrid->setSQLorder('b.title ASC');
    // is there any search
    $criteria = 'b.biblio_id IS NOT NULL ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (b.title LIKE '%{$word}%' OR b.isbn_issn LIKE '%{$word}%') AND";
            }
            // remove the last AND
            $concat_sql = substr_replace($concat_sql, '', -3);
            $concat_sql .= ') ';
Example #18
0
	</div>
    </fieldset>
    <!-- filter end -->
    <div class="dataListHeader" style="padding: 3px;"><span id="pagingBox"></span></div>
    <iframe name="reportView" id="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // table spec
    $table_spec = 'member AS m
        LEFT JOIN mst_member_type AS mt ON m.member_type_id=mt.member_type_id';
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('m.member_id AS \'' . __('Member ID') . '\'', 'm.member_name AS \'' . __('Member Name') . '\'', 'mt.member_type_name AS \'' . __('Membership Type') . '\'');
    $reportgrid->setSQLorder('member_name ASC');
    // is there any search
    $criteria = 'm.member_id IS NOT NULL ';
    if (isset($_GET['member_type']) and !empty($_GET['member_type'])) {
        $mtype = intval($_GET['member_type']);
        $criteria .= ' AND m.member_type_id=' . $mtype;
    }
    if (isset($_GET['id_name']) and !empty($_GET['id_name'])) {
        $id_name = $dbs->escape_string($_GET['id_name']);
        $criteria .= ' AND (m.member_id LIKE \'%' . $id_name . '%\' OR m.member_name LIKE \'%' . $id_name . '%\')';
    }
    if (isset($_GET['gender']) and $_GET['gender'] != 'ALL') {
        $gender = intval($_GET['gender']);
        $criteria .= ' AND m.gender=' . $gender;
Example #19
0
    <div class="dataListHeader" style="height: 35px;">
    <input type="button" value="<?php 
    echo lang_mod_reporting_form_button_print;
    ?>
" style="margin-top: 9px; margin-left: 5px; margin-right: 5px;"
    onclick="javascript: reportView.print();" />
    &nbsp;<span id="pagingBox">&nbsp;</span></div>
    <iframe name="reportView" src="<?php 
    echo $_SERVER['PHP_SELF'] . '?reportView=true';
    ?>
" frameborder="0" style="width: 100%; height: 500px;"></iframe>
<?php 
} else {
    ob_start();
    // create datagrid
    $reportgrid = new report_datagrid();
    $reportgrid->setSQLColumn('b.biblio_id', 'b.title AS \'' . lang_mod_biblio_field_title . '\'', 'COUNT(item_id) AS ' . lang_mod_biblio_field_copies . '', 'b.isbn_issn AS \'' . lang_mod_biblio_field_isbn . '\'', 'b.call_number AS \'' . lang_mod_biblio_field_call_number . '\'');
    $reportgrid->setSQLorder('b.title ASC');
    $reportgrid->invisible_fields = array(0);
    // is there any search
    $criteria = 'bsub.biblio_id IS NOT NULL ';
    $outer_criteria = 'b.biblio_id > 0 ';
    if (isset($_GET['title']) and !empty($_GET['title'])) {
        $keyword = $dbs->escape_string(trim($_GET['title']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " (bsub.title LIKE '%{$word}%' OR bsub.isbn_issn LIKE '%{$word}%') AND";
            }
            // remove the last AND