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


PHP PMA_ifSetOr函数代码示例

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


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

示例1: get_config

/**
 * Returns config file contents depending on GET type value:
 * o session - uses ConfigFile::getConfigFile()
 * o post - uses POST textconfig value
 *
 * @return string
 */
function get_config()
{
    $type = PMA_ifSetOr($_GET['type'], 'session');
    if ($type == 'session') {
        $config = ConfigFile::getInstance()->getConfigFile();
    } else {
        $config = PMA_ifSetOr($_POST['textconfig'], '');
        // make sure our eol is \n
        $config = str_replace("\r\n", "\n", $config);
        if ($_SESSION['eol'] == 'win') {
            $config = str_replace("\n", "\r\n", $config);
        }
    }
    return $config;
}
开发者ID:alecbenson,项目名称:TurnoutWeb-Patches,代码行数:22,代码来源:config.php

示例2: _setHistory

 /**
  * Saves query in history
  *
  * @return void
  */
 private function _setHistory()
 {
     if (!PMA_isValid($_REQUEST['no_history']) && empty($GLOBALS['error_message']) && !empty($GLOBALS['sql_query'])) {
         PMA_setHistory(PMA_ifSetOr($GLOBALS['db'], ''), PMA_ifSetOr($GLOBALS['table'], ''), $GLOBALS['cfg']['Server']['user'], $GLOBALS['sql_query']);
     }
 }
开发者ID:20000Hz,项目名称:bak-letvs,代码行数:11,代码来源:Footer.class.php

示例3: check_config_rw

/**
 * Core libraries.
 */
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';

$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
?>
<h2><?php echo __('Configuration file') ?></h2>
<?php display_form_top('config.php'); ?>
<input type="hidden" name="eol" value="<?php echo htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) ?>" />
<?php display_fieldset_top('', '', null, array('class' => 'simple')); ?>
<tr>
    <td>
        <textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
            echo htmlspecialchars(ConfigGenerator::getConfigFile())
        ?></textarea>
    </td>
</tr>
<tr>
    <td class="lastrow" style="text-align: left">
        <input type="submit" name="submit_download" value="<?php echo __('Download') ?>" class="green" />
        <input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php
if (!$config_writable) {
    echo ' disabled="disabled"';
} ?> />
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:30,代码来源:config.inc.php

示例4: _ajaxResponse

 /**
  * Sends a JSON response to the browser
  *
  * @return void
  */
 private function _ajaxResponse()
 {
     if (!isset($this->_JSON['message'])) {
         $this->_JSON['message'] = $this->_getDisplay();
     } else {
         if ($this->_JSON['message'] instanceof PMA_Message) {
             $this->_JSON['message'] = $this->_JSON['message']->getDisplay();
         }
     }
     if ($this->_isSuccess) {
         $this->_JSON['success'] = true;
     } else {
         $this->_JSON['success'] = false;
         $this->_JSON['error'] = $this->_JSON['message'];
         unset($this->_JSON['message']);
     }
     if ($this->_isSuccess) {
         // Note: the old judge sentence is:
         // $this->_isAjaxPage && $this->_isSuccess
         // Removal the first, because console need log all queries, if caused any
         // bug, contact Edward Cheng
         $this->addJSON('_title', $this->getHeader()->getTitleTag());
         if (isset($GLOBALS['dbi'])) {
             $menuHash = $this->getHeader()->getMenu()->getHash();
             $this->addJSON('_menuHash', $menuHash);
             $hashes = array();
             if (isset($_REQUEST['menuHashes'])) {
                 $hashes = explode('-', $_REQUEST['menuHashes']);
             }
             if (!in_array($menuHash, $hashes)) {
                 $this->addJSON('_menu', $this->getHeader()->getMenu()->getDisplay());
             }
         }
         $this->addJSON('_scripts', $this->getHeader()->getScripts()->getFiles());
         $this->addJSON('_selflink', $this->getFooter()->getSelfUrl('unencoded'));
         $this->addJSON('_displayMessage', $this->getHeader()->getMessage());
         $debug = $this->_footer->getDebugMessage();
         if (empty($_REQUEST['no_debug']) && mb_strlen($debug)) {
             $this->addJSON('_debug', $debug);
         }
         $errors = $this->_footer->getErrorMessages();
         if (mb_strlen($errors)) {
             $this->addJSON('_errors', $errors);
         }
         $promptPhpErrors = $GLOBALS['error_handler']->hasErrorsForPrompt();
         $this->addJSON('_promptPhpErrors', $promptPhpErrors);
         if (empty($GLOBALS['error_message'])) {
             // set current db, table and sql query in the querywindow
             // (this is for the bottom console)
             $query = '';
             $maxChars = $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'];
             if (isset($GLOBALS['sql_query']) && mb_strlen($GLOBALS['sql_query']) < $maxChars) {
                 $query = $GLOBALS['sql_query'];
             }
             $this->addJSON('_reloadQuerywindow', array('db' => PMA_ifSetOr($GLOBALS['db'], ''), 'table' => PMA_ifSetOr($GLOBALS['table'], ''), 'sql_query' => $query));
             if (!empty($GLOBALS['focus_querywindow'])) {
                 $this->addJSON('_focusQuerywindow', $query);
             }
             if (!empty($GLOBALS['reload'])) {
                 $this->addJSON('_reloadNavigation', 1);
             }
             $this->addJSON('_params', $this->getHeader()->getJsParams());
         }
     }
     // Set the Content-Type header to JSON so that jQuery parses the
     // response correctly.
     if (!defined('TESTSUITE')) {
         header('Cache-Control: no-cache');
         header('Content-Type: application/json');
     }
     echo json_encode($this->_JSON);
 }
开发者ID:FuhrerMalkovich,项目名称:Blogpost,代码行数:77,代码来源:Response.class.php

示例5: PMA_ifSetOr

    $GLOBALS['table'] = $recent_table['table'];
    $GLOBALS['url_params']['table'] = $GLOBALS['table'];
}
/**
 * SQL query to be executed
 * @global string $GLOBALS['sql_query']
 */
$GLOBALS['sql_query'] = '';
if (PMA_isValid($_REQUEST['sql_query'])) {
    $GLOBALS['sql_query'] = $_REQUEST['sql_query'];
}
/**
 * avoid problems in phpmyadmin.css.php in some cases
 * @global string $js_frame
 */
$_REQUEST['js_frame'] = PMA_ifSetOr($_REQUEST['js_frame'], '');
//$_REQUEST['set_theme'] // checked later in this file LABEL_theme_setup
//$_REQUEST['server']; // checked later in this file
//$_REQUEST['lang'];   // checked by LABEL_loading_language_file
/**
 * holds name of JavaScript files to be included in HTML header
 * @global array $js_include
 */
$GLOBALS['js_include'] = array();
$GLOBALS['js_include'][] = 'jquery/jquery-1.6.2+fix-9521.js';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.16.custom.js';
$GLOBALS['js_include'][] = 'update-location.js';
/**
 * holds an array of javascript code snippets to be included in the HTML header
 * Can be used with PMA_AddJSCode() to pass on js variables to the browser.
 * @global array $js_script
开发者ID:GStepOne,项目名称:CI,代码行数:31,代码来源:common.inc.php

示例6: array

        echo '<form name="usersForm" id="addUsersForm_' . $random_n . '" action="server_privileges.php" method="post">' . "\n";
        $_params = array(
            'username' => $username,
            'hostname' => $hostname,
        );
        if (isset($dbname)) {
            $_params['dbname'] = $dbname;
            if (isset($tablename)) {
                $_params['tablename'] = $tablename;
            }
        }
        echo PMA_generate_common_hidden_inputs($_params);

        PMA_displayPrivTable(
            PMA_ifSetOr($dbname, '*', 'length'),
            PMA_ifSetOr($tablename, '*', 'length')
        );

        echo '</form>' . "\n";

        if (! isset($tablename) && empty($dbname_is_wildcard)) {

            // no table name was given, display all table specific rights
            // but only if $dbname contains no wildcards

            // table header
            echo '<form action="server_privileges.php" id="db_or_table_specific_priv" method="post">' . "\n"
               . PMA_generate_common_hidden_inputs('', '')
               . '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"
               . '<input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n"
               . '<fieldset>' . "\n"
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:31,代码来源:server_privileges.php

示例7: PMA_getHtmlForUserProperties

/**
 * Get HTML snippet for display user properties
 *
 * @param boolean $dbname_is_wildcard whether database name is wildcard or not
 * @param string  $url_dbname         url database name that urlencode() string
 * @param string  $username           username
 * @param string  $hostname           host name
 * @param string  $dbname             database name
 * @param string  $tablename          table name
 *
 * @return string $html_output
 */
function PMA_getHtmlForUserProperties($dbname_is_wildcard, $url_dbname, $username, $hostname, $dbname, $tablename)
{
    $html_output = '<div id="edit_user_dialog">';
    $html_output .= PMA_getHtmlHeaderForUserProperties($dbname_is_wildcard, $url_dbname, $dbname, $username, $hostname, $tablename);
    $sql = "SELECT '1' FROM `mysql`.`user`" . " WHERE `User` = '" . PMA_Util::sqlAddSlashes($username) . "'" . " AND `Host` = '" . PMA_Util::sqlAddSlashes($hostname) . "';";
    $user_does_not_exists = (bool) (!$GLOBALS['dbi']->fetchValue($sql));
    if ($user_does_not_exists) {
        $html_output .= PMA_Message::error(__('The selected user was not found in the privilege table.'))->getDisplay();
        $html_output .= PMA_getHtmlForLoginInformationFields();
        //exit;
    }
    $_params = array('username' => $username, 'hostname' => $hostname);
    if (!is_array($dbname) && mb_strlen($dbname)) {
        $_params['dbname'] = $dbname;
        if (mb_strlen($tablename)) {
            $_params['tablename'] = $tablename;
        }
    } else {
        $_params['dbname'] = $dbname;
    }
    $html_output .= '<form class="submenu-item" name="usersForm" ' . 'id="addUsersForm" action="server_privileges.php" method="post">' . "\n";
    $html_output .= PMA_URL_getHiddenInputs($_params);
    $html_output .= PMA_getHtmlToDisplayPrivilegesTable(PMA_ifSetOr($dbname, is_array($dbname) ? $dbname[0] : '*', 'length'), PMA_ifSetOr($tablename, '*', 'length'));
    $html_output .= '</form>' . "\n";
    if (!is_array($dbname) && !mb_strlen($tablename) && empty($dbname_is_wildcard)) {
        // no table name was given, display all table specific rights
        // but only if $dbname contains no wildcards
        $html_output .= '<form class="submenu-item" action="server_privileges.php" ' . 'id="db_or_table_specific_priv" method="post">' . "\n";
        // unescape wildcards in dbname at table level
        $unescaped_db = PMA_Util::unescapeMysqlWildcards($dbname);
        list($html_rightsTable, $found_rows) = PMA_getHtmlForAllTableSpecificRights($username, $hostname, $unescaped_db);
        $html_output .= $html_rightsTable;
        if (!mb_strlen($dbname)) {
            // no database name was given, display select db
            $html_output .= PMA_getHtmlForSelectDbInEditPrivs($found_rows);
        } else {
            $html_output .= PMA_displayTablesInEditPrivs($dbname, $found_rows);
        }
        $html_output .= '</fieldset>' . "\n";
        $html_output .= '<fieldset class="tblFooters">' . "\n" . '    <input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . "\n" . '</form>' . "\n";
    }
    // Provide a line with links to the relevant database and table
    if (!is_array($dbname) && mb_strlen($dbname) && empty($dbname_is_wildcard)) {
        $html_output .= PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename);
    }
    if (!is_array($dbname) && !mb_strlen($dbname) && !$user_does_not_exists) {
        //change login information
        $html_output .= PMA_getHtmlForChangePassword($username, $hostname);
        $html_output .= PMA_getChangeLoginInformationHtmlForm($username, $hostname);
    }
    $html_output .= '</div>';
    return $html_output;
}
开发者ID:siddhantsomani,项目名称:phpmyadmin,代码行数:65,代码来源:server_privileges.lib.php

示例8: preg_match

if (isset($_REQUEST['submit_sql'])
 && ! preg_match('@^SELECT@i', $sql_query)) {
    PMA_Message::warning('strHaveToShow')->display();
}


/**
 * Initialize some variables
 */
$col_cnt = PMA_ifSetOr($_REQUEST['col_cnt'], 3, 'numeric');
$add_col = PMA_ifSetOr($_REQUEST['add_col'], 0, 'numeric');
$add_row = PMA_ifSetOr($_REQUEST['add_row'], 0, 'numeric');

$rows    = PMA_ifSetOr($_REQUEST['rows'],    0, 'numeric');
$ins_col = PMA_ifSetOr($_REQUEST['ins_col'], null, 'array');
$del_col = PMA_ifSetOr($_REQUEST['del_col'], null, 'array');

$prev_criteria = isset($_REQUEST['prev_criteria'])
    ? $_REQUEST['prev_criteria']
    : array();
$criteria = isset($_REQUEST['criteria'])
    ? $_REQUEST['criteria']
    : array_fill(0, $col_cnt, '');

$ins_row = isset($_REQUEST['ins_row'])
    ? $_REQUEST['ins_row']
    : array_fill(0, $col_cnt, '');
$del_row = isset($_REQUEST['del_row'])
    ? $_REQUEST['del_row']
    : array_fill(0, $col_cnt, '');
$and_or_row = isset($_REQUEST['and_or_row'])
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:31,代码来源:db_qbe.php

示例9: unset

 unset($sql);
 if ($user_does_not_exists) {
     PMA_Message::error(__('The selected user was not found in the privilege table.'))->display();
     PMA_displayLoginInformationFields();
     //require './libraries/footer.inc.php';
 }
 echo '<form name="usersForm" id="addUsersForm_' . $random_n . '" action="server_privileges.php" method="post">' . "\n";
 $_params = array('username' => $username, 'hostname' => $hostname);
 if (isset($dbname)) {
     $_params['dbname'] = $dbname;
     if (isset($tablename)) {
         $_params['tablename'] = $tablename;
     }
 }
 echo PMA_generate_common_hidden_inputs($_params);
 PMA_displayPrivTable(PMA_ifSetOr($dbname, '*', 'length'), PMA_ifSetOr($tablename, '*', 'length'));
 echo '</form>' . "\n";
 if (!isset($tablename) && empty($dbname_is_wildcard)) {
     // no table name was given, display all table specific rights
     // but only if $dbname contains no wildcards
     // table header
     echo '<form action="server_privileges.php" id="db_or_table_specific_priv" method="post">' . "\n" . PMA_generate_common_hidden_inputs('', '') . '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n" . '<input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n" . '<fieldset>' . "\n" . '<legend>' . (!isset($dbname) ? __('Database-specific privileges') : __('Table-specific privileges')) . '</legend>' . "\n" . '<table class="data">' . "\n" . '<thead>' . "\n" . '<tr><th>' . (!isset($dbname) ? __('Database') : __('Table')) . '</th>' . "\n" . '    <th>' . __('Privileges') . '</th>' . "\n" . '    <th>' . __('Grant') . '</th>' . "\n" . '    <th>' . (!isset($dbname) ? __('Table-specific privileges') : __('Column-specific privileges')) . '</th>' . "\n" . '    <th colspan="2">' . __('Action') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
     $user_host_condition = ' WHERE `User`' . ' = \'' . PMA_sqlAddSlashes($username) . "'" . ' AND `Host`' . ' = \'' . PMA_sqlAddSlashes($hostname) . "'";
     // table body
     // get data
     // we also want privielgs for this user not in table `db` but in other table
     $tables = PMA_DBI_fetch_result('SHOW TABLES FROM `mysql`;');
     if (!isset($dbname)) {
         // no db name given, so we want all privs for the given user
         $tables_to_search_for_users = array('tables_priv', 'columns_priv');
         $db_rights_sqls = array();
开发者ID:AmberWish,项目名称:laba_web,代码行数:31,代码来源:server_privileges.php

示例10: PMA_escapeJsString

        if (window.parent && window.parent.frame_navigation) {
            window.parent.frame_navigation.location.reload();
        }
        <?php 
            }
        }
        ?>
// set current db, table and sql query in the querywindow
if (window.parent.reload_querywindow) {
    window.parent.reload_querywindow(
        '<?php 
        echo PMA_escapeJsString(PMA_ifSetOr($GLOBALS['db'], ''));
        ?>
',
        '<?php 
        echo PMA_escapeJsString(PMA_ifSetOr($GLOBALS['table'], ''));
        ?>
',
        '<?php 
        echo strlen($GLOBALS['sql_query']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] ? PMA_escapeJsString($GLOBALS['sql_query']) : '';
        ?>
');
}
    <?php 
    }
    if (!empty($GLOBALS['focus_querywindow'])) {
        ?>
// set focus to the querywindow
if (parent.querywindow && !parent.querywindow.closed && parent.querywindow.location) {
    self.focus();
}
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:footer.inc.php

示例11: PMA_checkConfigRw

if (!defined('PHPMYADMIN')) {
    exit;
}
/**
 * Core libraries.
 */
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';
$config_readable = false;
$config_writable = false;
$config_exists = false;
PMA_checkConfigRw($config_readable, $config_writable, $config_exists);
echo '<h2>' . __('Configuration file') . '</h2>';
PMA_displayFormTop('config.php');
echo '<input type="hidden" name="eol" value="' . htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) . '" />';
PMA_displayFieldsetTop('config.inc.php', '', null, array('class' => 'simple'));
echo '<tr>';
echo '<td>';
echo '<textarea cols="50" rows="20" name="textconfig" ' . 'id="textconfig" spellcheck="false">';
echo htmlspecialchars(ConfigGenerator::getConfigFile($GLOBALS['ConfigFile']));
echo '</textarea>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="lastrow" style="text-align: left">';
echo '<input type="submit" name="submit_download" value="' . __('Download') . '" class="green" />';
echo '<input type="submit" name="submit_save" value="' . __('Save') . '"';
if (!$config_writable) {
    echo ' disabled="disabled"';
}
开发者ID:yszar,项目名称:linuxwp,代码行数:31,代码来源:config.inc.php

示例12: PMA_getHtmlForUserProperties

/**
 * Get HTML snippet for display user properties
 *
 * @param boolean $dbname_is_wildcard whether database name is wildcard or not
 * @param string  $url_dbname         url database name that urlencode() string
 * @param string  $username           username
 * @param string  $hostname           host name
 * @param string  $dbname             database name
 * @param string  $tablename          table name
 *
 * @return string $html_output
 */
function PMA_getHtmlForUserProperties($dbname_is_wildcard, $url_dbname, $username, $hostname, $dbname, $tablename)
{
    $html_output = '<div id="edit_user_dialog">';
    $html_output .= PMA_getHtmlHeaderForUserProperties($dbname_is_wildcard, $url_dbname, $dbname, $username, $hostname, $tablename, 'table');
    $sql = "SELECT '1' FROM `mysql`.`user`" . " WHERE `User` = '" . $GLOBALS['dbi']->escapeString($username) . "'" . " AND `Host` = '" . $GLOBALS['dbi']->escapeString($hostname) . "';";
    $user_does_not_exists = (bool) (!$GLOBALS['dbi']->fetchValue($sql));
    if ($user_does_not_exists) {
        $html_output .= Message::error(__('The selected user was not found in the privilege table.'))->getDisplay();
        $html_output .= PMA_getHtmlForLoginInformationFields();
    }
    $_params = array('username' => $username, 'hostname' => $hostname);
    if (!is_array($dbname) && strlen($dbname) > 0) {
        $_params['dbname'] = $dbname;
        if (strlen($tablename) > 0) {
            $_params['tablename'] = $tablename;
        }
    } else {
        $_params['dbname'] = $dbname;
    }
    $html_output .= '<form class="submenu-item" name="usersForm" ' . 'id="addUsersForm" action="server_privileges.php" method="post">' . "\n";
    $html_output .= URL::getHiddenInputs($_params);
    $html_output .= PMA_getHtmlToDisplayPrivilegesTable(PMA_ifSetOr($dbname, is_array($dbname) ? $dbname[0] : '*', 'length'), PMA_ifSetOr($tablename, '*', 'length'));
    $html_output .= '</form>' . "\n";
    if (!is_array($dbname) && strlen($tablename) === 0 && empty($dbname_is_wildcard)) {
        // no table name was given, display all table specific rights
        // but only if $dbname contains no wildcards
        if (strlen($dbname) === 0) {
            $html_output .= PMA_getHtmlForAllTableSpecificRights($username, $hostname, 'database');
        } else {
            // unescape wildcards in dbname at table level
            $unescaped_db = Util::unescapeMysqlWildcards($dbname);
            $html_output .= PMA_getHtmlForAllTableSpecificRights($username, $hostname, 'table', $unescaped_db);
            $html_output .= PMA_getHtmlForAllTableSpecificRights($username, $hostname, 'routine', $unescaped_db);
        }
    }
    // Provide a line with links to the relevant database and table
    if (!is_array($dbname) && strlen($dbname) > 0 && empty($dbname_is_wildcard)) {
        $html_output .= PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename);
    }
    if (!is_array($dbname) && strlen($dbname) === 0 && !$user_does_not_exists) {
        //change login information
        $html_output .= PMA_getHtmlForChangePassword('edit_other', $username, $hostname);
        $html_output .= PMA_getChangeLoginInformationHtmlForm($username, $hostname);
    }
    $html_output .= '</div>';
    return $html_output;
}
开发者ID:nijel,项目名称:phpmyadmin,代码行数:59,代码来源:server_privileges.lib.php

示例13: _setSearchParams

 /**
  * Sets search parameters
  *
  */
 private function _setSearchParams()
 {
     // sets column count
     $criteriaColumnCount = PMA_ifSetOr($_REQUEST['criteriaColumnCount'], 3, 'numeric');
     $criteriaColumnAdd = PMA_ifSetOr($_REQUEST['criteriaColumnAdd'], 0, 'numeric');
     $this->_criteria_column_count = max($criteriaColumnCount + $criteriaColumnAdd, 0);
     // sets row count
     $rows = PMA_ifSetOr($_REQUEST['rows'], 0, 'numeric');
     $criteriaRowAdd = PMA_ifSetOr($_REQUEST['criteriaRowAdd'], 0, 'numeric');
     $this->_criteria_row_count = max($rows + $criteriaRowAdd, 0);
     $this->_criteriaColumnInsert = PMA_ifSetOr($_REQUEST['criteriaColumnInsert'], null, 'array');
     $this->_criteriaColumnDelete = PMA_ifSetOr($_REQUEST['criteriaColumnDelete'], null, 'array');
     $this->_prev_criteria = isset($_REQUEST['prev_criteria']) ? $_REQUEST['prev_criteria'] : array();
     $this->_criteria = isset($_REQUEST['criteria']) ? $_REQUEST['criteria'] : array_fill(0, $criteriaColumnCount, '');
     $this->_criteriaRowInsert = isset($_REQUEST['criteriaRowInsert']) ? $_REQUEST['criteriaRowInsert'] : array_fill(0, $criteriaColumnCount, '');
     $this->_criteriaRowDelete = isset($_REQUEST['criteriaRowDelete']) ? $_REQUEST['criteriaRowDelete'] : array_fill(0, $criteriaColumnCount, '');
     $this->_criteriaAndOrRow = isset($_REQUEST['criteriaAndOrRow']) ? $_REQUEST['criteriaAndOrRow'] : array_fill(0, $criteriaColumnCount, '');
     $this->_criteriaAndOrColumn = isset($_REQUEST['criteriaAndOrColumn']) ? $_REQUEST['criteriaAndOrColumn'] : array_fill(0, $criteriaColumnCount, '');
     // sets minimum width
     $this->_form_column_width = 12;
     $this->_curField = array();
     $this->_curSort = array();
     $this->_curShow = array();
     $this->_curCriteria = array();
     $this->_curAndOrRow = array();
     $this->_curAndOrCol = array();
 }
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:31,代码来源:DBQbe.class.php

示例14: testVarNotSetNoDefault

 public function testVarNotSetNoDefault()
 {
     // $in is not set!
     $out = PMA_ifSetOr($in);
     $this->assertEquals($out, null);
 }
开发者ID:bugyak,项目名称:phporadmin,代码行数:6,代码来源:PMA_ifSetOr_test.php

示例15: _initializeCriteriasCount

 /**
  * Initialize _criteria_column_count
  *
  * @return int Previous number of columns
  */
 private function _initializeCriteriasCount()
 {
     // sets column count
     $criteriaColumnCount = PMA_ifSetOr($_REQUEST['criteriaColumnCount'], 3, 'numeric');
     $criteriaColumnAdd = PMA_ifSetOr($_REQUEST['criteriaColumnAdd'], 0, 'numeric');
     $this->_criteria_column_count = max($criteriaColumnCount + $criteriaColumnAdd, 0);
     // sets row count
     $rows = PMA_ifSetOr($_REQUEST['rows'], 0, 'numeric');
     $criteriaRowAdd = PMA_ifSetOr($_REQUEST['criteriaRowAdd'], 0, 'numeric');
     $this->_criteria_row_count = max($rows + $criteriaRowAdd, 0);
     return $criteriaColumnCount;
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:17,代码来源:DbQbe.php


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