Example #1
0
         $acct = new Account($acct->id);
     } else {
         $acct = new Account($acct);
         $acct->updateLastLogin();
     }
     $acct->load($acct->id);
     $_SESSION["user"]["id"] = $acct->id;
     $_SESSION["user"]["prefs"] = $acct->prefs;
     $_SESSION["user"]["nick"] = !empty($acct->nickname) ? $acct->nickname : $openid;
     $_SESSION["user"]["fullname"] = $acct->fullname;
     $_SESSION["user"]["apikey"] = $acct->apikey;
     $_SESSION["user"]["guid"] = $acct->guid;
     $_SESSION["user"]["adminLevel"] = $acct->adminLevel;
     $_SESSION["user"]["timezone"] = $acct->timezone;
 } else {
     Template::Simple("New OpenID Associated", "Thank you! Your new OpenID username has been associated with this account. You may now <a href='/settings.php'>continue with more settings</a>.");
     exit;
 }
 session_write_close();
 if (isset($_GET["redir"])) {
     if (preg_match(',/login\\.php$,', $_GET["redir"])) {
         header("Location: http://" . $_SERVER["SERVER_NAME"]);
     } else {
         if (preg_match(',/oid\\.php$,', $_GET["redir"])) {
             header("Location: http://" . $_SERVER["SERVER_NAME"] . "/settings.php");
         } else {
             header("Location: " . $_GET["redir"]);
         }
     }
 } else {
     header("Location: http://" . $_SERVER["SERVER_NAME"]);
Example #2
0
<?php

/*
  This file is part of the Pastebin package.
  Copyright (c) 2003-2008, Stephen Olesen
  All rights reserved.
  More information is available at http://pastebin.ca/
*/
require "include/global.inc.php";
$newest = PasteUtil::mostRecent();
$t = new Template();
header("Location: " . $t->_tpl_vars['url']['root'] . "/{$newest}");
Template::Simple("Going to Newest Paste", "You are now being redirected to the newest paste, " . $t->_tpl_vars['url']['root'] . "/{$newest}");