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


PHP PMA_linkOrButton函数代码示例

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


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

示例1: PMA_backquote

        // uses SHOW CREATE
        $definition = 'DROP ' . $routine['ROUTINE_TYPE'] . ' ' . PMA_backquote($routine['SPECIFIC_NAME']) . $delimiter . "\n" . PMA_DBI_get_definition($db, $routine['ROUTINE_TYPE'], $routine['SPECIFIC_NAME']) . "\n";
        //if ($routine['ROUTINE_TYPE'] == 'PROCEDURE') {
        //    $sqlUseProc  = 'CALL ' . $routine['SPECIFIC_NAME'] . '()';
        //} else {
        //    $sqlUseProc = 'SELECT ' . $routine['SPECIFIC_NAME'] . '()';
        /* this won't get us far: to really use the function
           i'd need to know how many parameters the function needs and then create
           something to ask for them. As i don't see this directly in
           the table i am afraid that requires parsing the ROUTINE_DEFINITION
           and i don't really need that now so i simply don't offer
           a method for running the function*/
        //}
        if ($routine['ROUTINE_TYPE'] == 'PROCEDURE') {
            $sqlDropProc = 'DROP PROCEDURE ' . PMA_backquote($routine['SPECIFIC_NAME']);
        } else {
            $sqlDropProc = 'DROP FUNCTION ' . PMA_backquote($routine['SPECIFIC_NAME']);
        }
        echo sprintf('<tr class="%s">
                          <td><input type="hidden" class="drop_procedure_sql" value="%s" /><strong>%s</strong></td>
                          <td>%s</td>
                          <td>%s</td>
                          <td>%s</td>
                          <td>%s</td>
                     </tr>', $ct % 2 == 0 ? 'even' : 'odd', $sqlDropProc, $routine['ROUTINE_NAME'], !empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;db_query_force=1&amp;delimiter=' . urlencode($delimiter), $titles['Edit']) : '&nbsp;', '<a ' . $conditional_class . ' href="sql.php?' . $url_query . '&amp;sql_query=' . urlencode($sqlDropProc) . '" >' . $titles['Drop'] . '</a>', $routine['ROUTINE_TYPE'], $routine['DTD_IDENTIFIER']);
        $ct++;
    }
    echo '</table>';
    echo '</fieldset>' . "\n";
    echo '</div>' . "\n";
}
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:31,代码来源:db_routines.inc.php

示例2: PMA_displayResultsOperations

/**
 * Displays operations that are available on results.
 *
 * @param   array   the display mode
 * @param   array   the analyzed query
 *
 * @uses    $_SESSION['tmp_user_values']['pos']
 * @uses    $_SESSION['tmp_user_values']['display_text']
 * @global  string   $db                the database name
 * @global  string   $table             the table name
 * @global  string   $sql_query         the current SQL query
 * @global  integer  $unlim_num_rows    the total number of rows returned by the
 *                                      SQL query without any programmatically
 *                                      appended "LIMIT" clause
 *
 * @access  private
 *
 * @see     PMA_showMessage(), PMA_setDisplayMode(),
 *          PMA_displayTableNavigation(), PMA_displayTableHeaders(),
 *          PMA_displayTableBody(), PMA_displayResultsOperations()
 */
function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
{
    global $db, $table, $sql_query, $unlim_num_rows;
    $header_shown = FALSE;
    $header = '<fieldset><legend>' . $GLOBALS['strQueryResultsOperations'] . '</legend>';
    if ($the_disp_mode[6] == '1' || $the_disp_mode[9] == '1') {
        // Displays "printable view" link if required
        if ($the_disp_mode[9] == '1') {
            if (!$header_shown) {
                echo $header;
                $header_shown = TRUE;
            }
            $_url_params = array('db' => $db, 'table' => $table, 'printview' => '1', 'sql_query' => $sql_query);
            $url_query = PMA_generate_common_url($_url_params);
            echo PMA_linkOrButton('sql.php' . $url_query, PMA_getIcon('b_print.png', $GLOBALS['strPrintView'], false, true), '', true, true, 'print_view') . "\n";
            if ($_SESSION['tmp_user_values']['display_text']) {
                $_url_params['display_text'] = 'F';
                echo PMA_linkOrButton('sql.php' . PMA_generate_common_url($_url_params), PMA_getIcon('b_print.png', $GLOBALS['strPrintViewFull'], false, true), '', true, true, 'print_view') . "\n";
                unset($_url_params['display_text']);
            }
        }
        // end displays "printable view"
    }
    // Export link
    // (the url_query has extra parameters that won't be used to export)
    // (the single_table parameter is used in display_export.lib.php
    //  to hide the SQL and the structure export dialogs)
    // If the parser found a PROCEDURE clause
    // (most probably PROCEDURE ANALYSE()) it makes no sense to
    // display the Export link).
    if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview) && !isset($analyzed_sql[0]['queryflags']['procedure'])) {
        if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
            $_url_params['single_table'] = 'true';
        }
        if (!$header_shown) {
            echo $header;
            $header_shown = TRUE;
        }
        $_url_params['unlim_num_rows'] = $unlim_num_rows;
        /**
         * At this point we don't know the table name; this can happen
         * for example with a query like
         * SELECT bike_code FROM (SELECT bike_code FROM bikes) tmp
         * As a workaround we set in the table parameter the name of the
         * first table of this database, so that tbl_export.php and
         * the script it calls do not fail
         */
        if (empty($_url_params['table'])) {
            $_url_params['table'] = PMA_DBI_fetch_value("SHOW TABLES");
        }
        echo PMA_linkOrButton('tbl_export.php' . PMA_generate_common_url($_url_params), PMA_getIcon('b_tblexport.png', $GLOBALS['strExport'], false, true), '', true, true, '') . "\n";
    }
    // CREATE VIEW
    /**
     *
     * @todo detect privileges to create a view
     *       (but see 2006-01-19 note in display_create_table.lib.php,
     *        I think we cannot detect db-specific privileges reliably)
     * Note: we don't display a Create view link if we found a PROCEDURE clause
     */
    if (!$header_shown) {
        echo $header;
        $header_shown = TRUE;
    }
    if (!isset($analyzed_sql[0]['queryflags']['procedure'])) {
        echo PMA_linkOrButton('view_create.php' . $url_query, PMA_getIcon('b_views.png', 'CREATE VIEW', false, true), '', true, true, '') . "\n";
    }
    if ($header_shown) {
        echo '</fieldset><br />';
    }
}
开发者ID:kolbermoorer,项目名称:edugame,代码行数:92,代码来源:display_tbl.lib.php

示例3: PMA_displayResultsOperations

/**
 * Displays operations that are available on results.
 *
 * @param   array   the display mode
 * @param   array   the analyzed query
 *
 * @global  string   $db                the database name
 * @global  string   $table             the table name
 * @global  boolean  $dontlimitchars    whether to limit the number of displayed
 *                                      characters of text type fields or not
 * @global  integer  $pos               the current postion of the first record
 *                                      to be displayed
 * @global  string   $sql_query         the current sql query
 * @global  integer  $unlim_num_rows    the total number of rows returned by the
 *                                      sql query without any programmatically
 *                                      appended "LIMIT" clause
 * @global  string   $disp_direction    the display mode
 *                                      (horizontal/vertical/horizontalflipped)
 * @global  integer  $repeat_cells      the number of row to display between two
 *                                      table headers
 *
 * @access  private
 *
 * @see     PMA_showMessage(), PMA_setDisplayMode(),
 *          PMA_displayTableNavigation(), PMA_displayTableHeaders(),
 *          PMA_displayTableBody(), PMA_displayResultsOperations()
 */
function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
{
    global $db, $table, $dontlimitchars, $pos, $sql_query, $unlim_num_rows, $disp_direction, $repeat_cells;
    $header_shown = FALSE;
    $header = '<fieldset><legend>' . $GLOBALS['strQueryResultsOperations'] . '</legend>';
    if ($the_disp_mode[6] == '1' || $the_disp_mode[9] == '1') {
        // Displays "printable view" link if required
        if ($the_disp_mode[9] == '1') {
            if (!$header_shown) {
                echo $header;
                $header_shown = TRUE;
            }
            $url_query = '?' . PMA_generate_common_url($db, $table) . '&amp;pos=' . $pos . '&amp;session_max_rows=' . $GLOBALS['session_max_rows'] . '&amp;disp_direction=' . $disp_direction . '&amp;repeat_cells=' . $repeat_cells . '&amp;printview=1' . '&amp;sql_query=' . urlencode($sql_query);
            echo '    <!-- Print view -->' . "\n";
            echo PMA_linkOrButton('sql.php' . $url_query . (isset($dontlimitchars) && $dontlimitchars == '1' ? '&amp;dontlimitchars=1' : ''), ($GLOBALS['cfg']['PropertiesIconic'] ? '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_print.png" height="16" width="16" alt="' . $GLOBALS['strPrintView'] . '"/>' : '') . $GLOBALS['strPrintView'], '', true, true, 'print_view') . "\n";
            if (!$dontlimitchars) {
                echo '    &nbsp;&nbsp;' . "\n";
                echo PMA_linkOrButton('sql.php' . $url_query . '&amp;dontlimitchars=1', ($GLOBALS['cfg']['PropertiesIconic'] ? '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_print.png" height="16" width="16" alt="' . $GLOBALS['strPrintViewFull'] . '"/>' : '') . $GLOBALS['strPrintViewFull'], '', true, true, 'print_view') . "\n";
            }
        }
        // end displays "printable view"
        echo "\n";
    }
    // Export link
    // (the url_query has extra parameters that won't be used to export)
    // (the single_table parameter is used in display_export.lib.php
    //  to hide the SQL and the structure export dialogs)
    if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview)) {
        if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
            $single_table = '&amp;single_table=true';
        } else {
            $single_table = '';
        }
        if (!$header_shown) {
            echo $header;
            $header_shown = TRUE;
        }
        echo '    <!-- Export -->' . "\n";
        echo '    &nbsp;&nbsp;' . "\n";
        echo PMA_linkOrButton('tbl_properties_export.php' . $url_query . '&amp;unlim_num_rows=' . $unlim_num_rows . $single_table, ($GLOBALS['cfg']['PropertiesIconic'] ? '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_tblexport.png" height="16" width="16" alt="' . $GLOBALS['strExport'] . '" />' : '') . $GLOBALS['strExport'], '', true, true, '') . "\n";
    }
    if ($header_shown) {
        echo '</fieldset><br />';
    }
}
开发者ID:a195474368,项目名称:ejiawang,代码行数:72,代码来源:display_tbl.lib.php

示例4: PMA_generateDeleteLink

/**
 * Generates a Delete link
 *
 * @uses    PMA_linkOrButton()
 * @param   string  $del_url
 * @param   string  $del_str
 * @param   string  $js_conf
 * @param   string  $class
 * @return  string  the generated HTML
 */
function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class)
{
    $ret = '';
    if (!empty($del_url)) {
        $ret .= '<td ';
        if (!empty($class)) {
            $ret .= 'class="' . $class . '" ';
        }
        $ret .= 'align="center" ' . ' >' . PMA_linkOrButton($del_url, $del_str, $js_conf, FALSE) . '</td>';
    }
    return $ret;
}
开发者ID:anmolview,项目名称:yiidemos,代码行数:22,代码来源:display_tbl.lib.php

示例5: PMA_SortableTableHeader

/**
 * Creates a clickable column header for table information
 *
 * @param   string  title to use for the link
 * @param   string  corresponds to sortable data name mapped in libraries/db_info.inc.php  
 * @param   string  initial sort order
 * @returns string  link to be displayed in the table header
 */
function PMA_SortableTableHeader($title, $sort, $initial_sort_order = 'ASC')
{
    // Set some defaults
    $requested_sort = 'table';
    $requested_sort_order = $future_sort_order = $initial_sort_order;
    // If the user requested a sort
    if (isset($_REQUEST['sort'])) {
        $requested_sort = $_REQUEST['sort'];
        if (isset($_REQUEST['sort_order'])) {
            $requested_sort_order = $_REQUEST['sort_order'];
        }
    }
    $order_img = '';
    $order_link_params = array();
    $order_link_params['title'] = __('Sort');
    // If this column was requested to be sorted.
    if ($requested_sort == $sort) {
        if ($requested_sort_order == 'ASC') {
            $future_sort_order = 'DESC';
            // current sort order is ASC
            $order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_asc.png" width="11" height="9" alt="' . __('Ascending') . '" title="' . __('Ascending') . '" id="sort_arrow" />';
            // but on mouse over, show the reverse order (DESC)
            $order_link_params['onmouseover'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
            // on mouse out, show current sort order (ASC)
            $order_link_params['onmouseout'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
        } else {
            $future_sort_order = 'ASC';
            // current sort order is DESC
            $order_img = ' <img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_desc.png" width="11" height="9" alt="' . __('Descending') . '" title="' . __('Descending') . '" id="sort_arrow" />';
            // but on mouse over, show the reverse order (ASC)
            $order_link_params['onmouseover'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_asc.png\'; }';
            // on mouse out, show current sort order (DESC)
            $order_link_params['onmouseout'] = 'if(document.getElementById(\'sort_arrow\')){ document.getElementById(\'sort_arrow\').src=\'' . $GLOBALS['pmaThemeImage'] . 's_desc.png\'; }';
        }
    }
    $_url_params = array('db' => $_REQUEST['db']);
    $url = 'db_structure.php' . PMA_generate_common_url($_url_params);
    // We set the position back to 0 every time they sort.
    $url .= "&amp;pos=0&amp;sort={$sort}&amp;sort_order={$future_sort_order}";
    return PMA_linkOrButton($url, $title . $order_img, $order_link_params);
}
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:49,代码来源:db_structure.lib.php

示例6: sprintf

    echo '<br />' . "\n" . '<table class="data">' . "\n" . '<caption class="tblHeaders">' . "\n" . sprintf($GLOBALS['strSearchResultsFor'], $searched, $option_str) . "\n" . '</caption>' . "\n";
    $num_search_result_total = 0;
    $odd_row = true;
    foreach ($tables_selected as $each_table) {
        // Gets the SQL statements
        $newsearchsqls = PMA_getSearchSqls($each_table, !empty($field_str) ? $field_str : '', $search_str, $search_option);
        // Executes the "COUNT" statement
        $res_cnt = PMA_DBI_fetch_value($newsearchsqls['select_count']);
        $num_search_result_total += $res_cnt;
        $sql_query .= $newsearchsqls['select_count'];
        echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . '<td>' . sprintf($GLOBALS['strNumSearchResultsInTable'], $res_cnt, htmlspecialchars($each_table)) . "</td>\n";
        if ($res_cnt > 0) {
            $this_url_params['sql_query'] = $newsearchsqls['select_fields'];
            echo '<td>' . PMA_linkOrButton('sql.php' . PMA_generate_common_url($this_url_params), $GLOBALS['strBrowse'], '') . "</td>\n";
            $this_url_params['sql_query'] = $newsearchsqls['delete'];
            echo '<td>' . PMA_linkOrButton('sql.php' . PMA_generate_common_url($this_url_params), $GLOBALS['strDelete'], $newsearchsqls['delete']) . "</td>\n";
        } else {
            echo '<td>&nbsp;</td>' . "\n" . '<td>&nbsp;</td>' . "\n";
        }
        // end if else
        $odd_row = !$odd_row;
        echo '</tr>' . "\n";
    }
    // end for
    echo '</table>' . "\n";
    if (count($tables_selected) > 1) {
        echo '<p>' . sprintf($GLOBALS['strNumSearchResultsTotal'], $num_search_result_total) . '</p>' . "\n";
    }
}
// end 1.
/**
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:db_search.php

示例7: PMA_showMessage


//.........这里部分代码省略.........
        // Basic url query part
        $url_params = array();
        if (strlen($GLOBALS['db'])) {
            $url_params['db'] = $GLOBALS['db'];
            if (strlen($GLOBALS['table'])) {
                $url_params['table'] = $GLOBALS['table'];
                $edit_link = 'tbl_sql.php';
            } else {
                $edit_link = 'db_sql.php';
            }
        } else {
            $edit_link = 'server_sql.php';
        }
        // Want to have the query explained (Mike Beck 2002-05-22)
        // but only explain a SELECT (that has not been explained)
        /* SQL-Parser-Analyzer */
        $explain_link = '';
        if (!empty($cfg['SQLQuery']['Explain']) && !$query_too_big) {
            $explain_params = $url_params;
            // Detect if we are validating as well
            // To preserve the validate uRL data
            if (!empty($GLOBALS['validatequery'])) {
                $explain_params['validatequery'] = 1;
            }
            if (preg_match('@^SELECT[[:space:]]+@i', $sql_query)) {
                $explain_params['sql_query'] = 'EXPLAIN ' . $sql_query;
                $_message = $GLOBALS['strExplain'];
            } elseif (preg_match('@^EXPLAIN[[:space:]]+SELECT[[:space:]]+@i', $sql_query)) {
                $explain_params['sql_query'] = substr($sql_query, 8);
                $_message = $GLOBALS['strNoExplain'];
            }
            if (isset($explain_params['sql_query'])) {
                $explain_link = 'import.php' . PMA_generate_common_url($explain_params);
                $explain_link = ' [' . PMA_linkOrButton($explain_link, $_message) . ']';
            }
        }
        //show explain
        $url_params['sql_query'] = $sql_query;
        $url_params['show_query'] = 1;
        if (!empty($cfg['SQLQuery']['Edit']) && !$query_too_big) {
            if ($cfg['EditInWindow'] == true) {
                $onclick = 'window.parent.focus_querywindow(\'' . PMA_jsFormat($sql_query, false) . '\'); return false;';
            } else {
                $onclick = '';
            }
            $edit_link .= PMA_generate_common_url($url_params) . '#querybox';
            $edit_link = ' [' . PMA_linkOrButton($edit_link, $GLOBALS['strEdit'], array('onclick' => $onclick)) . ']';
        } else {
            $edit_link = '';
        }
        $url_qpart = PMA_generate_common_url($url_params);
        // Also we would like to get the SQL formed in some nice
        // php-code (Mike Beck 2002-05-22)
        if (!empty($cfg['SQLQuery']['ShowAsPHP']) && !$query_too_big) {
            $php_params = $url_params;
            if (!empty($GLOBALS['show_as_php'])) {
                $_message = $GLOBALS['strNoPhp'];
            } else {
                $php_params['show_as_php'] = 1;
                $_message = $GLOBALS['strPhp'];
            }
            $php_link = 'import.php' . PMA_generate_common_url($php_params);
            $php_link = ' [' . PMA_linkOrButton($php_link, $_message) . ']';
            if (isset($GLOBALS['show_as_php'])) {
                $runquery_link = 'import.php' . PMA_generate_common_url($url_params);
                $php_link .= ' [' . PMA_linkOrButton($runquery_link, $GLOBALS['strRunQuery']) . ']';
开发者ID:kebyn,项目名称:apache_workspace,代码行数:67,代码来源:common.lib.php

示例8: sprintf

    echo sprintf('<tr>
                      <th>%s</th>
                      <th>&nbsp;</th>
                      <th>&nbsp;</th>
                      <th>%s</th>
                </tr>', __('Name'), __('Type'));
    $ct = 0;
    $delimiter = '//';
    if ($GLOBALS['cfg']['AjaxEnable']) {
        $conditional_class = 'class="drop_event_anchor"';
    } else {
        $conditional_class = '';
    }
    foreach ($events as $event) {
        // information_schema (at least in MySQL 5.1.22) does not return
        // the full CREATE EVENT statement in a way that could be useful for us
        // so we rely on PMA_DBI_get_definition() which uses SHOW CREATE EVENT
        $definition = 'DROP EVENT ' . PMA_backquote($event['EVENT_NAME']) . $delimiter . "\n" . PMA_DBI_get_definition($db, 'EVENT', $event['EVENT_NAME']) . "\n";
        $sqlDrop = 'DROP EVENT ' . PMA_backquote($event['EVENT_NAME']);
        echo sprintf('<tr class="%s">
                          <td><strong>%s</strong></td>
                          <td>%s</td>
                          <td>%s</td>
                          <td>%s</td>
                     </tr>', $ct % 2 == 0 ? 'even' : 'odd', $event['EVENT_NAME'], !empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;db_query_force=1&amp;delimiter=' . urlencode($delimiter), $titles['Structure']) : '&nbsp;', '<a ' . $conditional_class . ' href="sql.php?' . $url_query . '&amp;sql_query=' . urlencode($sqlDrop) . '" >' . $titles['Drop'] . '</a>', $event['EVENT_TYPE']);
        $ct++;
    }
    echo '</table>';
    echo '</fieldset>' . "\n";
    echo '</div>' . "\n";
}
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:31,代码来源:db_events.inc.php

示例9: PMA_buttonOrImage

    if (!empty($tbl_type) && ($tbl_type == 'MYISAM' || $tbl_type == 'ARIA' || $tbl_type == 'MARIA')) {
        PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_fulltext', __('Fulltext'), 'b_ftext.png', 'ftext');
    }
}
?>
</form>
<hr />

<?php 
/**
 * Work on the table
 */
if ($tbl_is_view) {
    $create_view = PMA_DBI_get_definition($db, 'VIEW', $table);
    $create_view = preg_replace('@^CREATE@', 'ALTER', $create_view);
    echo PMA_linkOrButton('tbl_sql.php' . PMA_generate_common_url($url_params + array('sql_query' => $create_view, 'show_query' => '1')), PMA_getIcon('b_edit.png', __('Edit view'), true));
}
?>

<a href="tbl_printview.php?<?php 
echo $url_query;
?>
"><?php 
echo PMA_getIcon('b_print.png', __('Print view'), true);
?>
</a>

<?php 
if (!$tbl_is_view && !$db_is_information_schema) {
    // if internal relations are available, or foreign keys are supported
    // ($tbl_type comes from libraries/tbl_info.inc.php)
开发者ID:kirhgoph,项目名称:VMWare-Workstation-web-interface,代码行数:31,代码来源:tbl_structure.php

示例10: PMA_linkOrButton

           . PMA_linkOrButton($edit_url, $edit_str, '', FALSE)
           . $bookmark_go
           . '    </td>' . "\n";
    }
    if (!empty($del_url)) {
        echo '    <td align="center">' . "\n"
           . PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''), FALSE)
           . '    </td>' . "\n";
    }
} elseif ($doWriteModifyAt == 'right') {
    if (!empty($del_url)) {
        echo '    <td align="center">' . "\n"
           . PMA_linkOrButton($del_url, $del_str, (isset($js_conf) ? $js_conf : ''), FALSE)
           . '    </td>' . "\n";
    }
    if (!empty($edit_url)) {
        echo '    <td align="center">' . "\n"
           . PMA_linkOrButton($edit_url, $edit_str, '', FALSE)
           . $bookmark_go
           . '    </td>' . "\n";
    }
    if (!empty($del_url) && $is_display['del_lnk'] != 'kp') {
        echo '    <td align="center">' . "\n"
           . '        <input type="checkbox" id="id_rows_to_delete' . $row_no . 'r" name="rows_to_delete[' . $where_clause_html . ']"'
           . ' onclick="copyCheckboxesRange(\'rowsDeleteForm\', \'id_rows_to_delete' . $row_no . '\',\'r\');"'
           . ' value="' . htmlspecialchars($del_query) . '" ' . (isset($GLOBALS['checkall']) ? 'checked="checked"' : '') . ' />' . "\n"
           . '    </td>' . "\n";
    }
}
?>
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:30,代码来源:display_tbl_links.lib.php

示例11: __

    echo '<div id="tabletriggers">' . "\n";
    echo '<table class="data">' . "\n";
    echo ' <caption class="tblHeaders">' . __('Triggers') . '</caption>' . "\n";
    echo sprintf('<tr>
                          <th>%s</th>
                          <th>&nbsp;</th>
                          <th>&nbsp;</th>
                          <th>%s</th>
                          <th>%s</th>
                    </tr>', __('Name'), __('Time'), __('Event'));
    $ct = 0;
    $delimiter = '//';
    if ($GLOBALS['cfg']['AjaxEnable']) {
        $conditional_class = 'class="drop_trigger_anchor"';
    } else {
        $conditional_class = '';
    }
    foreach ($triggers as $trigger) {
        $drop_and_create = $trigger['drop'] . $delimiter . "\n" . $trigger['create'] . "\n";
        echo sprintf('<tr class="noclick %s">
                              <td><strong>%s</strong></td>
                              <td>%s</td>
                              <td>%s</td>
                              <td>%s</td>
                              <td>%s</td>
                         </tr>', $ct % 2 == 0 ? 'even' : 'odd', $trigger['name'], PMA_linkOrButton('tbl_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($drop_and_create) . '&amp;show_query=1&amp;delimiter=' . urlencode($delimiter), $titles['Change']), '<a ' . $conditional_class . ' href="sql.php?' . $url_query . '&sql_query=' . urlencode($trigger['drop']) . '" >' . $titles['Drop'] . '</a>', $trigger['action_timing'], $trigger['event_manipulation']);
        $ct++;
    }
    echo '</table>';
    echo '</div>' . "\n";
}
开发者ID:BGCX262,项目名称:zuozhenshi-prego-svn-to-git,代码行数:31,代码来源:tbl_triggers.lib.php

示例12: PMA_displayTable


//.........这里部分代码省略.........
        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 -----
    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) . '&amp;sql_query=' . urlencode($sql_query) . '&amp;pos=' . $pos . '&amp;session_max_rows=' . $GLOBALS['session_max_rows'] . '&amp;pos=' . $pos . '&amp;disp_direction=' . $disp_direction . '&amp;repeat_cells=' . $repeat_cells . '&amp;goto=' . $goto . '&amp;dontlimitchars=' . $dontlimitchars;
        $checkall_url = $uncheckall_url . '&amp;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);
    } else {
        if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
            echo "\n" . '<br /><br />' . "\n";
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:101,代码来源:display_tbl.lib.php

示例13: PMA_linkOrButton

            // end displays "printable view"
            echo "\n";
        }
        // Export link
        // (the url_query has extra parameters that won't be used to export)
        // (the single_table parameter is used in display_export.lib.php
        //  to hide the SQL and the structure export dialogs)
        if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview)) {
            if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) {
                $single_table = '&amp;single_table=true';
            } else {
                $single_table = '';
            }
            echo '    <!-- Export -->' . "\n";
            echo '    &nbsp;&nbsp;' . "\n";
            echo PMA_linkOrButton('tbl_properties_export.php' . $url_query . '&amp;unlim_num_rows=' . $unlim_num_rows . $single_table, ($cfg['PropertiesIconic'] ? '<img src="' . $pmaThemeImage . 'b_tblexport.png" border="0" height="16" width="16" align="middle" hspace="2" alt="' . $strExport . '" />' : '') . $strExport, '', TRUE, TRUE, '') . "\n";
        }
        // Bookmark Support if required
        if ($disp_mode[7] == '1' && ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table'] && empty($id_bookmark)) && !empty($sql_query)) {
            echo "\n";
            $goto = 'sql.php?' . PMA_generate_common_url($db, $table) . '&amp;pos=' . $pos . '&amp;session_max_rows=' . $session_max_rows . '&amp;disp_direction=' . $disp_direction . '&amp;repeat_cells=' . $repeat_cells . '&amp;dontlimitchars=' . $dontlimitchars . '&amp;sql_query=' . urlencode($sql_query) . '&amp;id_bookmark=1';
            ?>
<!-- Bookmark the query -->
            <?php 
            echo "\n";
            if ($disp_mode[3] == '1') {
                echo '    <i>' . $strOr . '</i>' . "\n";
            } else {
                echo '<br /><br />';
            }
            ?>
开发者ID:mike503,项目名称:phpmyadmin,代码行数:31,代码来源:sql.php

示例14: foreach

    $delimiter = '//';
    foreach ($events as $event) {

        // information_schema (at least in MySQL 5.1.22) does not return
        // the full CREATE EVENT statement in a way that could be useful for us
        // so we rely on PMA_DBI_get_definition() which uses SHOW CREATE EVENT

        $definition = 'DROP EVENT ' . PMA_backquote($event['EVENT_NAME']) . $delimiter . "\n"
            .  PMA_DBI_get_definition($db, 'EVENT', $event['EVENT_NAME'])
            . "\n";

        $sqlDrop = 'DROP EVENT ' . PMA_backquote($event['EVENT_NAME']);
        echo sprintf('<tr class="%s">
                          <td><strong>%s</strong></td>
                          <td>%s</td>
                          <td>%s</td>
                          <td>%s</td>
                     </tr>',
                     ($ct%2 == 0) ? 'even' : 'odd',
                     $event['EVENT_NAME'],
                     ! empty($definition) ? PMA_linkOrButton('db_sql.php?' . $url_query . '&amp;sql_query=' . urlencode($definition) . '&amp;show_query=1&amp;delimiter=' . urlencode($delimiter), $titles['Structure']) : '&nbsp;',
                     '<a href="sql.php?' . $url_query . '&sql_query=' . urlencode($sqlDrop) . '" onclick="return confirmLink(this, \'' . PMA_jsFormat($sqlDrop, false) . '\')">' . $titles['Drop'] . '</a>',
                     $event['EVENT_TYPE']);
        $ct++;
    }
    echo '</table>';
    echo '</fieldset>' . "\n";
    echo '</div>' . "\n";
}
?>
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:30,代码来源:db_events.inc.php

示例15: PMA_linkOrButton

/* $Id: display_tbl_links.lib.php,v 1.1 2005/02/03 06:03:51 nuhpardon Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
// modified 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
// - bugfix for select all checkboxes
// - copy right to left (or left to right) if user click on a check box
// - reversed the right modify links: 1. drop, 2. edit, 3. checkbox
// - also changes made in libraries/functions.js
if ($doWriteModifyAt == 'left') {
    if (!empty($del_url) && $is_display['del_lnk'] != 'kp') {
        echo '    <td width="16" align="center" valign="top" bgcolor="' . $bgcolor . '">' . "\n" . '        <input type="checkbox" id="id_rows_to_delete' . $row_no . '" name="rows_to_delete[' . $uva_condition . ']"' . ' onclick="copyCheckboxesRange(\'rowsDeleteForm\', \'id_rows_to_delete' . $row_no . '\',\'l\');"' . ' value="' . $del_query . '" ' . (isset($GLOBALS['checkall']) ? 'checked="checked"' : '') . ' />' . "\n" . '    </td>' . "\n";
    }
    if (!empty($edit_url)) {
        echo '    <td width="16" align="center" valign="top" bgcolor="' . $bgcolor . '">' . "\n" . PMA_linkOrButton($edit_url, $edit_str, '', FALSE) . $bookmark_go . '    </td>' . "\n";
    }
    if (!empty($del_url)) {
        echo '    <td width="16" align="center" valign="top" bgcolor="' . $bgcolor . '">' . "\n" . PMA_linkOrButton($del_url, $del_str, isset($js_conf) ? $js_conf : '', FALSE) . '    </td>' . "\n";
    }
} else {
    if ($doWriteModifyAt == 'right') {
        if (!empty($del_url)) {
            echo '    <td width="16" align="center" valign="top" bgcolor="' . $bgcolor . '">' . "\n" . PMA_linkOrButton($del_url, $del_str, isset($js_conf) ? $js_conf : '', FALSE) . '    </td>' . "\n";
        }
        if (!empty($edit_url)) {
            echo '    <td width="16" align="center" valign="top" bgcolor="' . $bgcolor . '">' . "\n" . PMA_linkOrButton($edit_url, $edit_str, '', FALSE) . $bookmark_go . '    </td>' . "\n";
        }
        if (!empty($del_url) && $is_display['del_lnk'] != 'kp') {
            echo '    <td width="16" align="center" valign="top" bgcolor="' . $bgcolor . '">' . "\n" . '        <input type="checkbox" id="id_rows_to_delete' . $row_no . 'r" name="rows_to_delete[' . $uva_condition . ']"' . ' onclick="copyCheckboxesRange(\'rowsDeleteForm\', \'id_rows_to_delete' . $row_no . '\',\'r\');"' . ' value="' . $del_query . '" ' . (isset($GLOBALS['checkall']) ? 'checked="checked"' : '') . ' />' . "\n" . '    </td>' . "\n";
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:smileinstaller,代码行数:30,代码来源:display_tbl_links.lib.php


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