本文整理汇总了PHP中PMA_displayTableBody函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_displayTableBody函数的具体用法?PHP PMA_displayTableBody怎么用?PHP PMA_displayTableBody使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_displayTableBody函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_displayTable
//.........这里部分代码省略.........
PMA_displayResultsOperations($the_disp_mode, $analyzed_sql);
}
if ($is_display['nav_bar'] == '1') {
PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);
echo "\n";
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
echo "\n" . '<br /><br />' . "\n";
}
// 2b ----- Get field references from Database -----
// (see the 'relation' config variable)
// loic1, 2002-03-02: extended to php3
// init map
$map = array();
// find tables
$target = array();
if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref'])) {
foreach ($analyzed_sql[0]['table_ref'] as $table_ref_position => $table_ref) {
$target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
}
}
$tabs = '(\'' . join('\',\'', $target) . '\')';
if ($cfgRelation['displaywork']) {
if (!isset($table) || !strlen($table)) {
$exist_rel = false;
} else {
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
if ($exist_rel) {
foreach ($exist_rel as $master_field => $rel) {
$display_field = PMA_getDisplayField($rel['foreign_db'], $rel['foreign_table']);
$map[$master_field] = array($rel['foreign_table'], $rel['foreign_field'], $display_field, $rel['foreign_db']);
}
// end while
}
// end if
}
// end if
}
// end if
// end 2b
// 3. ----- Displays the results table -----
PMA_displayTableHeaders($is_display, $fields_meta, $fields_cnt, $analyzed_sql);
$url_query = '';
echo '<tbody>' . "\n";
PMA_displayTableBody($dt_result, $is_display, $map, $analyzed_sql);
echo '</tbody>' . "\n";
// vertical output case
if ($disp_direction == 'vertical') {
PMA_displayVerticalTable();
}
// end if
unset($vertical_display);
?>
</table>
<?php
// 4. ----- Displays the link for multi-fields delete
if ($is_display['del_lnk'] == 'dr' && $is_display['del_lnk'] != 'kp') {
$delete_text = $is_display['del_lnk'] == 'dr' ? $GLOBALS['strDelete'] : $GLOBALS['strKill'];
$uncheckall_url = 'sql.php?' . PMA_generate_common_url($db, $table) . '&sql_query=' . urlencode($sql_query) . '&pos=' . $pos . '&session_max_rows=' . $GLOBALS['session_max_rows'] . '&pos=' . $pos . '&disp_direction=' . $disp_direction . '&repeat_cells=' . $repeat_cells . '&goto=' . $goto . '&dontlimitchars=' . $dontlimitchars;
$checkall_url = $uncheckall_url . '&checkall=1';
if ($disp_direction == 'vertical') {
$checkall_params['onclick'] = 'if (setCheckboxes(\'rowsDeleteForm\', true)) return false;';
$uncheckall_params['onclick'] = 'if (setCheckboxes(\'rowsDeleteForm\', false)) return false;';
} else {
$checkall_params['onclick'] = 'if (markAllRows(\'rowsDeleteForm\')) return false;';
$uncheckall_params['onclick'] = 'if (unMarkAllRows(\'rowsDeleteForm\')) return false;';
}
$checkall_link = PMA_linkOrButton($checkall_url, $GLOBALS['strCheckAll'], $checkall_params, false);
$uncheckall_link = PMA_linkOrButton($uncheckall_url, $GLOBALS['strUncheckAll'], $uncheckall_params, false);
if ($disp_direction != 'vertical') {
echo '<img class="selectallarrow" width="38" height="22"' . ' src="' . $GLOBALS['pmaThemeImage'] . 'arrow_' . $GLOBALS['text_dir'] . '.png' . '"' . ' alt="' . $GLOBALS['strWithChecked'] . '" />';
}
echo $checkall_link . "\n" . ' / ' . "\n" . $uncheckall_link . "\n" . '<i>' . $GLOBALS['strWithChecked'] . '</i>' . "\n";
if ($GLOBALS['cfg']['PropertiesIconic']) {
PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_change', $GLOBALS['strChange'], 'b_edit.png');
PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_delete', $delete_text, 'b_drop.png');
if ($analyzed_sql[0]['querytype'] == 'SELECT') {
PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', $GLOBALS['strExport'], 'b_tblexport.png');
}
echo "\n";
} else {
echo ' <input type="submit" name="submit_mult"' . ' value="' . htmlspecialchars($GLOBALS['strEdit']) . '"' . ' title="' . $GLOBALS['strEdit'] . '" />' . "\n";
echo ' <input type="submit" name="submit_mult"' . ' value="' . htmlspecialchars($delete_text) . '"' . ' title="' . $delete_text . '" />' . "\n";
if ($analyzed_sql[0]['querytype'] == 'SELECT') {
echo ' <input type="submit" name="submit_mult"' . ' value="' . htmlspecialchars($GLOBALS['strExport']) . '"' . ' title="' . $GLOBALS['strExport'] . '" />' . "\n";
}
}
echo '<input type="hidden" name="sql_query"' . ' value="' . htmlspecialchars($sql_query) . '" />' . "\n";
echo '<input type="hidden" name="pos" value="' . $pos . '" />' . "\n";
echo '<input type="hidden" name="url_query"' . ' value="' . $GLOBALS['url_query'] . '" />' . "\n";
echo '</form>' . "\n";
}
// 5. ----- Displays the navigation bar at the bottom if required -----
if ($is_display['nav_bar'] == '1') {
echo '<br />' . "\n";
PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
echo "\n" . '<br /><br />' . "\n";
}
}
示例2: PMA_displayTable
//.........这里部分代码省略.........
} else {
$table = '';
}
}
if ($is_display['nav_bar'] == '1') {
PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, 'top_direction_dropdown');
echo "\n";
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
echo "\n" . '<br /><br />' . "\n";
}
// 2b ----- Get field references from Database -----
// (see the 'relation' configuration variable)
// loic1, 2002-03-02: extended to php3
// initialize map
$map = array();
// find tables
$target = array();
if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref'])) {
foreach ($analyzed_sql[0]['table_ref'] as $table_ref_position => $table_ref) {
$target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
}
}
$tabs = '(\'' . join('\',\'', $target) . '\')';
if ($cfgRelation['displaywork']) {
if (!strlen($table)) {
$exist_rel = false;
} else {
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
if ($exist_rel) {
foreach ($exist_rel as $master_field => $rel) {
$display_field = PMA_getDisplayField($rel['foreign_db'], $rel['foreign_table']);
$map[$master_field] = array($rel['foreign_table'], $rel['foreign_field'], $display_field, $rel['foreign_db']);
}
// end while
}
// end if
}
// end if
}
// end if
// end 2b
// 3. ----- Displays the results table -----
PMA_displayTableHeaders($is_display, $fields_meta, $fields_cnt, $analyzed_sql, $sort_expression, $sort_expression_nodirection, $sort_direction);
$url_query = '';
echo '<tbody>' . "\n";
$clause_is_unique = PMA_displayTableBody($dt_result, $is_display, $map, $analyzed_sql);
// vertical output case
if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical') {
PMA_displayVerticalTable();
}
// end if
unset($vertical_display);
echo '</tbody>' . "\n";
?>
</table>
<?php
// 4. ----- Displays the link for multi-fields edit and delete
if ($is_display['del_lnk'] == 'dr' && $is_display['del_lnk'] != 'kp') {
$delete_text = $is_display['del_lnk'] == 'dr' ? $GLOBALS['strDelete'] : $GLOBALS['strKill'];
$_url_params = array('db' => $db, 'table' => $table, 'sql_query' => $sql_query, 'goto' => $goto);
$uncheckall_url = 'sql.php' . PMA_generate_common_url($_url_params);
$_url_params['checkall'] = '1';
$checkall_url = 'sql.php' . PMA_generate_common_url($_url_params);
if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical') {
$checkall_params['onclick'] = 'if (setCheckboxes(\'rowsDeleteForm\', true)) return false;';
$uncheckall_params['onclick'] = 'if (setCheckboxes(\'rowsDeleteForm\', false)) return false;';
} else {
$checkall_params['onclick'] = 'if (markAllRows(\'rowsDeleteForm\')) return false;';
$uncheckall_params['onclick'] = 'if (unMarkAllRows(\'rowsDeleteForm\')) return false;';
}
$checkall_link = PMA_linkOrButton($checkall_url, $GLOBALS['strCheckAll'], $checkall_params, false);
$uncheckall_link = PMA_linkOrButton($uncheckall_url, $GLOBALS['strUncheckAll'], $uncheckall_params, false);
if ($_SESSION['tmp_user_values']['disp_direction'] != 'vertical') {
echo '<img class="selectallarrow" width="38" height="22"' . ' src="' . $GLOBALS['pmaThemeImage'] . 'arrow_' . $GLOBALS['text_dir'] . '.png' . '"' . ' alt="' . $GLOBALS['strWithChecked'] . '" />';
}
echo $checkall_link . "\n" . ' / ' . "\n" . $uncheckall_link . "\n" . '<i>' . $GLOBALS['strWithChecked'] . '</i>' . "\n";
PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_change', $GLOBALS['strChange'], 'b_edit.png');
PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_delete', $delete_text, 'b_drop.png');
if ($analyzed_sql[0]['querytype'] == 'SELECT') {
PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', $GLOBALS['strExport'], 'b_tblexport.png');
}
echo "\n";
echo '<input type="hidden" name="sql_query"' . ' value="' . htmlspecialchars($sql_query) . '" />' . "\n";
echo '<input type="hidden" name="url_query"' . ' value="' . $GLOBALS['url_query'] . '" />' . "\n";
echo '<input type="hidden" name="clause_is_unique"' . ' value="' . $clause_is_unique . '" />' . "\n";
echo '</form>' . "\n";
}
// 5. ----- Displays the navigation bar at the bottom if required -----
if ($is_display['nav_bar'] == '1') {
echo '<br />' . "\n";
PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, 'bottom_direction_dropdown');
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
echo "\n" . '<br /><br />' . "\n";
}
// 6. ----- Displays "Query results operations"
if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
PMA_displayResultsOperations($the_disp_mode, $analyzed_sql);
}
}
示例3: PMA_displayTable
//.........这里部分代码省略.........
if (!isset($table) || strlen(trim($table)) == 0) {
$table = $fields_meta[0]->table;
}
if ($is_display['nav_bar'] == '1') {
PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);
echo "\n";
} else {
if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
echo "\n" . '<br /><br />' . "\n";
}
}
// 2b ----- Get field references from Database -----
// (see the 'relation' config variable)
// loic1, 2002-03-02: extended to php3
// init map
$map = array();
// find tables
$target = array();
if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref'])) {
foreach ($analyzed_sql[0]['table_ref'] as $table_ref_position => $table_ref) {
$target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
}
}
$tabs = '(\'' . join('\',\'', $target) . '\')';
if ($cfgRelation['displaywork']) {
if (empty($table)) {
$exist_rel = FALSE;
} else {
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
if ($exist_rel) {
foreach ($exist_rel as $master_field => $rel) {
$display_field = PMA_getDisplayField($rel['foreign_db'], $rel['foreign_table']);
$map[$master_field] = array($rel['foreign_table'], $rel['foreign_field'], $display_field, $rel['foreign_db']);
}
// end while
}
// end if
}
// end if
}
// end if
// end 2b
// 3. ----- Displays the results table -----
echo '<!-- Results table -->' . "\n" . '<table ';
if (isset($GLOBALS['printview']) && $GLOBALS['printview'] == '1') {
echo 'border="1" cellpadding="2" cellspacing="0"';
} else {
echo 'border="' . $GLOBALS['cfg']['Border'] . '" cellpadding="5"';
}
echo '>' . "\n";
PMA_displayTableHeaders($is_display, $fields_meta, $fields_cnt, $analyzed_sql);
$url_query = '';
PMA_displayTableBody($dt_result, $is_display, $map, $analyzed_sql);
// vertical output case
if ($disp_direction == 'vertical') {
PMA_displayVerticalTable();
}
// end if
unset($vertical_display);
?>
</table>
<?php
echo "\n";
// 4. ----- Displays the link for multi-fields delete
if ($is_display['del_lnk'] == 'dr' || $is_display['del_lnk'] == 'kp') {
$delete_text = $is_display['del_lnk'] == 'dr' ? $GLOBALS['strDelete'] : $GLOBALS['strKill'];
$propicon = (string) $GLOBALS['cfg']['PropertiesIconic'];
// echo ' <img src="./images/arrow_' . $GLOBALS['text_dir'] . '.gif" border="0" width="38" height="22" alt="' . $GLOBALS['strWithChecked'] . '" />';
echo ' <i>' . $GLOBALS['strWithChecked'] . '</i>' . "\n";
if ($cfg['PropertiesIconic']) {
/* Opera has trouble with <input type="image"> */
/* IE has trouble with <button> */
if (PMA_USR_BROWSER_AGENT != 'IE') {
echo ' <button class="mult_submit" type="submit" name="submit_mult" value="row_edit" title="' . $GLOBALS['strEdit'] . '">' . "\n" . '<img src="./images/button_edit.png" title="' . $GLOBALS['strEdit'] . '" alt="' . $GLOBALS['strEdit'] . '" width="11" height="13" />' . ($propicon == 'both' ? ' ' . $GLOBALS['strEdit'] : '') . "\n" . '</button>';
echo ' <button class="mult_submit" type="submit" name="submit_mult" value="row_delete" title="' . $delete_text . '">' . "\n" . '<img src="./images/button_drop.png" title="' . $delete_text . '" alt="' . $delete_text . '" width="11" height="13" />' . ($propicon == 'both' ? ' ' . $delete_text : '') . "\n" . '</button>';
} else {
echo ' <input type="image" name="submit_mult_edit" value="row_edit" title="' . $GLOBALS['strEdit'] . '" src="./images/button_edit.png" />' . ($propicon == 'both' ? ' ' . $GLOBALS['strEdit'] : '');
echo ' <input type="image" name="submit_mult" value="row_delete" title="' . $delete_text . '" src="./images/button_drop.png" />' . ($propicon == 'both' ? ' ' . $delete_text : '');
}
echo "\n";
} else {
echo ' <input type="submit" name="submit_mult" value="row_edit" title="' . $GLOBALS['strEdit'] . '" />' . "\n";
echo ' <input type="submit" name="submit_mult" value="row_delete" title="' . $delete_text . '" />' . "\n";
}
echo '<input type="hidden" name="sql_query" value="' . $sql_query . '" />' . "\n";
echo '<input type="hidden" name="pos" value="' . $pos . '" />' . "\n";
echo '<input type="hidden" name="url_query" value="' . $GLOBALS['url_query'] . '" />' . "\n";
echo '<br />' . "\n";
echo '</form>' . "\n";
}
// 5. ----- Displays the navigation bar at the bottom if required -----
if ($is_display['nav_bar'] == '1') {
echo '<br />' . "\n";
PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);
} else {
if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
echo "\n" . '<br /><br />' . "\n";
}
}
}
示例4: PMA_displayTable
//.........这里部分代码省略.........
// (see the 'relation' config variable)
// loic1, 2002-03-02: extended to php3
// init map
$map = array();
// find tables
$target = array();
if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref'])) {
foreach ($analyzed_sql[0]['table_ref'] as $table_ref_position => $table_ref) {
$target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
}
}
$tabs = '(\'' . join('\',\'', $target) . '\')';
if ($cfgRelation['displaywork']) {
if (empty($table)) {
$exist_rel = FALSE;
} else {
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
if ($exist_rel) {
foreach ($exist_rel as $master_field => $rel) {
$display_field = PMA_getDisplayField($rel['foreign_db'], $rel['foreign_table']);
$map[$master_field] = array($rel['foreign_table'], $rel['foreign_field'], $display_field, $rel['foreign_db']);
}
// end while
}
// end if
}
// end if
}
// end if
// end 2b
// 3. ----- Displays the results table -----
PMA_displayTableHeaders($is_display, $fields_meta, $fields_cnt, $analyzed_sql);
$url_query = '';
PMA_displayTableBody($dt_result, $is_display, $map, $analyzed_sql);
// vertical output case
if ($disp_direction == 'vertical') {
PMA_displayVerticalTable();
}
// end if
unset($vertical_display);
?>
</table>
<?php
echo "\n";
// 4. ----- Displays the link for multi-fields delete
if ($is_display['del_lnk'] == 'dr' && $is_display['del_lnk'] != 'kp') {
$delete_text = $is_display['del_lnk'] == 'dr' ? $GLOBALS['strDelete'] : $GLOBALS['strKill'];
$propicon = (string) $GLOBALS['cfg']['PropertiesIconic'];
?>
<img src="<?php
echo $GLOBALS['pmaThemeImage'] . 'arrow_' . $GLOBALS['text_dir'] . '.png';
?>
" border="0" width="38" height="22" alt="<?php
echo $GLOBALS['strWithChecked'];
?>
" />
<a href="<?php
echo $text_url . '&checkall=1';
?>
" onclick="setCheckboxesRange('rowsDeleteForm', true, 'id_rows_to_delete', 0, '<?php
echo $num_rows;
?>
'); return false;">
<?php
echo $GLOBALS['strCheckAll'];
?>
示例5: PMA_displayTable
//.........这里部分代码省略.........
unset($total);
}
// 1.2 Defines offsets for the next and previous pages
if ($is_display['nav_bar'] == '1') {
if (!isset($pos)) {
$pos = 0;
}
if ($GLOBALS['session_max_rows'] == 'all') {
$pos_next = 0;
$pos_prev = 0;
} else {
$pos_next = $pos + $GLOBALS['cfgMaxRows'];
$pos_prev = $pos - $GLOBALS['cfgMaxRows'];
if ($pos_prev < 0) {
$pos_prev = 0;
}
}
}
// end if
// 1.3 Urlencodes the query to use in input form fields ($sql_query
// will be stripslashed in 'sql.php' if the 'magic_quotes_gpc'
// directive is set to 'on')
if (get_magic_quotes_gpc()) {
$encoded_sql_query = urlencode(addslashes($sql_query));
} else {
$encoded_sql_query = urlencode($sql_query);
}
// 2. ----- Displays the top of the page -----
// 2.1 Displays a messages with position informations
if ($is_display['nav_bar'] == '1' && isset($pos_next)) {
if (isset($unlim_num_rows) && $unlim_num_rows != $total) {
$selectstring = ', ' . $unlim_num_rows . ' ' . $GLOBALS['strSelectNumRows'];
} else {
$selectstring = '';
}
$last_shown_rec = $GLOBALS['session_max_rows'] == 'all' || $pos_next > $total ? $total - 1 : $pos_next - 1;
PMA_showMessage($GLOBALS['strShowingRecords'] . " {$pos} - {$last_shown_rec} ({$total} " . $GLOBALS['strTotal'] . $selectstring . ')');
} else {
PMA_showMessage($GLOBALS['strSQLQuery']);
}
// 2.3 Displays the navigation bars
if (!isset($table) || strlen(trim($table)) == 0) {
$table = $fields_meta[0]->table;
}
if ($is_display['nav_bar'] == '1') {
PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);
echo "\n";
} else {
echo "\n" . '<br /><br />' . "\n";
}
// 2b ----- Get field references from Database -----
// (see the 'relation' config variable)
// loic1, 2002-03-02: extended to php3
// init map
$map = array();
if (!empty($cfgServer['relation'])) {
// find tables
// $tabs = '(\'' . join('\',\'', spliti('`? *((on [^,]+)?,|(NATURAL )?(inner|left|right)( outer)? join) *`?',
// eregi_replace('^.*FROM +`?|`? *(on [^,]+)?(WHERE.*)?$', '', $sql_query))) . '\')';
$pattern = '`?[[:space:]]+(((ON|on)[[:space:]]+[^,]+)?,|((NATURAL|natural)[[:space:]]+)?(INNER|inner|LEFT|left|RIGHT|right)([[:space:]]+(OUTER|outer))?[[:space:]]+(JOIN|join))[[:space:]]*`?';
$target = eregi_replace('^.*[[:space:]]+FROM[[:space:]]+`?|`?[[:space:]]*(ON[[:space:]]+[^,]+)?(WHERE[[:space:]]+.*)?$', '', $sql_query);
$tabs = '(\'' . join('\',\'', split($pattern, $target)) . '\')';
$local_query = 'SELECT src_column, dest_table, dest_column' . ' FROM ' . $cfgServer['relation'] . ' WHERE src_table IN ' . $tabs;
$result = @mysql_query($local_query);
if ($result) {
while ($rel = mysql_fetch_row($result)) {
$map[$rel[0]] = array($rel[1], $rel[2]);
}
}
}
// end 2b
// 3. ----- Displays the results table -----
?>
<!-- Results table -->
<table border="<?php
echo $GLOBALS['cfgBorder'];
?>
" cellpadding="5">
<?php
echo "\n";
PMA_displayTableHeaders($is_display, $fields_meta, $fields_cnt);
PMA_displayTableBody($dt_result, $is_display, $map);
// lem9: vertical output case
if ($disp_direction == 'vertical') {
PMA_displayVerticalTable();
}
// end if
unset($vertical_display);
?>
</table>
<br />
<?php
echo "\n";
// 4. ----- Displays the navigation bar at the bottom if required -----
if ($is_display['nav_bar'] == '1') {
PMA_displayTableNavigation($pos_next, $pos_prev, $encoded_sql_query);
} else {
echo "\n" . '<br />' . "\n";
}
}