forked from 9inevolt/OverRustle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavbar.php
More file actions
105 lines (94 loc) · 3.73 KB
/
Copy pathnavbar.php
File metadata and controls
105 lines (94 loc) · 3.73 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
$SERVICE_OPTIONS = array(
"twitch" => "Twitch",
"twitch-vod" => "Twitch - VOD",
"hitbox" => "Hitbox",
"castamp" => "CastAmp",
"youtube" => "Youtube",
"youtube-playlist" => "Youtube (Playlist)",
"mlg" => "MLG (Beta*)",
"ustream" => "Ustream (Beta*)",
"dailymotion" => "Dailymotion",
"azubu" => "Azubu",
"picarto" => "Picarto",
"chaturbate" => "Chaturbate",
"advanced" => "Advanced"
);
?>
<nav class="navbar navbar-default navbar-inverse" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand hidden-md hidden-sm" href="/strims">OverRustle</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="#"><div id="twitch-ajax"></div></a></li>
<li><a target="_blank" href="/strims"><div id="server-broadcast"></div></a></li>
<li class="donate"><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6TUMKXJ23YGQG"><span>Donate</span></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<?php
if (basename($_SERVER['PHP_SELF'], '.php') == 'channel') {
if ($config['chat_enable']) {
$otherchat = 'Channel';
}
} elseif (!empty($s) && in_array($s, array('twitch', 'hitbox', 'ustream', 'azubu'))) {
$otherchat = ucfirst($s);
}
if (!empty($otherchat))
{
echo '<li class="active hidden-md hidden-sm"><a href="#destinychat" role="tab" data-toggle="tab">Destiny Chat</a></li>';
echo '<li class="hidden-md hidden-sm"><a href="#otherchat" role="tab" data-toggle="tab"> ' . $otherchat . ' Chat</a></li>';
}
?>
<form action="destinychat" class="navbar-form navbar-left" role="search">
<div class="form-group">
<select name="s" class="form-control">
<?php
foreach ($SERVICE_OPTIONS as $key => $value) {
echo '<option value="'.$key.'">'.$value.'</option>';
}
?>
</select>
<input type="text" name="stream" type="text" class="form-control" placeholder="Stream/Video ID"/>
<button type="submit" class="btn btn-default hidden-md hidden-sm">Go</button>
</div>
</form>
<li>
<div class="btn-group">
<?php
require_once 'config.php';
if (isset($_SESSION['user'])) { ?>
<a href="/profile">
<button class="btn btn-default navbar-btn" title="Profile">
<span class="glyphicon glyphicon-user"></span>
</button>
</a>
<a href="/logout">
<button class="btn btn-default navbar-btn" title="Log Out">
<span class="glyphicon glyphicon-off"></span>
</button>
</a>
<?php
} else {
$twitch_url = 'https://api.twitch.tv/kraken/oauth2/authorize?response_type=code'
. '&client_id='.$config['twitch_client_id']
. '&redirect_uri='.$config['twitch_redirect_uri']
. '&scope=user_read';
?>
<a href="<?php echo $twitch_url ?>">
<button class="btn btn-default navbar-btn" title="Log In with Twitch">
<span>Log In</span>
</button>
</a>
<?php
}
?>
</div>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>