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


PHP PMA_getHtmlForOtherActions函數代碼示例

本文整理匯總了PHP中PMA_getHtmlForOtherActions函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_getHtmlForOtherActions函數的具體用法?PHP PMA_getHtmlForOtherActions怎麽用?PHP PMA_getHtmlForOtherActions使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: testPMAGetHtmlForOtherActions

 /**
  * Test for PMA_getHtmlForOtherActions
  *
  * @return void
  */
 public function testPMAGetHtmlForOtherActions()
 {
     $what = 'replace_prefix_tbl';
     $action = 'delete_row';
     $_url_params = array('url_query' => 'PMA_original_url_query');
     $full_query = 'select column from PMA_table';
     //Call the test function
     $html = PMA_getHtmlForOtherActions($what, $action, $_url_params, $full_query);
     //validate 1: form action
     $this->assertContains('<form action="' . $action . '" method="post">', $html);
     //validate 2: $_url_params
     $this->assertContains(PMA_URL_getHiddenInputs($_url_params), $html);
     //validate 3: conform
     $this->assertContains(__('Do you really want to execute the following query?'), $html);
     //validate 4: query
     $this->assertContains('<code>' . $full_query . '</code>', $html);
     //validate 5: button : yes or no
     $this->assertContains(__('Yes'), $html);
     $this->assertContains(__('No'), $html);
 }
開發者ID:BrunoChauvet,項目名稱:phpmyadmin,代碼行數:25,代碼來源:PMA_mult_submits_test.php

示例2: list

        include './libraries/db_common.inc.php';
        include './libraries/db_info.inc.php';
    } else {
        include_once './libraries/server_common.inc.php';
    }
    // Builds the query
    list($full_query, $reload, $full_query_views) = PMA_getQueryFromSelected($what, $db, $table, $selected, $views);
    // Displays the confirmation form
    $_url_params = PMA_getUrlParams($what, $reload, $action, $db, $table, $selected, $views, isset($original_sql_query) ? $original_sql_query : null, isset($original_url_query) ? $original_url_query : null);
    $response = PMA_Response::getInstance();
    if ($what == 'replace_prefix_tbl' || $what == 'copy_tbl_change_prefix') {
        $response->addHTML(PMA_getHtmlForReplacePrefixTable($what, $action, $_url_params));
    } elseif ($what == 'add_prefix_tbl') {
        $response->addHTML(PMA_getHtmlForAddPrefixTable($action, $_url_params));
    } else {
        $response->addHTML(PMA_getHtmlForOtherActions($what, $action, $_url_params, $full_query));
    }
    exit;
} elseif (!empty($mult_btn) && $mult_btn == __('Yes')) {
    /**
     * Executes the query - dropping rows, columns/fields, tables or dbs
     */
    if ($query_type == 'drop_db' || $query_type == 'drop_tbl' || $query_type == 'drop_fld') {
        include_once './libraries/relation_cleanup.lib.php';
    }
    if ($query_type == 'primary_fld') {
        // Gets table primary key
        $GLOBALS['dbi']->selectDb($db);
        $result = $GLOBALS['dbi']->query('SHOW KEYS FROM ' . PMA_Util::backquote($table) . ';');
        $primary = '';
        while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
開發者ID:BrunoChauvet,項目名稱:phpmyadmin,代碼行數:31,代碼來源:mult_submits.inc.php

示例3: elseif

    } elseif (mb_strlen($db)) {
        include './libraries/db_common.inc.php';
        include './libraries/db_info.inc.php';
    } else {
        include_once './libraries/server_common.inc.php';
    }
    // Builds the query
    list($full_query, $reload, $full_query_views) = PMA_getQueryFromSelected($what, $db, $table, $selected, $views);
    // Displays the confirmation form
    $_url_params = PMA_getUrlParams($what, $reload, $action, $db, $table, $selected, $views, isset($original_sql_query) ? $original_sql_query : null, isset($original_url_query) ? $original_url_query : null);
    if ($what == 'replace_prefix_tbl' || $what == 'copy_tbl_change_prefix') {
        echo PMA_getHtmlForReplacePrefixTable($what, $action, $_url_params);
    } elseif ($what == 'add_prefix_tbl') {
        echo PMA_getHtmlForAddPrefixTable($action, $_url_params);
    } else {
        echo PMA_getHtmlForOtherActions($what, $action, $_url_params, $full_query);
    }
    exit;
} elseif (!empty($mult_btn) && $mult_btn == __('Yes')) {
    /**
     * Executes the query - dropping rows, columns/fields, tables or dbs
     */
    if ($query_type == 'drop_db' || $query_type == 'drop_tbl' || $query_type == 'drop_fld') {
        include_once './libraries/relation_cleanup.lib.php';
    }
    if ($query_type == 'primary_fld') {
        // Gets table primary key
        $GLOBALS['dbi']->selectDb($db);
        $result = $GLOBALS['dbi']->query('SHOW KEYS FROM ' . PMA_Util::backquote($table) . ';');
        $primary = '';
        while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
開發者ID:ecssjapan,項目名稱:guiding-you-afteropen,代碼行數:31,代碼來源:mult_submits.inc.php


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