當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pagination::set_css_class方法代碼示例

本文整理匯總了PHP中pagination::set_css_class方法的典型用法代碼示例。如果您正苦於以下問題:PHP pagination::set_css_class方法的具體用法?PHP pagination::set_css_class怎麽用?PHP pagination::set_css_class使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pagination的用法示例。


在下文中一共展示了pagination::set_css_class方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: CONCAT

 echo $test_output;
 //*** Query Manager ***
 //To be display only when the user is not testin a new query
 if ($_POST[$wpbi_settings['parameter']['action']] != 'test') {
     //Get saved queries
     $qy_queries = "\r\n\t\tSELECT `QUERY_ID`, `QUERY_NAME`, CONCAT(`DB_NAME`,'(',`DB_USER`,'@',`DB_HOST`,')') \"DATABASE\" , `QUERY_STATEMENT` \r\n\t\tFROM " . $wpbi_sql['tname']['queries'] . ", " . $wpbi_sql['tname']['databases'] . "\r\n\t\tWHERE `DATABASE_ID` = `DB_ID` order by `QUERY_NAME` asc";
     $query = new query($qy_queries, $wpdb, $wpbi_sql['tname']['vars']);
     $total_rows = $wpdb->get_results($query->count_qy_results(), 'ARRAY_N');
     $total_rows = intval($total_rows[0][0]);
     //Page navigation
     $pagination = new pagination();
     $pagination->set_pg_interval($wpbi_settings['parameter']['page-interval']);
     $pagination->set_pg_parameter('pg');
     $pagination->set_current_page(isset($_GET[$pagination->pg_parameter]) ? abs((int) $_GET[$pagination->pg_parameter]) : 1);
     $pagination->set_rows($total_rows);
     $pagination->set_css_class('widefat post fixed');
     $pagination->set_css_style('widefat-pagination.css');
     $pagination->set_pagination_tpl_path($wpbi_url['tpl']);
     $pagination->set_pagination_stats($wpbi_dialog['table']['pagination']['stats']);
     $pagination->set_paginate_links(paginate_links(array('base' => esc_url(add_query_arg($pagination->pg_parameter, '%#%')), 'format' => '', 'prev_text' => __($wpbi_dialog['table']['pagination']['prev_text']), 'next_text' => __($wpbi_dialog['table']['pagination']['next_text']), 'total' => ceil($pagination->rows / $pagination->pg_interval), 'current' => $pagination->current_page)));
     $pagination->initialize();
     echo $pagination->get_html();
     //END page navigation
     //Execute query limitng the resultset
     $qy_queries_rows = $wpdb->get_results($query->limit_qy_to($pagination->item_start - 1, $pagination->pg_interval), 'ARRAY_N');
     //Output table
     $column_headers = array($wpbi_dialog['header']['queries']['id'], $wpbi_dialog['header']['queries']['name'], $wpbi_dialog['header']['queries']['database'], $wpbi_dialog['header']['queries']['statement']);
     $single_actions = array("edit" => array("label" => $wpbi_dialog['action']['label']['edit'], "page" => $wpbi_url['slug']['queries'], "action" => $wpbi_settings['value']['edit'], "parameter" => $wpbi_settings['parameter']['qy_id']), "copy" => array("label" => $wpbi_dialog['action']['label']['copy'], "page" => $wpbi_url['slug']['queries'], "action" => $wpbi_settings['value']['copy'], "parameter" => $wpbi_settings['parameter']['qy_id']), "test" => array("label" => $wpbi_dialog['action']['label']['test'], "page" => $wpbi_url['slug']['queries'], "action" => $wpbi_settings['value']['test'], "parameter" => $wpbi_settings['parameter']['qy_id']), "drop" => array("label" => $wpbi_dialog['action']['label']['drop'], "page" => $wpbi_url['slug']['queries'], "action" => $wpbi_settings['value']['drop'], "parameter" => $wpbi_settings['parameter']['qy_id']));
     $global_actions = array("drop" => array("label" => $wpbi_dialog['button']['label']['drop'], "value" => $wpbi_settings['value']['drop']));
     $table_form = new table_form();
     $table_form->set_css_class('widefat post fixed');
開發者ID:RA2WP,項目名稱:RA2WP,代碼行數:31,代碼來源:queries.php


注:本文中的pagination::set_css_class方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。