本文整理匯總了PHP中PMA_getUrlParams函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_getUrlParams函數的具體用法?PHP PMA_getUrlParams怎麽用?PHP PMA_getUrlParams使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了PMA_getUrlParams函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
/** @var PMA_String $pmaString */
$pmaString = $GLOBALS['PMA_String'];
if (mb_strlen($table)) {
include './libraries/tbl_common.inc.php';
$url_query .= '&goto=tbl_sql.php&back=tbl_sql.php';
include './libraries/tbl_info.inc.php';
} 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);
$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';
示例2: testPMAGetUrlParams
/**
* Test for PMA_getUrlParams
*
* @return void
*/
public function testPMAGetUrlParams()
{
$what = 'row_delete';
$reload = true;
$action = 'db_delete_row';
$db = "PMA_db";
$table = "PMA_table";
$selected = array("index1" => "table1");
$views = null;
$original_sql_query = "original_sql_query";
$original_url_query = "original_url_query";
$_url_params = PMA_getUrlParams($what, $reload, $action, $db, $table, $selected, $views, $original_sql_query, $original_url_query);
$this->assertEquals($what, $_url_params['query_type']);
$this->assertEquals($db, $_url_params['db']);
$this->assertEquals(array('DELETE FROM `PMA_db`.`PMA_table` WHERE table1 LIMIT 1;'), $_url_params['selected']);
$this->assertEquals($original_sql_query, $_url_params['original_sql_query']);
$this->assertEquals($original_url_query, $_url_params['original_url_query']);
}