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


PHP PMA_isValid函数代码示例

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


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

示例1: PMA_RTN_main

/**
 * Main function for the routines functionality
 *
 * @param string $type 'FUNCTION' for functions,
 *                     'PROCEDURE' for procedures,
 *                     null for both
 *
 * @return void
 */
function PMA_RTN_main($type)
{
    global $db;
    PMA_RTN_setGlobals();
    /**
     * Process all requests
     */
    PMA_RTN_handleEditor();
    PMA_RTN_handleExecute();
    PMA_RTN_handleExport();
    /**
     * Display a list of available routines
     */
    if (!PMA_isValid($type, array('FUNCTION', 'PROCEDURE'))) {
        $type = null;
    }
    $items = $GLOBALS['dbi']->getRoutines($db, $type);
    echo PMA_RTE_getList('routine', $items);
    /**
     * Display the form for adding a new routine, if the user has the privileges.
     */
    echo PMA_RTN_getFooterLinks();
    /**
     * Display a warning for users with PHP's old "mysql" extension.
     */
    if (!PMA\libraries\DatabaseInterface::checkDbExtension('mysqli')) {
        trigger_error(__('You are using PHP\'s deprecated \'mysql\' extension, ' . 'which is not capable of handling multi queries. ' . '[strong]The execution of some stored routines may fail![/strong] ' . 'Please use the improved \'mysqli\' extension to ' . 'avoid any problems.'), E_USER_WARNING);
    }
}
开发者ID:wp-cloud,项目名称:phpmyadmin,代码行数:38,代码来源:rte_routines.lib.php

示例2: PMA_RTN_main

/**
 * Main function for the routines functionality
 *
 * @param string $type 'FUNCTION' for functions,
 *                     'PROCEDURE' for procedures,
 *                     null for both
 *
 * @return void
 */
function PMA_RTN_main($type)
{
    global $db;
    PMA_RTN_setGlobals();
    /**
     * Process all requests
     */
    PMA_RTN_handleEditor();
    PMA_RTN_handleExecute();
    PMA_RTN_handleExport();
    /**
     * Display a list of available routines
     */
    $columns = "`SPECIFIC_NAME`, `ROUTINE_NAME`, `ROUTINE_TYPE`, ";
    $columns .= "`DTD_IDENTIFIER`, `ROUTINE_DEFINITION`";
    $where = "ROUTINE_SCHEMA='" . PMA_Util::sqlAddSlashes($db) . "'";
    if (PMA_isValid($type, array('FUNCTION', 'PROCEDURE'))) {
        $where .= " AND `ROUTINE_TYPE`='" . $type . "'";
    }
    $items = $GLOBALS['dbi']->fetchResult("SELECT {$columns} FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE {$where};");
    echo PMA_RTE_getList('routine', $items);
    /**
     * Display the form for adding a new routine, if the user has the privileges.
     */
    echo PMA_RTN_getFooterLinks();
    /**
     * Display a warning for users with PHP's old "mysql" extension.
     */
    if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') {
        trigger_error(__('You are using PHP\'s deprecated \'mysql\' extension, ' . 'which is not capable of handling multi queries. ' . '[strong]The execution of some stored routines may fail![/strong] ' . 'Please use the improved \'mysqli\' extension to ' . 'avoid any problems.'), E_USER_WARNING);
    }
}
开发者ID:yszar,项目名称:linuxwp,代码行数:41,代码来源:rte_routines.lib.php

示例3: PMA_ifSetOr

/**
 * checks given $var and returns it if valid, or $default of not valid
 * given $var is also checked for type being 'similar' as $default
 * or against any other type if $type is provided
 *
 * <code>
 * // $_REQUEST['db'] not set
 * echo PMA_ifSetOr($_REQUEST['db'], ''); // ''
 * // $_REQUEST['sql_query'] not set
 * echo PMA_ifSetOr($_REQUEST['sql_query']); // null
 * // $cfg['ForceSSL'] not set
 * echo PMA_ifSetOr($cfg['ForceSSL'], false, 'boolean'); // false
 * echo PMA_ifSetOr($cfg['ForceSSL']); // null
 * // $cfg['ForceSSL'] set to 1
 * echo PMA_ifSetOr($cfg['ForceSSL'], false, 'boolean'); // false
 * echo PMA_ifSetOr($cfg['ForceSSL'], false, 'similar'); // 1
 * echo PMA_ifSetOr($cfg['ForceSSL'], false); // 1
 * // $cfg['ForceSSL'] set to true
 * echo PMA_ifSetOr($cfg['ForceSSL'], false, 'boolean'); // true
 * </code>
 *
 * @param mixed &$var    param to check
 * @param mixed $default default value
 * @param mixed $type    var type or array of values to check against $var
 *
 * @return mixed   $var or $default
 *
 * @see     PMA_isValid()
 */
function PMA_ifSetOr(&$var, $default = null, $type = 'similar')
{
    if (!PMA_isValid($var, $type, $default)) {
        return $default;
    }
    return $var;
}
开发者ID:JohanArmando,项目名称:MaxCorpMedia,代码行数:36,代码来源:core.lib.php

示例4: factory

 /**
  * Returns the singleton instance of geometric class of the given type.
  *
  * @param string $type type of the geometric object
  *
  * @return PMA_GIS_Geometry the singleton instance of geometric class
  *                          of the given type
  *
  * @access public
  * @static
  */
 public static function factory($type)
 {
     include_once './libraries/gis/GIS_Geometry.class.php';
     $type_lower = strtolower($type);
     $file = './libraries/gis/GIS_' . ucfirst($type_lower) . '.class.php';
     if (!PMA_isValid($type_lower, PMA_Util::getGISDatatypes()) || !file_exists($file)) {
         return false;
     }
     if (include_once $file) {
         switch (strtoupper($type)) {
             case 'MULTIPOLYGON':
                 return PMA_GIS_Multipolygon::singleton();
             case 'POLYGON':
                 return PMA_GIS_Polygon::singleton();
             case 'MULTIPOINT':
                 return PMA_GIS_Multipoint::singleton();
             case 'POINT':
                 return PMA_GIS_Point::singleton();
             case 'MULTILINESTRING':
                 return PMA_GIS_Multilinestring::singleton();
             case 'LINESTRING':
                 return PMA_GIS_Linestring::singleton();
             case 'GEOMETRYCOLLECTION':
                 return PMA_GIS_Geometrycollection::singleton();
             default:
                 return false;
         }
     } else {
         return false;
     }
 }
开发者ID:FuhrerMalkovich,项目名称:Blogpost,代码行数:42,代码来源:GIS_Factory.class.php

示例5: PMA_generate_html_tab

/**
 * returns a tab for tabbed navigation.
 * If the variables $link and $args ar left empty, an inactive tab is created
 *
 * @param array $tab        array with all options
 * @param array $url_params
 *
 * @return  string  html code for one tab, a link if valid otherwise a span
 *
 * @access  public
 */
function PMA_generate_html_tab($tab, $url_params = array(), $base_dir = '')
{
    // default values
    $defaults = array('text' => '', 'class' => '', 'active' => null, 'link' => '', 'sep' => '?', 'attr' => '', 'args' => '', 'warning' => '', 'fragment' => '', 'id' => '');
    $tab = array_merge($defaults, $tab);
    // determine additionnal style-class
    if (empty($tab['class'])) {
        if (!empty($tab['active']) || PMA_isValid($GLOBALS['active_page'], 'identical', $tab['link'])) {
            $tab['class'] = 'active';
        } elseif (is_null($tab['active']) && empty($GLOBALS['active_page']) && basename($GLOBALS['PMA_PHP_SELF']) == $tab['link'] && empty($tab['warning'])) {
            $tab['class'] = 'active';
        }
    }
    if (!empty($tab['warning'])) {
        $tab['class'] .= ' error';
        $tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
    }
    // If there are any tab specific URL parameters, merge those with
    // the general URL parameters
    if (!empty($tab['url_params']) && is_array($tab['url_params'])) {
        $url_params = array_merge($url_params, $tab['url_params']);
    }
    // build the link
    if (!empty($tab['link'])) {
        $tab['link'] = htmlentities($tab['link']);
        $tab['link'] = $tab['link'] . PMA_generate_common_url($url_params);
        if (!empty($tab['args'])) {
            foreach ($tab['args'] as $param => $value) {
                $tab['link'] .= PMA_get_arg_separator('html') . urlencode($param) . '=' . urlencode($value);
            }
        }
    }
    if (!empty($tab['fragment'])) {
        $tab['link'] .= $tab['fragment'];
    }
    // display icon, even if iconic is disabled but the link-text is missing
    if (($GLOBALS['cfg']['MainPageIconic'] || empty($tab['text'])) && isset($tab['icon'])) {
        // avoid generating an alt tag, because it only illustrates
        // the text that follows and if browser does not display
        // images, the text is duplicated
        $tab['text'] = PMA_getImage(htmlentities($tab['icon'])) . $tab['text'];
    } elseif (empty($tab['text'])) {
        // check to not display an empty link-text
        $tab['text'] = '?';
        trigger_error('empty linktext in function ' . __FUNCTION__ . '()', E_USER_NOTICE);
    }
    //Set the id for the tab, if set in the params
    $id_string = empty($tab['id']) ? '' : ' id="' . $tab['id'] . '" ';
    $out = '<li' . ($tab['class'] == 'active' ? ' class="active"' : '') . '>';
    if (!empty($tab['link'])) {
        $out .= '<a class="tab' . htmlentities($tab['class']) . '"' . $id_string . ' href="' . $tab['link'] . '" ' . $tab['attr'] . '>' . $tab['text'] . '</a>';
    } else {
        $out .= '<span class="tab' . htmlentities($tab['class']) . '"' . $id_string . '>' . $tab['text'] . '</span>';
    }
    $out .= '</li>';
    return $out;
}
开发者ID:AmberWish,项目名称:laba_web,代码行数:68,代码来源:common.lib.php

示例6: PMA_moveOrCopyTable

/**
 * Move or copy a table
 *
 * @param string $db    current database name
 * @param string $table current table name
 *
 * @return void
 */
function PMA_moveOrCopyTable($db, $table)
{
    /**
     * Selects the database to work with
     */
    $GLOBALS['dbi']->selectDb($db);
    /**
     * $_REQUEST['target_db'] could be empty in case we came from an input field
     * (when there are many databases, no drop-down)
     */
    if (empty($_REQUEST['target_db'])) {
        $_REQUEST['target_db'] = $db;
    }
    /**
     * A target table name has been sent to this script -> do the work
     */
    if (PMA_isValid($_REQUEST['new_name'])) {
        if ($db == $_REQUEST['target_db'] && $table == $_REQUEST['new_name']) {
            if (isset($_REQUEST['submit_move'])) {
                $message = Message::error(__('Can\'t move table to same one!'));
            } else {
                $message = Message::error(__('Can\'t copy table to same one!'));
            }
        } else {
            Table::moveCopy($db, $table, $_REQUEST['target_db'], $_REQUEST['new_name'], $_REQUEST['what'], isset($_REQUEST['submit_move']), 'one_table');
            if (isset($_REQUEST['adjust_privileges']) && !empty($_REQUEST['adjust_privileges'])) {
                if (isset($_REQUEST['submit_move'])) {
                    PMA_AdjustPrivileges_renameOrMoveTable($db, $table, $_REQUEST['target_db'], $_REQUEST['new_name']);
                } else {
                    PMA_AdjustPrivileges_copyTable($db, $table, $_REQUEST['target_db'], $_REQUEST['new_name']);
                }
                if (isset($_REQUEST['submit_move'])) {
                    $message = Message::success(__('Table %s has been moved to %s. Privileges have been ' . 'adjusted.'));
                } else {
                    $message = Message::success(__('Table %s has been copied to %s. Privileges have been ' . 'adjusted.'));
                }
            } else {
                if (isset($_REQUEST['submit_move'])) {
                    $message = Message::success(__('Table %s has been moved to %s.'));
                } else {
                    $message = Message::success(__('Table %s has been copied to %s.'));
                }
            }
            $old = PMA\libraries\Util::backquote($db) . '.' . PMA\libraries\Util::backquote($table);
            $message->addParam($old);
            $new = PMA\libraries\Util::backquote($_REQUEST['target_db']) . '.' . PMA\libraries\Util::backquote($_REQUEST['new_name']);
            $message->addParam($new);
            /* Check: Work on new table or on old table? */
            if (isset($_REQUEST['submit_move']) || PMA_isValid($_REQUEST['switch_to_new'])) {
            }
        }
    } else {
        /**
         * No new name for the table!
         */
        $message = Message::error(__('The table name is empty!'));
    }
    if ($GLOBALS['is_ajax_request'] == true) {
        $response = PMA\libraries\Response::getInstance();
        $response->addJSON('message', $message);
        if ($message->isSuccess()) {
            $response->addJSON('db', $GLOBALS['db']);
        } else {
            $response->setRequestStatus(false);
        }
        exit;
    }
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:76,代码来源:operations.lib.php

示例7: PMA_foreignDropdown

/**
 * Outputs dropdown with values of foreign fields
 *
 * @param array  $disp_row        array of the displayed row
 * @param string $foreign_field   the foreign field
 * @param string $foreign_display the foreign field to display
 * @param string $data            the current data of the dropdown (field in row)
 * @param int    $max             maximum number of items in the dropdown
 *
 * @return string   the <option value=""><option>s
 *
 * @access  public
 */
function PMA_foreignDropdown($disp_row, $foreign_field, $foreign_display, $data, $max = null)
{
    if (null === $max) {
        $max = $GLOBALS['cfg']['ForeignKeyMaxLimit'];
    }
    $foreign = array();
    // collect the data
    foreach ($disp_row as $relrow) {
        $key = $relrow[$foreign_field];
        // if the display field has been defined for this foreign table
        if ($foreign_display) {
            $value = $relrow[$foreign_display];
        } else {
            $value = '';
        }
        // end if ($foreign_display)
        $foreign[$key] = $value;
    }
    // end foreach
    // put the dropdown sections in correct order
    $top = array();
    $bottom = array();
    if ($foreign_display) {
        if (PMA_isValid($GLOBALS['cfg']['ForeignKeyDropdownOrder'], 'array')) {
            if (PMA_isValid($GLOBALS['cfg']['ForeignKeyDropdownOrder'][0])) {
                $top = PMA_buildForeignDropdown($foreign, $data, $GLOBALS['cfg']['ForeignKeyDropdownOrder'][0]);
            }
            if (PMA_isValid($GLOBALS['cfg']['ForeignKeyDropdownOrder'][1])) {
                $bottom = PMA_buildForeignDropdown($foreign, $data, $GLOBALS['cfg']['ForeignKeyDropdownOrder'][1]);
            }
        } else {
            $top = PMA_buildForeignDropdown($foreign, $data, 'id-content');
            $bottom = PMA_buildForeignDropdown($foreign, $data, 'content-id');
        }
    } else {
        $top = PMA_buildForeignDropdown($foreign, $data, 'id-only');
    }
    // beginning of dropdown
    $ret = '<option value="">&nbsp;</option>';
    $top_count = count($top);
    if ($max == -1 || $top_count < $max) {
        $ret .= implode('', $top);
        if ($foreign_display && $top_count > 0) {
            // this empty option is to visually mark the beginning of the
            // second series of values (bottom)
            $ret .= '<option value="">&nbsp;</option>';
        }
    }
    if ($foreign_display) {
        $ret .= implode('', $bottom);
    }
    return $ret;
}
开发者ID:mercysmart,项目名称:naikelas,代码行数:66,代码来源:relation.lib.php

示例8: array

 */
$is_show_stats = $cfg['ShowStats'];
/**
 * @global bool whether selected db is information_schema
 */
$db_is_information_schema = false;
if ($db == 'information_schema') {
    $is_show_stats = false;
    $db_is_information_schema = true;
}
/**
 * @global array information about tables in db
 */
$tables = array();
// When used in Nested table group mode, only show tables matching the given groupname
if (PMA_isValid($tbl_group) && !$cfg['ShowTooltipAliasTB']) {
    $tbl_group_sql = ' LIKE "' . PMA_escape_mysql_wildcards($tbl_group) . '%"';
} else {
    $tbl_group_sql = '';
}
if ($cfg['ShowTooltip']) {
    $tooltip_truename = array();
    $tooltip_aliasname = array();
}
// Special speedup for newer MySQL Versions (in 4.0 format changed)
if (true === $cfg['SkipLockedTables']) {
    $db_info_result = PMA_DBI_query('SHOW OPEN TABLES FROM ' . PMA_backquote($db) . ';');
    // Blending out tables in use
    if ($db_info_result && PMA_DBI_num_rows($db_info_result) > 0) {
        while ($tmp = PMA_DBI_fetch_row($db_info_result)) {
            // if in use memorize tablename
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:db_info.inc.php

示例9: _setCriteriaTablesAndColumns

 /**
  * Sets criteria tables and columns
  *
  * @return void
  */
 private function _setCriteriaTablesAndColumns()
 {
     // The tables list sent by a previously submitted form
     if (PMA_isValid($_REQUEST['TableList'], 'array')) {
         foreach ($_REQUEST['TableList'] as $each_table) {
             $this->_criteriaTables[$each_table] = ' selected="selected"';
         }
     }
     // end if
     $all_tables = $GLOBALS['dbi']->query('SHOW TABLES FROM ' . Util::backquote($this->_db) . ';', null, DatabaseInterface::QUERY_STORE);
     $all_tables_count = $GLOBALS['dbi']->numRows($all_tables);
     if (0 == $all_tables_count) {
         Message::error(__('No tables found in database.'))->display();
         exit;
     }
     // The tables list gets from MySQL
     while (list($table) = $GLOBALS['dbi']->fetchRow($all_tables)) {
         $columns = $GLOBALS['dbi']->getColumns($this->_db, $table);
         if (empty($this->_criteriaTables[$table]) && !empty($_REQUEST['TableList'])) {
             $this->_criteriaTables[$table] = '';
         } else {
             $this->_criteriaTables[$table] = ' selected="selected"';
         }
         //  end if
         // The fields list per selected tables
         if ($this->_criteriaTables[$table] == ' selected="selected"') {
             $each_table = Util::backquote($table);
             $this->_columnNames[] = $each_table . '.*';
             foreach ($columns as $each_column) {
                 $each_column = $each_table . '.' . Util::backquote($each_column['Field']);
                 $this->_columnNames[] = $each_column;
                 // increase the width if necessary
                 $this->_form_column_width = max(mb_strlen($each_column), $this->_form_column_width);
             }
             // end foreach
         }
         // end if
     }
     // end while
     $GLOBALS['dbi']->freeResult($all_tables);
     // sets the largest width found
     $this->_realwidth = $this->_form_column_width . 'ex';
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:48,代码来源:DbQbe.php

示例10: array_intersect

        $options = array_intersect($_REQUEST['view']['with'], $view_with_options);
        if (count($options)) {
            $sql_query .= $sep . ' WITH ' . implode(' ', $options);
        }
    }
    if (PMA_DBI_try_query($sql_query)) {
        $message = PMA_Message::success();
        require './' . $cfg['DefaultTabDatabase'];
        exit;
    } else {
        $message = PMA_Message::rawError(PMA_DBI_getError());
    }
}
// prefill values if not already filled from former submission
$view = array('or_replace' => '', 'algorithm' => '', 'name' => '', 'column_names' => '', 'as' => $sql_query, 'with' => array());
if (PMA_isValid($_REQUEST['view'], 'array')) {
    $view = array_merge($view, $_REQUEST['view']);
}
/**
 * Displays top menu links
 * We use db links because a VIEW is not necessarily on a single table
 */
$num_tables = 0;
require_once './libraries/db_links.inc.php';
$url_params['db'] = $GLOBALS['db'];
$url_params['reload'] = 1;
/**
 * Displays the page
 */
?>
<!-- CREATE VIEW options -->
开发者ID:fathitarek,项目名称:cop5725-dbms-project,代码行数:31,代码来源:view_create.php

示例11: isset

            $message = PMA_Message::error(__('Can\'t copy table to same one!'));
        }
        $result = false;
    } else {
        $result = PMA_Table::moveCopy($db, $table, $_REQUEST['target_db'], $_REQUEST['new_name'], $_REQUEST['what'], isset($_REQUEST['submit_move']), 'one_table');
        if (isset($_REQUEST['submit_move'])) {
            $message = PMA_Message::success(__('Table %s has been moved to %s.'));
        } else {
            $message = PMA_Message::success(__('Table %s has been copied to %s.'));
        }
        $old = PMA_Util::backquote($db) . '.' . PMA_Util::backquote($table);
        $message->addParam($old);
        $new = PMA_Util::backquote($_REQUEST['target_db']) . '.' . PMA_Util::backquote($_REQUEST['new_name']);
        $message->addParam($new);
        /* Check: Work on new table or on old table? */
        if (isset($_REQUEST['submit_move']) || PMA_isValid($_REQUEST['switch_to_new'])) {
            $db = $_REQUEST['target_db'];
            $table = $_REQUEST['new_name'];
        }
        $reload = 1;
    }
} else {
    /**
     * No new name for the table!
     */
    $message = PMA_Message::error(__('The table name is empty!'));
    $result = false;
}
if ($GLOBALS['is_ajax_request'] == true) {
    $response = PMA_Response::getInstance();
    $response->addJSON('message', $message);
开发者ID:yxwzaxns,项目名称:sakura,代码行数:31,代码来源:tbl_move_copy.php

示例12: define

<?php

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * URL redirector to avoid leaking Referer with some sensitive information.
 *
 * @package PhpMyAdmin
 */
/**
 * Gets core libraries and defines some variables
 */
define('PMA_MINIMUM_COMMON', true);
require_once './libraries/common.inc.php';
if (!PMA_isValid($_GET['url']) || !preg_match('/^https?:\\/\\/[^\\n\\r]*$/', $_GET['url'])) {
    header('Location: ' . $cfg['PmaAbsoluteUri']);
} else {
    header('Location: ' . $_GET['url']);
}
die;
开发者ID:AtomPy,项目名称:AtomPySite,代码行数:19,代码来源:url.php

示例13: PMA_displayTable_checkConfigParams

/**
 *
 * @uses    $_SESSION['userconf']['disp_direction']
 * @uses    $_REQUEST['disp_direction']
 * @uses    $GLOBALS['cfg']['DefaultDisplay']
 * @uses    $_SESSION['userconf']['repeat_cells']
 * @uses    $_REQUEST['repeat_cells']
 * @uses    $GLOBALS['cfg']['RepeatCells']
 * @uses    $_SESSION['userconf']['max_rows']
 * @uses    $_REQUEST['session_max_rows']
 * @uses    $GLOBALS['cfg']['MaxRows']
 * @uses    $_SESSION['userconf']['pos']
 * @uses    $_REQUEST['pos']
 * @uses    $_SESSION['userconf']['dontlimitchars']
 * @uses    $_REQUEST['dontlimitchars']
 * @uses    PMA_isValid()
 * @uses    $GLOBALS['sql_query']
 * @todo    make maximum remembered queries configurable
 * @todo    move/split into SQL class!?
 * @todo    currently this is called twice unnecessary
 * @todo    ignore LIMIT and ORDER in query!?
 */
function PMA_displayTable_checkConfigParams()
{
    $sql_key = md5($GLOBALS['sql_query']);
    $_SESSION['userconf']['query'][$sql_key]['sql'] = $GLOBALS['sql_query'];
    if (PMA_isValid($_REQUEST['disp_direction'], array('horizontal', 'vertical', 'horizontalflipped'))) {
        $_SESSION['userconf']['query'][$sql_key]['disp_direction'] = $_REQUEST['disp_direction'];
        unset($_REQUEST['disp_direction']);
    } elseif (empty($_SESSION['userconf']['query'][$sql_key]['disp_direction'])) {
        $_SESSION['userconf']['query'][$sql_key]['disp_direction'] = $GLOBALS['cfg']['DefaultDisplay'];
    }
    if (PMA_isValid($_REQUEST['repeat_cells'], 'numeric')) {
        $_SESSION['userconf']['query'][$sql_key]['repeat_cells'] = $_REQUEST['repeat_cells'];
        unset($_REQUEST['repeat_cells']);
    } elseif (empty($_SESSION['userconf']['query'][$sql_key]['repeat_cells'])) {
        $_SESSION['userconf']['query'][$sql_key]['repeat_cells'] = $GLOBALS['cfg']['RepeatCells'];
    }
    if (PMA_isValid($_REQUEST['session_max_rows'], 'numeric') || $_REQUEST['session_max_rows'] == 'all') {
        $_SESSION['userconf']['query'][$sql_key]['max_rows'] = $_REQUEST['session_max_rows'];
        unset($_REQUEST['session_max_rows']);
    } elseif (empty($_SESSION['userconf']['query'][$sql_key]['max_rows'])) {
        $_SESSION['userconf']['query'][$sql_key]['max_rows'] = $GLOBALS['cfg']['MaxRows'];
    }
    if (PMA_isValid($_REQUEST['pos'], 'numeric')) {
        $_SESSION['userconf']['query'][$sql_key]['pos'] = $_REQUEST['pos'];
        unset($_REQUEST['pos']);
    } elseif (empty($_SESSION['userconf']['query'][$sql_key]['pos'])) {
        $_SESSION['userconf']['query'][$sql_key]['pos'] = 0;
    }
    if (PMA_isValid($_REQUEST['dontlimitchars'], array('0', '1'))) {
        $_SESSION['userconf']['query'][$sql_key]['dontlimitchars'] = (int) $_REQUEST['dontlimitchars'];
        unset($_REQUEST['dontlimitchars']);
    } elseif (empty($_SESSION['userconf']['query'][$sql_key]['dontlimitchars'])) {
        $_SESSION['userconf']['query'][$sql_key]['dontlimitchars'] = 0;
    }
    // move current query to the last position, to be removed last
    // so only least executed query will be removed if maximum remembered queries
    // limit is reached
    $tmp = $_SESSION['userconf']['query'][$sql_key];
    unset($_SESSION['userconf']['query'][$sql_key]);
    $_SESSION['userconf']['query'][$sql_key] = $tmp;
    // do not exceed a maximum number of queries to remember
    if (count($_SESSION['userconf']['query']) > 10) {
        array_shift($_SESSION['userconf']['query']);
        //echo 'deleting one element ...';
    }
    // populate query configuration
    $_SESSION['userconf']['dontlimitchars'] = $_SESSION['userconf']['query'][$sql_key]['dontlimitchars'];
    $_SESSION['userconf']['pos'] = $_SESSION['userconf']['query'][$sql_key]['pos'];
    $_SESSION['userconf']['max_rows'] = $_SESSION['userconf']['query'][$sql_key]['max_rows'];
    $_SESSION['userconf']['repeat_cells'] = $_SESSION['userconf']['query'][$sql_key]['repeat_cells'];
    $_SESSION['userconf']['disp_direction'] = $_SESSION['userconf']['query'][$sql_key]['disp_direction'];
    /*
    * debugging
        echo '<pre>';
        var_dump($_SESSION['userconf']);
        echo '</pre>';
    */
}
开发者ID:bharathi26,项目名称:openemr,代码行数:80,代码来源:display_tbl.lib.php

示例14: array

$is_show_stats = $cfg['ShowStats'];
/**
 * @global bool whether selected db is information_schema
 */
$db_is_information_schema = false;
if (PMA_is_system_schema($db)) {
    $is_show_stats = false;
    $db_is_information_schema = true;
}
/**
 * @global array information about tables in db
 */
$tables = array();
// When used in Nested table group mode,
// only show tables matching the given groupname
if (PMA_isValid($_REQUEST['tbl_group'])) {
    $tbl_group_sql = ' LIKE "' . PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group']) . '%"';
} else {
    $tbl_group_sql = '';
}
$tooltip_truename = array();
$tooltip_aliasname = array();
// Special speedup for newer MySQL Versions (in 4.0 format changed)
if (true === $cfg['SkipLockedTables']) {
    $db_info_result = PMA_DBI_query('SHOW OPEN TABLES FROM ' . PMA_Util::backquote($db) . ';');
    // Blending out tables in use
    if ($db_info_result && PMA_DBI_num_rows($db_info_result) > 0) {
        while ($tmp = PMA_DBI_fetch_row($db_info_result)) {
            // if in use memorize tablename
            if (preg_match('@in_use=[1-9]+@i', $tmp[1])) {
                $sot_cache[$tmp[0]] = true;
开发者ID:fanscky,项目名称:HTPMS,代码行数:31,代码来源:db_info.inc.php

示例15: PMA_changePassHashingFunction

/**
 * Generate the hashing function
 *
 * @return string  $hashing_function
 */
function PMA_changePassHashingFunction()
{
    if (PMA_isValid($_REQUEST['authentication_plugin'], 'identical', 'mysql_old_password')) {
        $hashing_function = 'OLD_PASSWORD';
    } else {
        $hashing_function = 'PASSWORD';
    }
    return $hashing_function;
}
开发者ID:Stony-Brook-University,项目名称:doitsbu,代码行数:14,代码来源:user_password.php


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