• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP simbio_datagrid类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: showLoanHist

 function showLoanHist($num_recs_show = 1000000)
 {
     global $dbs;
     require SIMBIO . 'simbio_GUI/table/simbio_table.inc.php';
     require SIMBIO . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
     require SIMBIO . 'simbio_GUI/paging/simbio_paging.inc.php';
     require SIMBIO . 'simbio_UTILS/simbio_date.inc.php';
     // table spec
     $_table_spec = 'loan AS l
         LEFT JOIN member AS m ON l.member_id=m.member_id
         LEFT JOIN item AS i ON l.item_code=i.item_code
         LEFT JOIN biblio AS b ON i.biblio_id=b.biblio_id';
     // create datagrid
     $_loan_hist = new simbio_datagrid();
     $_loan_hist->disable_paging = true;
     $_loan_hist->table_ID = 'loanhist';
     $_loan_hist->setSQLColumn('l.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', 'l.loan_date AS \'' . __('Loan Date') . '\'', 'l.return_date AS \'' . __('Return Date') . '\'');
     $_loan_hist->setSQLorder('l.loan_date DESC');
     $_criteria = sprintf('m.member_id=\'%s\' AND l.is_lent=1 AND is_return=1 ', $_SESSION['mid']);
     $_loan_hist->setSQLCriteria($_criteria);
     /* callback function to show overdue */
     function showOverdue($obj_db, $array_data)
     {
         $_curr_date = date('Y-m-d');
         if (simbio_date::compareDates($array_data[3], $_curr_date) == $_curr_date) {
             #return '<strong style="color: #f00;">'.$array_data[3].' '.__('OVERDUED').'</strong>';
         } else {
             return $array_data[3];
         }
     }
     // modify column value
     #$_loan_hist->modifyColumnContent(3, 'callback{showOverdue}');
     // set table and table header attributes
     $_loan_hist->table_attr = 'align="center" class="memberLoanList" cellpadding="5" cellspacing="0"';
     $_loan_hist->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
     $_loan_hist->using_AJAX = false;
     // return the result
     $_result = $_loan_hist->createDataGrid($dbs, $_table_spec, $num_recs_show);
     $_result = '<div class="memberLoanHistInfo">' . $_loan_hist->num_rows . ' ' . __('item(s) loan history') . '</div>' . "\n" . $_result;
     return $_result;
 }
开发者ID:banumelody,项目名称:slims7_cendana,代码行数:41,代码来源:download_loan_history.inc.php


示例2: __

}
echo ' ' . __('in queue waiting to be printed.');
//mfc
?>
    </div>
</div>
</fieldset>
<?php 
/* search form end */
/* ITEM LIST */
require SIMBIO_BASE_DIR . 'simbio_UTILS/simbio_tokenizecql.inc.php';
require LIB_DIR . 'biblio_list.inc.php';
// table spec
$table_spec = 'item LEFT JOIN biblio ON item.biblio_id=biblio.biblio_id';
// create datagrid
$datagrid = new simbio_datagrid();
$datagrid->setSQLColumn('item.item_code', 'item.item_code AS \'' . __('Item Code') . '\'', 'biblio.title AS \'' . __('Title') . '\'');
$datagrid->setSQLorder('item.last_update DESC');
// is there any search
if (isset($_GET['keywords']) and $_GET['keywords']) {
    $keywords = $dbs->escape_string(trim($_GET['keywords']));
    $searchable_fields = array('title', 'author', 'subject', 'itemcode');
    $search_str = '';
    // if no qualifier in fields
    if (!preg_match('@[a-z]+\\s*=\\s*@i', $keywords)) {
        foreach ($searchable_fields as $search_field) {
            $search_str .= $search_field . '=' . $keywords . ' OR ';
        }
    } else {
        $search_str = $keywords;
    }
开发者ID:purwoko,项目名称:slims3-stable15-jquery,代码行数:31,代码来源:item_barcode_generator.php


示例3: simbio_datagrid

    }
    // print out the form object
    echo $form->printOut();
} else {
    /* TOPIC LIST */
    // table spec
    $sql_criteria = 't.topic_id > 1';
    if (isset($_GET['type']) && $_GET['type'] == 'orphaned') {
        $table_spec = 'mst_topic AS t LEFT JOIN biblio_topic AS bt ON t.topic_id=bt.topic_id';
        $sql_criteria = 'bt.biblio_id IS NULL OR bt.topic_id IS NULL';
    } else {
        $table_spec = 'mst_topic AS t';
    }
    $subj_type_fld = 1;
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $subj_type_fld = 2;
        $datagrid->setSQLColumn('t.topic_id', 't.topic AS \'' . __('Subject') . '\'', 't.topic_type AS \'' . __('Subject Type') . '\'', 't.auth_list AS \'' . __('Authority Files') . '\'', 't.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('t.topic AS \'' . __('Subject') . '\'', 't.topic_type AS \'' . __('Subject Type') . '\'', 't.auth_list AS \'' . __('Authority Files') . '\'', 't.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('topic ASC');
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keyword = $dbs->escape_string(trim($_GET['keywords']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' AND (';
            foreach ($words as $word) {
                $concat_sql .= " t.topic LIKE '%{$word}%' AND";
开发者ID:ridorido,项目名称:s3st15_matoa,代码行数:31,代码来源:topic.php


示例4: simbio_datagrid

        mode : "exact", elements : "contentDesc", theme : "advanced",
        plugins : "safari,style,table,media,searchreplace,directionality,visualchars,xhtmlxtras,compat2x",
        skin : "o2k7", skin_variant : "silver",
        // Theme options
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,fontsizeselect,|,bullist,numlist,|,link,unlink,anchor,image,cleanup,code,forecolor",
        theme_advanced_buttons2 : "undo,redo,|,tablecontrols,|,hr,removeformat,visualaid,|,charmap,media,|,ltr,rtl,|,search,replace",
        theme_advanced_buttons3 : null, theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : false, content_css : "' . (SENAYAN_WEB_ROOT_DIR . 'admin/' . $sysconf['admin_template']['css']) . '",
        });</script>';
    echo $form->printOut();
} else {
    /* USER LIST */
    // table spec
    $table_spec = 'content AS c';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('c.content_id', 'c.content_title AS \'' . __('Content Title') . '\'', 'c.content_path AS \'' . __('Path (Must be unique)') . '\'', 'c.last_update AS \'' . __('Last Updated') . '\'');
    } else {
        $datagrid->setSQLColumn('c.content_title AS \'' . __('Content Title') . '\'', 'c.content_path AS \'' . __('Path (Must be unique)') . '\'', 'c.last_update AS \'' . __('Last Updated') . '\'');
    }
    $datagrid->setSQLorder('c.last_update DESC');
    // is there any search
    $criteria = 'c.content_id IS NOT NULL ';
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $criteria .= " AND MATCH(content_title, content_desc) AGAINST('{$keywords}')";
    }
    $datagrid->setSQLCriteria($criteria);
    // set table and table header attributes
    $datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:content.php


示例5: __

        $rules[] = SKIP_STOCK_TAKE;
    }
    $form->addCheckbox('rules', __('Rules'), $rules_option, $rules);
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit Item Status data') . ' : <b>' . $rec_d['item_status_name'] . '</b>  <br />' . __('Last Update') . $rec_d['last_update'] . '</div>';
        //mfc
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* ITEM STATUS LIST */
    // table spec
    $table_spec = 'mst_item_status AS ist';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('ist.item_status_id', 'ist.item_status_id AS \'' . __('Item Status Code') . '\'', 'ist.item_status_name AS \'' . __('Item Status Name') . '\'', 'ist.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('ist.item_status_id AS \'' . __('Item Status Code') . '\'', 'ist.item_status_name AS \'' . __('Item Status Name') . '\'', 'ist.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('item_status_name ASC');
    // change the record order
    if (isset($_GET['fld']) and isset($_GET['dir'])) {
        $datagrid->setSQLorder("'" . urldecode($_GET['fld']) . "' " . $dbs->escape_string($_GET['dir']));
    }
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("ist.item_status_name LIKE '%{$keywords}%'");
    }
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:item_status.php


示例6: __

    }
    /* Form Element(s) */
    // language ID
    $form->addTextField('text', 'langID', __('Language Code') . '*', $rec_d['language_id'], 'style="width: 20%;" maxlength="5"');
    // language_name
    $form->addTextField('text', 'langName', __('Language') . '*', $rec_d['language_name'], 'style="width: 60%;"');
    // print out the form object
    echo '<div class="infoBox">' . __('You are going to edit language data') . ' : <b>' . $rec_d['language_name'] . '</b>  <br />' . __('Last Update') . $rec_d['last_update'] . '</div>';
    //mfc
    echo $form->printOut();
} else {
    /* DOCUMENT LANGUAGE LIST */
    // table spec
    $table_spec = 'mst_language AS l';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('l.language_id', 'l.language_name AS \'' . __('Language') . '\'', 'l.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('l.language_name AS \'' . __('Language') . '\'', 'l.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('language_name ASC');
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("l.language_name LIKE '%{$keywords}%'");
    }
    // set table and table header attributes
    $datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
    $datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    // set delete proccess URL
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:doc_language.php


示例7: ob_start

require SIMBIO_BASE_DIR . 'simbio_GUI/paging/simbio_paging.inc.php';
require SIMBIO_BASE_DIR . 'simbio_DB/datagrid/simbio_dbgrid.inc.php';
// page title
$page_title = 'Member Loan List';
// start the output buffering
ob_start();
// check if there is member ID
if (isset($_SESSION['memberID']) and !empty($_SESSION['memberID'])) {
    /* LOAN HISTORY LIST */
    $memberID = trim($_SESSION['memberID']);
    // table spec
    $table_spec = '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';
    // create datagrid
    $datagrid = new simbio_datagrid();
    $datagrid->setSQLColumn('l.item_code AS \'' . __('Item Code') . '\'', 'b.title AS \'' . __('Title') . '\'', 'l.loan_date AS \'' . __('Loan Date') . '\'', 'IF(return_date IS NULL, \'<i>' . __('Not Returned Yet') . '</i>\', return_date) AS \'' . __('Returned Date') . '\'');
    $datagrid->setSQLorder("l.loan_date DESC");
    $criteria = 'l.member_id=\'' . $dbs->escape_string($memberID) . '\' ';
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keyword = $dbs->escape_string($_GET['keywords']);
        $criteria .= " AND (l.item_code LIKE '%{$keyword}%' OR b.title LIKE '%{$keyword}%')";
    }
    $datagrid->setSQLCriteria($criteria);
    // set table and table header attributes
    $datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
    $datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    $datagrid->icon_edit = SENAYAN_WEB_ROOT_DIR . 'admin/' . $sysconf['admin_template']['dir'] . '/' . $sysconf['admin_template']['theme'] . '/edit.gif';
    // special properties
    $datagrid->using_AJAX = false;
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:member_loan_hist.php


示例8: __

    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit user profile'), ' : <b>' . $rec_d['realname'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . ' //mfc
            <br />' . __('Leave Password field blank if you don\'t want to change the password') . '</div>';
    }
    // print out the form object
    echo $form->printOut();
} else {
    // only administrator have privileges to view user list
    if (!($can_read and $can_write) or $_SESSION['uid'] != 1) {
        die('<div class="errorBox">' . __('You don\'t have enough privileges to view this section') . '</div>');
    }
    /* USER LIST */
    // table spec
    $table_spec = 'user AS u';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('u.user_id', 'u.realname AS \'' . __('Real Name') . '\'', 'u.username AS \'' . __('Login Username') . '\'', 'u.last_login AS \'' . __('Last Login') . '\'', 'u.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('u.realname AS \'' . __('Real Name') . '\'', 'u.username AS \'' . __('Real Name') . '\'', 'u.last_login AS \'' . __('Last Login') . '\'', 'u.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('username ASC');
    // is there any search
    $criteria = 'u.user_id != 1 ';
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $criteria .= " AND (u.username LIKE '%{$keywords}%' OR u.realname LIKE '%{$keywords}%')";
    }
    $datagrid->setSQLCriteria($criteria);
    // set table and table header attributes
    $datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:app_user.php


示例9: foreach

 #var_dump($unpaid_fines);
 if (!empty($unpaid_fines)) {
     foreach ($unpaid_fines as $key => $value) {
         $total_unpaid_fines = $total_unpaid_fines + $value['3'] - $value['4'];
     }
 }
 if ($total_unpaid_fines > 0) {
     $fines_alert = TRUE;
 }
 echo '<div style="color:red; font-weight:bold;">Total of unpaid fines: ' . $total_unpaid_fines . '</div>';
 /* FINES LIST */
 $memberID = trim($_SESSION['memberID']);
 // table spec
 $table_spec = 'fines AS f';
 // create datagrid
 $datagrid = new simbio_datagrid();
 $datagrid->setSQLColumn('f.fines_id AS \'EDIT\'', 'f.description AS \'' . __('Description/Name') . '\'', 'f.fines_date AS \'' . __('Fines Date') . '\'', 'f.debet AS \'' . __('Debit') . '\'', 'f.credit AS \'' . __('Credit') . '\'');
 $datagrid->setSQLorder("f.fines_date DESC");
 $criteria = 'f.member_id=\'' . $dbs->escape_string($memberID) . '\' ';
 // view balanced overdue
 if (isset($_GET['balance'])) {
     $criteria .= ' AND (f.debet=f.credit) ';
 } else {
     $criteria .= ' AND (f.debet!=f.credit) ';
 }
 // is there any search
 if (isset($_GET['keywords']) and $_GET['keywords']) {
     $keyword = $dbs->escape_string($_GET['keywords']);
     $criteria .= " AND (f.description LIKE '%{$keyword}%' OR f.fines_date LIKE '%{$keyword}%')";
 }
 $datagrid->setSQLCriteria($criteria);
开发者ID:slims,项目名称:slims8_akasia,代码行数:31,代码来源:fines_list.php


示例10: simbio_datagrid

    ?>
system/sys_log.php" id="saveLogsForm" target="blindSubmit" method="post" style="display: inline;"><input type="hidden" name="saveLogs" value="true" /></form>
    <?php 
}
?>
    <!-- LOG CLEARANCE FORM END -->
  </div>
</div>
</fieldset>
<?php 
/* search form end */
/* SYSTEM LOGS LIST */
// table spec
$table_spec = 'system_log AS sl';
// create datagrid
$datagrid = new simbio_datagrid();
$datagrid->setSQLColumn('sl.log_date AS \'' . __('Time') . '\'', 'sl.log_location AS \'' . __('Location') . '\'', 'sl.log_msg AS \'' . __('Message') . '\'');
$datagrid->setSQLorder('sl.log_date DESC');
// is there any search
if (isset($_GET['keywords']) and $_GET['keywords']) {
    $keyword = $dbs->escape_string(trim($_GET['keywords']));
    $words = explode(' ', $keyword);
    if (count($words) > 1) {
        $concat_sql = ' (';
        foreach ($words as $word) {
            $concat_sql .= " (sl.log_date LIKE '%{$word}%' OR sl.log_msg LIKE '%{$word}%') AND";
        }
        // remove the last AND
        $concat_sql = substr_replace($concat_sql, '', -3);
        $concat_sql .= ') ';
        $datagrid->setSQLCriteria($concat_sql);
开发者ID:banumelody,项目名称:slims7_cendana,代码行数:31,代码来源:sys_log.php


示例11: while

     while ($_biblio_d = $_biblio_q->fetch_row()) {
         $_title = $_biblio_d[0];
         $_authors .= $_biblio_d[1] . ' - ';
     }
     $_authors = substr_replace($_authors, '', -3);
     $_output = '<div style="float: left;"><b>' . $_title . '</b><br /><i>' . $_authors . '</i></div>';
     return $_output;
 }
 // callback function to show node name
 function showNodeName($obj_db, $array_data)
 {
     global $sysconf;
     return $sysconf['node'][$array_data[4]]['name'];
 }
 // create datagrid
 $datagrid = new simbio_datagrid();
 if ($can_read and $can_write) {
     $datagrid->setSQLColumn('biblio.biblio_id', 'biblio.biblio_id AS bid', 'biblio.title AS \'' . __('Title') . '\'', 'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'', 'biblio.node_id AS \'' . __('Node') . '\'', 'biblio.last_update AS \'' . __('Last Update') . '\'');
     $datagrid->modifyColumnContent(2, 'callback{showTitleAuthors}');
     $datagrid->modifyColumnContent(4, 'callback{showNodeName}');
 } else {
     $datagrid->setSQLColumn('biblio.biblio_id AS bid', 'biblio.title AS \'' . __('Title') . '\'', 'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'', 'biblio.node_id AS \'' . __('Node') . '\'', 'biblio.last_update AS \'' . __('Last Update') . '\'');
     // modify column value
     $datagrid->modifyColumnContent(1, 'callback{showTitleAuthors}');
     $datagrid->modifyColumnContent(3, 'callback{showNodeName}');
 }
 $datagrid->invisible_fields = array(0);
 $datagrid->setSQLorder('biblio.input_date DESC');
 // is there any search
 if (isset($_GET['keywords']) and $_GET['keywords']) {
     $keywords = $dbs->escape_string(trim($_GET['keywords']));
开发者ID:slims,项目名称:s3st14,代码行数:31,代码来源:index.php


示例12: __

    echo '<font id="queueCount" style="color: #f00">0</font>';
}
echo ' ' . __('in queue waiting to be printed.');
//mfc
?>
    </div>
</div>
</fieldset>
<?php 
/* search form end */
/* ITEM LIST */
// table spec
$table_spec = 'member AS m
    LEFT JOIN mst_member_type AS mt ON m.member_type_id=mt.member_type_id';
// create datagrid
$datagrid = new simbio_datagrid();
$datagrid->setSQLColumn('m.member_id', 'm.member_id AS \'' . __('Member ID') . '\'', 'm.member_name AS \'' . __('Member Name') . '\'', 'mt.member_type_name AS \'' . __('Membership Type') . '\'');
$datagrid->setSQLorder('m.last_update DESC');
// is there any search
if (isset($_GET['keywords']) and $_GET['keywords']) {
    $keyword = $dbs->escape_string(trim($_GET['keywords']));
    $words = explode(' ', $keyword);
    if (count($words) > 1) {
        $concat_sql = ' (';
        foreach ($words as $word) {
            $concat_sql .= " (m.member_id LIKE '%{$word}%' OR m.member_name LIKE '%{$word}%'";
        }
        // remove the last AND
        $concat_sql = substr_replace($concat_sql, '', -3);
        $concat_sql .= ') ';
        $datagrid->setSQLCriteria($concat_sql);
开发者ID:banumelody,项目名称:slims7_cendana,代码行数:31,代码来源:member_card_generator.php


示例13: __

    $form->addTextField('text', 'supplierFax', __('Fax Number'), $rec_d['fax'], 'style="width: 60%;"');
    // supplier account number
    $form->addTextField('text', 'supplierAccount', __('Account Number'), $rec_d['account'], 'style="width: 60%;"');
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit Supplier data') . ' : <b>' . $rec_d['supplier_name'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . '</div>';
        //mfc
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* SUPPLIER LIST */
    // table spec
    $table_spec = 'mst_supplier AS sp';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('sp.supplier_id', 'sp.supplier_name AS \'' . __('Supplier Name') . '\'', 'sp.contact AS \'' . __('Contact') . '\'', 'sp.phone AS \'' . __('Phone Number') . '\'', 'sp.fax AS \'' . __('Fax Number') . '\'', 'sp.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('sp.supplier_name AS \'' . __('Supplier Name') . '\'', 'sp.contact AS \'' . __('Contact') . '\'', 'sp.phone AS \'' . __('Phone Number') . '\'', 'sp.fax AS \'' . __('Fax Number') . '\'', 'sp.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('supplier_name ASC');
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("sp.supplier_name LIKE '%{$keywords}%' OR sp.supplier_id LIKE '%{$keywords}%'\n            OR sp.contact LIKE '%{$keywords}%' OR sp.address LIKE '%{$keywords}%'");
    }
    // set table and table header attributes
    $datagrid->table_attr = 'align="center" class="dataList" cellpadding="5" cellspacing="0"';
    $datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    // set delete proccess URL
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:supplier.php


示例14: array

    $unit_options[] = array('month', lang_sys_common_month);
    $unit_options[] = array('year', lang_sys_common_year);
    $form->addSelectList('timeUnit', lang_mod_masterfile_frequency_form_field_frequency_unit, $unit_options, $rec_d['time_unit']);
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . lang_mod_masterfile_frequency_common_edit_info . ' : <b>' . $rec_d['frequency'] . '</b>  <br />' . lang_mod_masterfile_frequency_common_last_update . $rec_d['last_update'] . '</div>';
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* GMD LIST */
    // table spec
    $table_spec = 'mst_frequency AS f
        LEFT JOIN mst_language AS l ON f.language_prefix=l.language_id';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('f.frequency_id', 'f.frequency AS \'' . lang_mod_masterfile_frequency_form_field_frequency_name . '\'', 'l.language_name AS \'' . lang_mod_masterfile_lang_form_field_name . '\'', 'f.time_increment AS \'' . lang_mod_masterfile_frequency_form_field_frequency_time_increment . '\'', 'f.time_unit AS \'' . lang_mod_masterfile_frequency_form_field_frequency_unit . '\'', 'f.last_update AS \'' . lang_mod_masterfile_frequency_common_last_update . '\'');
    } else {
        $datagrid->setSQLColumn('f.frequency AS \'' . lang_mod_masterfile_frequency_form_field_frequency_name . '\'', 'l.language_name AS \'' . lang_mod_masterfile_lang_form_field_name . '\'', 'f.time_increment AS \'' . lang_mod_masterfile_frequency_form_field_frequency_time_increment . '\'', 'f.time_unit AS \'' . lang_mod_masterfile_frequency_form_field_frequency_unit . '\'', 'f.last_update AS \'' . lang_mod_masterfile_frequency_common_last_update . '\'');
    }
    $datagrid->setSQLorder('frequency ASC');
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("g.frequency_name LIKE '%{$keywords}%'");
    }
    // set table and table header attributes
    $datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
    $datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    // set delete proccess URL
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:frequency.php


示例15: simbio_datagrid

    // print out the form object
    echo $form->printOut();
} else {
    /* AUTHOR LIST */
    // table spec
    $sql_criteria = 'a.author_id > 1';
    if (isset($_GET['type']) && $_GET['type'] == 'orphaned') {
        $table_spec = 'mst_author AS a LEFT JOIN biblio_author AS ba ON a.author_id=ba.author_id';
        $sql_criteria = 'ba.biblio_id IS NULL OR ba.author_id IS NULL';
    } else {
        $table_spec = 'mst_author AS a';
    }
    // authority field num
    $auth_type_fld = 2;
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $auth_type_fld = 3;
        $datagrid->setSQLColumn('a.author_id', 'a.author_name AS \'' . __('Author Name') . '\'', 'a.author_year AS \'' . __('Author Year') . '\'', 'a.authority_type AS \'' . __('Authority Type') . '\'', 'a.auth_list AS \'' . __('Authority Files') . '\'', 'a.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('a.author_name AS \'' . __('Author Name') . '\'', 'a.author_year AS \'' . __('Author Year') . '\'', 'a.authority_type AS \'' . __('Authority Type') . '\'', 'a.auth_list AS \'' . __('Authority Files') . '\'', 'a.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('author_name ASC');
    // change the record order
    if (isset($_GET['fld']) and isset($_GET['dir'])) {
        $datagrid->setSQLorder("'" . urldecode($_GET['fld']) . "' " . $dbs->escape_string($_GET['dir']));
    }
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $sql_criteria .= " AND a.author_name LIKE '%{$keywords}%'";
开发者ID:slims,项目名称:s3st15_matoa,代码行数:31,代码来源:author.php


示例16: __

    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit loan rules') . ' : <br />' . __('Last Update') . $rec_d['last_update'] . '</div>' . "\n";
        //mfc
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* LOAN RULES LIST */
    // table spec
    $table_spec = 'mst_loan_rules AS lr
        LEFT JOIN mst_member_type AS mt ON lr.member_type_id=mt.member_type_id
        LEFT JOIN mst_coll_type AS ct ON lr.coll_type_id=ct.coll_type_id
        LEFT JOIN mst_gmd AS g ON lr.gmd_id=g.gmd_id';
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $datagrid->setSQLColumn('lr.loan_rules_id', 'mt.member_type_name AS \'' . __('Member Type') . '\'', 'ct.coll_type_name AS \'' . __('Collection Type') . '\'', 'g.gmd_name AS \'' . __('GMD') . '\'', 'lr.loan_limit AS \'' . __('Loan Limit') . '\'', 'lr.loan_periode AS \'' . __('Loan Period') . '\'', 'lr.last_update AS \'' . __('Last Update') . '\'');
    } else {
        $datagrid->setSQLColumn('mt.member_type_name AS \'' . __('Member Type') . '\'', 'ct.coll_type_name AS \'' . __('Collection Type') . '\'', 'g.gmd_name AS \'' . __('GMD') . '\'', 'lr.loan_limit AS \'' . __('Loan Limit') . '\'', 'lr.loan_periode AS \'' . __('Loan Period') . '\'', 'lr.last_update AS \'' . __('Last Update') . '\'');
    }
    $datagrid->setSQLorder('mt.member_type_name ASC');
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("mt.member_type_name LIKE '%{$keywords}%'");
    }
    // set table and table header attributes
    $datagrid->icon_edit = $sysconf['admin_template']['dir'] . '/' . $sysconf['admin_template']['theme'] . '/edit.gif';
    $datagrid->table_attr = 'align="center" class="dataList" cellpadding="5" cellspacing="0"';
    $datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
开发者ID:sulfan,项目名称:SENAYAN-3-Stable-jQuery,代码行数:31,代码来源:loan_rules.php


示例17: __

    $form->addTextField('text', 'modulePath', __('Module Path') . '*', $rec_d['module_path'], 'style="width: 100%;"');
    // module desc
    $form->addTextField('text', 'moduleDesc', __('Module Description'), $rec_d['module_desc'], 'style="width: 100%;"');
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit data') . ' : <b>' . $rec_d['module_name'] . '</b></div>';
        //mfc
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* MODULE LIST */
    // table spec
    $table_spec = 'mst_module AS mdl';
    // create datagrid
    $datagrid = new simbio_datagrid();
    $datagrid->setSQLColumn('mdl.module_id', 'mdl.module_name AS \'' . __('Module Name') . '\'', 'mdl.module_desc AS \'' . __('Module Description') . '\'');
    $datagrid->setSQLorder('module_name ASC');
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("mdl.module_name LIKE '%{$keywords}%'");
    }
    // set table and table header attributes
    $datagrid->icon_edit = $sysconf['admin_template']['dir'] . '/' . $sysconf['admin_template']['theme'] . '/edit.gif';
    $datagrid->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
    $datagrid->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
    // set delete proccess URL
    $datagrid->chbox_form_URL = $_SERVER['PHP_SELF'];
    // put the result into variables
    $datagrid_result = $datagrid->createDataGrid($dbs, $table_spec, 20, true);
开发者ID:edikriting,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:module.php


示例18: simbio_datagrid

    // authority list
    $form->addTextField('text', 'authList', lang_mod_masterfile_authority_files, $rec_d['auth_list'], 'style="width: 30%;"');
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . lang_mod_masterfile_author_common_edit_info . '<b>' . $rec_d['author_name'] . '</b> <br />' . lang_mod_masterfile_author_common_last_update . $rec_d['last_update'] . '</div>';
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* AUTHOR LIST */
    // table spec
    $table_spec = 'mst_author AS a';
    // authority field num
    $auth_type_fld = 1;
    // create datagrid
    $datagrid = new simbio_datagrid();
    if ($can_read and $can_write) {
        $auth_type_fld = 2;
        $datagrid->setSQLColumn('a.author_id', 'a.author_name AS \'' . lang_mod_masterfile_author_form_field_name . '\'', 'a.authority_type AS \'' . lang_mod_masterfile_author_form_field_authority . '\'', 'a.auth_list AS \'' . lang_mod_masterfile_authority_files . '\'', 'a.last_update AS \'' . lang_mod_masterfile_author_common_last_update . '\'');
    } else {
        $datagrid->setSQLColumn('a.author_name AS \'' . lang_mod_masterfile_author_form_field_name . '\'', 'a.authority_type AS \'' . lang_mod_masterfile_author_form_field_authority . '\'', 'a.auth_list AS \'' . lang_mod_masterfile_authority_files . '\'', 'a.last_update AS \'' . lang_mod_masterfile_author_common_last_update . '\'');
    }
    $datagrid->setSQLorder('author_name ASC');
    // change the record order
    if (isset($_GET['fld']) and isset($_GET['dir'])) {
        $datagrid->setSQLorder("'" . urldecode($_GET['fld']) . "' " . $dbs->escape_string($_GET['dir']));
    }
    // is there any search
    if (isset($_GET['keywords']) and $_GET['keywords']) {
        $keywords = $dbs->escape_string($_GET['keywords']);
        $datagrid->setSQLCriteria("a.author_name LIKE '%{$keywords}%'");
开发者ID:purwoko,项目名称:SENAYAN-3-Stable,代码行数:31,代码来源:author.php


示例19: __

        <div style="margin-top: 3px;"><div style="width: 90px; float: left;"><?php echo __('Search'); ?> : </div><input type="text" name="keywords" size="30" /> <input type="hidden" name="view" value="<?php echo $view; ?>" /> <input type="submit" id="doSearch" value="<?php echo __('Search'); ?>" class="button" /></div>
        </form>
    </div>
    </fieldset>
    <!-- give focus to itemCode text field -->
    <script type="text/javascript">
    Form.Element.focus('itemCode');
    </script>
    <div id="stError" class="errorBox" style="display: none;">&nbsp;</div>
<?php
    /* CURRENT STOCK TAKE ITEM LIST */
    // table spec
    $table_spec = 'stock_take_item AS sti';

    // create datagrid
    $datagrid = new simbio_datagrid();
    $datagrid->setSQLColumn('item_code AS \''.__('Item Code').'\'',
        'title AS \''.__('Title').'\'',
        'coll_type_name AS \''.__('Collection Type').'\'',
        'classification AS \''.__('Classification').'\'',
        'IF(sti.status=\'e\', \''.__('Exists').'\', IF(sti.status=\'l\', \''.__('On Loan').'\', \''.__('Missing').'\')) AS \'Status\'');
    $datagrid->setSQLorder("last_update DESC");

    $criteria = 'item_id <> 0 ';
    // is there any search
    if (isset($_GET['keywords']) AND $_GET['keywords']) {
        $keyword = $dbs->escape_string(trim($_GET['keywords']));
        $words = explode(' ', $keyword);
        if (count($words) > 1) {
            $concat_sql = ' (';
            foreach ($words as $word) {
开发者ID:ridorido,项目名称:s3st13,代码行数:31,代码来源:current.php


示例20: substr_replace

         $_promoted = (int) $_biblio_d[3];
     }
     $_authors = substr_replace($_authors, '', -3);
     $_output = '<div style="float: left;"><b>' . $_title . '</b><br /><i>' . $_authors . '</i></div>';
     // check for opac hide flag
     if ($_opac_hide) {
         $_output .= '<div style="float: right; width: 20px; height: 20px;" class="lockFlagIcon" title="Hidden in OPAC">&nbsp;</div>';
     }
     // check for promoted flag
     if ($_promoted) {
         $_output .= '<div style="float: right; width: 20px; height: 20px;" class="homeFlagIcon" title="Promoted To Homepage">&nbsp;</div>';
     }
     return $_output;
 }
 // create datagrid
 $datagrid = new simbio_datagrid();
 if ($can_read and $can_write) {
     $datagrid->setSQLColumn('biblio.biblio_id', 'biblio.biblio_id AS bid', 'biblio.title AS \'' . __('Title') . '\'', 'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'', 'IF(COUNT(item.item_id)>0, COUNT(item.item_id), \'<strong style="color: #f00;">' . __('None') . '</strong>\') AS \'' . __('Copies') . '\'', 'biblio.last_update AS \'' . __('Last Update') . '\'');
     $datagrid->modifyColumnContent(2, 'callback{showTitleAuthors}');
 } else {
     $datagrid->setSQLColumn('biblio.biblio_id AS bid', 'biblio.title AS \'' . __('Title') . '\'', 'biblio.isbn_issn AS \'' . __('ISBN/ISSN') . '\'', 'IF(COUNT(item.item_id)>0, COUNT(item.item_id), \'<strong style="color: #f00;">' . __('None') . '</strong>\') AS \'' . __('Copies') . '\'', 'biblio.last_update AS \'' . __('Last Update') . '\'');
     // modify column value
     $datagrid->modifyColumnContent(1, 'callback{showTitleAuthors}');
 }
 $datagrid->invisible_fields = array(0);
 $datagrid->setSQLorder('biblio.last_update DESC');
 // is there any search
 if (isset($_GET['keywords']) and $_GET['keywords']) {
     $keywords = $dbs->escape_string(trim($_GET['keywords']));
     $searchable_fields = array('title', 'author', 'subject', 'isbn', 'publisher');
     if ($_GET['field'] != '0' and in_array($_GET['field'], $searchable_fields)) {
开发者ID:purwoko,项目名称:slims3-stable15-jquery,代码行数:31,代码来源:index.php



注:本文中的simbio_datagrid类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP simbio_dbop类代码示例发布时间:2022-05-23
下一篇:
PHP sigesp_sno_class_report_historico类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap