当前位置: 首页>>代码示例>>PHP>>正文


PHP simbio_table类代码示例

本文整理汇总了PHP中simbio_table的典型用法代码示例。如果您正苦于以下问题:PHP simbio_table类的具体用法?PHP simbio_table怎么用?PHP simbio_table使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了simbio_table类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: str_replace

     $reserve_q = $dbs->query('SELECT r.member_id, m.member_name
         FROM reserve AS r
         LEFT JOIN member AS m ON r.member_id=m.member_id
         WHERE item_code=\'' . $loan_d['item_code'] . '\' ORDER BY reserve_date DESC');
     $reserve_d = $reserve_q->fetch_row();
     $member = $reserve_d[1] . ' (' . $reserve_d[0] . ')';
     $reserve_msg = str_replace(array('{itemCode}', '{member}'), array($loan_d['item_code'], $member), __('Item {itemCode} is being reserved by member {member}'));
     //mfc
     $loan_d['title'] .= '<div>' . $reserve_msg . '</div>';
 }
 // write log
 utility::writeLogs($dbs, 'member', $loan_d['member_id'], 'circulation', $_SESSION['realname'] . ' return item (' . $_POST['quickReturnID'] . ') with title (' . $loan_d['title'] . ') with Quick Return method');
 // show loan information
 include SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
 // create table object
 $table = new simbio_table();
 $table->table_attr = 'class="border" style="width: 100%; margin-bottom: 5px;" cellpadding="5" cellspacing="0"';
 // append data to table row
 $table->appendTableRow(array('Item ' . $_POST['quickReturnID'] . __(' successfully returned on') . $return_date));
 //mfc
 $table->appendTableRow(array(__('Title'), $loan_d['title']));
 $table->appendTableRow(array(__('Member Name'), $loan_d['member_name'], __('Member ID'), $loan_d['member_id']));
 $table->appendTableRow(array(__('Loan Date'), $loan_d['loan_date'], __('Due Date'), $loan_d['due_date']));
 // set the cell attributes
 $table->setCellAttr(1, null, 'class="dataListHeader" style="color: #FFFFFF; font-weight: bold;" colspan="4"');
 $table->setCellAttr(2, 0, 'class="alterCell"');
 $table->setCellAttr(2, 1, 'class="alterCell2" colspan="3"');
 $table->setCellAttr(3, 0, 'class="alterCell" width="15%"');
 $table->setCellAttr(3, 1, 'class="alterCell2" width="35%"');
 $table->setCellAttr(3, 2, 'class="alterCell" width="15%"');
 $table->setCellAttr(3, 3, 'class="alterCell2" width="35%"');
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:circulation_action.php

示例2: simbio_dbop

  }
}
</script>
<?php 
if (isset($_POST['remove'])) {
    $tid = (int) $_POST['tid'];
    $vid = (int) $_POST['remove'];
    $sql_op = new simbio_dbop($dbs);
    $sql_op->delete('mst_voc_ctrl', 'topic_id=' . $tid . ' AND vocabolary_id=' . $vid);
    echo '<script type="text/javascript">';
    echo 'alert(\'' . addslashes(__('Topic succesfully removed!')) . '\');';
    echo 'location.href = \'iframe_vocabolary_control.php?itemID=' . $tid . '\';';
    echo '</script>';
}
if ($itemID) {
    $table = new simbio_table();
    $table->table_attr = 'align="center" class="detailTable" style="width: 98%;" cellpadding="2" cellspacing="0"';
    // query database
    $voc_q = $dbs->query('SELECT * FROM mst_voc_ctrl WHERE topic_id=' . $itemID);
    $row = 1;
    while ($voc_d = $voc_q->fetch_assoc()) {
        if (!is_null($voc_d['scope'])) {
            echo '<b>Scope note: </b>' . $voc_d['scope'] . '<hr>';
        }
        if (is_null($voc_d['scope'])) {
            // fallback related topic id
            $topic_q = $dbs->query('SELECT topic FROM mst_topic WHERE topic_id=' . $voc_d['related_topic_id']);
            $topic_d = $topic_q->fetch_row();
            // alternate the row color
            $row_class = $row % 2 == 0 ? 'alterCell' : 'alterCell2';
            // links
开发者ID:slims,项目名称:slims8_akasia,代码行数:31,代码来源:iframe_vocabolary_control.php

示例3: viewKardexes

 /**
  * 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;
 }
开发者ID:slims,项目名称:s3st15_matoa,代码行数:87,代码来源:serial_base_lib.inc.php

示例4: die

 */
/* Reporting section */
// main system configuration
require '../../../sysconfig.inc.php';
// start the session
require SENAYAN_BASE_DIR . 'admin/default/session.inc.php';
require SENAYAN_BASE_DIR . 'admin/default/session_check.inc.php';
require SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
// privileges checking
$can_read = utility::havePrivilege('reporting', 'r');
$can_write = utility::havePrivilege('reporting', 'w');
if (!$can_read) {
    die('<div class="errorBox">' . lang_sys_common_no_privilage . '</div>');
}
/* loan report */
$table = new simbio_table();
$table->table_attr = 'align="center" class="border" cellpadding="5" cellspacing="0"';
// total number of member
$report_query = $dbs->query('SELECT COUNT(member_id) FROM member');
$report_data = $report_query->fetch_row();
$loan_report[lang_mod_report_member_field_registered] = $report_data[0];
// total number of active member
$report_query = $dbs->query('SELECT COUNT(member_id) FROM member
    WHERE TO_DAYS(expire_date)>TO_DAYS(\'' . date('Y-m-d') . '\')');
$report_data = $report_query->fetch_row();
$loan_report[lang_mod_report_member_field_active] = $report_data[0];
// total number of active member by membership type
$report_query = $dbs->query('SELECT member_type_name, COUNT(member_id) FROM mst_member_type AS mt
    LEFT JOIN member AS m ON mt.member_type_id=m.member_type_id
    WHERE TO_DAYS(expire_date)>TO_DAYS(\'' . date('Y-m-d') . '\')
    GROUP BY m.member_type_id ORDER BY COUNT(member_id) DESC');
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:member_report.php

示例5: simbio_table

        $author_year = $biblio_author_d['author_year'];
        $authority_type = $sysconf['authority_type'][$biblio_author_d['authority_type']];
        $table->appendTableRow(array($remove_link, $author, $author_year, $authority_type, $sysconf['authority_level'][$biblio_author_d['level']]));
        $table->setCellAttr($row, 0, 'valign="top" class="' . $row_class . '" style="font-weight: bold; width: 10%;"');
        $table->setCellAttr($row, 1, 'valign="top" class="' . $row_class . '" style="width: 30%;"');
        $table->setCellAttr($row, 2, 'valign="top" class="' . $row_class . '" style="width: 20%;"');
        $table->setCellAttr($row, 3, 'valign="top" class="' . $row_class . '" style="width: 20%;"');
        $table->setCellAttr($row, 4, 'valign="top" class="' . $row_class . '" style="width: 20%;"');
        $row++;
    }
    echo $table->printTable();
    // hidden form
    echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="bid" value="0" /><input type="hidden" name="remove" value="0" /></form>';
} else {
    if ($_SESSION['biblioAuthor']) {
        $table = new simbio_table();
        $table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
        $row = 1;
        $row_class = 'alterCell2';
        foreach ($_SESSION['biblioAuthor'] as $biblio_session) {
            // remove link
            $remove_link = '<a href="iframe_author.php?removesess=' . $biblio_session[0] . '"
          style="color: #000000; text-decoration: underline;">Remove</a>';
            if ($biblio_session) {
                $author_q = $dbs->query("SELECT author_name, author_year, authority_type FROM mst_author\n              WHERE author_id=" . $biblio_session[0]);
                $author_d = $author_q->fetch_row();
                $author = $author_d[0];
                $author_year = $author_d[1];
                $authority_type = $author_d[2];
            }
            $table->appendTableRow(array($remove_link, $author, $author_year, $authority_type, $sysconf['authority_level'][$biblio_session[1]]));
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:iframe_author.php

示例6: array

    $hol_dayname = array();
    if ($rec_q->num_rows > 0) {
        while ($rec_d = $rec_q->fetch_row()) {
            $hol_dayname[] = $rec_d[0];
        }
    }
    // small function to check the checkbox
    function isChecked($str_data)
    {
        global $hol_dayname;
        if (in_array($str_data, $hol_dayname)) {
            return 'checked';
        }
    }
    // create table object
    $table = new simbio_table();
    $table->table_attr = 'align="center" class="border fullWidth" cellpadding="5" cellspacing="0"';
    // dayname list
    $table->appendTableRow(array('<input type="checkbox" name="dayname[]" value="mon" ' . isChecked('mon') . ' /> ' . __('Monday'), '<input type="checkbox" name="dayname[]" value="tue" ' . isChecked('tue') . ' /> ' . __('Tuesday'), '<input type="checkbox" name="dayname[]" value="wed" ' . isChecked('wed') . ' /> ' . __('Wednesday')));
    $table->appendTableRow(array('<input type="checkbox" name="dayname[]" value="thu" ' . isChecked('thu') . ' /> ' . __('Thursday'), '<input type="checkbox" name="dayname[]" value="fri" ' . isChecked('fri') . ' /> ' . __('Friday'), '<input type="checkbox" name="dayname[]" value="sat" ' . isChecked('sat') . ' /> ' . __('Saturday')));
    $table->appendTableRow(array('<input type="checkbox" name="dayname[]" value="sun" ' . isChecked('sun') . ' /> ' . __('Sunday')));
    // set cell attribute
    $table->setCellAttr(3, 0, 'colspan="3"');
    // submit button
    $table->appendTableRow(array('<input type="button" name="saveDaynameData" value="' . __('Save Settings') . '" onclick="$(\'#mainContent\').simbioAJAX(\'' . $_SERVER['PHP_SELF'] . '\', { method: \'POST\', addData: $(\'#holidayForm\').serialize() } )" />'));
    // set cell attribute
    $table->setCellAttr(4, 0, 'colspan="3" class="alterCell"');
    echo '<form name="holidayForm" id="holidayForm">';
    echo $table->printTable();
    echo '</form>';
}
开发者ID:banumelody,项目名称:slims7_cendana,代码行数:31,代码来源:holiday.php

示例7: __

 :
    <input type="text" name="keywords" size="30" />
    <input type="submit" value="<?php 
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';
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:index.php

示例8: strtoupper

        echo 'location.href = \'' . $_SERVER['PHP_SELF'] . '\'' . "\n";
        echo '</script>';
    }
    exit;
}
?>
<fieldset class="menuBox">
<div class="menuBoxInner barcodeIcon">
    <?php 
echo strtoupper(lang_sys_barcodes) . ' <hr />' . lang_sys_barcodes_description . ' "' . lang_sys_conf_barcode_button_print . '".';
?>
</div>
</fieldset>
<?php 
// create table object
$table = new simbio_table();
$table->table_attr = 'align="center" class="border fullWidth" cellpadding="5" cellspacing="0"';
// initial row count
$row = 1;
$row_num = 6;
// submit button
$table->appendTableRow(array(lang_sys_conf_barcode_field_size . ' : <select name="size"><option value="1">' . lang_sys_conf_barcode_field_option_1 . '</option>
    <option value="2" selected>' . lang_sys_conf_barcode_field_option_2 . '</option>
    <option value="3">' . lang_sys_conf_barcode_field_option_3 . '</option></select>'));
// set cell attribute
$table->setCellAttr($row, 0, 'colspan="3" class="alterCell"');
$row++;
// barcode text fields
while ($row <= $row_num) {
    $table->appendTableRow(array('<input type="text" name="barcode[]" style="width: 100%;" />', '<input type="text" name="barcode[]" style="width: 100%;" />', '<input type="text" name="barcode[]" style="width: 100%;" />'));
    $row++;
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:barcode_generator.php

示例9: simbio_table

        $title = $biblio_relation_d['title'];
        $publish_year = $biblio_relation_d['publish_year'];
        $edition = $biblio_relation_d['edition'];
        $table->appendTableRow(array($remove_link, $title, $publish_year, $edition));
        $table->setCellAttr($row, 0, 'valign="top" class="' . $row_class . '" style="font-weight: bold; width: 10%;"');
        $table->setCellAttr($row, 1, 'valign="top" class="' . $row_class . '" style="width: 50%;"');
        $table->setCellAttr($row, 2, 'valign="top" class="' . $row_class . '" style="width: 20%;"');
        $table->setCellAttr($row, 3, 'valign="top" class="' . $row_class . '" style="width: 20%;"');
        $row++;
    }
    echo $table->printTable();
    // hidden form
    echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="bid" value="0" /><input type="hidden" name="remove" value="0" /></form>';
} else {
    if ($_SESSION['biblioToBiblio']) {
        $table = new simbio_table();
        $table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
        $row = 1;
        $row_class = 'alterCell2';
        foreach ($_SESSION['biblioToBiblio'] as $biblio_session) {
            // remove link
            $remove_link = '<a class="notAJAX btn button btn-danger btn-delete" href="iframe_biblio_rel.php?removesess=' . $biblio_session[0] . '">' . __('Remove') . '</a>';
            if ($biblio_session) {
                $title_q = $dbs->query("SELECT title, publish_year, edition FROM biblio\n              WHERE biblio_id=" . $biblio_session[0]);
                $title_d = $title_q->fetch_row();
                $title = $title_d[0];
                $publish_year = $title_d[1];
                $edition = $title_d[2];
            }
            $table->appendTableRow(array($remove_link, $title, $publish_year, $edition));
            $table->setCellAttr($row, 0, 'valign="top" class="' . $row_class . '" style="font-weight: bold; background-color: #ffc466; width: 10%;"');
开发者ID:slims,项目名称:slims8_akasia,代码行数:31,代码来源:iframe_biblio_rel.php

示例10: ob_start

 * 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
 * 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';
    }
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:module_priv_form.inc.php

示例11: __

    ?>
 :
            <input type="text" id="tempLoanID" name="tempLoanID" />
            <input type="submit" value="<?php 
    echo __('Loan');
    ?>
" 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']) {
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:loan.php

示例12: printOut

 /**
  * Method to print out form table
  *
  * @return  string
  */
 public function printOut()
 {
     // create table object
     $_table = new simbio_table();
     // set the table attr
     $_table->table_attr = $this->table_attr;
     $_buffer = '';
     // check if form tag is included
     if ($this->with_form_tag) {
         $_buffer .= $this->startForm() . "\n";
     }
     // loop the form element
     $_row_num = 0;
     foreach ($this->elements as $row) {
         $_form_element = $row['element']->out();
         if ($_form_element_info = trim($row['info'])) {
             $_form_element .= '<div class="formElementInfo">' . $_form_element_info . '</div>';
         }
         // append row
         $_table->appendTableRow(array($row['label'], ':', $_form_element));
         // set the column header attr
         $_table->setCellAttr($_row_num + 1, 0, 'width="20%" valign="top"' . $this->table_header_attr);
         $_table->setCellAttr($_row_num + 1, 1, 'width="1%" valign="top"' . $this->table_header_attr);
         // set the form element column attr
         $_table->setCellAttr($_row_num + 1, 2, 'width="79%" ' . $this->table_content_attr);
         $_row_num++;
     }
     // link and buttons
     $_edit_link = '';
     $_delete_button = '';
     $_back_button = '';
     if (defined('lang_sys_common_form_delete')) {
         $_del_value = lang_sys_common_form_delete;
     } else {
         $_del_value = 'Delete Record';
     }
     if (defined('lang_sys_common_form_cancel')) {
         $_cancel_value = lang_sys_common_form_cancel;
     } else {
         $_cancel_value = 'Cancel';
     }
     // check if we are on edit form mode
     if ($this->edit_mode) {
         $_edit_link .= '<a href="#" onclick="enableForm(\'' . $this->form_name . '\'); enableForm(\'deleteForm\');" style="font-weight: bold;" class="editFormLink">EDIT</a>';
         // delete button exists if the record_id exists
         if ($this->record_id && $this->delete_button) {
             $_delete_button = '<input type="button" value="' . $_del_value . '" class="button" onclick="confSubmit(\'deleteForm\', \'Are you sure to delete ' . addslashes($this->record_title) . '?\\nOnce Deleted it cant be restored again\')" style="color: red; font-weight: bold;" />';
         }
         // back button
         if ($this->back_button) {
             $_back_button = '<input type="button" class="cancelButton button" value="' . $_cancel_value . '" onclick="javascript: self.history.back();" />';
         }
     }
     $_buttons = '';
     if ($this->with_form_tag) {
         $_buttons = '<table cellspacing="0" cellpadding="3" style="width: 100%; background-color: #dcdcdc;">' . '<tr><td><input type="submit" ' . $this->submit_button_attr . ' /> ' . $_delete_button . ' ' . $_back_button . '</td><td align="right">' . $_edit_link . '</td>' . '</tr></table>' . "\n";
     }
     // get the table result
     $_buffer .= $_buttons;
     $_buffer .= $_table->printTable();
     $_buffer .= $_buttons;
     // extract all hidden elements here
     foreach ($this->hidden_elements as $_hidden) {
         $_buffer .= $_hidden->out();
     }
     // update ID hidden elements
     if ($this->edit_mode and $this->record_id) {
         // add hidden form element flag for detail editing purpose
         $_buffer .= '<input type="hidden" name="updateRecordID" value="' . $this->record_id . '" />';
     }
     // check if form tag is included
     if ($this->with_form_tag) {
         $_buffer .= $this->endForm() . "\n";
     }
     if ($this->edit_mode) {
         // hidden form for deleting records
         $_buffer .= '<form action="' . $this->form_action . '" id="deleteForm" method="post" style="display: inline;"><input type="hidden" name="itemID" value="' . $this->record_id . '" /><input type="hidden" name="itemAction" value="true" /></form>';
         // disabling form
         $_buffer .= '<script type="text/javascript">disableForm(\'' . $this->form_name . '\');disableForm(\'deleteForm\');</script>';
     }
     // output
     return $_buffer;
 }
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:88,代码来源:simbio_form_table.inc.php

示例13: str_replace

     // get reservation data
     $reserve_q = $dbs->query('SELECT r.member_id, m.member_name
         FROM reserve AS r
         LEFT JOIN member AS m ON r.member_id=m.member_id
         WHERE item_code=\'' . $loan_d['item_code'] . '\' ORDER BY reserve_date DESC');
     $reserve_d = $reserve_q->fetch_row();
     $member = $reserve_d[1] . ' (' . $reserve_d[0] . ')';
     $reserve_msg = str_replace(array('{itemCode}', '{member}'), array($loan_d['item_code'], $member), lang_mod_circ_reserve_alert_after_return);
     $loan_d['title'] .= '<div>' . $reserve_msg . '</div>';
 }
 // write log
 utility::writeLogs($dbs, 'member', $loan_d['member_id'], 'circulation', $_SESSION['realname'] . ' return item (' . $_POST['quickReturnID'] . ') with title (' . $loan_d['title'] . ') with Quick Return method');
 // show loan information
 include SIMBIO_BASE_DIR . 'simbio_GUI/table/simbio_table.inc.php';
 // create table object
 $table = new simbio_table();
 $table->table_attr = 'class="border" style="width: 100%; margin-bottom: 5px;" cellpadding="5" cellspacing="0"';
 // append data to table row
 $table->appendTableRow(array('Item ' . $_POST['quickReturnID'] . lang_mod_circ_common_item_return_ok . $return_date));
 $table->appendTableRow(array(lang_mod_circ_tblheader_title, $loan_d['title']));
 $table->appendTableRow(array(lang_mod_circ_field_member_name, $loan_d['member_name'], lang_mod_circ_field_member_id, $loan_d['member_id']));
 $table->appendTableRow(array(lang_mod_circ_tblheader_loan_date, $loan_d['loan_date'], lang_mod_circ_tblheader_due_date, $loan_d['due_date']));
 // set the cell attributes
 $table->setCellAttr(1, null, 'class="dataListHeader" style="color: #FFFFFF; font-weight: bold;" colspan="4"');
 $table->setCellAttr(2, 0, 'class="alterCell"');
 $table->setCellAttr(2, 1, 'class="alterCell2" colspan="3"');
 $table->setCellAttr(3, 0, 'class="alterCell" width="15%"');
 $table->setCellAttr(3, 1, 'class="alterCell2" width="35%"');
 $table->setCellAttr(3, 2, 'class="alterCell" width="15%"');
 $table->setCellAttr(3, 3, 'class="alterCell2" width="35%"');
 $table->setCellAttr(4, 0, 'class="alterCell" width="15%"');
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:circulation_action.php

示例14: die

 * 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
 *
 */
// 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';
    }
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:module_priv_form.inc.php

示例15: urlencode

        } else {
            $file = '<a href="' . SENAYAN_WEB_ROOT_DIR . 'admin/view.php?fid=' . urlencode($biblio_attach_d['file_id']) . '" target="_blank">' . $biblio_attach_d['file_title'] . '</a>';
        }
        $table->appendTableRow(array($remove_link, $edit_link, $file, $biblio_attach_d['file_desc']));
        $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: 5%;"');
        $table->setCellAttr($row, 2, 'valign="top" class="' . $row_class . '" style="width: 40%;"');
        $table->setCellAttr($row, 3, 'valign="top" class="' . $row_class . '" style="width: 50%;"');
        $row++;
    }
    echo $table->printTable();
    // hidden form
    echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="bid" value="0" /><input type="hidden" name="remove" value="0" /><input type="hidden" name="alsoDeleteFile" value="0" /></form>';
} else {
    if ($_SESSION['biblioAttach']) {
        $table = new simbio_table();
        $table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
        $row = 1;
        $row_class = 'alterCell2';
        foreach ($_SESSION['biblioAttach'] as $idx => $biblio_session) {
            // remove link
            $remove_link = '<a href="iframe_attach.php?removesess=' . $idx . '" style="color: #000000; text-decoration: underline;">Remove</a>';
            $table->appendTableRow(array($remove_link, $biblio_session['file_name'], $biblio_session['last_update']));
            $table->setCellAttr($row, 0, 'valign="top" class="' . $row_class . '" style="font-weight: bold; background-color: #ffc466; width: 10%;"');
            $table->setCellAttr($row, 1, 'valign="top" class="' . $row_class . '" style="background-color: #ffc466; width: 60%;"');
            $table->setCellAttr($row, 2, 'valign="top" class="' . $row_class . '" style="background-color: #ffc466; width: 30%;"');
            $row++;
        }
        echo $table->printTable();
    }
}
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:iframe_attach.php


注:本文中的simbio_table类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。