本文整理汇总了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');