예제 #1
0
 function addQuery($value)
 {
     $debugbar = globals('debugbar');
     foreach (func_get_args() as $value) {
         $debugbar->addQuery($value, 'queries');
     }
 }
예제 #2
0
파일: index.php 프로젝트: Utley/warden
function getPlayerName($sID)
{
    globals($apiKey);
    $steamURL = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key={$apiKey}&steamids=76561197960435530";
    $ch = curl_init($steamURL);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
    $head = curl_exec($ch);
    curl_close($ch);
    $jsonobj = json_decode($head);
    return $jsonobj->personaname;
}
예제 #3
0
 public function request($sKey = null, $mDefault = null)
 {
     $sMethod = strtolower(server('request_method')) ?: 'get';
     return $sMethod == 'post' ? $this->_globals($sKey, $_POST, $mDefault) : globals($sKey, $_GET, $mDefault);
 }
예제 #4
0
파일: globals.php 프로젝트: exts/nab145
#functions/globals.php File
#Version 1.3
****************************************************************
#Copy Righted 2006-2007(http://nevuxbulletin.com)
#Created By NevuxAB Developement Team
****************************************************************
*/
if (!defined("NABPROOF")) {
    die("Hacking attempt");
}
function globals()
{
    foreach ($_GET as $key => $val) {
        if (get_magic_quotes_gpc()) {
            $val = stripslashes($val);
        } else {
            $val = addslashes($val);
        }
        return $_GET[$key] = htmlspecialchars(strip_tags($val));
    }
    foreach ($_POST as $key => $val) {
        if (get_magic_quotes_gpc()) {
            $val = stripslashes($val);
        } else {
            $val = addslashes($val);
        }
        return $_POST[$key] = htmlspecialchars(strip_tags($val));
    }
}
globals();
 static function password_expired()
 {
     parent::password_expired();
     view_var('user', globals('user'));
 }
 /**
  * Releases the vision to renew the password from the hash.
  */
 static function password_expired()
 {
     $model = \Auth::$model;
     # hash GET param exists
     if (!($hash = data('hash'))) {
         go('/');
     }
     # user hash exists
     $user = $model::first(array('fields' => 'id, email, name', 'where' => "hash_password_expired = '{$hash}'"));
     if (empty($user)) {
         go('/');
     }
     # POST passwords sent
     if ($model::data()) {
         $user->password = $model::data('password');
         $user->password_confirm = $model::data('password_confirm');
         # validate passwords
         if ($user->validate()) {
             # password edit
             $code = password_edit($user->email, $user->password);
             # check status
             if ($code === -2) {
                 flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');
             } else {
                 if ($code === true) {
                     flash('Sua senha foi renovada com sucesso.');
                 }
             }
             go('/');
         }
     }
     globals('user', $user);
 }
예제 #7
0
function files($sKey = null, $mDefault = null)
{
    return globals($sKey, $_FILES, $mDefault);
}