本文整理汇总了PHP中PMA_Util::linkOrButton方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Util::linkOrButton方法的具体用法?PHP PMA_Util::linkOrButton怎么用?PHP PMA_Util::linkOrButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Util
的用法示例。
在下文中一共展示了PMA_Util::linkOrButton方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getGeometricalInputBox
/**
* Provides html elements for search criteria inputbox
* in case the column's type is geometrical
*
* @param int $column_index Column's index
* @param bool $in_fbs Whether we are in 'function based search'
*
* @return string HTML elements.
*/
private function _getGeometricalInputBox($column_index, $in_fbs)
{
$html_output = '<input type="text" name="criteriaValues[' . $column_index . ']"' . ' size="40" class="textfield" id="field_' . $column_index . '" />';
if ($in_fbs) {
$edit_url = 'gis_data_editor.php?' . PMA_URL_getCommon();
$edit_str = PMA_Util::getIcon('b_edit.png', __('Edit/Insert'));
$html_output .= '<span class="open_search_gis_editor">';
$html_output .= PMA_Util::linkOrButton($edit_url, $edit_str, array(), false, false, '_blank');
$html_output .= '</span>';
}
return $html_output;
}
示例2: _getDeleteLink
/**
* Prepares a Delete link
*
* @param string $del_url delete url
* @param string $del_str text for the delete link
* @param string $js_conf text for the JS confirmation
* @param string $class css classes for the td element
*
* @return string the generated HTML
*
* @access private
*
* @see _getTableBody(), _getCheckboxAndLinks()
*/
private function _getDeleteLink($del_url, $del_str, $js_conf, $class)
{
$ret = '';
if (!empty($del_url)) {
$ret .= '<td class="';
if (!empty($class)) {
$ret .= $class . ' ';
}
$ajax = PMA_Response::getInstance()->isAjax() ? ' ajax' : '';
$ret .= 'center" ' . ' >' . PMA_Util::linkOrButton($del_url, $del_str, array('class' => 'delete_row requireConfirm' . $ajax), false) . '<div class="hide">' . $js_conf . '</div>' . '</td>';
}
return $ret;
}
示例3: PMA_getHTMLforGisDataTypes
/**
* Get HTML for gis data types
*
* @return string an html snippet
*/
function PMA_getHTMLforGisDataTypes()
{
$edit_str = PMA_Util::getIcon('b_edit.png', __('Edit/Insert'));
return '<span class="open_gis_editor">' . PMA_Util::linkOrButton('#', $edit_str, array(), false, false, '_blank') . '</span>';
}
示例4: PMA_getHtmlForEditView
/**
* Get HTML for edit views'
*
* @param string $url_params URL parameters
*
* @return string $html_output
*/
function PMA_getHtmlForEditView($url_params)
{
$query = "SELECT `VIEW_DEFINITION`, `CHECK_OPTION`, `DEFINER`, `SECURITY_TYPE`" . " FROM `INFORMATION_SCHEMA`.`VIEWS`" . " WHERE TABLE_SCHEMA='" . PMA_Util::sqlAddSlashes($GLOBALS['db']) . "'" . " AND TABLE_NAME='" . PMA_Util::sqlAddSlashes($GLOBALS['table']) . "';";
$item = $GLOBALS['dbi']->fetchSingleRow($query);
$view = array('operation' => 'alter', 'definer' => $item['DEFINER'], 'sql_security' => $item['SECURITY_TYPE'], 'name' => $GLOBALS['table'], 'as' => $item['VIEW_DEFINITION'], 'with' => $item['CHECK_OPTION']);
$url = 'view_create.php' . PMA_URL_getCommon($url_params) . '&';
$url .= implode('&', array_map(function ($key, $val) {
return 'view[' . urlencode($key) . ']=' . urlencode($val);
}, array_keys($view), $view));
$html_output = PMA_Util::linkOrButton($url, PMA_Util::getIcon('b_edit.png', __('Edit view'), true));
return $html_output;
}
示例5: PMA_getHtmlForEditView
/**
* Get HTML for edit views'
*
* @param string $url_params URL parameters
*
* @return string $html_output
*/
function PMA_getHtmlForEditView($url_params)
{
$query = "SELECT `VIEW_DEFINITION`, `CHECK_OPTION`, `DEFINER`, `SECURITY_TYPE`" . " FROM `INFORMATION_SCHEMA`.`VIEWS`" . " WHERE TABLE_SCHEMA='" . PMA_Util::sqlAddSlashes($GLOBALS['db']) . "'" . " AND TABLE_NAME='" . PMA_Util::sqlAddSlashes($GLOBALS['table']) . "';";
$item = $GLOBALS['dbi']->fetchSingleRow($query);
$query = "SHOW CREATE TABLE " . PMA_Util::backquote($GLOBALS['db']) . "." . PMA_Util::backquote($GLOBALS['table']);
$createView = $GLOBALS['dbi']->fetchValue($query, 0, 'Create View');
// get algorithm from $createView of the form CREATE ALGORITHM=<ALGORITHM> DE...
$parts = explode(" ", substr($createView, 17));
$item['ALGORITHM'] = $parts[0];
$view = array('operation' => 'alter', 'definer' => $item['DEFINER'], 'sql_security' => $item['SECURITY_TYPE'], 'name' => $GLOBALS['table'], 'as' => $item['VIEW_DEFINITION'], 'with' => $item['CHECK_OPTION'], 'algorithm' => $item['ALGORITHM']);
$url = 'view_create.php' . PMA_URL_getCommon($url_params) . '&';
$url .= implode('&', array_map(function ($key, $val) {
return 'view[' . urlencode($key) . ']=' . urlencode($val);
}, array_keys($view), $view));
$html_output = PMA_Util::linkOrButton($url, PMA_Util::getIcon('b_edit.png', __('Edit view'), true));
return $html_output;
}
示例6: PMA_getHtmlForEditView
/**
* Get HTML for edit views'
*
* @param string $url_params URL parameters
*
* @return string $html_output
*/
function PMA_getHtmlForEditView($url_params)
{
$create_view = PMA_DBI_get_definition($GLOBALS['db'], 'VIEW', $GLOBALS['table']);
$create_view = preg_replace('@^CREATE@', 'ALTER', $create_view);
$html_output = PMA_Util::linkOrButton('tbl_sql.php' . PMA_generate_common_url($url_params + array('sql_query' => $create_view, 'show_query' => '1')), PMA_Util::getIcon('b_edit.png', __('Edit view'), true));
return $html_output;
}
示例7: _getDeleteLink
/**
* Prepares a Delete link
*
* @param string $del_url delete url
* @param string $del_str text for the delete link
* @param string $js_conf text for the JS confirmation
* @param string $class css classes for the td element
*
* @return string the generated HTML
*
* @access private
*
* @see _getTableBody(), _getCheckboxAndLinks()
*/
private function _getDeleteLink($del_url, $del_str, $js_conf, $class)
{
$ret = '';
if (!empty($del_url)) {
$ret .= '<td class="';
if (!empty($class)) {
$ret .= $class . ' ';
}
$ret .= 'center" ' . ' >' . PMA_Util::linkOrButton($del_url, $del_str, $js_conf, false) . '</td>';
}
return $ret;
}