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


PHP PMA_getPlugins函数代码示例

本文整理汇总了PHP中PMA_getPlugins函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getPlugins函数的具体用法?PHP PMA_getPlugins怎么用?PHP PMA_getPlugins使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: PMA_getHtmlForSchemaExport

/**
 * Function to get html for displaying the schema export
 *
 * @param string $db   database name
 * @param int    $page the page to be exported
 *
 * @return string
 */
function PMA_getHtmlForSchemaExport($db, $page)
{
    /* Scan for schema plugins */
    /* @var $export_list SchemaPlugin[] */
    $export_list = PMA_getPlugins("schema", 'libraries/plugins/schema/', null);
    /* Fail if we didn't find any schema plugin */
    if (empty($export_list)) {
        return Message::error(__('Could not load schema plugins, please check your installation!'))->getDisplay();
    }
    return PMA\libraries\Template::get('database/designer/schema_export')->render(array('db' => $db, 'page' => $page, 'export_list' => $export_list));
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:19,代码来源:db_designer.lib.php

示例2: PMA_exportCheckboxCheck

require_once './libraries/file_listing.php';
require_once './libraries/plugin_interface.lib.php';
function PMA_exportCheckboxCheck($str)
{
    if (isset($GLOBALS['cfg']['Export'][$str]) && $GLOBALS['cfg']['Export'][$str]) {
        echo ' checked="checked"';
    }
}
function PMA_exportIsActive($what, $val)
{
    if (isset($GLOBALS['cfg']['Export'][$what]) && $GLOBALS['cfg']['Export'][$what] == $val) {
        echo ' checked="checked"';
    }
}
/* Scan for plugins */
$export_list = PMA_getPlugins('./libraries/export/', array('export_type' => $export_type, 'single_table' => isset($single_table)));
/* Fail if we didn't find any plugin */
if (empty($export_list)) {
    PMA_Message::error('strCanNotLoadExportPlugins')->display();
    require './libraries/footer.inc.php';
}
?>

<form method="post" action="export.php" name="dump">

<?php 
if ($export_type == 'server') {
    echo PMA_generate_common_hidden_inputs('', '', 1);
} elseif ($export_type == 'database') {
    echo PMA_generate_common_hidden_inputs($db, '', 1);
} else {
开发者ID:alexhava,项目名称:elixirjuice,代码行数:31,代码来源:display_export.lib.php

示例3: PMA_getImportDisplay

/**
 * Gets HTML to display import dialogs
 *
 * @param String $import_type     Import type: server|database|table
 * @param String $db              Selected DB
 * @param String $table           Selected Table
 * @param int    $max_upload_size Max upload size
 *
 * @return string $html
 */
function PMA_getImportDisplay($import_type, $db, $table, $max_upload_size)
{
    global $SESSION_KEY;
    include_once './libraries/file_listing.lib.php';
    include_once './libraries/plugin_interface.lib.php';
    include_once './libraries/display_import_ajax.lib.php';
    list($SESSION_KEY, $upload_id, $plugins) = PMA_uploadProgressSetup();
    /* Scan for plugins */
    /* @var $import_list ImportPlugin[] */
    $import_list = PMA_getPlugins("import", 'libraries/plugins/import/', $import_type);
    /* Fail if we didn't find any plugin */
    if (empty($import_list)) {
        Message::error(__('Could not load import plugins, please check your installation!'))->display();
        exit;
    }
    if (PMA_isValid($_REQUEST['offset'], 'numeric')) {
        $offset = $_REQUEST['offset'];
    }
    if (isset($_REQUEST['timeout_passed'])) {
        $timeout_passed = $_REQUEST['timeout_passed'];
    }
    $local_import_file = '';
    if (isset($_REQUEST['local_import_file'])) {
        $local_import_file = $_REQUEST['local_import_file'];
    }
    $timeout_passed_str = isset($timeout_passed) ? $timeout_passed : null;
    $offset_str = isset($offset) ? $offset : null;
    return PMA_getHtmlForImport($upload_id, $import_type, $db, $table, $max_upload_size, $import_list, $timeout_passed_str, $offset_str, $local_import_file);
}
开发者ID:kokigit,项目名称:phpmyadmin,代码行数:39,代码来源:display_import.lib.php

示例4: PMA_getHtmlForSchemaExport

/**
 * Function to get html for displaying the schema export
 *
 * @param string $db   database name
 * @param int    $page the page to be exported
 *
 * @return string
 */
function PMA_getHtmlForSchemaExport($db, $page)
{
    /* Scan for schema plugins */
    $export_list = PMA_getPlugins("schema", 'libraries/plugins/schema/', null);
    /* Fail if we didn't find any schema plugin */
    if (empty($export_list)) {
        return PMA_Message::error(__('Could not load schema plugins, please check your installation!'))->getDisplay();
    }
    $htmlString = '<form method="post" action="schema_export.php"' . ' class="disableAjax" id="id_export_pages">';
    $htmlString .= '<fieldset>';
    $htmlString .= PMA_URL_getHiddenInputs($db);
    $htmlString .= '<label>' . __('Select Export Relational Type') . '</label><br />';
    $htmlString .= PMA_pluginGetChoice('Schema', 'export_type', $export_list, 'format');
    $htmlString .= '<input type="hidden" name="page_number"' . ' value="' . htmlspecialchars($page) . '" />';
    $htmlString .= PMA_pluginGetOptions('Schema', $export_list);
    $htmlString .= '</fieldset>';
    $htmlString .= '</form>';
    return $htmlString;
}
开发者ID:singhneeraj,项目名称:fr-store,代码行数:27,代码来源:db_designer.lib.php

示例5: PMA_getExportDisplay

/**
 * Gets HTML to display export dialogs
 *
 * @param String $export_type    export type: server|database|table
 * @param String $db             selected DB
 * @param String $table          selected table
 * @param String $sql_query      SQL query
 * @param Int    $num_tables     number of tables
 * @param Int    $unlim_num_rows unlimited number of rows
 * @param String $multi_values   selector options
 *
 * @return string $html
 */
function PMA_getExportDisplay($export_type, $db, $table, $sql_query, $num_tables, $unlim_num_rows, $multi_values)
{
    $cfgRelation = PMA_getRelationsParam();
    if (isset($_REQUEST['single_table'])) {
        $GLOBALS['single_table'] = $_REQUEST['single_table'];
    }
    include_once './libraries/file_listing.lib.php';
    include_once './libraries/plugin_interface.lib.php';
    include_once './libraries/display_export.lib.php';
    /* Scan for plugins */
    /* @var $export_list ExportPlugin[] */
    $export_list = PMA_getPlugins("export", 'libraries/plugins/export/', array('export_type' => $export_type, 'single_table' => isset($GLOBALS['single_table'])));
    /* Fail if we didn't find any plugin */
    if (empty($export_list)) {
        Message::error(__('Could not load export plugins, please check your installation!'))->display();
        exit;
    }
    $html = PMA_getHtmlForExportOptionHeader($export_type, $db, $table);
    if ($cfgRelation['exporttemplateswork']) {
        $html .= PMA_getHtmlForExportTemplateLoading($export_type);
    }
    $html .= '<form method="post" action="export.php" ' . ' name="dump" class="disableAjax">';
    //output Hidden Inputs
    $single_table_str = isset($GLOBALS['single_table']) ? $GLOBALS['single_table'] : '';
    $html .= PMA_getHtmlForHiddenInput($export_type, $db, $table, $single_table_str, $sql_query);
    //output Export Options
    $html .= PMA_getHtmlForExportOptions($export_type, $db, $table, $multi_values, $num_tables, $export_list, $unlim_num_rows);
    $html .= '</form>';
    return $html;
}
开发者ID:nijel,项目名称:phpmyadmin,代码行数:43,代码来源:display_export.lib.php

示例6: PMA_getPlugins

/**
 *
 * @package PhpMyAdmin
 */
if (!defined('PHPMYADMIN')) {
    exit;
}
/**
 *
 */
require_once './libraries/file_listing.php';
require_once './libraries/plugin_interface.lib.php';
require_once './libraries/display_import_ajax.lib.php';
$common_functions = PMA_CommonFunctions::getInstance();
/* Scan for plugins */
$import_list = PMA_getPlugins("import", 'libraries/plugins/import/', $import_type);
/* Fail if we didn't find any plugin */
if (empty($import_list)) {
    PMA_Message::error(__('Could not load import plugins, please check your installation!'))->display();
    exit;
}
?>

<iframe id="import_upload_iframe" name="import_upload_iframe" width="1" height="1" style="display: none;"></iframe>
<div id="import_form_status" style="display: none;"></div>
<div id="importmain">
    <img src="<?php 
echo $GLOBALS['pmaThemeImage'];
?>
ajax_clock_small.gif" width="16" height="16" alt="ajax clock" style="display: none;" />
    <script type="text/javascript">
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:31,代码来源:display_import.lib.php

示例7: PMA_getPlugins

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 *
 * @package PhpMyAdmin
 */
if (!defined('PHPMYADMIN')) {
    exit;
}
/**
 *
 */
require_once './libraries/file_listing.php';
require_once './libraries/plugin_interface.lib.php';
require_once './libraries/display_import_ajax.lib.php';
/* Scan for plugins */
$import_list = PMA_getPlugins('./libraries/import/', $import_type);
/* Fail if we didn't find any plugin */
if (empty($import_list)) {
    PMA_Message::error(__('Could not load import plugins, please check your installation!'))->display();
    include './libraries/footer.inc.php';
}
?>

<iframe id="import_upload_iframe" name="import_upload_iframe" width="1" height="1" style="display: none;"></iframe>
<div id="import_form_status" style="display: none;"></div>
<div id="importmain">
    <img src="<?php 
echo $GLOBALS['pmaThemeImage'];
?>
ajax_clock_small.gif" alt="ajax clock" style="display: none;" />
    <script type="text/javascript">
开发者ID:AmberWish,项目名称:laba_web,代码行数:31,代码来源:display_import.lib.php

示例8: testPMAGetHtmlForExportOptions

 /**
  * Test for PMA_getHtmlForExportOptions
  *
  * @return void
  */
 public function testPMAGetHtmlForExportOptions()
 {
     global $cfg;
     $cfg['Export']['method'] = "XML";
     $cfg['SaveDir'] = "/tmp";
     $export_type = "server";
     $db = "PMA";
     $table = "PMA_test";
     $multi_values_str = "multi_values_str";
     $num_tables_str = "10";
     $unlim_num_rows_str = "unlim_num_rows_str";
     $single_table = "single_table";
     PMA_Table::$cache[$db][$table]['ENGINE'] = "MERGE";
     $columns_info = array('test_column1' => array('COLUMN_NAME' => 'test_column1'), 'test_column2' => array('COLUMN_NAME' => 'test_column2'));
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     $dbi->expects($this->any())->method('getColumnsFull')->will($this->returnValue($columns_info));
     $GLOBALS['dbi'] = $dbi;
     /* Scan for plugins */
     $export_list = PMA_getPlugins("export", 'libraries/plugins/export/', array('export_type' => $export_type, 'single_table' => isset($single_table)));
     //Call the test function
     $html = PMA_getHtmlForExportOptions($export_type, $db, $table, $multi_values_str, $num_tables_str, $export_list, $unlim_num_rows_str);
     //validate 1: PMA_getHtmlForExportOptionHeader
     $this->assertContains('<div class="exportoptions" id="header">', $html);
     $this->assertContains(__('Exporting databases from the current server'), $html);
     //validate 2: PMA_getHtmlForExportOptionsMethod
     $this->assertContains($cfg['Export']['method'], $html);
     $this->assertContains('<div class="exportoptions" id="quick_or_custom">', $html);
     $this->assertContains(__('Export Method:'), $html);
     $this->assertContains(__('Custom - display all possible options'), $html);
     //validate 3: PMA_getHtmlForExportOptionsSelection
     $this->assertContains('<div class="exportoptions" id="databases_and_tables">', $html);
     $this->assertContains('<h3>' . __('Database(s):') . '</h3>', $html);
     $this->assertContains($multi_values_str, $html);
     //validate 4: PMA_getHtmlForExportOptionsQuickExport
     $this->assertContains('<input type="checkbox" name="onserver" value="saveit" ', $html);
     $dir = htmlspecialchars(PMA_Util::userDir($cfg['SaveDir']));
     $this->assertContains('Save on server in the directory <b>' . $dir . '</b>', $html);
     //validate 5: PMA_getHtmlForAliasModalDialog
     $this->assertContains('<div id="alias_modal" class="hide" title="' . 'Rename exported databases/tables/columns">', $html);
     $this->assertContains('Select database', $html);
     $this->assertContains('Select table', $html);
     $this->assertContains('New database name', $html);
     $this->assertContains('New table name', $html);
     $this->assertContains('test_column', $html);
     //validate 6: PMA_getHtmlForExportOptionsOutput
     $this->assertContains('<div class="exportoptions" id="output">', $html);
     $this->assertContains('user value for test', $html);
     //validate 7: PMA_getHtmlForExportOptionsFormat
     $this->assertContains('<div class="exportoptions" id="format">', $html);
     $this->assertContains('<h3>' . __('Format:') . '</h3>', $html);
 }
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:56,代码来源:PMA_display_export_test.php

示例9: testPMAGetHtmlForExportOptions

 /**
  * Test for PMA_getHtmlForExportOptions
  *
  * @return vgetUserValue
  */
 public function testPMAGetHtmlForExportOptions()
 {
     global $cfg;
     $cfg['Export']['method'] = "XML";
     $cfg['SaveDir'] = "/tmp";
     $export_type = "server";
     $db = "PMA";
     $table = "PMA_test";
     $multi_values_str = "multi_values_str";
     $num_tables_str = "10";
     $export_list = null;
     $unlim_num_rows_str = "unlim_num_rows_str";
     $single_table = "single_table";
     PMA_Table::$cache[$db][$table]['ENGINE'] = "MERGE";
     /* Scan for plugins */
     $export_list = PMA_getPlugins("export", 'libraries/plugins/export/', array('export_type' => $export_type, 'single_table' => isset($single_table)));
     //Call the test function
     $html = PMA_getHtmlForExportOptions($export_type, $db, $table, $multi_values_str, $num_tables_str, $export_list, $unlim_num_rows_str);
     //validate 1: PMA_getHtmlForExportOptionHeader
     $this->assertContains('<div class="exportoptions" id="header">', $html);
     $this->assertContains(__('Exporting databases from the current server'), $html);
     //validate 2: PMA_getHtmlForExportOptionsMethod
     $this->assertContains($cfg['Export']['method'], $html);
     $this->assertContains('<div class="exportoptions" id="quick_or_custom">', $html);
     $this->assertContains(__('Export Method:'), $html);
     $this->assertContains(__('Custom - display all possible options'), $html);
     //validate 3: PMA_getHtmlForExportOptionsSelection
     $this->assertContains('<div class="exportoptions" id="databases_and_tables">', $html);
     $this->assertContains('<h3>' . __('Database(s):') . '</h3>', $html);
     $this->assertContains($multi_values_str, $html);
     //validate 4: PMA_getHtmlForExportOptionsQuickExport
     $this->assertContains('<input type="checkbox" name="onserver" value="saveit" ', $html);
     $dir = htmlspecialchars(PMA_Util::userDir($cfg['SaveDir']));
     $this->assertContains('Save on server in the directory <b>' . $dir . '</b>', $html);
     //validate 5: PMA_getHtmlForExportOptionsOutput
     $this->assertContains('<div class="exportoptions" id="output">', $html);
     $this->assertContains('user value for test', $html);
     //validate 6: PMA_getHtmlForExportOptionsFormat
     $this->assertContains('<div class="exportoptions" id="format">', $html);
     $this->assertContains('<h3>' . __('Format:') . '</h3>', $html);
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:46,代码来源:PMA_display_export_test.php


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