-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
75 lines (62 loc) · 1.36 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
require_once( 'config.php' );
require_once( 'LogMemory.php' );
require_once( 'GoogleHandler.php' );
$gh = new GoogleHandler();
if( isset( $_GET['code'] ) ) {
$gh->requestTokens( $_GET['code'] );
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>YouTube – New Subscription Videos</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="bootstrap-3.2.0/css/bootstrap.min.css" />
<style>
.label {
margin-right: 8px;
}
.panel {
display: inline-block;
min-width: 400px;
}
.panel textarea {
background-color: #fafafa;
border: 1px solid #e0e0e0;
border-radius: 4px;
box-sizing: border-box;
font-family: monospace;
font-size: 12px;
min-height: 80px;
padding: 10px;
resize: vertical;
width: 100%;
}
</style>
</head>
<body>
<div class="container">
<div class="page-header">
<h1>YouTube – New Subscription Videos</h1>
</div>
<?php
if( LogMemory::hasErrors() ) {
LogMemory::printErrors();
}
?>
<?php if( !$gh->hasRefreshToken() ): ?>
<h3>
<span class="label label-danger">No access token</span>
<a href="<?php echo $gh->getLink(); ?>">Obtain access token.</a>
</h3>
<?php else: ?>
<h3>
<span class="label label-success">Access token found</span>
<a href="rss.php">View your RSS feed.</a>
</h3>
<?php endif ?>
</div>
</body>
</html>