本文整理匯總了PHP中PMA_Util::showIcons方法的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_Util::showIcons方法的具體用法?PHP PMA_Util::showIcons怎麽用?PHP PMA_Util::showIcons使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PMA_Util
的用法示例。
在下文中一共展示了PMA_Util::showIcons方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: PMA_getHtmlForCreateTable
/**
* Returns the html for create table.
*
* @param string $db database name
*
* @return string
*/
function PMA_getHtmlForCreateTable($db)
{
$html = '<form id="create_table_form_minimal" method="post" ' . 'action="tbl_create.php">';
$html .= '<fieldset>';
$html .= '<legend>';
if (PMA_Util::showIcons('ActionLinksMode')) {
$html .= PMA_Util::getImage('b_newtbl.png');
}
$html .= __('Create table');
$html .= ' </legend>';
$html .= PMA_URL_getHiddenInputs($db);
$html .= '<div class="formelement">';
$html .= __('Name') . ":";
$html .= ' <input type="text" name="table" maxlength="64" ' . 'size="30" required="required" />';
$html .= ' </div>';
$html .= ' <div class="formelement">';
$html .= __('Number of columns') . ":";
$html .= ' <input type="number" min="1" name="num_fields" value="4" required="required" />';
$html .= ' </div>';
$html .= ' <div class="clearfloat"></div>';
$html .= '</fieldset>';
$html .= '<fieldset class="tblFooters">';
$html .= ' <input type="submit" value="' . __('Go') . '" />';
$html .= '</fieldset>';
$html .= '</form>';
return $html;
}
示例2: PMA_getHtmlForChangeDatabaseCharset
/**
* Get HTML snippet for change database charset
*
* @param string $db database name
* @param string $table table name
*
* @return string $html_output
*/
function PMA_getHtmlForChangeDatabaseCharset($db, $table)
{
$html_output = '<div class="operations_half_width">' . '<form id="change_db_charset_form" ';
$html_output .= 'class="ajax" ';
$html_output .= 'method="post" action="db_operations.php">';
$html_output .= PMA_URL_getHiddenInputs($db, $table);
$html_output .= '<fieldset>' . "\n" . ' <legend>';
if (PMA_Util::showIcons('ActionLinksMode')) {
$html_output .= PMA_Util::getImage('s_asci.png') . ' ';
}
$html_output .= '<label for="select_db_collation">' . __('Collation') . '</label>' . "\n" . '</legend>' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', 'select_db_collation', isset($_REQUEST['db_collation']) ? $_REQUEST['db_collation'] : '', false) . '</fieldset>' . '<fieldset class="tblFooters">' . '<input type="submit" name="submitcollation"' . ' value="' . __('Go') . '" />' . "\n" . '</fieldset>' . "\n" . '</form></div>' . "\n";
return $html_output;
}
示例3: PMA_getHtmlForTrackingReport
/**
* Function to get html for tracking report and tracking report export
*
* @param string $url_query url query
* @param array $data data
* @param array $url_params url params
* @param boolean $selection_schema selection schema
* @param boolean $selection_data selection data
* @param boolean $selection_both selection both
* @param int $filter_ts_to filter time stamp from
* @param int $filter_ts_from filter time stamp tp
* @param array $filter_users filter users
*
* @return string
*/
function PMA_getHtmlForTrackingReport($url_query, $data, $url_params, $selection_schema, $selection_data, $selection_both, $filter_ts_to, $filter_ts_from, $filter_users)
{
$html = '<h3>' . __('Tracking report') . ' [<a href="tbl_tracking.php' . $url_query . '">' . __('Close') . '</a>]</h3>';
$html .= '<small>' . __('Tracking statements') . ' ' . htmlspecialchars($data['tracking']) . '</small><br/>';
$html .= '<br/>';
list($str1, $str2, $str3, $str4, $str5) = PMA_getHtmlForElementsOfTrackingReport($selection_schema, $selection_data, $selection_both);
// Prepare delete link content here
$drop_image_or_text = '';
if (PMA_Util::showIcons('ActionLinksMode')) {
$drop_image_or_text .= PMA_Util::getImage('b_drop.png', __('Delete tracking data row from report'));
}
if (PMA_Util::showText('ActionLinksMode')) {
$drop_image_or_text .= __('Delete');
}
/*
* First, list tracked data definition statements
*/
if (count($data['ddlog']) == 0 && count($data['dmlog']) == 0) {
$msg = PMA_Message::notice(__('No data'));
$msg->display();
}
$html .= PMA_getHtmlForTrackingReportExportForm1($data, $url_params, $selection_schema, $selection_data, $selection_both, $filter_ts_to, $filter_ts_from, $filter_users, $str1, $str2, $str3, $str4, $str5, $drop_image_or_text);
$html .= PMA_getHtmlForTrackingReportExportForm2($url_params, $str1, $str2, $str3, $str4, $str5);
$html .= "<br/><br/><hr/><br/>\n";
return $html;
}
示例4: PMA_getNavigationRow
/**
* Returns the html for Navigation Row.
*
* @param Array $url_params Links parameters
* @param int $pos Position to display
* @param int $num_rows Number of results row
* @param bool $dontlimitchars Whether limit chars
*
* @return string
*/
function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
{
$html = "";
// we do not know how much rows are in the binlog
// so we can just force 'NEXT' button
if ($pos > 0) {
$this_url_params = $url_params;
if ($pos > $GLOBALS['cfg']['MaxRows']) {
$this_url_params['pos'] = $pos - $GLOBALS['cfg']['MaxRows'];
}
$html .= '<a href="server_binlog.php' . PMA_URL_getCommon($this_url_params) . '"';
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
} else {
$html .= '>' . _pgettext('Previous page', 'Previous');
}
// end if... else...
$html .= ' < </a> - ';
}
$this_url_params = $url_params;
if ($pos > 0) {
$this_url_params['pos'] = $pos;
}
if ($dontlimitchars) {
unset($this_url_params['dontlimitchars']);
$tempTitle = __('Truncate Shown Queries');
$tempImgMode = 'partial';
} else {
$this_url_params['dontlimitchars'] = 1;
$tempTitle = __('Show Full Queries');
$tempImgMode = 'full';
}
$html .= '<a href="server_binlog.php' . PMA_URL_getCommon($this_url_params) . '" title="' . $tempTitle . '">' . '<img src="' . $GLOBALS['pmaThemeImage'] . 's_' . $tempImgMode . 'text.png" alt="' . $tempTitle . '" /></a>';
// we do not now how much rows are in the binlog
// so we can just force 'NEXT' button
if ($num_rows >= $GLOBALS['cfg']['MaxRows']) {
$this_url_params = $url_params;
$this_url_params['pos'] = $pos + $GLOBALS['cfg']['MaxRows'];
$html .= ' - <a href="server_binlog.php' . PMA_URL_getCommon($this_url_params) . '"';
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
} else {
$html .= '>' . _pgettext('Next page', 'Next');
}
// end if... else...
$html .= ' > </a>';
}
return $html;
}
示例5: PMA_getHtmlForSqlQueryFormInsert
/**
* return HTML for Sql Query Form Insert
*
* @param string $query query to display in the textarea
* @param string $delimiter default delimiter to use
*
* @return string
*
* @usedby PMA_getHtmlForSqlQueryForm()
*/
function PMA_getHtmlForSqlQueryFormInsert($query = '', $delimiter = ';')
{
// enable auto select text in textarea
if ($GLOBALS['cfg']['TextareaAutoSelect']) {
$auto_sel = ' onclick="selectContent(this, sql_box_locked, true);"';
} else {
$auto_sel = '';
}
$locking = '';
$height = $GLOBALS['cfg']['TextareaRows'] * 2;
$table = '';
$db = '';
$fields_list = array();
if (!mb_strlen($GLOBALS['db'])) {
// prepare for server related
$legend = sprintf(__('Run SQL query/queries on server %s'), '"' . htmlspecialchars(!empty($GLOBALS['cfg']['Servers'][$GLOBALS['server']]['verbose']) ? $GLOBALS['cfg']['Servers'][$GLOBALS['server']]['verbose'] : $GLOBALS['cfg']['Servers'][$GLOBALS['server']]['host']) . '"');
} elseif (!mb_strlen($GLOBALS['table'])) {
// prepare for db related
$db = $GLOBALS['db'];
// if you want navigation:
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . PMA_URL_getCommon(array('db' => $db)) . '"';
$tmp_db_link .= '>' . htmlspecialchars($db) . '</a>';
// else use
// $tmp_db_link = htmlspecialchars($db);
$legend = sprintf(__('Run SQL query/queries on database %s'), $tmp_db_link);
if (empty($query)) {
$query = PMA_Util::expandUserString($GLOBALS['cfg']['DefaultQueryDatabase'], 'backquote');
}
} else {
$table = $GLOBALS['table'];
$db = $GLOBALS['db'];
// Get the list and number of fields
// we do a try_query here, because we could be in the query window,
// trying to synchronize and the table has not yet been created
$fields_list = $GLOBALS['dbi']->getColumns($db, $GLOBALS['table'], null, true);
$tmp_db_link = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . PMA_URL_getCommon(array('db' => $db)) . '"';
$tmp_db_link .= '>' . htmlspecialchars($db) . '</a>';
// else use
// $tmp_db_link = htmlspecialchars($db);
$legend = sprintf(__('Run SQL query/queries on database %s'), $tmp_db_link);
if (empty($query)) {
$query = PMA_Util::expandUserString($GLOBALS['cfg']['DefaultQueryTable'], 'backquote');
}
}
$legend .= ': ' . PMA_Util::showMySQLDocu('SELECT');
if (count($fields_list)) {
$sqlquerycontainer_id = 'sqlquerycontainer';
} else {
$sqlquerycontainer_id = 'sqlquerycontainerfull';
}
$html = '<a id="querybox"></a>' . '<div id="queryboxcontainer">' . '<fieldset id="queryboxf">';
$html .= '<legend>' . $legend . '</legend>';
$html .= '<div id="queryfieldscontainer">';
$html .= '<div id="' . $sqlquerycontainer_id . '">' . '<textarea tabindex="100" name="sql_query" id="sqlquery"' . ' cols="' . $GLOBALS['cfg']['TextareaCols'] . '"' . ' rows="' . $height . '"' . ' dir="' . $GLOBALS['text_dir'] . '"' . $auto_sel . $locking . '>' . htmlspecialchars($query) . '</textarea>';
// Add buttons to generate query easily for
// select all, single select, insert, update and delete
if (count($fields_list)) {
$html .= '<input type="button" value="SELECT *" id="selectall"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="SELECT" id="select"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="INSERT" id="insert"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="UPDATE" id="update"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="DELETE" id="delete"' . ' class="button sqlbutton" />';
}
$html .= '<input type="button" value="' . __('Clear') . '" id="clear"' . ' class="button sqlbutton" />';
$html .= '</div>' . "\n";
if (count($fields_list)) {
$html .= '<div id="tablefieldscontainer">' . '<label>' . __('Columns') . '</label>' . '<select id="tablefields" name="dummy" ' . 'size="' . ($GLOBALS['cfg']['TextareaRows'] - 2) . '" ' . 'multiple="multiple" ondblclick="insertValueQuery()">';
foreach ($fields_list as $field) {
$html .= '<option value="' . PMA_Util::backquote(htmlspecialchars($field['Field'])) . '"';
if (isset($field['Field']) && mb_strlen($field['Field']) && isset($field['Comment'])) {
$html .= ' title="' . htmlspecialchars($field['Comment']) . '"';
}
$html .= '>' . htmlspecialchars($field['Field']) . '</option>' . "\n";
}
$html .= '</select>' . '<div id="tablefieldinsertbuttoncontainer">';
if (PMA_Util::showIcons('ActionLinksMode')) {
$html .= '<input type="button" class="button" name="insert"' . ' value="<<" onclick="insertValueQuery()"' . ' title="' . __('Insert') . '" />';
} else {
$html .= '<input type="button" class="button" name="insert"' . ' value="' . __('Insert') . '"' . ' onclick="insertValueQuery()" />';
}
$html .= '</div>' . "\n" . '</div>' . "\n";
}
$html .= '<div class="clearfloat"></div>' . "\n";
$html .= '</div>' . "\n";
$cfgBookmark = PMA_Bookmark_getParams();
if ($cfgBookmark) {
$html .= '<div id="bookmarkoptions">';
$html .= '<div class="formelement">';
$html .= '<label for="bkm_label">' . __('Bookmark this SQL query:') . '</label>';
$html .= '<input type="text" name="bkm_label" id="bkm_label"' . ' tabindex="110" value="" />';
//.........這裏部分代碼省略.........
示例6: _getBreadcrumbs
/**
* Returns the breadcrumbs as HTML
*
* @return string HTML formatted breadcrumbs
*/
private function _getBreadcrumbs()
{
$retval = '';
$tbl_is_view = PMA_Table::isView($this->_db, $this->_table);
$server_info = !empty($GLOBALS['cfg']['Server']['verbose']) ? $GLOBALS['cfg']['Server']['verbose'] : $GLOBALS['cfg']['Server']['host'];
$server_info .= empty($GLOBALS['cfg']['Server']['port']) ? '' : ':' . $GLOBALS['cfg']['Server']['port'];
$separator = "<span class='separator item'> »</span>";
$item = '<a href="%1$s%2$s" class="item">';
if (PMA_Util::showText('TabsMode')) {
$item .= '%4$s: ';
}
$item .= '%3$s</a>';
$retval .= "<div id='floating_menubar'></div>";
$retval .= "<div id='serverinfo'>";
if (PMA_Util::showIcons('TabsMode')) {
$retval .= PMA_Util::getImage('s_host.png', '', array('class' => 'item'));
}
$retval .= sprintf($item, $GLOBALS['cfg']['DefaultTabServer'], PMA_URL_getCommon(), htmlspecialchars($server_info), __('Server'));
if (mb_strlen($this->_db)) {
$retval .= $separator;
if (PMA_Util::showIcons('TabsMode')) {
$retval .= PMA_Util::getImage('s_db.png', '', array('class' => 'item'));
}
$retval .= sprintf($item, $GLOBALS['cfg']['DefaultTabDatabase'], PMA_URL_getCommon(array('db' => $this->_db)), htmlspecialchars($this->_db), __('Database'));
// if the table is being dropped, $_REQUEST['purge'] is set to '1'
// so do not display the table name in upper div
if (mb_strlen($this->_table) && !(isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) {
include './libraries/tbl_info.inc.php';
$retval .= $separator;
if (PMA_Util::showIcons('TabsMode')) {
$icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
$retval .= PMA_Util::getImage($icon, '', array('class' => 'item'));
}
$retval .= sprintf($item, $GLOBALS['cfg']['DefaultTabTable'], PMA_URL_getCommon(array('db' => $this->_db, 'table' => $this->_table)), str_replace(' ', ' ', htmlspecialchars($this->_table)), $tbl_is_view ? __('View') : __('Table'));
/**
* Displays table comment
*/
if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
if (mb_strstr($show_comment, '; InnoDB free')) {
$show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
}
$retval .= '<span class="table_comment"';
$retval .= ' id="span_table_comment">"';
$retval .= htmlspecialchars($show_comment);
$retval .= '"</span>';
}
// end if
} else {
// no table selected, display database comment if present
$cfgRelation = PMA_getRelationsParam();
// Get additional information about tables for tooltip is done
// in libraries/db_info.inc.php only once
if ($cfgRelation['commwork']) {
$comment = PMA_getDbComment($this->_db);
/**
* Displays table comment
*/
if (!empty($comment)) {
$retval .= '<span class="table_comment"' . ' id="span_table_comment">"' . htmlspecialchars($comment) . '"</span>';
}
// end if
}
}
}
$retval .= '<div class="clearfloat"></div>';
$retval .= '</div>';
return $retval;
}
示例7: PMA_getHtmlForSqlQueryFormInsert
/**
* return HTML for Sql Query Form Insert
*
* @param string $query query to display in the textarea
* @param string $delimiter default delimiter to use
*
* @return string
*
* @usedby PMA_getHtmlForSqlQueryForm()
*/
function PMA_getHtmlForSqlQueryFormInsert($query = '', $delimiter = ';')
{
// enable auto select text in textarea
if ($GLOBALS['cfg']['TextareaAutoSelect']) {
$auto_sel = ' onclick="selectContent(this, sql_box_locked, true);"';
} else {
$auto_sel = '';
}
$locking = '';
$height = $GLOBALS['cfg']['TextareaRows'] * 2;
list($legend, $query, $columns_list) = PMA_initQueryForm($query);
if (!empty($columns_list)) {
$sqlquerycontainer_id = 'sqlquerycontainer';
} else {
$sqlquerycontainer_id = 'sqlquerycontainerfull';
}
$html = '<a id="querybox"></a>' . '<div id="queryboxcontainer">' . '<fieldset id="queryboxf">';
$html .= '<legend>' . $legend . '</legend>';
$html .= '<div id="queryfieldscontainer">';
$html .= '<div id="' . $sqlquerycontainer_id . '">' . '<textarea tabindex="100" name="sql_query" id="sqlquery"' . ' cols="' . $GLOBALS['cfg']['TextareaCols'] . '"' . ' rows="' . $height . '"' . ' dir="' . $GLOBALS['text_dir'] . '"' . $auto_sel . $locking . '>' . htmlspecialchars($query) . '</textarea>';
$html .= '<div id="querymessage"></div>';
// Add buttons to generate query easily for
// select all, single select, insert, update and delete
if (!empty($columns_list)) {
$html .= '<input type="button" value="SELECT *" id="selectall"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="SELECT" id="select"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="INSERT" id="insert"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="UPDATE" id="update"' . ' class="button sqlbutton" />';
$html .= '<input type="button" value="DELETE" id="delete"' . ' class="button sqlbutton" />';
}
$html .= '<input type="button" value="' . __('Clear') . '" id="clear"' . ' class="button sqlbutton" />';
if ($GLOBALS['cfg']['CodemirrorEnable']) {
$html .= '<input type="button" value="' . __('Format') . '" id="format"' . ' class="button sqlbutton" />';
}
$html .= '<input type="button" value="' . __('Get auto-saved query') . '" id="saved"' . ' class="button sqlbutton" />';
// Disable/Enable foreign key checks
$html .= '<div>';
$html .= PMA_Util::getFKCheckbox();
$html .= '</div>';
// parameter binding
$html .= '<div>';
$html .= '<input type="checkbox" name="parameterized" id="parameterized" />';
$html .= '<label for="parameterized">' . __('Bind parameters') . '</label>';
$html .= '<div id="parametersDiv"></div>';
$html .= '</div>';
$html .= '</div>' . "\n";
if (!empty($columns_list)) {
$html .= '<div id="tablefieldscontainer">' . '<label>' . __('Columns') . '</label>' . '<select id="tablefields" name="dummy" ' . 'size="' . ($GLOBALS['cfg']['TextareaRows'] - 2) . '" ' . 'multiple="multiple" ondblclick="insertValueQuery()">';
foreach ($columns_list as $field) {
$html .= '<option value="' . PMA_Util::backquote(htmlspecialchars($field['Field'])) . '"';
if (isset($field['Field']) && mb_strlen($field['Field']) && isset($field['Comment'])) {
$html .= ' title="' . htmlspecialchars($field['Comment']) . '"';
}
$html .= '>' . htmlspecialchars($field['Field']) . '</option>' . "\n";
}
$html .= '</select>' . '<div id="tablefieldinsertbuttoncontainer">';
if (PMA_Util::showIcons('ActionLinksMode')) {
$html .= '<input type="button" class="button" name="insert"' . ' value="<<" onclick="insertValueQuery()"' . ' title="' . __('Insert') . '" />';
} else {
$html .= '<input type="button" class="button" name="insert"' . ' value="' . __('Insert') . '"' . ' onclick="insertValueQuery()" />';
}
$html .= '</div>' . "\n" . '</div>' . "\n";
}
$html .= '<div class="clearfloat"></div>' . "\n";
$html .= '</div>' . "\n";
$cfgBookmark = PMA_Bookmark_getParams();
if ($cfgBookmark) {
$html .= '<div id="bookmarkoptions">';
$html .= '<div class="formelement">';
$html .= '<label for="bkm_label">' . __('Bookmark this SQL query:') . '</label>';
$html .= '<input type="text" name="bkm_label" id="bkm_label"' . ' tabindex="110" value="" />';
$html .= '</div>';
$html .= '<div class="formelement">';
$html .= '<input type="checkbox" name="bkm_all_users" tabindex="111"' . ' id="id_bkm_all_users" value="true" />';
$html .= '<label for="id_bkm_all_users">' . __('Let every user access this bookmark') . '</label>';
$html .= '</div>';
$html .= '<div class="formelement">';
$html .= '<input type="checkbox" name="bkm_replace" tabindex="112"' . ' id="id_bkm_replace" value="true" />';
$html .= '<label for="id_bkm_replace">' . __('Replace existing bookmark of same name') . '</label>';
$html .= '</div>';
$html .= '</div>';
}
$html .= '<div class="clearfloat"></div>' . "\n";
$html .= '</fieldset>' . "\n" . '</div>' . "\n";
$html .= '<fieldset id="queryboxfooter" class="tblFooters">' . "\n";
$html .= '<div class="formelement">' . "\n";
$html .= '</div>' . "\n";
$html .= '<div class="formelement">' . "\n";
$html .= '<label for="id_sql_delimiter">[ ' . __('Delimiter') . '</label>' . "\n";
$html .= '<input type="text" name="sql_delimiter" tabindex="131" size="3" ' . 'value="' . $delimiter . '" ' . 'id="id_sql_delimiter" /> ]';
//.........這裏部分代碼省略.........
示例8: _renderNode
/**
* Renders a single node or a branch of the tree
*
* @param Node $node The node to render
* @param bool $recursive Bool: Whether to render a single node or a branch
* @param string $class An additional class for the list item
*
* @return string HTML code for the tree node or branch
*/
private function _renderNode($node, $recursive, $class = '')
{
$retval = '';
$paths = $node->getPaths();
if ($node->hasSiblings() || isset($_REQUEST['results']) || $node->realParent() === false) {
if ($node->type == Node::CONTAINER && count($node->children) == 0 && $GLOBALS['is_ajax_request'] != true) {
return '';
}
$retval .= '<li class="' . trim($class . ' ' . $node->classes) . '">';
$sterile = array('events', 'triggers', 'functions', 'procedures', 'views', 'columns', 'indexes');
$parentName = '';
$parents = $node->parents(false, true);
if (count($parents)) {
$parentName = $parents[0]->real_name;
}
// if node name itself is in sterile, then allow
if ($node->is_group || !in_array($parentName, $sterile) && !$node->isNew || in_array($node->real_name, $sterile)) {
$retval .= "<div class='block'>";
$iClass = '';
if ($class == 'first') {
$iClass = " class='first'";
}
$retval .= "<i{$iClass}></i>";
if (strpos($class, 'last') === false) {
$retval .= "<b></b>";
}
$match = $this->_findTreeMatch($this->_aPath, $paths['aPath_clean']);
$match |= $this->_findTreeMatch($this->_vPath, $paths['vPath_clean']);
$retval .= '<a class="' . $node->getCssClasses($match) . '"';
$retval .= " href='#'>";
$retval .= "<span class='hide aPath'>";
$retval .= $paths['aPath'];
$retval .= "</span>";
$retval .= "<span class='hide vPath'>";
$retval .= $paths['vPath'];
$retval .= "</span>";
$retval .= "<span class='hide pos'>";
$retval .= $this->_pos;
$retval .= "</span>";
$retval .= $this->_getPaginationParamsHtml($node);
$retval .= $node->getIcon($match);
$retval .= "</a>";
$retval .= "</div>";
} else {
$retval .= "<div class='block'>";
$iClass = '';
if ($class == 'first') {
$iClass = " class='first'";
}
$retval .= "<i{$iClass}></i>";
$retval .= $this->_getPaginationParamsHtml($node);
$retval .= "</div>";
}
$linkClass = '';
$haveAjax = array('functions', 'procedures', 'events', 'triggers', 'indexes');
$parent = $node->parents(false, true);
$isNewView = $parent[0]->real_name == 'views' && $node->isNew == true;
if ($parent[0]->type == Node::CONTAINER && (in_array($parent[0]->real_name, $haveAjax) || $isNewView)) {
$linkClass = ' ajax';
}
if ($node->type == Node::CONTAINER) {
$retval .= "<i>";
}
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
$retval .= "<div class='block'>";
if (isset($node->links['icon'])) {
$args = array();
foreach ($node->parents(true) as $parent) {
$args[] = urlencode($parent->real_name);
}
$link = vsprintf($node->links['icon'], $args);
if ($linkClass != '') {
$retval .= "<a class='{$linkClass}' href='{$link}'>";
$retval .= "{$node->icon}</a>";
} else {
$retval .= "<a href='{$link}'>{$node->icon}</a>";
}
} else {
$retval .= "<u>{$node->icon}</u>";
}
$retval .= "</div>";
}
if (isset($node->links['text'])) {
$args = array();
foreach ($node->parents(true) as $parent) {
$args[] = urlencode($parent->real_name);
}
$link = vsprintf($node->links['text'], $args);
$title = empty($node->links['title']) ? '' : $node->links['title'];
if ($node->type == Node::CONTAINER) {
$retval .= " <a class='hover_show_full' href='{$link}'>";
//.........這裏部分代碼省略.........
示例9: PMA_getHtmlForAddColumn
/**
* Get HTML snippet for "Add column" feature in structure table
*
* @param array $columns_list column list array
*
* @return string $html_output
*/
function PMA_getHtmlForAddColumn($columns_list)
{
$html_output = '<form method="post" action="tbl_addfield.php" ' . 'id="addColumns" name="addColumns" ' . 'onsubmit="return checkFormElementInRange(' . 'this, \'num_fields\', \'' . str_replace('\'', '\\\'', __('You have to add at least one column.')) . '\', 1)' . '">';
$html_output .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
if (PMA_Util::showIcons('ActionLinksMode')) {
$html_output .= PMA_Util::getImage('b_insrow.png', __('Add column'));
$html_output .= ' ';
}
$num_fields = '<input type="number" name="num_fields" ' . 'value="1" onfocus="this.select()" ' . 'min="1" required />';
$html_output .= sprintf(__('Add %s column(s)'), $num_fields);
// I tried displaying the drop-down inside the label but with Firefox
// the drop-down was blinking
$column_selector = '<select name="after_field" ' . 'onchange="checkFirst()">';
$column_selector .= '<option ' . 'value="first" data-pos = "first">' . __('at beginning of table') . '</option>';
$cols_count = count($columns_list);
foreach ($columns_list as $one_column_name) {
//by default select the last column (add column at the end of the table)
if (--$cols_count == 0) {
$column_selector .= '<option ' . 'value="' . htmlspecialchars($one_column_name) . '" selected="selected">';
} else {
$column_selector .= '<option ' . 'value="' . htmlspecialchars($one_column_name) . '">';
}
$column_selector .= sprintf(__('after %s'), htmlspecialchars($one_column_name)) . '</option>';
}
$column_selector .= '</select>';
$html_output .= '<input type="hidden" name="field_where" value="after"/>';
$html_output .= ' ';
$html_output .= $column_selector;
$html_output .= '<input type="submit" value="' . __('Go') . '" />' . '</form>';
return $html_output;
}
示例10: __
</th>
<th><?php
echo __('Action');
?>
</th>
<th><?php
echo __('Show');
?>
</th>
</tr>
</thead>
<tbody>
<?php
// Print out information about versions
$drop_image_or_text = '';
if (PMA_Util::showIcons('ActionLinksMode')) {
$drop_image_or_text .= PMA_Util::getImage('b_drop.png', __('Delete tracking data for this table'));
}
if (PMA_Util::showText('ActionLinksMode')) {
$drop_image_or_text .= __('Drop');
}
$style = 'odd';
while ($one_result = $GLOBALS['dbi']->fetchArray($all_tables_result)) {
list($table_name, $version_number) = $one_result;
$table_query = ' SELECT * FROM ' . PMA_Util::backquote($cfgRelation['db']) . '.' . PMA_Util::backquote($cfgRelation['tracking']) . ' WHERE `db_name` = \'' . PMA_Util::sqlAddSlashes($_REQUEST['db']) . '\' AND `table_name` = \'' . PMA_Util::sqlAddSlashes($table_name) . '\' AND `version` = \'' . $version_number . '\'';
$table_result = PMA_queryAsControlUser($table_query);
$version_data = $GLOBALS['dbi']->fetchArray($table_result);
$tmp_link = 'tbl_tracking.php' . $url_query . '&table=' . htmlspecialchars($version_data['table_name']);
$delete_link = 'db_tracking.php' . $url_query . '&table=' . htmlspecialchars($version_data['table_name']) . '&delete_tracking=true&';
?>
<tr class="noclick <?php
示例11: displaySchemaGenerationOptions
/**
* show Export relational schema generation options
* user can select export type of his own choice
* and the attributes related to it
*
* @return void
* @access public
*/
public function displaySchemaGenerationOptions()
{
global $cfg, $db, $test_rs, $chpage;
$htmlString = '<form method="post" action="schema_export.php"' . ' class="disableAjax">' . '<fieldset>' . '<legend>' . PMA_URL_getHiddenInputs($db);
if (PMA_Util::showIcons('ActionLinksMode')) {
$htmlString .= PMA_Util::getImage('b_views.png');
}
/*
* TODO: This list should be generated dynamically based on list of
* available plugins.
*/
$htmlString .= __('Display relational schema') . ':' . '</legend>' . '<select name="export_type" id="export_type">';
if (file_exists(TCPDF_INC)) {
$htmlString .= '<option value="pdf" selected="selected">PDF</option>';
}
$htmlString .= '<option value="svg">SVG</option>' . '<option value="dia">DIA</option>' . '<option value="eps">EPS</option>' . '</select>' . '<label>' . __('Select Export Relational Type') . '</label><br />';
if (isset($test_rs)) {
$htmlString .= '<label for="pdf_page_number_opt">' . __('Page number:') . '</label>' . '<select name="pdf_page_number" id="pdf_page_number_opt">';
while ($pages = @$GLOBALS['dbi']->fetchAssoc($test_rs)) {
$htmlString .= '<option value="' . $pages['page_nr'] . '">' . $pages['page_nr'] . ': ' . htmlspecialchars($pages['page_descr']) . '</option>' . "\n";
}
// end while
$GLOBALS['dbi']->freeResult($test_rs);
unset($test_rs);
$htmlString .= '</select><br />';
} else {
$htmlString .= '<input type="hidden" name="pdf_page_number"' . ' value="' . htmlspecialchars($this->chosenPage) . '" />';
}
$htmlString .= '<input type="hidden" name="do" value="process_export" />' . '<input type="hidden" name="chpage" value="' . $chpage . '" />' . '<input type="checkbox" name="show_grid" id="show_grid_opt" />' . '<label for="show_grid_opt">' . __('Show grid') . '</label><br />' . '<input type="checkbox" name="show_color"' . ' id="show_color_opt" checked="checked" />' . '<label for="show_color_opt">' . __('Show color') . '</label>' . '<br />' . '<input type="checkbox" name="show_table_dimension"' . ' id="show_table_dim_opt" />' . '<label for="show_table_dim_opt">' . __('Show dimension of tables') . '</label><br />' . '<input type="checkbox" name="all_tables_same_width"' . ' id="all_tables_same_width" />' . '<label for="all_tables_same_width">' . __('Same width for all tables') . '</label><br />' . '<input type="checkbox" name="with_doc"' . ' id="with_doc" checked="checked" />' . '<label for="with_doc">' . __('Data Dictionary') . '</label><br />' . '<input type="checkbox" name="show_keys" id="show_keys" />' . '<label for="show_keys">' . __('Only show keys') . '</label><br />' . '<select name="orientation" id="orientation_opt" class="paper-change">' . '<option value="L">' . __('Landscape') . '</option>' . '<option value="P">' . __('Portrait') . '</option>' . '</select>' . '<label for="orientation_opt">' . __('Orientation') . '</label>' . '<br />' . '<select name="paper" id="paper_opt" class="paper-change">';
foreach ($cfg['PDFPageSizes'] as $val) {
$htmlString .= '<option value="' . $val . '"';
if ($val == $cfg['PDFDefaultPageSize']) {
$htmlString .= ' selected="selected"';
}
$htmlString .= ' >' . $val . '</option>' . "\n";
}
$htmlString .= '</select>' . '<label for="paper_opt">' . __('Paper size') . '</label>' . '</fieldset>' . '<fieldset class="tblFooters">' . '<input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . '</form>';
echo $htmlString;
}
示例12: _renderNode
//.........這裏部分代碼省略.........
$retval .= "<span class='hide aPath'>";
$retval .= $paths['aPath'];
$retval .= "</span>";
$retval .= "<span class='hide vPath'>";
$retval .= $paths['vPath'];
$retval .= "</span>";
$retval .= "<span class='hide pos'>";
$retval .= $this->_pos;
$retval .= "</span>";
$retval .= $this->_getPaginationParamsHtml($node);
$retval .= $icon;
$retval .= "</a>";
$retval .= "</div>";
} else {
$retval .= "<div class='block'>";
$iClass = '';
if ($class == 'first') {
$iClass = " class='first'";
}
$retval .= "<i{$iClass}></i>";
$retval .= $this->_getPaginationParamsHtml($node);
$retval .= "</div>";
}
$linkClass = '';
$haveAjax = array('functions', 'procedures', 'events', 'triggers', 'indexes');
$parent = $node->parents(false, true);
$isNewView = $parent[0]->real_name == 'views' && $node->isNew == true;
if ($parent[0]->type == Node::CONTAINER && (in_array($parent[0]->real_name, $haveAjax) || $isNewView)) {
$linkClass = ' class="ajax"';
}
if ($node->type == Node::CONTAINER) {
$retval .= "<i>";
}
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
$retval .= "<div class='block'>";
if (isset($node->links['icon'])) {
$args = array();
foreach ($node->parents(true) as $parent) {
$args[] = urlencode($parent->real_name);
}
$link = vsprintf($node->links['icon'], $args);
$retval .= "<a{$linkClass} href='{$link}'>{$node->icon}</a>";
} else {
$retval .= "<u>{$node->icon}</u>";
}
$retval .= "</div>";
}
if (isset($node->links['text'])) {
$args = array();
foreach ($node->parents(true) as $parent) {
$args[] = urlencode($parent->real_name);
}
$link = vsprintf($node->links['text'], $args);
if ($node->type == Node::CONTAINER) {
$retval .= "<a href='{$link}'>";
$retval .= htmlspecialchars($node->name);
$retval .= "</a>";
} else {
$retval .= "<a{$linkClass} href='{$link}'>";
$retval .= htmlspecialchars($node->real_name);
$retval .= "</a>";
}
} else {
$retval .= "{$node->name}";
}
if ($node->type == Node::CONTAINER) {
示例13: PMA_getHtmlForExportRelationalSchemaView
/**
* Get HTML snippet for export relational schema view
*
* @param string $url_query Query string for link
*
* @return string $html_output
*/
function PMA_getHtmlForExportRelationalSchemaView($url_query)
{
$html_output = '<div class="operations_full_width">' . '<fieldset><a href="schema_edit.php?' . $url_query . '">';
if (PMA_Util::showIcons('ActionLinksMode')) {
$html_output .= PMA_Util::getImage('b_edit.png');
}
$html_output .= __('Edit or export relational schema') . '</a></fieldset>' . '</div>';
return $html_output;
}
示例14: _getSelfLink
/**
* Renders the link to open a new page
*
* @param string $url The url of the page
*
* @return string
*/
private function _getSelfLink($url)
{
$retval = '';
$retval .= '<div id="selflink" class="print_ignore">';
$retval .= '<a href="' . $url . '"' . ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
if (PMA_Util::showIcons('TabsMode')) {
$retval .= PMA_Util::getImage('window-new.png', __('Open new phpMyAdmin window'));
} else {
$retval .= __('Open new phpMyAdmin window');
}
$retval .= '</a>';
$retval .= '</div>';
return $retval;
}
示例15: PMA_getHtmlForAddColumn
/**
* Get HTML snippet for "Add column" feature in structure table
*
* @param array $columns_list column list array
*
* @return string $html_output
*/
function PMA_getHtmlForAddColumn($columns_list)
{
$html_output = '<form method="post" action="tbl_addfield.php" ' . 'id="addColumns" name="addColumns" ' . 'onsubmit="return checkFormElementInRange(' . 'this, \'num_fields\', \'' . str_replace('\'', '\\\'', __('You have to add at least one column.')) . '\', 1)' . '">';
$html_output .= PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
if (PMA_Util::showIcons('ActionLinksMode')) {
$html_output .= PMA_Util::getImage('b_insrow.png', __('Add column'));
}
$num_fields = '<input type="number" name="num_fields" ' . 'value="1" onfocus="this.select()" ' . 'min="1" required />';
$html_output .= sprintf(__('Add %s column(s)'), $num_fields);
// I tried displaying the drop-down inside the label but with Firefox
// the drop-down was blinking
$column_selector = '<select name="after_field" ' . 'onclick="this.form.field_where[2].checked=true" ' . 'onchange="this.form.field_where[2].checked=true">';
foreach ($columns_list as $one_column_name) {
$column_selector .= '<option ' . 'value="' . htmlspecialchars($one_column_name) . '">' . htmlspecialchars($one_column_name) . '</option>';
}
$column_selector .= '</select>';
$choices = array('last' => __('At End of Table'), 'first' => __('At Beginning of Table'), 'after' => sprintf(__('After %s'), ''));
$html_output .= PMA_Util::getRadioFields('field_where', $choices, 'last', false);
$html_output .= $column_selector;
$html_output .= '<input type="submit" value="' . __('Go') . '" />' . '</form>';
return $html_output;
}