コード例 #1
0
$report_query = $dbs->query('SELECT COUNT(member_id) FROM member
    WHERE TO_DAYS(\'' . date('Y-m-d') . '\')>TO_DAYS(expire_date)');
$report_data = $report_query->fetch_row();
$loan_report[lang_mod_report_member_field_expired] = $report_data[0];
// 10 most active member
$report_query = $dbs->query('SELECT m.member_name, m.member_id, COUNT(loan_id) FROM loan AS l
    INNER JOIN member AS m ON m.member_id=l.member_id
    WHERE TO_DAYS(expire_date)>TO_DAYS(\'' . date('Y-m-d') . '\')
    GROUP BY l.member_id ORDER BY COUNT(loan_id) DESC LIMIT 10');
$report_data = '<ul>';
while ($data = $report_query->fetch_row()) {
    $report_data .= '<li>' . $data[0] . ' (' . $data[1] . ')</li>';
}
$loan_report[lang_mod_report_member_field_active_topten] = $report_data;
// table header
$table->setHeader(array(lang_mod_report_member_table_head));
$table->table_header_attr = 'class="dataListHeader" colspan="3"';
// initial row count
$row = 1;
foreach ($loan_report as $headings => $report_data) {
    $table->appendTableRow(array($headings, ':', $report_data));
    // set cell attribute
    $table->setCellAttr($row, 0, 'class="alterCell" valign="top" style="width: 170px;"');
    $table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
    $table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
    // add row count
    $row++;
}
// if we are in print mode
if (isset($_GET['print'])) {
    // html strings
コード例 #2
0
$report_query = $dbs->query('SELECT COUNT(member_id) FROM member
    WHERE TO_DAYS(\'' . date('Y-m-d') . '\')>TO_DAYS(expire_date)');
$report_data = $report_query->fetch_row();
$loan_report[__('Total Expired Member')] = $report_data[0];
// 10 most active member
$report_query = $dbs->query('SELECT m.member_name, m.member_id, COUNT(loan_id) FROM loan AS l
    INNER JOIN member AS m ON m.member_id=l.member_id
    WHERE TO_DAYS(expire_date)>TO_DAYS(\'' . date('Y-m-d') . '\')
    GROUP BY l.member_id ORDER BY COUNT(loan_id) DESC LIMIT 10');
$report_data = '<ul>';
while ($data = $report_query->fetch_row()) {
    $report_data .= '<li>' . $data[0] . ' (' . $data[1] . ')</li>';
}
$loan_report[__('10 most active members')] = $report_data;
// table header
$table->setHeader(array(__('Membership Data Summary')));
$table->table_header_attr = 'class="dataListHeader" colspan="3"';
// initial row count
$row = 1;
foreach ($loan_report as $headings => $report_data) {
    $table->appendTableRow(array($headings, ':', $report_data));
    // set cell attribute
    $table->setCellAttr($row, 0, 'class="alterCell" valign="top" style="width: 170px;"');
    $table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
    $table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
    // add row count
    $row++;
}
// if we are in print mode
if (isset($_GET['print'])) {
    // html strings
コード例 #3
0
ファイル: index.php プロジェクト: slims/s3st15_matoa
echo __('Search');
?>
" class="button" />
    </form>
</div>
</fieldset>
<?php 
if (isset($_POST['itemID']) and !empty($_POST['itemID'])) {
    $itemID = (int) $_POST['itemID'];
    $rec_q = $dbs->query("SELECT\r\n        stock_take_name AS '" . __('Stock Take Name') . "',\r\n        start_date AS '" . __('Start Date') . "',\r\n        end_date AS '" . __('End Date') . "',\r\n        init_user AS '" . __('Initializer') . "',\r\n        total_item_stock_taked AS '" . __('Total Item Stock Taked') . "',\r\n        total_item_lost AS '" . __('Total Item Lost') . "',\r\n        total_item_exists AS '" . __('Total Item Exists') . "',\r\n        total_item_loan AS '" . __('Total Item On Loan') . "',\r\n        stock_take_users AS '" . __('Stock Take Participants') . "',\r\n        is_active AS '" . __('Status') . "',\r\n        report_file AS '" . __('Report') . "'\r\n        FROM stock_take WHERE stock_take_id=" . $itemID);
    $rec_d = $rec_q->fetch_assoc();
    // create table object
    $table = new simbio_table();
    $table->table_attr = 'align="center" class="border" cellpadding="5" cellspacing="0"';
    // table header
    $table->setHeader(array($rec_d[__('Stock Take Name')]));
    $table->table_header_attr = 'class="dataListHeader" colspan="3"';
    // initial row count
    $row = 1;
    foreach ($rec_d as $headings => $stk_data) {
        if ($headings == 'stock_take_id') {
            continue;
        } else {
            if ($headings == __('Status')) {
                if ($stk_data == '1') {
                    $stk_data = '<b style="color: #f00;">' . __('Currently Active') . '</b>';
                } else {
                    $stk_data = 'Finished';
                }
            }
        }
コード例 #4
0
ファイル: index.php プロジェクト: jgoegelein/s3st13
    $stat_data .= ', ';
}
$collection_stat[__('Total Items By Collection Type')] = $stat_data;
// popular titles
$stat_query = $dbs->query('SELECT b.title,l.item_code,COUNT(l.loan_id) AS total_loans FROM `loan` AS l
    LEFT JOIN item AS i ON l.item_code=i.item_code
    LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
    GROUP BY l.item_code ORDER BY COUNT(l.loan_id) DESC LIMIT 10');
$stat_data = '<ul>';
while ($data = $stat_query->fetch_row()) {
    $stat_data .= '<li>' . $data[0] . '</li>';
}
$stat_data .= '</ul>';
$collection_stat[__('10 Most Popular Titles')] = $stat_data;
// table header
$table->setHeader(array(__('Collection Statistic Summary')));
$table->table_header_attr = 'class="dataListHeader" colspan="3"';
// initial row count
$row = 1;
foreach ($collection_stat as $headings => $stat_data) {
    $table->appendTableRow(array($headings, ':', $stat_data));
    // set cell attribute
    $table->setCellAttr($row, 0, 'class="alterCell" valign="top" style="width: 170px;"');
    $table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
    $table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
    // add row count
    $row++;
}
// if we are in print mode
if (isset($_GET['print'])) {
    // html strings
コード例 #5
0
ファイル: loan.php プロジェクト: edikriting/SENAYAN-3-Stable
" class="button" />
        </form>
    </div>
    <script type="text/javascript">$('tempLoanID').focus();</script>
    <!--item loan form end-->
    <?php 
    // 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(__('Remove'), __('Item Code'), __('Title'), __('Loan Date'), __('Due Date'));
        $temp_loan_list->setHeader($headers);
        // row number init
        $row = 1;
        foreach ($_SESSION['temp_loan'] as $_loan_ID => $temp_loan_list_d) {
            // alternate the row color
            $row_class = $row % 2 == 0 ? 'alterCell' : 'alterCell2';
            // remove link
            $remove_link = '<a href="circulation_action.php?removeID=' . $temp_loan_list_d['item_code'] . '" title="Remove this item" class="trashLink">&nbsp;</a>';
            // check if manually changes loan and due date allowed
            if ($sysconf['allow_loan_date_change']) {
                $loan_date = '<a href="#" title="' . __('Click To Change Loan Date') . '" onclick="changeDateForm(\'' . $_loan_ID . '\', \'loan\', \'loanDate' . $row . '\')" id="loanDate' . $row . '">' . $temp_loan_list_d['loan_date'] . '</a>';
                $due_date = '<a href="#" title="' . __('Click To Change Due Date') . '" onclick="changeDateForm(\'' . $_loan_ID . '\', \'due\', \'dueDate' . $row . '\')" id="dueDate' . $row . '">' . $temp_loan_list_d['due_date'] . '</a>';
            } else {
                $loan_date = $temp_loan_list_d['loan_date'];
                $due_date = $temp_loan_list_d['due_date'];
            }
コード例 #6
0
ファイル: reserve_list.php プロジェクト: slims/s3st15_matoa
</div>
<!--item loan form end-->

<?php 
// check if there is member ID
if (isset($_SESSION['memberID'])) {
    $memberID = trim($_SESSION['memberID']);
    $reserve_list_q = $dbs->query("SELECT r.*, b.title FROM reserve AS r\r\n        LEFT JOIN biblio AS b ON r.biblio_id=b.biblio_id\r\n        WHERE r.member_id='{$memberID}'");
    // create table object
    $reserve_list = new simbio_table();
    $reserve_list->table_attr = 'align="center" style="width: 100%;" cellpadding="3" cellspacing="0"';
    $reserve_list->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    $reserve_list->highlight_row = true;
    // table header
    $headers = array(__('Remove'), __('Title'), __('Item Code'), __('Reserve Date'));
    $reserve_list->setHeader($headers);
    // row number init
    $row = 1;
    while ($reserve_list_d = $reserve_list_q->fetch_assoc()) {
        // alternate the row color
        $row_class = $row % 2 == 0 ? 'alterCell' : 'alterCell2';
        // remove reserve link
        $remove_link = '<a href="#" onclick="confirmProcess(' . $reserve_list_d['reserve_id'] . ', \'' . $reserve_list_d['title'] . '\')" title="Remove Reservation" class="trashLink">&nbsp;</a>';
        // check if item/collection is available
        $avail_q = $dbs->query("SELECT COUNT(loan_id) FROM loan WHERE item_code='" . $reserve_list_d['item_code'] . "' AND is_lent=1 AND is_return=0");
        $avail_d = $avail_q->fetch_row();
        if ($avail_d[0] < 1) {
            $reserve_list_d['title'] .= ' - <strong>' . strtoupper(__('Available')) . '</strong>';
        }
        // check if reservation are already expired
        if ((strtotime(date('Y-m-d')) - strtotime($reserve_list_d['reserve_date'])) / (3600 * 24) > $sysconf['reserve_expire_periode']) {
コード例 #7
0
$report_query = $dbs->query('SELECT DISTINCT member_id FROM loan');
$report_data = $report_query->num_rows;
$loan_report[__('Members Already Had Loans')] = $report_data;
// total members having loans
// get total member that already not expired
$total_members_query = $dbs->query('SELECT COUNT(member_id) FROM member
    WHERE TO_DAYS(expire_date)>TO_DAYS(\'' . date('Y-m-d') . '\')');
$total_members_data = $total_members_query->fetch_row();
$loan_report[__('Members Never Have Loans Yet')] = $total_members_data[0] - $loan_report[__('Members Already Had Loans')];
// total overdued loand
$report_query = $dbs->query('SELECT COUNT(loan_id) FROM loan WHERE
    is_lent=1 AND is_return=0 AND TO_DAYS(due_date)>TO_DAYS(\'' . date('Y-m-d') . '\')');
$report_data = $report_query->fetch_row();
$loan_report[__('Total Overdued Loans')] = $report_data[0];
// table header
$table->setHeader(array(__('Loan Data Summary')));
$table->table_header_attr = 'class="dataListHeader" colspan="3"';
// initial row count
$row = 1;
foreach ($loan_report as $headings => $report_data) {
    $table->appendTableRow(array($headings, ':', $report_data));
    // set cell attribute
    $table->setCellAttr($row, 0, 'class="alterCell" valign="top" style="width: 170px;"');
    $table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
    $table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
    // add row count
    $row++;
}
// if we are in print mode
if (isset($_GET['print'])) {
    // html strings
コード例 #8
0
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
// start the output buffer
ob_start();
$table = new simbio_table();
$table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
$table->setHeader(array(lang_sys_conf_group_privileges_modul_name, lang_sys_conf_group_privileges_modul_read, lang_sys_conf_group_privileges_modul_write));
$table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
// initial row count
$row = 1;
$row_class = 'alterCell2';
// database list
$module_query = $dbs->query("SELECT * FROM mst_module AS m");
while ($module_data = $module_query->fetch_assoc()) {
    // alternate the row color
    if ($row_class == 'alterCell2') {
        $row_class = 'alterCell';
    } else {
        $row_class = 'alterCell2';
    }
    $read_checked = '';
    $write_checked = '';
コード例 #9
0
 /**
  * View kardex list
  * @return  string
  **/
 public function viewKardexes()
 {
     $_can_read = utility::havePrivilege('serial_control', 'r');
     $_can_write = utility::havePrivilege('serial_control', 'w');
     // start the output buffer
     ob_start();
     ?>
     <script type="text/javascript">
     function confirmProcess(int_serial_id, int_kardex_id)
     {
         var confirmBox = confirm('Are you sure to remove selected Kardex data?' + "\n" + 'Once deleted, it can\'t be restored!');
         if (confirmBox) {
             // set hidden element value
             document.hiddenActionForm.serialID.value = int_serial_id;
             document.hiddenActionForm.remove.value = int_kardex_id;
             // submit form
             document.hiddenActionForm.submit();
         }
     }
     </script>
     <?php 
     $_table = new simbio_table();
     $_table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
     $_table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
     $_table->highlight_row = true;
     $_table->setHeader(array('&nbsp;', __('Date Expected'), __('Date Received'), __('Seq. Number'), __('Note')));
     if ($_can_read and $_can_write) {
         $_add_link = '<span title="Add New Kardex" class="extendLink">&nbsp;</span>';
         $_date_exp = simbio_form_element::dateField('dateExpected[0]');
         $_date_rec = simbio_form_element::dateField('dateReceived[0]');
         $_seq_num = simbio_form_element::textField('text', 'seqNumber[0]', '', 'width: 100%;');
         $_notes = simbio_form_element::textField('text', 'notes[0]', '', 'width: 100%;');
         $_table->appendTableRow(array($_add_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
         $_table->setCellAttr(1, null, 'valign="top" class="alterCell2" style="font-weight: bold; width: auto;"');
         $_table->setCellAttr(1, 0, 'valign="top" class="alterCell2" style="font-weight: bold; width: 5%;"');
         $_table->setCellAttr(1, 1, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
         $_table->setCellAttr(1, 2, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
     }
     $_row = 2;
     foreach ($this->getKardexes() as $_kardex) {
         // alternate the row color
         $_row_class = $_row % 2 == 0 ? 'alterCell' : 'alterCell2';
         if ($_can_read and $_can_write) {
             // kardex removal links
             $_remove_link = '<a href="#" onclick="confirmProcess(' . $this->serial_id . ', ' . $_kardex['kardex_id'] . ')" class="trashLink notAJAX">&nbsp;</a>';
             $_date_exp = simbio_form_element::dateField('dateExpected[' . $_kardex['kardex_id'] . ']', $_kardex['date_expected']);
             $_date_rec = simbio_form_element::dateField('dateReceived[' . $_kardex['kardex_id'] . ']', $_kardex['date_received']);
             $_seq_num = simbio_form_element::textField('text', 'seqNumber[' . $_kardex['kardex_id'] . ']', $_kardex['seq_number'], 'width: 100%;');
             $_notes = simbio_form_element::textField('text', 'notes[' . $_kardex['kardex_id'] . ']', $_kardex['notes'], 'width: 100%;');
         } else {
             $_remove_link = '&nbsp;';
             $_date_exp = $_kardex['date_expected'];
             $_date_rec = $_kardex['date_received'];
             $_seq_num = $_kardex['seq_number'];
             $_notes = $_kardex['notes'];
         }
         $_table->appendTableRow(array($_remove_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
         $_table->setCellAttr($_row, null, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: auto;"');
         $_table->setCellAttr($_row, 0, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 5%;"');
         $_table->setCellAttr($_row, 1, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
         $_table->setCellAttr($_row, 2, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
         $_row++;
     }
     // button
     $_button_grp = '<div style="padding: 3px; background: #999999;"><input type="submit" class="button" name="saveKardexes" value="' . __('Save') . '" /></div>';
     // header
     echo '<div style="padding: 5px; background: #CCCCCC;">' . __('Kardex Detail for subscription') . ' <strong>' . $this->serial_period . '</strong></div>';
     if ($_can_read and $_can_write) {
         echo '<form method="post" name="kardexListForm" id="kardexListForm" action="' . $_SERVER['PHP_SELF'] . '">';
         echo $_button_grp;
     }
     echo $_table->printTable();
     if ($_can_read and $_can_write) {
         echo $_button_grp;
         echo simbio_form_element::hiddenField('serialID', $this->serial_id);
         echo '</form>';
         // hidden form
         echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="serialID" value="0" /><input type="hidden" name="remove" value="0" /></form>';
     }
     /* main content end */
     $_content = ob_get_clean();
     return $_content;
 }
コード例 #10
0
ファイル: loan_list.php プロジェクト: slims/slims8_akasia
<!--loan specific javascript functions end-->
<?php 
// check if there is member ID
if (isset($_SESSION['memberID'])) {
    $memberID = trim($_SESSION['memberID']);
    $circulation = new circulation($dbs, $memberID);
    $loan_list_query = $dbs->query(sprintf("SELECT L.loan_id, b.title, ct.coll_type_name,\n        i.item_code, L.loan_date, L.due_date, L.return_date, L.renewed,\n        IF(lr.reborrow_limit IS NULL, IF(L.renewed>=mt.reborrow_limit, 1, 0), IF(L.renewed>=lr.reborrow_limit, 1, 0)) AS extend\n        FROM loan AS L\n        LEFT JOIN item AS i ON L.item_code=i.item_code\n        LEFT JOIN mst_coll_type AS ct ON i.coll_type_id=ct.coll_type_id\n        LEFT JOIN member AS m ON L.member_id=m.member_id\n        LEFT JOIN mst_member_type AS mt ON m.member_type_id=mt.member_type_id\n        LEFT JOIN mst_loan_rules AS lr ON mt.member_type_id=lr.member_type_id AND i.coll_type_id = lr.coll_type_id\n        LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id\n        WHERE L.is_lent=1 AND L.is_return=0 AND L.member_id='%s'", $memberID));
    // query modified by Indra Sutriadi
    // create table object
    $loan_list = new simbio_table();
    $loan_list->table_attr = 'align="center" width="100%" cellpadding="3" cellspacing="0"';
    $loan_list->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    $loan_list->highlight_row = true;
    // table header
    $headers = array(__('Return'), __('Extend'), __('Item Code'), __('Title'), __('Col. Type'), __('Loan Date'), __('Due Date'));
    $loan_list->setHeader($headers);
    // row number init
    $row = 1;
    $is_overdue = false;
    /* modified by Indra Sutriadi */
    $circulation->ignore_holidays_fine_calc = $sysconf['ignore_holidays_fine_calc'];
    $circulation->holiday_dayname = $_SESSION['holiday_dayname'];
    $circulation->holiday_date = $_SESSION['holiday_date'];
    /* end of modification */
    $_total_temp_fines = 0;
    #newly added
    while ($loan_list_data = $loan_list_query->fetch_assoc()) {
        // alternate the row color
        $row_class = $row % 2 == 0 ? 'alterCell' : 'alterCell2';
        // return link
        $return_link = '<a href="#" onclick="confirmProcess(' . $loan_list_data['loan_id'] . ', \'' . $loan_list_data['item_code'] . '\', \'return\')" title="' . __('Return this item') . '" class="returnLink">&nbsp;</a>';
コード例 #11
0
ファイル: index.php プロジェクト: purwoko/SENAYAN-3-Stable
echo lang_sys_common_form_search;
?>
" class="button" />
    </form>
</div>
</fieldset>
<?php 
if (isset($_POST['itemID']) and !empty($_POST['itemID'])) {
    $itemID = (int) $_POST['itemID'];
    $rec_q = $dbs->query("SELECT\n        stock_take_name AS '" . lang_mod_stocktake_init_field_name . "',\n        start_date AS '" . lang_mod_stocktake_init_field_start_date . "',\n        end_date AS '" . lang_mod_stocktake_init_field_end_date . "',\n        init_user AS '" . lang_mod_stocktake_init_field_user . "',\n        total_item_stock_taked AS '" . lang_mod_stocktake_total . "',\n        total_item_lost AS '" . lang_mod_stocktake_lost_total . "',\n        total_item_exists AS '" . lang_mod_stocktake_exists_total . "',\n        total_item_loan AS '" . lang_mod_stocktake_loan_total . "',\n        stock_take_users AS '" . lang_mod_stocktake_participants . "',\n        is_active AS '" . lang_mod_stocktake_status . "',\n        report_file AS '" . lang_mod_stocktake_init_field_report_file . "'\n        FROM stock_take WHERE stock_take_id=" . $itemID);
    $rec_d = $rec_q->fetch_assoc();
    // create table object
    $table = new simbio_table();
    $table->table_attr = 'align="center" class="border" cellpadding="5" cellspacing="0"';
    // table header
    $table->setHeader(array($rec_d[lang_mod_stocktake_init_field_name]));
    $table->table_header_attr = 'class="dataListHeader" colspan="3"';
    // initial row count
    $row = 1;
    foreach ($rec_d as $headings => $stk_data) {
        if ($headings == 'stock_take_id') {
            continue;
        } else {
            if ($headings == lang_mod_stocktake_status) {
                if ($stk_data == '1') {
                    $stk_data = '<b style="color: #FF0000;">' . lang_mod_stocktake_active_status . '</b>';
                } else {
                    $stk_data = 'Finished';
                }
            }
        }
コード例 #12
0
$report_query = $dbs->query('SELECT DISTINCT member_id FROM loan');
$report_data = $report_query->num_rows;
$loan_report[lang_mod_report_loan_field_member_with_loan] = $report_data;
// total members having loans
// get total member that already not expired
$total_members_query = $dbs->query('SELECT COUNT(member_id) FROM member
    WHERE TO_DAYS(expire_date)>TO_DAYS(\'' . date('Y-m-d') . '\')');
$total_members_data = $total_members_query->fetch_row();
$loan_report[lang_mod_report_loan_field_member_no_loan] = $total_members_data[0] - $loan_report[lang_mod_report_loan_field_member_with_loan];
// total overdued loand
$report_query = $dbs->query('SELECT COUNT(loan_id) FROM loan WHERE
    is_lent=1 AND is_return=0 AND TO_DAYS(due_date)>TO_DAYS(\'' . date('Y-m-d') . '\')');
$report_data = $report_query->fetch_row();
$loan_report[lang_mod_report_loan_field_overdue] = $report_data[0];
// table header
$table->setHeader(array(lang_mod_report_loan_table_head));
$table->table_header_attr = 'class="dataListHeader" colspan="3"';
// initial row count
$row = 1;
foreach ($loan_report as $headings => $report_data) {
    $table->appendTableRow(array($headings, ':', $report_data));
    // set cell attribute
    $table->setCellAttr($row, 0, 'class="alterCell" valign="top" style="width: 170px;"');
    $table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
    $table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
    // add row count
    $row++;
}
// if we are in print mode
if (isset($_GET['print'])) {
    // html strings
コード例 #13
0
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
// start the output buffer
ob_start();
$table = new simbio_table();
$table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
$table->setHeader(array(__('Module Name'), __('Read'), __('Write')));
$table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
// initial row count
$row = 1;
$row_class = 'alterCell2';
// database list
$module_query = $dbs->query("SELECT * FROM mst_module AS m");
while ($module_data = $module_query->fetch_assoc()) {
    // alternate the row color
    if ($row_class == 'alterCell2') {
        $row_class = 'alterCell';
    } else {
        $row_class = 'alterCell2';
    }
    $read_checked = '';
    $write_checked = '';
コード例 #14
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
// be sure that this file not accessed directly
if (INDEX_AUTH != 1) {
    die("can not access this file directly");
}
// start the output buffer
ob_start();
$table = new simbio_table();
$table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
$table->setHeader(array(__('Module Name'), '<a id="allRead" class="notAJAX" href="#">' . __('Read') . '</a>', '<a id="allWrite" class="notAJAX" href="#">' . __('Write') . '</a>'));
$table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
// initial row count
$row = 1;
$row_class = 'alterCell2';
// database list
$module_query = $dbs->query("SELECT * FROM mst_module AS m");
while ($module_data = $module_query->fetch_assoc()) {
    // alternate the row color
    if ($row_class == 'alterCell2') {
        $row_class = 'alterCell';
    } else {
        $row_class = 'alterCell2';
    }
    $read_checked = '';
    $write_checked = '';
コード例 #15
0
ファイル: index.php プロジェクト: purwoko/SENAYAN-3-Stable
    $stat_data .= ', ';
}
$collection_stat[lang_mod_report_stat_field_by_colltype] = $stat_data;
// popular titles
$stat_query = $dbs->query('SELECT b.title,l.item_code,COUNT(l.loan_id) AS total_loans FROM `loan` AS l
    LEFT JOIN item AS i ON l.item_code=i.item_code
    LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
    GROUP BY l.item_code ORDER BY COUNT(l.loan_id) DESC LIMIT 10');
$stat_data = '<ul>';
while ($data = $stat_query->fetch_row()) {
    $stat_data .= '<li>' . $data[0] . '</li>';
}
$stat_data .= '</ul>';
$collection_stat[lang_mod_report_stat_field_title_topten] = $stat_data;
// table header
$table->setHeader(array(lang_mod_report_stat_table_head));
$table->table_header_attr = 'class="dataListHeader" colspan="3"';
// initial row count
$row = 1;
foreach ($collection_stat as $headings => $stat_data) {
    $table->appendTableRow(array($headings, ':', $stat_data));
    // set cell attribute
    $table->setCellAttr($row, 0, 'class="alterCell" valign="top" style="width: 170px;"');
    $table->setCellAttr($row, 1, 'class="alterCell" valign="top" style="width: 1%;"');
    $table->setCellAttr($row, 2, 'class="alterCell2" valign="top" style="width: auto;"');
    // add row count
    $row++;
}
// if we are in print mode
if (isset($_GET['print'])) {
    // html strings