Blame view

social/index.php 1.6 KB
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  <?php
  //Always place this code at the top of the Page
  session_start();
  if (isset($_SESSION['id'])) {
      // Redirection to login page twitter or facebook
      header("location: home.php");
  }
  
  if (array_key_exists("login", $_GET)) {
      $oauth_provider = $_GET['oauth_provider'];
      if ($oauth_provider == 'twitter') {
          header("Location: login-twitter.php");
      } else if ($oauth_provider == 'facebook') {
          header("Location: login-facebook.php");
      }
  }
  ?>
  <html>
  <head>
  <title>9lessons Facebook | Twitter Login</title>
  <style type="text/css">
      #buttons
  	{
  	text-align:center
  	}
      #buttons img,
      #buttons a img
      { border: none;}
  	h1
  	{
  	font-family:Arial, Helvetica, sans-serif;
  	color:#999999;
  	}
  	
  </style>
  <script type="text/javascript" src="http://userapi.com/js/api/openapi.js?34"></script>
  <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
  <script>
  VK.init({apiId: 3078252}); // __APP_ID__ - èäåíòèôèêàòîð ïðèëîæåíèÿ
  </script>
  </head>
  
  <body>
  <div id="buttons">
  <h1>Twitter Facebook Login </h1>
      <a href="?login&oauth_provider=twitter"><img src="images/tw_login.png"></a>&nbsp;&nbsp;&nbsp;
      <a href="?login&oauth_provider=facebook"><img src="images/fb_login.png"></a> <br />
  
  <a href="http://oauth.vk.com/authorize?client_id=3079859&scope=&redirect_uri=http://extremstyle.ua/social/login-vkontakte.php&response_type=code" onClick="">Âîéòè ÷åðåç ÂÊîíòàêòå</a>
  
   <div id="vk_auth" style="visibility:hide;"></div>
  <script type="text/javascript">
  VK.Widgets.Auth("vk_auth", {width: "300px", authUrl: '/social/login-vkontakte.php?'});
  </script>
  
  
  </div></body><html>