-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·42 lines (37 loc) · 1018 Bytes
/
index.php
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
<?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");
}
}
?>
<title> 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>
<div id="buttons">
<h1>Twitter Facebook Login </h1>
<a href="index.php?login&oauth_provider=twitter"><img src="images/tw_login.png"></a>
<a href="index.php?login&oauth_provider=facebook"><img src="images/fb_login.png"></a> <br />
<br />
</div>