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


PHP get_vars函数代码示例

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


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

示例1: get_categories

 function get_categories()
 {
     global $db;
     $cat_info = get_vars("category");
     $this->priority = $this->cat_priority;
     if (!is_array($cat_info)) {
         $cat_info = array();
         $db->query("SELECT * FROM " . PREFIX . "_category ORDER BY posi ASC");
         while ($row = $db->get_row()) {
             $cat_info[$row['id']] = array();
             foreach ($row as $key => $value) {
                 $cat_info[$row['id']][$key] = $value;
             }
         }
         set_vars("category", $cat_info);
         $db->free();
     }
     $xml = "";
     $lastmod = date("Y-m-d");
     foreach ($cat_info as $cats) {
         if ($this->allow_url) {
             $loc = $this->home . $this->get_url($cats[id], $cat_info) . "/";
         } else {
             $loc = $this->home . "index.php?do=cat&category=" . $cats['alt_name'];
         }
         $xml .= $this->get_xml($loc, $lastmod);
     }
     return $xml;
 }
开发者ID:Gordondalos,项目名称:union,代码行数:29,代码来源:google.class.php

示例2: get_user

function get_user()
{
    $arr = get_vars();
    if (!in_array('logged_in', $arr) || !in_array('name', $arr)) {
        return false;
    }
    if (!$arr['logged_in']) {
        return false;
    }
    return $arr['name'];
}
开发者ID:arthaud,项目名称:write-ups-2016,代码行数:11,代码来源:function.php

示例3: import_or_new_with

 static function import_or_new_with($name, $settings)
 {
     $me = static::import($name);
     if ($me) {
         return $me;
     }
     $me = new static();
     $containee = $settings['containee'];
     $containee->__no_export = TRUE;
     foreach (get_vars($containee) as $key => $value) {
         if ($key !== '_cols') {
             if (is_object($value)) {
                 $me->{$key} = $v = clone $value;
             } else {
                 $me->{$key} = $value;
             }
         }
     }
     $me->_cols = [];
     $ColumnClass = static::$ColumnClass;
     foreach ($containee->cols as $ccol) {
         $state_arr = [];
         foreach (get_vars($ccol) as $key => $value) {
             if ($key != '__owner' && is_object($value)) {
                 $v = ref(clone $value);
                 $state_arr[$key] = $v;
             } else {
                 $state_arr[$key] = $value;
             }
         }
         $state_arr['__owner'] = ref($me);
         $state_arr['__no_export'] = FALSE;
         $c = $ColumnClass::__set_state($state_arr);
         $c->containee = ref($ccol);
         $me->_cols[] = ref($c);
     }
     $me->containee = ref($containee);
     $me->__no_export = FALSE;
     return $me;
 }
开发者ID:prkeshri,项目名称:getpanel,代码行数:40,代码来源:Table.php

示例4: get_vars

			<br /><br />
			<label>Senha</label> <input id="login" type="password" name="password" value="<?php 
echo get_vars('password');
?>
" class='form-class'/>
			<br /><br />
			<?php 
if (isset($_SESSION["error_message"])) {
    $message = trim(htmlspecialchars(isset($_SESSION["error_message"]) ? $_SESSION["error_message"] : null));
    echo '<p class="feedback-login">' . $message . '</p>';
    unset($_SESSION["error_message"]);
    session_destroy();
}
?>
			<br /><br />
			<input type="submit" class="btn-voltar" value="_" name="back" />
			<?php 
if (!$default_message) {
    ?>
<input type="submit" class="btn-cadastro" value="_" name="ok" /> <?php 
}
?>
			<input type="hidden" name="target_redirect" value="<?php 
echo htmlspecialchars(get_vars("target_redirect"));
?>
" />
			<br class='clean' />
		</div>
	</form>
</div>
开发者ID:r4fh4,项目名称:Visita,代码行数:30,代码来源:cadastro.inc.php

示例5: get_vars

 * @author     Adam Armstrong <adama@memetic.org>
 * @copyright  (C) 2006-2015 Adam Armstrong
 *
 */
$links = 1;
include_once "../includes/defaults.inc.php";
include_once "../config.php";
include_once "../includes/definitions.inc.php";
include $config['install_dir'] . "/includes/functions.inc.php";
include $config['html_dir'] . "/includes/functions.inc.php";
include $config['html_dir'] . "/includes/authenticate.inc.php";
if ($_SESSION['authenticated']) {
    // Do various queries which we use in multiple places
    include $config['html_dir'] . "/includes/cache-data.inc.php";
}
$vars = get_vars('GET');
if (strpos($_SERVER['REQUEST_URI'], "anon")) {
    $anon = 1;
}
if (is_array($config['branding'])) {
    if ($config['branding'][$_SERVER['SERVER_NAME']]) {
        foreach ($config['branding'][$_SERVER['SERVER_NAME']] as $confitem => $confval) {
            eval("\$config['" . $confitem . "'] = \$confval;");
        }
    } else {
        foreach ($config['branding']['default'] as $confitem => $confval) {
            eval("\$config['" . $confitem . "'] = \$confval;");
        }
    }
}
if (isset($vars['device']) && is_numeric($vars['device'])) {
开发者ID:rhizalpatrax64bit,项目名称:StacksNetwork,代码行数:31,代码来源:map.php

示例6: ContentBlockFoot

</form>

<?php 
ContentBlockFoot();
ContentBlockHead("Profiles");
?>


<center>
	<?php 
echo ResNavigationRet('ProfilesUpper', 0);
?>
</center>

<form action="profiles.php<?php 
echo substr(get_vars(), 0, strlen($get_vars) - 1);
?>
" method="post" name="prf_form">
	<table cellspacing="1" cellpadding="0" class="small1" style="border: none; background-color: #eee; width: 590px; text-align: center;">
	
<?php 
if (!$p_num) {
    echo "<td class=panel>No profiles available</td>";
} else {
    ?>
		<tr class="panel">
			<td>&nbsp;</td>
			<td align="center">
				<a href="profiles.php?<?php 
    echo $inc_profiles;
    ?>
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:profiles.php

示例7: array

if (!$user_group) {
    $user_group = array();
    $db->query("SELECT * FROM " . USERPREFIX . "_usergroups ORDER BY id ASC");
    while ($row = $db->get_row()) {
        $user_group[$row['id']] = array();
        foreach ($row as $key => $value) {
            $user_group[$row['id']][$key] = stripslashes($value);
        }
    }
    set_vars("usergroup", $user_group);
    $db->free();
}
//####################################################################################################################
//                    Определение забаненных пользователей и IP
//####################################################################################################################
$banned_info = get_vars("banned");
if (!is_array($banned_info)) {
    $banned_info = array();
    $db->query("SELECT * FROM " . USERPREFIX . "_banned");
    while ($row = $db->get_row()) {
        if ($row['users_id']) {
            $banned_info['users_id'][$row['users_id']] = array('users_id' => $row['users_id'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
        } else {
            if (count(explode(".", $row['ip'])) == 4) {
                $banned_info['ip'][$row['ip']] = array('ip' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
            } elseif (strpos($row['ip'], "@") !== false) {
                $banned_info['email'][$row['ip']] = array('email' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
            } else {
                $banned_info['name'][$row['ip']] = array('name' => $row['ip'], 'descr' => stripslashes($row['descr']), 'date' => $row['date']);
            }
        }
开发者ID:Hadryan,项目名称:L2LWEB,代码行数:31,代码来源:addcomments.php

示例8: connect_db

<?php

require_once '../../common/php/db.php';
$TABLE_NAME = 'sources';
$DB_NAME = 'uedwardn_clips';
# Get a connection to the database
$conn = connect_db($DB_NAME);
# These are the variables expected via POST
$posted_var_names = array('id');
# Get the POST variables
$posted_vars = get_vars($posted_var_names);
# Make an sql insert statement
$sql = get_sql_select_query($conn, $TABLE_NAME, $posted_vars);
# Query the db
$result = mysqli_query($conn, $sql);
if ($err = mysqli_error($conn)) {
    echo '{"success":false, "error":"' . $sql . '"}';
} else {
    echo result2json($result);
}
?>

开发者ID:enewe101,项目名称:snips,代码行数:21,代码来源:get_source.php

示例9: connect_db

<?php

require_once '../../common/php/db.php';
$TABLE_NAME = 'sources';
$DB_NAME = 'uedwardn_clips';
# Get a connection to the database
$conn = connect_db($DB_NAME);
# These are the variables expected via POST
$posted_var_names = array('id', 'bib_code', 'doc_name', 'authors', 'create_date', 'modify_date');
# Get the POST variables
$omit_absent = TRUE;
$posted_vars = get_vars($posted_var_names, $omit_absent);
# Make an sql insert statement
$sql = get_sql_select_query($conn, $TABLE_NAME, $posted_vars);
# Query the db
$result = mysqli_query($conn, $sql);
if ($err = mysqli_error($conn)) {
    echo '{"success":false, "error":"' . $sql . '"}';
} else {
    echo result2json($result);
}
//	$link_prefix = 'http://shpow.com/snips/snipper.php?source_id=';
//	while($row = mysqli_fetch_assoc($result)) {
//		$name = $row['display_name'];
//		$id = $row['id'];
//		echo "<a href='$link_prefix$id'>$name</a><br />";
//	}
?>

开发者ID:enewe101,项目名称:snips,代码行数:28,代码来源:get_sources.php

示例10: ResNavigationRet

function ResNavigationRet($form_name, $short = 0, $function = '', $aVar = '')
{
    global $p_num;
    global $page;
    global $_page;
    global $p_per_page;
    global $page_first_p;
    global $pages_num;
    global $logged;
    global $oTemplConfig;
    global $gallery_view;
    $pages_around = 5;
    if (!is_array($aVar)) {
        $per_page_array = array(10, 15, 20, 30, 50);
    } else {
        $per_page_array = $aVar;
    }
    if ($logged['admin']) {
        array_push($per_page_array, 100);
    }
    if (!$function) {
        $get_vars_controls = get_vars_controls(1, 0, 1, 1, 1);
        $get_vars = get_vars(0, 1, 1, 1, 0);
    } else {
        $func = create_function('', $function);
        $get_vars = $func();
    }
    $gallery_view = (int) $gallery_view;
    ob_start();
    if ($p_num) {
        ?>
		<form name="<?php 
        echo 'NavForm' . $form_name;
        ?>
" id="<?php 
        echo 'NavForm' . $form_name;
        ?>
" method="get" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
" style="margin: 0px;">
			<?php 
        echo $get_vars_controls;
        ?>
			<table class="text2" cellpadding="0" cellspacing="0" border="0">
<?php 
        if (!$short) {
            ?>
				<tr>
					<td><?php 
            echo _t("_Results");
            ?>
:&nbsp;<b><?php 
            echo (int) $page_first_p;
            ?>
</b>-<b><?php 
            echo min((int) ($page_first_p + $p_per_page - 1), (int) $p_num);
            ?>
</b>&nbsp;|&nbsp;<?php 
            echo _t("Total");
            ?>
:&nbsp;<b><?php 
            echo (int) $p_num;
            ?>
</b></td>
					<td>&nbsp;|&nbsp;<?php 
            echo _t("_Results per page");
            ?>
:&nbsp;</td>
					<td>
						<select name="p_per_page" onchange="javascript: document.forms['<?php 
            echo 'NavForm' . $form_name;
            ?>
'].submit();">
<?php 
            foreach ($per_page_array as $per_page_elem) {
                echo "<option value=\"{$per_page_elem}\" " . ($p_per_page == $per_page_elem ? 'selected="selected"' : '') . ">{$per_page_elem}</option>";
            }
            ?>
						</select>
					</td>
					<td>&nbsp;</td>
				</tr>
<?php 
        }
        ?>
				<tr>
					<td align="center" colspan="3">
						<?php 
        echo _t('_Pages');
        ?>
:&nbsp;
<?php 
        if ($page > 1) {
            echo "\n\t\t\t\t\t\t<a href=\"{$_SERVER['PHP_SELF']}{$get_vars}page=1&amp;gallery_view={$gallery_view}\">" . _t("_First") . "</a>&nbsp;|&nbsp;\n\t\t\t\t\t\t<a href=\"{$_SERVER['PHP_SELF']}{$get_vars}page=" . (int) ($page - 1) . "&amp;gallery_view={$gallery_view}\">" . _t("_Prev") . "</a>&nbsp;|&nbsp;";
        }
        // print all previous pages
        for ($i = max($page - $pages_around, 1); $i < $page; $i++) {
            echo "\n\t\t\t\t\t\t<a href=\"{$_SERVER['PHP_SELF']}{$get_vars}page={$i}&amp;gallery_view={$gallery_view}\">{$i}</a>&nbsp;";
        }
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:101,代码来源:admin.inc.php

示例11: authenticate

 /**
  * método para autenticar usuário.
  */
 public function authenticate()
 {
     global $secury_key;
     // carregar variaveis globais
     require ROOT_WEBSITE . "scripts/load_globals.php";
     $login = trim(strip_tags(isset($_POST["login"]) ? $_POST["login"] : ""));
     $pws = trim(strip_tags(isset($_POST["password"]) ? $_POST["password"] : ""));
     $now = date("Y-m-d H:i:s");
     // verificar se existe sessão criada
     if (isset($_SESSION["login_data_site"])) {
         $session_data = $_SESSION["login_data_site"];
         if ($session_data["login_key"] == md5($secury_key . $session_data["ip"] . $session_data["user_key"])) {
             $SQL = "SELECT * FROM tb_user WHERE id_user = '" . mysql_real_escape_string($session_data["user_key"]) . "' AND active='1' AND verify='1' ";
             $results = $connection->execute($SQL, true);
             if ($results) {
                 //calcular tempo do ultimo acesso ao sistema
                 $diff_last_login = EXPIRATION_TIME;
                 if ($results[0]["dt_last_login"]) {
                     $last_login = $results[0]["dt_last_login"];
                     $diff_last_login = timeDiff($last_login, $now);
                 }
                 if ($results[0]["dt_last_login"] && $diff_last_login > EXPIRATION_TIME) {
                     $this->logout();
                 }
                 // alterar status do usuário para logado
                 $SQL = "UPDATE tb_user SET dt_last_login = '" . $now . "' WHERE id_user = '" . mysql_real_escape_string($session_data["user_key"]) . "' ";
                 $connection->execute($SQL);
                 session_regenerate_id();
                 return true;
             }
         }
     }
     //caso não haja sessão, verifica se o acesso foi feito pelo facebook
     if ($_POST['facebook-login'] == 1 && !empty($_POST['facebook-name'])) {
         //cria senha padrão para usuários facebook
         $pws = 'fb#us3r$p455w0rd';
         //verifica se já existe o user
         $SQL = 'SELECT * FROM tb_user WHERE email = "' . $login . '" ';
         $res = $connection->execute($SQL, true);
         //caso não exista o usuário, é criado um usuário com dados do facebook
         if (!$res) {
             $SQL = 'INSERT INTO tb_user(nm_user, email, password, verification_code, active, verify, logged, login)';
             $SQL .= ' VALUES("' . $_POST['facebook-name'] . '", "' . mysql_real_escape_string($login) . '", MD5("' . $pws . '"), "f7a4c6e3b8o0o0k2", 1, 1, 0, "' . mysql_real_escape_string($login) . '")';
             $connection->execute($SQL);
         }
     }
     // caso não haja sessão pega os dados do form de login.
     if (!empty($login) || !empty($pws)) {
         $SQL = "SELECT * FROM tb_user WHERE login = '" . mysql_real_escape_string($login) . "' AND active='1' AND verify='1' ";
         $results = $connection->execute($SQL, true);
         // se encontrou o login digitado verifica a senha
         if ($results) {
             // verificar senhas
             if (!empty($results[0]["password"]) && $results[0]["password"] == md5($pws)) {
                 // alterar status do usuário para logado
                 $SQL = "UPDATE tb_user SET logged = '1', dt_last_login = '" . $now . "' WHERE id_user = '" . mysql_real_escape_string($results[0]["id_user"]) . "' ";
                 $connection->execute($SQL);
                 // armazenar dados na session
                 $ip = $_SERVER['REMOTE_ADDR'];
                 $hora = time();
                 $secury_key = md5($secury_key . $ip . $results[0]["id_user"]);
                 $_SESSION["login_data_site"] = array("full_name" => $results[0]["nm_user"], "email" => $results[0]["email"], "login" => $results[0]["login"], "login_key" => $secury_key, "ip" => $ip, "user_key" => $results[0]["id_user"]);
                 unset($login);
                 unset($pws);
                 session_regenerate_id();
                 $target_redirect = null;
                 if ($this->target_redirect) {
                     $target_redirect = $this->target_redirect;
                 } else {
                     if (get_vars("target_redirect") && !preg_match("/(\\.\\.|\"|\\'|\\.)+/", get_vars("target_redirect"))) {
                         $target_redirect = get_vars("target_redirect");
                     }
                 }
                 header("Location: " . $alias . $target_redirect);
                 header("Content-Length: 0");
                 exit;
             } else {
                 if (!isset($_SESSION["error_message"])) {
                     $_SESSION["error_message"] = "Dados de acesso incorretos.";
                 }
                 return false;
             }
         } else {
             if (!isset($_SESSION["error_message"])) {
                 $_SESSION["error_message"] = "Dados de acesso incorretos.";
             }
             return false;
         }
     } else {
         if (!isset($_SESSION["error_message"])) {
             $_SESSION["error_message"] = "Preencha os campos para efetuar o login.";
         }
         return false;
     }
     return false;
 }
开发者ID:r4fh4,项目名称:Visita,代码行数:99,代码来源:cadastro.class.php

示例12: cadastro_active

 public function cadastro_active()
 {
     // carregar variaveis globais
     require ROOT_WEBSITE . "scripts/load_globals.php";
     $default_message = '<h3>Cadastro Ativado com sucesso</h3>';
     if (get_vars("email") && get_vars("token")) {
         $results = $this->model->recover_dados(get_vars("email"), get_vars("token"));
         if (!$results) {
             header("Location: " . $base_url_site);
             header("Content-Length: 0");
             exit;
         }
         $this->model->active_user(get_vars("email"));
     } else {
         header("Location: " . $base_url_site);
         header("Content-Length: 0");
         exit;
     }
     $css_files = write_css_header(array('cadastro'));
     $no_footer = true;
     include $template_directory . "header.inc.php";
     include $template_directory . "ativacao.inc.php";
     include $template_directory . "footer.inc.php";
     $connection->disconnect();
 }
开发者ID:r4fh4,项目名称:Visita,代码行数:25,代码来源:cadastro_controller.class.php

示例13: check_function

/** run tests on a function. the code is passed in $txt */
function check_function($name, $txt, $offset)
{
    global $API_params;
    if (preg_match_all('/zend_parse_parameters(?:_ex\\s*\\([^,]+,[^,]+|\\s*\\([^,]+),\\s*"([^"]*)"\\s*,\\s*([^{;]*)/S', $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
        $GLOBALS['current_function'] = $name;
        foreach ($matches as $m) {
            $GLOBALS['error_few_vars_given'] = false;
            update_lineno($offset + $m[2][1]);
            $vars = get_vars(substr($txt, 0, $m[0][1]));
            // limit var search to current location
            $params = get_params($vars, $m[2][0]);
            $optional = $varargs = false;
            $last_last_char = $last_char = '';
            $j = -1;
            $len = strlen($m[1][0]);
            for ($i = 0; $i < $len; ++$i) {
                switch ($char = $m[1][0][$i]) {
                    // separator for optional parameters
                    case '|':
                        if ($optional) {
                            error("more than one optional separator at char #{$i}");
                        } else {
                            $optional = true;
                            if ($i == $len - 1) {
                                error("unnecessary optional separator");
                            }
                        }
                        break;
                        // separate_zval_if_not_ref
                    // separate_zval_if_not_ref
                    case '/':
                        if (!in_array($last_char, array('r', 'z'))) {
                            error("the '/' specifier cannot be applied to '{$last_char}'");
                        }
                        break;
                        // nullable arguments
                    // nullable arguments
                    case '!':
                        if (!in_array($last_char, array('a', 'C', 'f', 'h', 'o', 'O', 'r', 's', 't', 'z', 'Z'))) {
                            error("the '!' specifier cannot be applied to '{$last_char}'");
                        }
                        break;
                    case '&':
                        if (version_compare(VERSION, '6', 'ge')) {
                            if ($last_char == 's' || $last_last_char == 's' && $last_char == '!') {
                                check_param($params, ++$j, 'UConverter*', $optional);
                            } else {
                                error("the '&' specifier cannot be applied to '{$last_char}'");
                            }
                        } else {
                            error("unknown char ('&') at column {$i}");
                        }
                        break;
                    case '+':
                    case '*':
                        if (version_compare(VERSION, '6', 'ge')) {
                            if ($varargs) {
                                error("A varargs specifier can only be used once. repeated char at column {$i}");
                            } else {
                                check_param($params, ++$j, 'zval****', $optional);
                                check_param($params, ++$j, 'int*', $optional);
                                $varargs = true;
                            }
                        } else {
                            error("unknown char ('{$char}') at column {$i}");
                        }
                        break;
                    default:
                        if (isset($API_params[$char])) {
                            foreach ($API_params[$char] as $exp) {
                                check_param($params, ++$j, $exp, $optional);
                            }
                        } else {
                            error("unknown char ('{$char}') at column {$i}");
                        }
                }
                $last_last_char = $last_char;
                $last_char = $char;
            }
        }
    }
}
开发者ID:garybulin,项目名称:php7,代码行数:83,代码来源:check_parameters.php

示例14: check_function

/** run tests on a function. the code is passed in $txt */
function check_function($name, $txt, $offset)
{
    global $API_params;
    $regex = '/
		(?: zend_parse_parameters(?:_throw)?               \\s*\\([^,]+
		|   zend_parse_(?:parameters_ex|method_parameters) \\s*\\([^,]+,[^,]+
		|   zend_parse_method_parameters_ex                \\s*\\([^,]+,[^,]+,[^,+]
		)
		,\\s*"([^"]*)"\\s*
		,\\s*([^{;]*)
	/Sx';
    if (preg_match_all($regex, $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
        $GLOBALS['current_function'] = $name;
        foreach ($matches as $m) {
            $GLOBALS['error_few_vars_given'] = false;
            update_lineno($offset + $m[2][1]);
            $vars = get_vars(substr($txt, 0, $m[0][1]));
            // limit var search to current location
            $params = get_params($vars, $m[2][0]);
            $optional = $varargs = false;
            $last_char = '';
            $j = -1;
            $spec = $m[1][0];
            $len = strlen($spec);
            for ($i = 0; $i < $len; ++$i) {
                $char = $spec[$i];
                switch ($char = $spec[$i]) {
                    // separator for optional parameters
                    case '|':
                        if ($optional) {
                            error("more than one optional separator at char #{$i}");
                        } else {
                            $optional = true;
                            if ($i == $len - 1) {
                                error("unnecessary optional separator");
                            }
                        }
                        break;
                        // separate_zval_if_not_ref
                    // separate_zval_if_not_ref
                    case '/':
                        if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
                            error("the '/' specifier should not be applied to '{$last_char}'");
                        }
                        break;
                        // nullable arguments
                    // nullable arguments
                    case '!':
                        if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
                            check_param($params, ++$j, 'zend_bool*', $optional);
                        }
                        break;
                        // variadic arguments
                    // variadic arguments
                    case '+':
                    case '*':
                        if ($varargs) {
                            error("A varargs specifier can only be used once. repeated char at column {$i}");
                        } else {
                            check_param($params, ++$j, 'zval**', $optional);
                            check_param($params, ++$j, 'int*', $optional);
                            $varargs = true;
                        }
                        break;
                    case 's':
                    case 'p':
                        check_param($params, ++$j, 'char**', $optional, $allow_uninit = true);
                        check_param($params, ++$j, 'size_t*', $optional, $allow_uninit = true);
                        if ($optional && !$params[$j - 1][2] && !$params[$j][2] && $params[$j - 1][0] !== '**dummy**' && $params[$j][0] !== '**dummy**') {
                            error("one of optional vars {$params[$j - 1][0]} or {$params[$j][0]} must be initialized", 1);
                        }
                        break;
                    case 'C':
                        // C must always be initialized, independently of whether it's optional
                        check_param($params, ++$j, 'zend_class_entry**', false);
                        break;
                    default:
                        if (!isset($API_params[$char])) {
                            error("unknown char ('{$char}') at column {$i}");
                        }
                        // If an is_null flag is in use, only that flag is required to be
                        // initialized
                        $allow_uninit = $i + 1 < $len && $spec[$i + 1] === '!' && in_array($char, array('l', 'L', 'd', 'b'));
                        foreach ($API_params[$char] as $exp) {
                            check_param($params, ++$j, $exp, $optional, $allow_uninit);
                        }
                }
                $last_char = $char;
            }
        }
    }
}
开发者ID:cefalo19,项目名称:php-src,代码行数:93,代码来源:check_parameters.php

示例15: Copyright

http://dle-news.ru/
-----------------------------------------------------
Copyright (c) 2004,2015 SoftNews Media Group
=====================================================
Данный код защищен авторскими правами
=====================================================
Файл: rssinform.php
-----------------------------------------------------
Назначение: Вывод RSS информеров
=====================================================
*/
if (!defined('DATALIFEENGINE')) {
    die("Hacking attempt!");
}
//################# Определение информеров
$informers = get_vars("informers");
if (!is_array($informers)) {
    $informers = array();
    $db->query("SELECT * FROM " . PREFIX . "_rssinform ORDER BY id ASC");
    while ($row_b = $db->get_row()) {
        $informers[$row_b['id']] = array();
        foreach ($row_b as $key => $value) {
            $informers[$row_b['id']][$key] = stripslashes($value);
        }
    }
    set_vars("informers", $informers);
    $db->free();
}
$allow_cache = $config['allow_cache'];
$config['allow_cache'] = 1;
$temp = array();
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:rssinform.php


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