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


PHP simbio_table::setCellAttr方法代码示例

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


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

示例1: foreach

    // 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['biblioTopic']) {
        $table = new simbio_table();
        $table->table_attr = 'align="center" style="width: 100%;" cellpadding="2" cellspacing="0"';
        $row = 1;
        $row_class = 'alterCell2';
        foreach ($_SESSION['biblioTopic'] as $biblio_session) {
            // remove link
            $remove_link = '<a class="notAJAX btn button btn-danger btn-delete" href="iframe_topic.php?removesess=' . $biblio_session[0] . '">Remove</a>';
            if ($biblio_session) {
                $topic_q = $dbs->query("SELECT topic, topic_type FROM mst_topic WHERE topic_id=" . $biblio_session[0]);
                $topic_d = $topic_q->fetch_row();
                $topic = $topic_d[0];
                $topic_type = $sysconf['subject_type'][$topic_d[1]];
            }
            $table->appendTableRow(array($remove_link, $topic, $topic_type, $sysconf['subject_level'][$biblio_session[1]]));
            $table->setCellAttr($row, 0, 'class="' . $row_class . '" style="font-weight: bold; background-color: #ffc466; width: 10%;"');
            $table->setCellAttr($row, 1, 'class="' . $row_class . '" style="background-color: #ffc466; width: 50%;"');
            $table->setCellAttr($row, 2, 'class="' . $row_class . '" style="background-color: #ffc466; width: 20%;"');
            $table->setCellAttr($row, 3, 'class="' . $row_class . '" style="background-color: #ffc466; width: 20%;"');
            $row++;
        }
        echo $table->printTable();
    }
}
/* main content end */
$content = ob_get_clean();
// include the page template
require SB . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
开发者ID:heroesoebekti,项目名称:slims8_akasia-1,代码行数:31,代码来源:iframe_topic.php

示例2: COUNT

        $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']) {
            $reserve_list_d['title'] .= ' - <strong style="color: red;">' . __('ALREADY EXPIRED') . '</strong>';
        }
        // row colums array
        $fields = array($remove_link, $reserve_list_d['title'], $reserve_list_d['item_code'], $reserve_list_d['reserve_date']);
        // append data to table row
        $reserve_list->appendTableRow($fields);
        // set the HTML attributes
        $reserve_list->setCellAttr($row, null, "valign='top' class='{$row_class}'");
        $reserve_list->setCellAttr($row, 0, "valign='top' align='center' class='{$row_class}' style='width: 5%;'");
        $reserve_list->setCellAttr($row, 1, "valign='top' class='{$row_class}' style='width: 70%;'");
        $row++;
    }
    echo $reserve_list->printTable();
    // hidden form for return and extend process
    echo '<form name="reserveHiddenForm" method="post" action="circulation_action.php"><input type="hidden" name="process" value="delete" /><input type="hidden" name="reserveID" value="" /></form>';
}
// get the buffered content
$content = ob_get_clean();
// include the page template
require SENAYAN_BASE_DIR . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:reserve_list.php

示例3: date

    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
    $html_str = '<html><head><title>' . $sysconf['library_name'] . ' Membership General Statistic Report</title>';
    $html_str .= '<style type="text/css">' . "\n";
    $html_str .= 'body {padding: 0.2cm}' . "\n";
    $html_str .= 'body * {color: black; font-size: 11pt;}' . "\n";
    $html_str .= 'table {border: 1px solid #000000;}' . "\n";
    $html_str .= '.dataListHeader {background-color: #000000; color: white; font-weight: bold;}' . "\n";
    $html_str .= '.alterCell {border-bottom: 1px solid #666666; background-color: #CCCCCC;}' . "\n";
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:member_report.php

示例4: foreach

        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'];
            }
            // row colums array
            $fields = array($remove_link, $temp_loan_list_d['item_code'], $temp_loan_list_d['title'], $loan_date, $due_date);
            // append data to table row
            $temp_loan_list->appendTableRow($fields);
            // 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%;'");
            $row++;
        }
        echo $temp_loan_list->printTable();
    }
}
// get the buffered content
$content = ob_get_clean();
// include the page template
require SENAYAN_BASE_DIR . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:loan.php

示例5: 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

示例6: foreach

        $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();
    }
}
/* main content end */
$content = ob_get_clean();
// include the page template
require SENAYAN_BASE_DIR . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:iframe_attach.php

示例7:

// 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 = '';
    if (isset($priv_data[$module_data['module_id']]['r']) and $priv_data[$module_data['module_id']]['r'] == 1) {
        $read_checked = 'checked';
    }
    if (isset($priv_data[$module_data['module_id']]['w']) and $priv_data[$module_data['module_id']]['w'] == 1) {
        $read_checked = 'checked';
        $write_checked = 'checked';
    }
    $chbox_read = '<input type="checkbox" name="read[]" value="' . $module_data['module_id'] . '" ' . $read_checked . ' />';
    $chbox_write = '<input type="checkbox" name="write[]" value="' . $module_data['module_id'] . '" ' . $write_checked . ' />';
    $table->appendTableRow(array($module_data['module_name'], $chbox_read, $chbox_write));
    $table->setCellAttr($row, 0, 'valign="top" class="' . $row_class . '"');
    $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="font-weight: bold; width: 5%;"');
    $row++;
}
echo $table->printTable();
$priv_table = ob_get_clean();
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:module_priv_form.inc.php

示例8: 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

示例9: item

        }
        // 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%"');
        $table->setCellAttr(4, 0, 'class="alterCell" width="15%"');
        $table->setCellAttr(4, 1, 'class="alterCell2" width="35%"');
        $table->setCellAttr(4, 2, 'class="alterCell" width="15%"');
        $table->setCellAttr(4, 3, 'class="alterCell2" width="35%"');
        // print out the table
        echo $table->printTable();
    }
    exit;
}
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:circulation_action.php

示例10:

?>
</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(__('Barcode Size') . ' : <select name="size"><option value="1">' . __('Small') . '</option>
    <option value="2" selected>' . __('Medium') . '</option>
    <option value="3">' . __('Big') . '</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++;
}
// submit button
$table->appendTableRow(array('<input type="submit" name="saveData" value="' . __('Generate Barcodes') . '" />'));
// set cell attribute
$table->setCellAttr($row_num + 1, 0, 'colspan="3" class="alterCell"');
echo '<form name="barcodeForm" id="barcodeForm" target="submitExec" method="post" action="' . $_SERVER['PHP_SELF'] . '">';
echo $table->printTable();
echo '</form>';
// for debugging purpose only
// echo '<iframe name="submitExec" id="submitExec" style="width: 100%; height: 200px; visibility: visible;"></iframe>';
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:barcode_generator.php

示例11: printOut

 public function printOut()
 {
     // create table object
     $_table = new simbio_table();
     // set the table attr
     $_table->table_attr = $this->table_attr;
     if ($this->edit_mode) {
         $this->disable = true;
     }
     // initialize result buffer
     $_buffer = '';
     // check if form tag is included
     if ($this->with_form_tag) {
         $this->submit_target = 'submitExec';
         $_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 = '';
     $_del_value = __('Delete Record');
     $_cancel_value = __('Cancel');
     // check if we are on edit form mode
     if ($this->edit_mode) {
         $_edit_link .= '<a href="#" class="notAJAX editFormLink">EDIT</a>';
         // delete button exists if the record_id properties exists
         if ($this->record_id && $this->delete_button) {
             // create delete button
             $_delete_button = '<input type="button" value="' . $_del_value . '" class="button confirmSubmit" 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 . '" />';
         }
     }
     $_buttons = '';
     // check if form tag is included
     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 . ' /> ' . $_back_button . ' ' . $_delete_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="' . preg_replace('/\\?.+/i', '', $this->form_action) . '" id="deleteForm" target="submitExec" method="post" style="display: inline;">' . '<input type="hidden" name="itemID" value="' . $this->record_id . '" /><input type="hidden" name="itemAction" value="true" /></form>';
     }
     // for debugging purpose only
     // $_buffer .= '<iframe name="submitExec" style="visibility: visible; width: 100%; height: 500px;"></iframe>';
     // hidden iframe for form executing
     $_buffer .= '<iframe name="submitExec" class="noBlock" style="visibility: hidden; width: 100%; height: 0;"></iframe>';
     return $_buffer;
 }
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:83,代码来源:simbio_form_table_AJAX.inc.php

示例12: while

    $table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
    // database list
    $item_q = $dbs->query('SELECT i.item_id, i.item_code, b.title, i.site, loc.location_name, ct.coll_type_name, st.item_status_name FROM item AS i
    LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id
    LEFT JOIN mst_location AS loc ON i.location_id=loc.location_id
    LEFT JOIN mst_coll_type AS ct ON i.coll_type_id=ct.coll_type_id
    LEFT JOIN mst_item_status AS st ON i.item_status_id=st.item_status_id
    WHERE i.biblio_id=' . $biblioID);
    $row = 1;
    while ($item_d = $item_q->fetch_assoc()) {
        // alternate the row color
        $row_class = $row % 2 == 0 ? 'alterCell' : 'alterCell2';
        // links
        $edit_link = '<a class="notAJAX btn btn-default button openPopUp" href="' . MWB . 'bibliography/pop_item.php?inPopUp=true&action=detail&biblioID=' . $biblioID . '&itemID=' . $item_d['item_id'] . '" width="650" height="400" title="' . __('Items/Copies') . '" style="text-decoration: underline;">Edit</a>';
        $remove_link = '<a href="#" class="notAJAX btn button btn-danger btn-delete" onclick="javascript: confirmProcess(' . $biblioID . ', ' . $item_d['item_id'] . ')">Delete</a>';
        $title = $item_d['item_code'];
        $table->appendTableRow(array($edit_link, $remove_link, $title, $item_d['location_name'], $item_d['site'], $item_d['coll_type_name'], $item_d['item_status_name']));
        $table->setCellAttr($row, null, 'class="' . $row_class . '" style="font-weight: bold; width: auto;"');
        $table->setCellAttr($row, 0, 'class="' . $row_class . '" style="font-weight: bold; width: 5%;"');
        $table->setCellAttr($row, 1, 'class="' . $row_class . '" style="font-weight: bold; width: 10%;"');
        $table->setCellAttr($row, 2, 'class="' . $row_class . '" style="font-weight: bold; width: 40%;"');
        $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>';
}
/* main content end */
$content = ob_get_clean();
// include the page template
require SB . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
开发者ID:heroesoebekti,项目名称:slims8_akasia-1,代码行数:31,代码来源:iframe_item_list.php

示例13: foreach

        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') . '" class="dateChange loan" data="' . $_loan_ID . '" id="loanDate' . $row . '">' . $temp_loan_list_d['loan_date'] . '</a>';
                $due_date = '<a href="#" title="' . __('Click To Change Due Date') . '" class="dateChange due" data="' . $_loan_ID . '" 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'];
            }
            // row colums array
            $fields = array($remove_link, $temp_loan_list_d['item_code'], $temp_loan_list_d['title'], $loan_date, $due_date);
            // append data to table row
            $temp_loan_list->appendTableRow($fields);
            // set the HTML attributes
            $temp_loan_list->setCellAttr($row, null, 'class="' . $row_class . '"');
            $temp_loan_list->setCellAttr($row, 0, 'valign="top" align="center" style="width: 5%;"');
            $temp_loan_list->setCellAttr($row, 1, 'valign="top" style="width: 10%;"');
            $temp_loan_list->setCellAttr($row, 2, 'valign="top" style="width: 60%;"');
            $row++;
        }
        echo $temp_loan_list->printTable();
    }
}
// get the buffered content
$content = ob_get_clean();
// include the page template
require SENAYAN_BASE_DIR . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
开发者ID:indonesia,项目名称:slims5_meranti,代码行数:31,代码来源:loan.php

示例14: 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


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