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


PHP PMA_getMaintainActionlink函数代码示例

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


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

示例1: PMA_getListofMaintainActionLink

/**
 * Get HTML 'li' having a link of maintain action
 *
 * @param boolean $is_myisam_or_aria whether MYISAM | ARIA or not
 * @param boolean $is_innodb         whether innodb or not
 * @param array   $url_params        array of URL parameters
 * @param boolean $is_berkeleydb     whether  berkeleydb or not
 *
 * @return string $html_output
 */
function PMA_getListofMaintainActionLink($is_myisam_or_aria, $is_innodb, $url_params, $is_berkeleydb)
{
    $html_output = '';
    // analyze table
    if ($is_innodb || $is_myisam_or_aria || $is_berkeleydb) {
        $params = array('sql_query' => 'ANALYZE TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Analyze table'), $params, $url_params, 'ANALYZE_TABLE');
    }
    // check table
    if ($is_myisam_or_aria || $is_innodb) {
        $params = array('sql_query' => 'CHECK TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Check table'), $params, $url_params, 'CHECK_TABLE');
    }
    // checksum table
    $params = array('sql_query' => 'CHECKSUM TABLE ' . Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
    $html_output .= PMA_getMaintainActionlink(__('Checksum table'), $params, $url_params, 'CHECKSUM_TABLE');
    // defragment table
    if ($is_innodb) {
        $params = array('sql_query' => 'ALTER TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']) . ' ENGINE = InnoDB;');
        $html_output .= PMA_getMaintainActionlink(__('Defragment table'), $params, $url_params, 'InnoDB_File_Defragmenting');
    }
    // flush table
    $params = array('sql_query' => 'FLUSH TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']), 'message_to_show' => sprintf(__('Table %s has been flushed.'), htmlspecialchars($GLOBALS['table'])), 'reload' => 1);
    $html_output .= PMA_getMaintainActionlink(__('Flush the table (FLUSH)'), $params, $url_params, 'FLUSH');
    // optimize table
    if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
        $params = array('sql_query' => 'OPTIMIZE TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Optimize table'), $params, $url_params, 'OPTIMIZE_TABLE');
    }
    // repair table
    if ($is_myisam_or_aria) {
        $params = array('sql_query' => 'REPAIR TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Repair table'), $params, $url_params, 'REPAIR_TABLE');
    }
    return $html_output;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:46,代码来源:operations.lib.php

示例2: testGetMaintainActionlink

 /**
  * Test for PMA_getMaintainActionlink
  *
  * @return void
  */
 public function testGetMaintainActionlink()
 {
     $this->assertRegExp('/.*href="sql.php.*post.*/', PMA_getMaintainActionlink("post", array("name" => 'foo', "value" => 'bar'), array(), 'doclink'));
 }
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:9,代码来源:PMA_operations_test.php

示例3: PMA_getListofMaintainActionLink

/**
 * Get HTML 'li' having a link of maintain action
 *
 * @param Table   $pma_table  Table object
 * @param array   $url_params Array of URL parameters
 *
 * @return string $html_output
 */
function PMA_getListofMaintainActionLink($pma_table, $url_params)
{
    $html_output = '';
    // analyze table
    if ($pma_table->isEngine(array('MYISAM', 'ARIA', 'INNODB', 'BERKELEYDB'))) {
        $params = array('sql_query' => 'ANALYZE TABLE ' . Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Analyze table'), $params, $url_params, 'ANALYZE_TABLE');
    }
    // check table
    if ($pma_table->isEngine(array('MYISAM', 'ARIA', 'INNODB'))) {
        $params = array('sql_query' => 'CHECK TABLE ' . Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Check table'), $params, $url_params, 'CHECK_TABLE');
    }
    // checksum table
    $params = array('sql_query' => 'CHECKSUM TABLE ' . Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
    $html_output .= PMA_getMaintainActionlink(__('Checksum table'), $params, $url_params, 'CHECKSUM_TABLE');
    // defragment table
    if ($pma_table->isEngine(array('INNODB'))) {
        $params = array('sql_query' => 'ALTER TABLE ' . Util::backquote($GLOBALS['table']) . ' ENGINE = InnoDB;');
        $html_output .= PMA_getMaintainActionlink(__('Defragment table'), $params, $url_params, 'InnoDB_File_Defragmenting');
    }
    // flush table
    $params = array('sql_query' => 'FLUSH TABLE ' . Util::backquote($GLOBALS['table']), 'message_to_show' => sprintf(__('Table %s has been flushed.'), htmlspecialchars($GLOBALS['table'])), 'reload' => 1);
    $html_output .= PMA_getMaintainActionlink(__('Flush the table (FLUSH)'), $params, $url_params, 'FLUSH');
    // optimize table
    if ($pma_table->isEngine(array('MYISAM', 'ARIA', 'INNODB', 'BERKELEYDB'))) {
        $params = array('sql_query' => 'OPTIMIZE TABLE ' . Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Optimize table'), $params, $url_params, 'OPTIMIZE_TABLE');
    }
    // repair table
    if ($pma_table->isEngine(array('MYISAM', 'ARIA'))) {
        $params = array('sql_query' => 'REPAIR TABLE ' . Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
        $html_output .= PMA_getMaintainActionlink(__('Repair table'), $params, $url_params, 'REPAIR_TABLE');
    }
    return $html_output;
}
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:44,代码来源:operations.lib.php

示例4: PMA_getListofMaintainActionLink

/**
 * Get HTML 'li' having a link of maintain action
 *
 * @param boolean $is_myisam_or_aria whether MYISAM | ARIA or not
 * @param boolean $is_innodb         whether innodb or not
 * @param array   $url_params        array of URL parameters
 * @param boolean $is_berkeleydb     whether  berkeleydb or not
 *
 * @return string $html_output
 */
function PMA_getListofMaintainActionLink($is_myisam_or_aria, $is_innodb, $url_params, $is_berkeleydb)
{
    $html_output = '';
    if ($is_myisam_or_aria || $is_innodb || $is_berkeleydb) {
        if ($is_myisam_or_aria || $is_innodb) {
            $params = array('sql_query' => 'CHECK TABLE ' . PMA_Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
            $html_output .= PMA_getMaintainActionlink(__('Check table'), $params, $url_params, 'CHECK_TABLE');
        }
        if ($is_innodb) {
            $params = array('sql_query' => 'ALTER TABLE ' . PMA_Util::backquote($GLOBALS['table']) . ' ENGINE = InnoDB;');
            $html_output .= PMA_getMaintainActionlink(__('Defragment table'), $params, $url_params, 'InnoDB_File_Defragmenting', 'Table_types');
        }
        if ($is_innodb || $is_myisam_or_aria || $is_berkeleydb) {
            $params = array('sql_query' => 'ANALYZE TABLE ' . PMA_Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
            $html_output .= PMA_getMaintainActionlink(__('Analyze table'), $params, $url_params, 'ANALYZE_TABLE');
        }
        if ($is_myisam_or_aria && !PMA_DRIZZLE) {
            $params = array('sql_query' => 'REPAIR TABLE ' . PMA_Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
            $html_output .= PMA_getMaintainActionlink(__('Repair table'), $params, $url_params, 'REPAIR_TABLE');
        }
        if (($is_myisam_or_aria || $is_innodb || $is_berkeleydb) && !PMA_DRIZZLE) {
            $params = array('sql_query' => 'OPTIMIZE TABLE ' . PMA_Util::backquote($GLOBALS['table']), 'table_maintenance' => 'Go');
            $html_output .= PMA_getMaintainActionlink(__('Optimize table'), $params, $url_params, 'OPTIMIZE_TABLE');
        }
    }
    // end MYISAM or BERKELEYDB case
    $params = array('sql_query' => 'FLUSH TABLE ' . PMA_Util::backquote($GLOBALS['table']), 'message_to_show' => sprintf(__('Table %s has been flushed.'), htmlspecialchars($GLOBALS['table'])), 'reload' => 1);
    $html_output .= PMA_getMaintainActionlink(__('Flush the table (FLUSH)'), $params, $url_params, 'FLUSH');
    return $html_output;
}
开发者ID:FilipeRamosFernandes,项目名称:phpmyadmin,代码行数:40,代码来源:operations.lib.php


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