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


PHP URL::getCommon方法代码示例

本文整理汇总了PHP中PMA\libraries\URL::getCommon方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::getCommon方法的具体用法?PHP URL::getCommon怎么用?PHP URL::getCommon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA\libraries\URL的用法示例。


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

示例1: testGetHtmlForControlButtons

 /**
  * Tests getHtmlForControlButtons() method
  *
  * @return void
  * @test
  */
 public function testGetHtmlForControlButtons()
 {
     $parent = NodeFactory::getInstance('NodeDatabase', 'parent');
     $parent->addChild($this->object);
     $this->object->expects($this->once())->method('getItemType')->will($this->returnValue('itemType'));
     $html = $this->object->getHtmlForControlButtons();
     $this->assertStringStartsWith('<span class="navItemControls">', $html);
     $this->assertStringEndsWith('</span>', $html);
     $this->assertContains('<a href="navigation.php' . URL::getCommon() . '&hideNavItem=true&itemType=itemType&itemName=child' . '&dbName=parent" class="hideNavItem ajax">', $html);
 }
开发者ID:rclakmal,项目名称:phpmyadmin,代码行数:16,代码来源:NodeDatabaseChildTest.php

示例2: PMA_getHtmlForFilter

/**
 * Returns the html for the list filter
 *
 * @param ServerStatusData $ServerStatusData Server status data
 *
 * @return string
 */
function PMA_getHtmlForFilter($ServerStatusData)
{
    $filterAlert = '';
    if (!empty($_REQUEST['filterAlert'])) {
        $filterAlert = ' checked="checked"';
    }
    $filterText = '';
    if (!empty($_REQUEST['filterText'])) {
        $filterText = htmlspecialchars($_REQUEST['filterText']);
    }
    $dontFormat = '';
    if (!empty($_REQUEST['dontFormat'])) {
        $dontFormat = ' checked="checked"';
    }
    $retval = '';
    $retval .= '<fieldset id="tableFilter">';
    $retval .= '<legend>' . __('Filters') . '</legend>';
    $retval .= '<form action="server_status_variables.php' . URL::getCommon() . '">';
    $retval .= '<input type="submit" value="' . __('Refresh') . '" />';
    $retval .= '<div class="formelement">';
    $retval .= '<label for="filterText">' . __('Containing the word:') . '</label>';
    $retval .= '<input name="filterText" type="text" id="filterText" ' . 'value="' . $filterText . '" />';
    $retval .= '</div>';
    $retval .= '<div class="formelement">';
    $retval .= '<input' . $filterAlert . ' type="checkbox" ' . 'name="filterAlert" id="filterAlert" />';
    $retval .= '<label for="filterAlert">';
    $retval .= __('Show only alert values');
    $retval .= '</label>';
    $retval .= '</div>';
    $retval .= '<div class="formelement">';
    $retval .= '<select id="filterCategory" name="filterCategory">';
    $retval .= '<option value="">' . __('Filter by category…') . '</option>';
    foreach ($ServerStatusData->sections as $section_id => $section_name) {
        if (isset($ServerStatusData->sectionUsed[$section_id])) {
            if (!empty($_REQUEST['filterCategory']) && $_REQUEST['filterCategory'] == $section_id) {
                $selected = ' selected="selected"';
            } else {
                $selected = '';
            }
            $retval .= '<option' . $selected . ' value="' . $section_id . '">';
            $retval .= htmlspecialchars($section_name) . '</option>';
        }
    }
    $retval .= '</select>';
    $retval .= '</div>';
    $retval .= '<div class="formelement">';
    $retval .= '<input' . $dontFormat . ' type="checkbox" ' . 'name="dontFormat" id="dontFormat" />';
    $retval .= '<label for="dontFormat">';
    $retval .= __('Show unformatted values');
    $retval .= '</label>';
    $retval .= '</div>';
    $retval .= '</form>';
    $retval .= '</fieldset>';
    return $retval;
}
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:62,代码来源:server_status_variables.lib.php

示例3: getHtmlForControlButtons

 /**
  * Returns HTML for control buttons displayed infront of a node
  *
  * @return String HTML for control buttons
  */
 public function getHtmlForControlButtons()
 {
     $ret = '';
     $cfgRelation = PMA_getRelationsParam();
     if ($cfgRelation['navwork']) {
         $db = $this->realParent()->real_name;
         $item = $this->real_name;
         $ret = '<span class="navItemControls">' . '<a href="navigation.php' . URL::getCommon() . '&hideNavItem=true' . '&itemType=' . urlencode($this->getItemType()) . '&itemName=' . urlencode($item) . '&dbName=' . urlencode($db) . '"' . ' class="hideNavItem ajax">' . PMA\libraries\Util::getImage('hide.png', __('Hide')) . '</a></span>';
     }
     return $ret;
 }
开发者ID:poush,项目名称:phpmyadmin,代码行数:16,代码来源:NodeDatabaseChild.php

示例4: getHtmlForControlButtons

 /**
  * Returns HTML for control buttons displayed infront of a node
  *
  * @return String HTML for control buttons
  */
 public function getHtmlForControlButtons()
 {
     $ret = '';
     $cfgRelation = PMA_getRelationsParam();
     if ($cfgRelation['navwork']) {
         $db = $this->realParent()->real_name;
         $item = $this->real_name;
         $params = array('hideNavItem' => true, 'itemType' => $this->getItemType(), 'itemName' => $item, 'dbName' => $db);
         $ret = '<span class="navItemControls">' . '<a href="navigation.php' . URL::getCommon($params) . '"' . ' class="hideNavItem ajax">' . PMA\libraries\Util::getImage('hide.png', __('Hide')) . '</a></span>';
     }
     return $ret;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:17,代码来源:NodeDatabaseChild.php

示例5: testGetHtmlForUserGroupsTableWithUserGroups

 /**
  * Tests PMA_getHtmlForUserGroupsTable() function when there are user groups
  *
  * @return void
  */
 public function testGetHtmlForUserGroupsTableWithUserGroups()
 {
     $expectedQuery = "SELECT * FROM `pmadb`.`usergroups`" . " ORDER BY `usergroup` ASC";
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->once())->method('tryQuery')->with($expectedQuery)->will($this->returnValue(true));
     $dbi->expects($this->once())->method('numRows')->withAnyParameters()->will($this->returnValue(1));
     $dbi->expects($this->at(2))->method('fetchAssoc')->withAnyParameters()->will($this->returnValue(array('usergroup' => 'usergroup', 'tab' => 'server_sql', 'allowed' => 'Y')));
     $dbi->expects($this->at(3))->method('fetchAssoc')->withAnyParameters()->will($this->returnValue(false));
     $dbi->expects($this->once())->method('freeResult');
     $GLOBALS['dbi'] = $dbi;
     $html = PMA_getHtmlForUserGroupsTable();
     $this->assertContains('<td>usergroup</td>', $html);
     $url_tag = '<a class="" href="server_user_groups.php' . URL::getCommon(array('viewUsers' => 1, 'userGroup' => htmlspecialchars('usergroup')));
     $this->assertContains($url_tag, $html);
     $url_tag = '<a class="" href="server_user_groups.php' . URL::getCommon(array('editUserGroup' => 1, 'userGroup' => htmlspecialchars('usergroup')));
     $this->assertContains($url_tag, $html);
     $url_tag = '<a class="deleteUserGroup ajax" href="server_user_groups.php' . URL::getCommon(array('deleteUserGroup' => 1, 'userGroup' => htmlspecialchars('usergroup')));
     $this->assertContains($url_tag, $html);
 }
开发者ID:rclakmal,项目名称:phpmyadmin,代码行数:24,代码来源:PMA_server_user_groups_test.php

示例6: PMA_getHtmlForSubMenusOnUsersPage

/**
 * Get HTML for secondary level menu tabs on 'Users' page
 *
 * @param string $selfUrl Url of the file
 *
 * @return string HTML for secondary level menu tabs on 'Users' page
 */
function PMA_getHtmlForSubMenusOnUsersPage($selfUrl)
{
    $url_params = URL::getCommon();
    $items = array(array('name' => __('User accounts overview'), 'url' => 'server_privileges.php', 'specific_params' => '&viewing_mode=server'));
    if ($GLOBALS['is_superuser']) {
        $items[] = array('name' => __('User groups'), 'url' => 'server_user_groups.php', 'specific_params' => '');
    }
    $retval = '<ul id="topmenu2">';
    foreach ($items as $item) {
        $class = '';
        if ($item['url'] === $selfUrl) {
            $class = ' class="tabactive"';
        }
        $retval .= '<li>';
        $retval .= '<a' . $class;
        $retval .= ' href="' . $item['url'] . $url_params . $item['specific_params'] . '">';
        $retval .= $item['name'];
        $retval .= '</a>';
        $retval .= '</li>';
    }
    $retval .= '</ul>';
    $retval .= '<div class="clearfloat"></div>';
    return $retval;
}
开发者ID:rclakmal,项目名称:phpmyadmin,代码行数:31,代码来源:server_users.lib.php

示例7: testGetHtmlForServerEngine

 /**
  * Tests for _getHtmlForServerEngine() method
  *
  * @return void
  */
 public function testGetHtmlForServerEngine()
 {
     $_REQUEST['engine'] = "Pbxt";
     $_REQUEST['page'] = "page";
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
     $class = new ReflectionClass('\\PMA\\libraries\\controllers\\server\\ServerEnginesController');
     $method = $class->getMethod('_getHtmlForServerEngine');
     $method->setAccessible(true);
     $engine_plugin = StorageEngine::getEngine("Pbxt");
     $ctrl = new ServerEnginesController();
     $html = $method->invoke($ctrl, $engine_plugin);
     //validate 1: Engine title
     $this->assertContains(htmlspecialchars($engine_plugin->getTitle()), $html);
     //validate 2: Engine Mysql Help Page
     $this->assertContains(PMA\libraries\Util::showMySQLDocu($engine_plugin->getMysqlHelpPage()), $html);
     //validate 3: Engine Comment
     $this->assertContains(htmlspecialchars($engine_plugin->getComment()), $html);
     //validate 4: Engine Info Pages
     $this->assertContains(__('Variables'), $html);
     $this->assertContains(URL::getCommon(array('engine' => $_REQUEST['engine'], 'page' => "Documentation")), $html);
     //validate 5: other items
     $this->assertContains(URL::getCommon(array('engine' => $_REQUEST['engine'])), $html);
     $this->assertContains($engine_plugin->getSupportInformationMessage(), $html);
     $this->assertContains('There is no detailed status information available for this ' . 'storage engine.', $html);
 }
开发者ID:rclakmal,项目名称:phpmyadmin,代码行数:32,代码来源:ServerEnginesControllerTest.php

示例8: isset

 * This test may be bypassed if $is_js_confirmed = 1 (already checked with js)
 * but since a malicious user may pass this variable by url/form, we don't take
 * into account this case.
 */
if (PMA_hasNoRightsToDropDatabase($analyzed_sql_results, $cfg['AllowUserDropDatabase'], $is_superuser)) {
    Util::mysqlDie(__('"DROP DATABASE" statements are disabled.'), '', false, $err_url);
}
// end if
/**
 * Need to find the real end of rows?
 */
if (isset($find_real_end) && $find_real_end) {
    $unlim_num_rows = PMA_findRealEndOfRows($db, $table);
}
/**
 * Bookmark add
 */
if (isset($_POST['store_bkm'])) {
    PMA_addBookmark($goto);
    // script has exited at this point
}
// end if
/**
 * Sets or modifies the $goto variable if required
 */
if ($goto == 'sql.php') {
    $is_gotofile = false;
    $goto = 'sql.php' . URL::getCommon(array('db' => $db, 'table' => $table, 'sql_query' => $sql_query));
}
// end if
PMA_executeQueryAndSendQueryResponse($analyzed_sql_results, $is_gotofile, $db, $table, isset($find_real_end) ? $find_real_end : null, isset($import_text) ? $import_text : null, isset($extra_data) ? $extra_data : null, isset($message_to_show) ? $message_to_show : null, isset($message) ? $message : null, isset($sql_data) ? $sql_data : null, $goto, $pmaThemeImage, isset($disp_query) ? $display_query : null, isset($disp_message) ? $disp_message : null, isset($query_type) ? $query_type : null, $sql_query, isset($selected) ? $selected : null, isset($complete_query) ? $complete_query : null);
开发者ID:poush,项目名称:phpmyadmin,代码行数:31,代码来源:sql.php

示例9:

*/
require_once 'libraries/file_listing.lib.php';
/**
 * Defines the url to return to in case of error in a sql statement
 * (at this point, $GLOBALS['goto'] will be set but could be empty)
 */
if (empty($GLOBALS['goto'])) {
    if (mb_strlen($table)) {
        // avoid a problem (see bug #2202709)
        $GLOBALS['goto'] = 'tbl_sql.php';
    } else {
        $GLOBALS['goto'] = 'db_sql.php';
    }
}
$_url_params = PMA_getUrlParameters($db, $table);
$err_url = $GLOBALS['goto'] . URL::getCommon($_url_params);
unset($_url_params);
$comments_map = PMA_getCommentsMap($db, $table);
/**
 * START REGULAR OUTPUT
 */
/**
 * Load JavaScript files
 */
$response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('sql.js');
$scripts->addFile('tbl_change.js');
$scripts->addFile('big_ints.js');
$scripts->addFile('jquery/jquery-ui-timepicker-addon.js');
开发者ID:poush,项目名称:phpmyadmin,代码行数:31,代码来源:tbl_change.php

示例10: _links

 /**
  * Creates the code for displaying the links
  * at the top of the navigation panel
  *
  * @return string HTML code for the links
  */
 private function _links()
 {
     // always iconic
     $showIcon = true;
     $showText = false;
     $retval = '<!-- LINKS START -->';
     $retval .= '<div id="navipanellinks">';
     $retval .= PMA\libraries\Util::getNavigationLink('index.php' . URL::getCommon(), $showText, __('Home'), $showIcon, 'b_home.png');
     // if we have chosen server
     if ($GLOBALS['server'] != 0) {
         // Logout for advanced authentication
         if ($GLOBALS['cfg']['Server']['auth_type'] != 'config') {
             $text = __('Log out');
         } else {
             $text = __('Empty session data');
         }
         $link = 'logout.php' . $GLOBALS['url_query'];
         $retval .= PMA\libraries\Util::getNavigationLink($link, $showText, $text, $showIcon, 's_loggoff.png', '', true, '', array('logout'));
     }
     $retval .= PMA\libraries\Util::getNavigationLink(PMA\libraries\Util::getDocuLink('index'), $showText, __('phpMyAdmin documentation'), $showIcon, 'b_docs.png', '', false, 'documentation');
     $retval .= PMA\libraries\Util::getNavigationLink(PMA\libraries\Util::getMySQLDocuURL('', ''), $showText, __('Documentation'), $showIcon, 'b_sqlhelp.png', '', false, 'mysql_doc');
     $retval .= PMA\libraries\Util::getNavigationLink('#', $showText, __('Navigation panel settings'), $showIcon, 's_cog.png', 'pma_navigation_settings_icon', false, '', defined('PMA_DISABLE_NAVI_SETTINGS') ? array('hide') : array());
     $retval .= PMA\libraries\Util::getNavigationLink('#', $showText, __('Reload navigation panel'), $showIcon, 's_reload.png', 'pma_navigation_reload');
     $retval .= '</div>';
     $retval .= '<!-- LINKS ENDS -->';
     return $retval;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:33,代码来源:NavigationHeader.php

示例11: getPrintPreview

 /**
  * Renders the preview for this theme
  *
  * @return string
  * @access public
  */
 public function getPrintPreview()
 {
     $url_params = array('set_theme' => $this->getId());
     $url = 'index.php' . URL::getCommon($url_params);
     $retval = '<div class="theme_preview">';
     $retval .= '<h2>';
     $retval .= htmlspecialchars($this->getName());
     $retval .= ' (' . htmlspecialchars($this->getVersion()) . ') ';
     $retval .= '</h2>';
     $retval .= '<p>';
     $retval .= '<a class="take_theme" ';
     $retval .= 'name="' . htmlspecialchars($this->getId()) . '" ';
     $retval .= 'href="' . $url . '">';
     if (@file_exists($this->getPath() . '/screen.png')) {
         // if screen exists then output
         $retval .= '<img src="' . $this->getPath() . '/screen.png" border="1"';
         $retval .= ' alt="' . htmlspecialchars($this->getName()) . '"';
         $retval .= ' title="' . htmlspecialchars($this->getName()) . '" />';
         $retval .= '<br />';
     } else {
         $retval .= __('No preview available.');
     }
     $retval .= '[ <strong>' . __('take it') . '</strong> ]';
     $retval .= '</a>';
     $retval .= '</p>';
     $retval .= '</div>';
     return $retval;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:34,代码来源:Theme.php

示例12: isset

    $currentSearchId = $savedSearch->getId();
}
/**
 * A query has been submitted -> (maybe) execute it
 */
$message_to_display = false;
if (isset($_REQUEST['submit_sql']) && !empty($sql_query)) {
    if (!preg_match('@^SELECT@i', $sql_query)) {
        $message_to_display = true;
    } else {
        $goto = 'db_sql.php';
        PMA_executeQueryAndSendQueryResponse(null, false, $_REQUEST['db'], null, false, null, null, null, null, null, $goto, $pmaThemeImage, null, null, null, $sql_query, null, null);
    }
}
$sub_part = '_qbe';
require 'libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_qbe.php';
$url_params['goto'] = 'db_qbe.php';
list($tables, $num_tables, $total_num_tables, $sub_part, $is_show_stats, $db_is_system_schema, $tooltip_truename, $tooltip_aliasname, $pos) = PMA\libraries\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
if ($message_to_display) {
    PMA\libraries\Message::error(__('You have to choose at least one column to display!'))->display();
}
unset($message_to_display);
// create new qbe search instance
$db_qbe = new PMA\libraries\DbQbe($GLOBALS['db'], $savedSearchList, $savedSearch);
$url = 'db_designer.php' . URL::getCommon(array_merge($url_params, array('query' => 1)));
$response->addHTML(PMA\libraries\Message::notice(sprintf(__('Switch to %svisual builder%s'), '<a href="' . $url . '">', '</a>')));
/**
 * Displays the Query by example form
 */
$response->addHTML($db_qbe->getSelectionForm());
开发者ID:poush,项目名称:phpmyadmin,代码行数:31,代码来源:db_qbe.php

示例13: PMA_linkURL

/**
 * Returns link to (possibly) external site using defined redirector.
 *
 * @param string $url URL where to go.
 *
 * @return string URL for a link.
 */
function PMA_linkURL($url)
{
    if (!preg_match('#^https?://#', $url)) {
        return $url;
    }
    $params = array();
    $params['url'] = $url;
    $url = URL::getCommon($params);
    //strip off token and such sensitive information. Just keep url.
    $arr = parse_url($url);
    parse_str($arr["query"], $vars);
    $query = http_build_query(array("url" => $vars["url"]));
    if (defined('PMA_SETUP')) {
        $url = '../url.php?' . $query;
    } else {
        $url = './url.php?' . $query;
    }
    return $url;
}
开发者ID:nijel,项目名称:phpmyadmin,代码行数:26,代码来源:core.lib.php

示例14: getHtmlForControlButtons

 /**
  * Returns HTML for control buttons displayed infront of a node
  *
  * @return String HTML for control buttons
  */
 public function getHtmlForControlButtons()
 {
     $ret = '';
     $cfgRelation = PMA_getRelationsParam();
     if ($cfgRelation['navwork']) {
         if ($this->hiddenCount > 0) {
             $ret = '<span class="dbItemControls">' . '<a href="navigation.php' . URL::getCommon() . '&showUnhideDialog=true' . '&dbName=' . urldecode($this->real_name) . '"' . ' class="showUnhide ajax">' . Util::getImage('show.png', __('Show hidden items')) . '</a></span>';
         }
     }
     return $ret;
 }
开发者ID:poush,项目名称:phpmyadmin,代码行数:16,代码来源:NodeDatabase.php

示例15: authFails

 /**
  * User is not allowed to login to MySQL -> authentication failed
  *
  * @return boolean   always true (no return indeed)
  */
 public function authFails()
 {
     $conn_error = $GLOBALS['dbi']->getError();
     if (!$conn_error) {
         $conn_error = __('Cannot connect: invalid settings.');
     }
     /* HTML header */
     $response = PMA\libraries\Response::getInstance();
     $response->getFooter()->setMinimal();
     $header = $response->getHeader();
     $header->setBodyId('loginform');
     $header->setTitle(__('Access denied!'));
     $header->disableMenuAndConsole();
     echo '<br /><br />
 <center>
     <h1>';
     echo sprintf(__('Welcome to %s'), ' phpMyAdmin ');
     echo '</h1>
 </center>
 <br />
 <table cellpadding="0" cellspacing="3" style="margin: 0 auto" width="80%">
     <tr>
         <td>';
     if (isset($GLOBALS['allowDeny_forbidden']) && $GLOBALS['allowDeny_forbidden']) {
         trigger_error(__('Access denied!'), E_USER_NOTICE);
     } else {
         // Check whether user has configured something
         if ($GLOBALS['PMA_Config']->source_mtime == 0) {
             echo '<p>', sprintf(__('You probably did not create a configuration file.' . ' You might want to use the %1$ssetup script%2$s to' . ' create one.'), '<a href="setup/">', '</a>'), '</p>', "\n";
         } elseif (!isset($GLOBALS['errno']) || isset($GLOBALS['errno']) && $GLOBALS['errno'] != 2002 && $GLOBALS['errno'] != 2003) {
             // if we display the "Server not responding" error, do not confuse
             // users by telling them they have a settings problem
             // (note: it's true that they could have a badly typed host name,
             // but anyway the current message tells that the server
             //  rejected the connection, which is not really what happened)
             // 2002 is the error given by mysqli
             // 2003 is the error given by mysql
             trigger_error(__('phpMyAdmin tried to connect to the MySQL server, and the' . ' server rejected the connection. You should check the' . ' host, username and password in your configuration and' . ' make sure that they correspond to the information given' . ' by the administrator of the MySQL server.'), E_USER_WARNING);
         }
         echo PMA\libraries\Util::mysqlDie($conn_error, '', true, '', false);
     }
     $GLOBALS['error_handler']->dispUserErrors();
     echo '</td>
     </tr>
     <tr>
         <td>', "\n";
     echo '<a href="', PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabServer'], 'server'), URL::getCommon(), '" class="button disableAjax">', __('Retry to connect'), '</a>', "\n";
     echo '</td>
     </tr>', "\n";
     if (count($GLOBALS['cfg']['Servers']) > 1) {
         // offer a chance to login to other servers if the current one failed
         include_once './libraries/select_server.lib.php';
         echo '<tr>', "\n";
         echo ' <td>', "\n";
         echo PMA_selectServer(true, true);
         echo ' </td>', "\n";
         echo '</tr>', "\n";
     }
     echo '</table>', "\n";
     if (!defined('TESTSUITE')) {
         exit;
     }
     return true;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:69,代码来源:AuthenticationConfig.php


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