Ejemplo n.º 1
0
 /**
  * Returns the HTML for secondary levels tabs of the table search page
  *
  * @return string HTML for secondary levels tabs
  */
 public function getSecondaryTabs()
 {
     $url_params = array();
     $url_params['db'] = $this->_db;
     $url_params['table'] = $this->_table;
     $html_output = '<ul id="topmenu2">';
     foreach ($this->_getSubTabs() as $tab) {
         $html_output .= PMA_Util::getHtmlTab($tab, $url_params);
     }
     $html_output .= '</ul>';
     $html_output .= '<div class="clearfloat"></div>';
     return $html_output;
 }
Ejemplo n.º 2
0
/**
 * Returns the HTML for secondary levels tabs of the table structure page
 *
 * @return string HTML for secondary levels tabs
 */
function PMA_getStructureSecondaryTabs($tbl_storage_engine)
{
    $html_output = '';
    $cfgRelation = PMA_getRelationsParam();
    if ($cfgRelation['relwork'] || PMA_Util::isForeignKeySupported(strtoupper($tbl_storage_engine))) {
        $url_params = array();
        $url_params['db'] = $GLOBALS['db'];
        $url_params['table'] = $GLOBALS['table'];
        $html_output .= '<ul id="topmenu2">';
        foreach (PMA_getStructureSubTabs() as $tab) {
            $html_output .= PMA_Util::getHtmlTab($tab, $url_params);
        }
        $html_output .= '</ul>';
        $html_output .= '<div class="clearfloat"></div>';
    }
    return $html_output;
}
 /**
  * Generates the table search form under table search tab
  *
  * @param string $goto      Goto URL
  * @param string $dataLabel Label for points in zoom plot
  *
  * @return string the generated HTML for table search form
  */
 public function getSelectionForm($goto, $dataLabel = null)
 {
     $url_params = array();
     $url_params['db'] = $this->_db;
     $url_params['table'] = $this->_table;
     $html_output = '<ul id="topmenu2">';
     foreach ($this->_getSubTabs() as $tab) {
         $html_output .= PMA_Util::getHtmlTab($tab, $url_params);
     }
     $html_output .= '</ul>';
     $html_output .= '<div class="clearfloat"></div>';
     $html_output .= $this->_getFormTag($goto);
     if ($this->_searchType == 'zoom') {
         $html_output .= '<fieldset id="fieldset_zoom_search">';
         $html_output .= '<fieldset id="inputSection">';
         $html_output .= '<legend>' . __('Do a "query by example" (wildcard: "%") for two different columns') . '</legend>';
         $html_output .= $this->_getFieldsTableHtml();
         $html_output .= $this->_getOptionsZoom($dataLabel);
         $html_output .= '</fieldset>';
         $html_output .= '</fieldset>';
     } else {
         $html_output .= '<fieldset id="fieldset_table_search">';
         $html_output .= '<fieldset id="fieldset_table_qbe">';
         $html_output .= '<legend>' . __('Do a "query by example" (wildcard: "%")') . '</legend>';
         $html_output .= $this->_getFieldsTableHtml();
         $html_output .= '<div id="gis_editor"></div>';
         $html_output .= '<div id="popup_background"></div>';
         $html_output .= '</fieldset>';
         $html_output .= $this->_getOptions();
         $html_output .= '</fieldset>';
     }
     /**
      * Displays selection form's footer elements
      */
     $html_output .= '<fieldset class="tblFooters">';
     $html_output .= '<input type="submit" name="' . ($this->_searchType == 'zoom' ? 'zoom_submit' : 'submit') . ($this->_searchType == 'zoom' ? '" id="inputFormSubmitId"' : '" ') . 'value="' . __('Go') . '" />';
     $html_output .= '</fieldset></form>';
     $html_output .= '<div id="sqlqueryresults"></div>';
     return $html_output;
 }
Ejemplo n.º 4
0
    exit;
}
// build user preferences menu
$form_param = isset($_GET['form']) ? $_GET['form'] : null;
if (!isset($forms[$form_param])) {
    $forms_keys = array_keys($forms);
    $form_param = array_shift($forms_keys);
}
$tabs_icons = array('Features' => 'b_tblops.png', 'Sql_queries' => 'b_sql.png', 'Navi_panel' => 'b_select.png', 'Main_panel' => 'b_props.png', 'Import' => 'b_import.png', 'Export' => 'b_export.png');
echo '<ul id="topmenu2" class="user_prefs_tabs">';
echo PMA_Util::getHtmlTab(array('link' => 'prefs_manage.php', 'text' => __('Manage your settings'))) . "\n";
echo '<li>&nbsp; &nbsp;</li>' . "\n";
$script_name = basename($GLOBALS['PMA_PHP_SELF']);
foreach (array_keys($forms) as $formset) {
    $tab = array('link' => 'prefs_forms.php', 'text' => PMA_lang('Form_' . $formset), 'icon' => $tabs_icons[$formset], 'active' => $script_name == 'prefs_forms.php' && $formset == $form_param);
    echo PMA_Util::getHtmlTab($tab, array('form' => $formset)) . "\n";
}
echo '</ul><div class="clearfloat"></div>';
// show "configuration saved" message and reload navigation panel if needed
if (!empty($_GET['saved'])) {
    PMA_Message::rawSuccess(__('Configuration has been saved.'))->display();
}
/* debug code
$arr = $cf->getConfigArray();
$arr2 = array();
foreach ($arr as $k => $v) {
    $arr2[] = "<b>$k</b> " . var_export($v, true);
}
$arr2 = implode(', ', $arr2);
$arr2 .= '<br />Blacklist: ' . (empty($cfg['UserprefsDisallow'])
        ? '<i>empty</i>'
if (!defined('PHPMYADMIN')) {
    exit;
}
// build user preferences menu
$form_param = isset($_GET['form']) ? $_GET['form'] : null;
if (!isset($forms[$form_param])) {
    $forms_keys = array_keys($forms);
    $form_param = array_shift($forms_keys);
}
$tabs_icons = array('Features' => 'b_tblops.png', 'Sql_queries' => 'b_sql.png', 'Navi_panel' => 'b_select.png', 'Main_panel' => 'b_props.png', 'Import' => 'b_import.png', 'Export' => 'b_export.png');
require_once './libraries/Template.class.php';
$content = PMA_Util::getHtmlTab(array('link' => 'prefs_manage.php', 'text' => __('Manage your settings'))) . "\n";
$script_name = basename($GLOBALS['PMA_PHP_SELF']);
foreach (array_keys($forms) as $formset) {
    $tab = array('link' => 'prefs_forms.php', 'text' => PMA_lang('Form_' . $formset), 'icon' => $tabs_icons[$formset], 'active' => $script_name == 'prefs_forms.php' && $formset == $form_param);
    $content .= PMA_Util::getHtmlTab($tab, array('form' => $formset)) . "\n";
}
echo PMA\Template::get('list/unordered')->render(array('id' => 'topmenu2', 'class' => 'user_prefs_tabs', 'content' => $content));
echo '<div class="clearfloat"></div>';
// show "configuration saved" message and reload navigation panel if needed
if (!empty($_GET['saved'])) {
    PMA_Message::rawSuccess(__('Configuration has been saved.'))->display();
}
/* debug code
$arr = $cf->getConfigArray();
$arr2 = array();
foreach ($arr as $k => $v) {
    $arr2[] = "<b>$k</b> " . var_export($v, true);
}
$arr2 = implode(', ', $arr2);
$arr2 .= '<br />Blacklist: ' . (empty($cfg['UserprefsDisallow'])