Advertisement
Guest User

Untitled

a guest
Jul 5th, 2010
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.45 KB | None | 0 0
  1. <?php
  2. require "openid.php";
  3.  
  4. if(!isset($_GET["openid_mode"])) {
  5.     if(isset($_POST["openid_identifier"])) {
  6.         $openid = new LightOpenID;
  7.         $openid->identity = $_POST['openid_identifier'];
  8.         header('Location: ' . $openid->authUrl());
  9.     }
  10.    
  11.     $content = "
  12.         Click your <a href='http://openid.net/what' target='_new'>OpenID</a> account provider:
  13.         <div id='provider' class='round5'>
  14.             <a title='Google'><img src='images/providers/Google.png'/></a>
  15.             <a title='Yahoo'><img src='images/providers/Yahoo.png'/></a>
  16.             <a title='MyOpenID'><img src='images/providers/MyOpenID.png'/></a>
  17.             <a title='AOL'><img src='images/providers/AOL.png'/></a>
  18.             <a title='Wordpress'><img src='images/providers/Wordpress.png'/></a>
  19.             <a title='Blogger'><img src='images/providers/Blogger.png'/></a>
  20.             <a title='LiveJournal'><img src='images/providers/LiveJournal.png'/></a>
  21.             <a title='ClickPass'><img src='images/providers/ClickPass.png'/></a>
  22.            
  23.             <br class='c'>
  24.                        
  25.             <div id='askProvider'></div>
  26.         </div>
  27.         Or, manually enter your <a href='http://openid.net/what' target='_new'>OpenID</a>:
  28.         <form method='post' action=''>
  29.             <input type='text' name='openid_identifier' />
  30.             <input type='submit' class='button' value='Log in' />
  31.            
  32.             <br class='c'>
  33.         </form>
  34.     ";
  35. } else if($_GET["openid_mode"] == "cancel") {
  36.     $content = "You have canceled authentication!<br><br><a href='/' class='button'>Back</a>";
  37. } else {
  38.     $openid = new LightOpenID;
  39.     $openid->required = array('contact/email');
  40.     $foo = $openid->getAttributes();
  41.     print_r($foo);
  42.    
  43.     $content = 'User ' . ($openid->validate() ? $_GET['openid_identity'] . ' has ' : 'has not ') . 'logged in.';
  44. }
  45. ?>
  46. <!DOCTYPE html>
  47. <html>
  48.     <head>
  49.         <title>ChanCom</title>
  50.         <!-- Made by Pontus Aurdal -->
  51.         <meta charset="utf-8"/>
  52.         <link rel="stylesheet" type="text/css" href="style.css"/>
  53.         <link rel="icon" type="image/png" href="favicon.ico"/>
  54.        
  55.         <script src="http://www.google.com/jsapi"></script>
  56.         <script type="text/javascript">
  57.             google.load("jquery", "1.4.2");
  58.             google.load("jqueryui", "1.5.2");
  59.         </script>
  60.         <script type="text/javascript" src="script.js"></script>
  61.     </head>
  62.     <body>
  63.         <div id="fWrapper">
  64.             <h1>ChanCom</h1>
  65.             <div id="fDesc">
  66.                 <b>ChanCom</b> is free to use and  and is an open forum for everyone to come and discuss.
  67.                 You join a channel, as on IRC, and start sending your posts.
  68.             </div>
  69.             <div id="fContent">
  70.                 <?=$content;?>
  71.             </div>
  72.         </div>
  73.     </body>
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement