OSDN Git Service

embrj
[embrj/master.git] / login.php
1 <?php 
2         include ('lib/twitese.php');
3  
4         delCookie('oauth_token');
5         delCookie('oauth_token_secret');
6         delCookie('user_id');
7         delCookie('twitese_name');
8         delCookie('twitese_pw');
9         delCookie('friends_count');
10         delCookie('statuses_count');
11         delCookie('followers_count');
12         delCookie('imgurl');
13         delCookie('name');
14         delCookie('listed_count');
15         delCookie('recover');
16         delCookie('homeInterval');
17         delCookie('updatesInterval');
18         session_destroy();
19         
20         ob_start();
21         if(!isset($_SESSION)){
22                 session_start();
23         }
24 ?>
25 <!DOCTYPE HTML>
26 <html>
27 <head>
28 <meta charset="utf-8" />
29 <meta name="keywords" content="embr, open source, php, twitter, oauth" />
30 <meta name="description" content="Vivid Interface for Twitter" />
31 <meta name="author" content="Contributors" />
32 <title>Embr / Sign In</title>
33 <style>
34 *{list-style:none outside none;margin:0;padding:0;}
35 body{background:none repeat scroll 0 0 #F6F7F8;font:10px helvetica,arial,sans-serif;text-align:center;margin:0;padding:0;}
36 a:active,a:focus{outline:none;}
37 a{color:#BFBFBF;outline:medium none;text-decoration:none;}
38 .form-container #container{background:none repeat scroll 0 0 transparent;margin-top:70px;text-align:left;width:400px;border-width:0;}
39 .form-container #header{position:absolute;text-align:center;z-index:-1;}
40 .form-container #header h1{margin-left:-50px;margin-top:-30px;}
41 .form-container .form{box-shadow:0 0 20px #666;-webkit-box-shadow:0 0 20px #666;-moz-box-shadow:0 0 20px #666;background-color:#F1F8FC;margin-top:66px;opacity:0.8;}
42 .form-container #footer{text-align:center;}
43 #container{background:none repeat scroll 0 0 #FFF;border:1px solid #D6D8D9;text-align:left;width:920px;margin:0 auto;padding:20px;}
44 #header h1{float:none;}
45 #footer{color:#BFBFBF;font-size:13px;text-align:center;padding:10px;}
46 .button:hover{background-position:center center;}
47 .button:active{background-position:center bottom;}
48 .rounded_left_12px{-moz-border-radius-topleft:12px;-moz-border-radius-bottomleft:12px;border-top-left-radius:12px;border-bottom-left-radius:12px;border-top-left-radius:12px;border-bottom-left-radius:12px;}
49 .rounded_right_12px{-moz-border-radius-topright:12px;-moz-border-radius-bottomright:12px;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-right-radius:12px;border-bottom-right-radius:12px;}
50 .rounded_5px{-moz-border-radius:5px;border-radius:5px;border-radius:5px;}
51 .clear{display:block;}
52 .form{padding:0 2px;}
53 .form > fieldset{border-width:0;padding:20px 10px 10px;}
54 .form fieldset fieldset{border-width:0;padding:10px 0 0;}
55 .form .checkbox{color:#666;font-size:1.15em;margin-left:90px;}
56 .form .checkbox input{float:left;margin:0 .5em 0 0;}
57 .form .form-footer{background:none repeat scroll 0 0 #E0F0FB;clear:both;font-size:12px;height:25px;line-height:25px;margin:10px 0 0;padding:10px;}
58 .form .form-footer .delete:hover{color:#B42B2B;text-decoration:underline;}
59 .form-footer .button{background:none repeat scroll 0 0 #FFF;border:1px solid #EEE;color:#666;cursor:pointer;display:inline-block;margin-left:-2px;font-weight:700;text-align:center;font-family:helvetica;outline:0;zoom:1;font-size:13px;height:21px;line-height:20px;vertical-align:middle;padding:1px 20px 2px;}
60 .form-footer .button:hover{background-color:#DDD;}
61 .form-footer .button:active{background:none repeat scroll 0 0 #999!important;color:#CCC!important;outline:medium none;text-shadow:0 -1px 0 #404348;border-color:#61676F!important;}
62 .form-footer .button.cancel:hover{background-color:#EDEDED;}
63 .form-footer input.button{outline:none!important;font-size:13px;height:24px;padding-top:0;vertical-align:middle;}
64 .form-footer .button::-moz-focus-inner{border-color:transparent!important;}
65 a:hover,.form-footer{color:#999;}
66 #oauth {border:none;line-height: 22px;margin-right:-2px;padding-left:25px;}
67 </style>
68 <script type="text/javascript">
69 function register() {
70         if (window.confirm("Make sure you can get access to twitter.com!")) {
71                 window.open("https://mobile.twitter.com/signup", "registerwindow", "height=450, width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=yes, status=yes");
72         }
73 }
74 </script>
75 </head>
76
77 <body class="form-container">
78 <div class="clear rounded_5px" id="container">
79  <div id="header">
80 <h1><a href="/"><img border="0" alt="Embr" height="167" width="500" src="img/big_logo.png"></a></h1>
81 </div>
82  
83 <?php if(isset($_GET['oauth']) && $_GET['oauth'] == 'denied') {?> 
84 <style type="text/css">
85 .form-container .form {display:none}
86 </style>
87 <div style="display: block; color: rgb(255, 0, 0); margin-top: 150px; margin-bottom: 10px; text-align: center;">
88 <h1 style="font-size: 20px;">Sorry, you are unauthorized to this site!</h1>
89 <p style="font-size: 12px;">Please contact the sitemaster for the ID-authorization issues.</p>
90 </div>
91 <?php } ?>
92  <!--[if lt IE 9]>
93 <style type="text/css">
94 .form-container .form {display:none}
95 </style>
96 <div style="display: block; color: rgb(255, 0, 0); margin-top: 150px; margin-bottom: 10px; text-align: center;">
97 <h1 style="font-size: 20px;">Sorry, higer version of IE is needed!</h1>
98 <p style="font-size: 12px;">For a better experience using this site, please update your IE or use web browsers with WebKit or Gecko core, like Firefox Chrome and Safari.</p>
99 </div>
100   <![endif]-->
101 <form class="form rounded_5px" id="form_login" method="post" action="oauth.php">
102 <fieldset class="clear">
103                 <div class="form-footer rounded_5px" style="padding-left:100px">
104                         <input type="submit" class="button rounded_left_12px" id="oauth" name="signin" value="Sign In">
105 <a class="button rounded_right_12px" id="register" title="register" onclick="register()">Sign Up!</a>
106 </div>
107 <ol>
108 <li>
109 <fieldset>
110 <ul>
111 <li class="checkbox"><input type="hidden" name="remember" value="0"><input type="checkbox" checked="checked" id="agent_session_remember_me" name="proxify" value="1">I CANNOT access to twitter.com!</li>
112 </ul>
113 </fieldset>
114 </li>
115 </ol>
116 </fieldset>
117 </form>
118 <div style="background: none repeat scroll 0% 0% transparent;" id="footer">
119 <p>&copy; 2013 Contributors <?php if(isset($_COOKIE['twitese_name'])) echo 'and '.$_COOKIE['twitese_name'];?> &middot; <a href="https://github.com/AstroProfundis/embrr" target="_blank" title="Embrr Open Source">Open Source</a></p>
120 </div>
121 </div>
122 </body>
123 </html>
124 <?php ob_end_flush(); ?>