|
@@ -1,12 +1,12 @@ discard block |
|
|
block discarded – undo |
|
1
|
1
|
<?php |
|
2
|
|
- if(isset($_SESSION['siteusername'])) { |
|
|
2
|
+ if (isset($_SESSION['siteusername'])) { |
|
3
|
3
|
$stmt = $__db->prepare("UPDATE users SET ip = :ip WHERE username = :username"); |
|
4
|
4
|
$stmt->bindParam(":username", $_SESSION['siteusername']); |
|
5
|
|
- $stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
|
5
|
+ $stmt->bindParam(":ip", $_SERVER["HTTP_CF_CONNECTING_IP"]); |
|
6
|
6
|
$stmt->execute(); |
|
7
|
7
|
} |
|
8
|
8
|
|
|
9
|
|
- if(isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) { |
|
|
9
|
+ if (isset($_SESSION['siteusername']) && !$__user_h->user_exists(@$_SESSION['siteusername'])) { |
|
10
|
10
|
die("<a href='/logout'>Your user has been deleted. Logout</a>"); |
|
11
|
11
|
} |
|
12
|
12
|
?> |
|
@@ -15,7 +15,7 @@ discard block |
|
|
block discarded – undo |
|
15
|
15
|
<a id="logo-container" href="/" title="SubRocks home"> |
|
16
|
16
|
<img id="logo" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="SubRocks home"> |
|
17
|
17
|
</a> |
|
18
|
|
- <?php if(!isset($_SESSION['siteusername'])) { ?> |
|
|
18
|
+ <?php if (!isset($_SESSION['siteusername'])) { ?> |
|
19
|
19
|
<div id="yt-masthead-signin"> |
|
20
|
20
|
<div id="masthead-user-display"><span id="masthead-user-wrapper"><button href="/sign_in" type="button" id="masthead-user-button" onclick=";window.location.href=this.getAttribute('href');return false;" class=" yt-uix-button yt-uix-button-text" role="button"><span class="yt-uix-button-content"> <span id="masthead-user-image"> |
|
21
|
21
|
<span class="clip"> |
|
@@ -33,7 +33,7 @@ discard block |
|
|
block discarded – undo |
|
33
|
33
|
<div id="masthead-user-bar"> |
|
34
|
34
|
<div id="masthead-user"> |
|
35
|
35
|
<span id="masthead-gaia-user-expander" class="masthead-user-menu-expander masthead-expander" onclick="yt.www.masthead.toggleExpandedMasthead()"><span id="masthead-gaia-user-wrapper" class="yt-rounded" tabindex="0"><?php echo htmlspecialchars($_SESSION['siteusername']); ?></span></span> |
|
36
|
|
- <?php if($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
|
36
|
+ <?php if ($__user_h->fetch_unread_pms($_SESSION['siteusername']) != 0) { ?> |
|
37
|
37
|
<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-on yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button> |
|
38
|
38
|
<?php } else { ?> |
|
39
|
39
|
<button type="button" onclick=";window.location.href=this.getAttribute('href');return false;" href="/inbox/" class="sb-button sb-notif-off yt-uix-button" id="sb-button-notify" role="button"><span class="yt-uix-button-content"><?php echo $__user_h->fetch_unread_pms($_SESSION['siteusername']); ?></span></button> |
|
@@ -58,7 +58,7 @@ discard block |
|
|
block discarded – undo |
|
58
|
58
|
<div id="ticker" class="ytg-base "><div id="ticker-inner"><div class="ytg-wide"><button onclick="yt.net.cookies.set('HideTicker', 1, 604800);" class="yt-uix-close" data-close-parent-id="ticker"><img alt="Close" src="https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"></button><img class="ticker-icon" src="https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif" alt=""><div class="ticker-content"> |
|
59
|
59
|
<b>New minor update: <pre style="display:inline-block;">1fe1fa4</pre></b> <pre style="display:inline-block;font-size:10px;margin-left:35px;">This is a part of the Communications update. The inbox has been updated with a cleaner look.</pre> |
|
60
|
60
|
</div></div></div></div><br> |
|
61
|
|
-<?php if(isset($_SESSION['siteusername'])) { ?> |
|
|
61
|
+<?php if (isset($_SESSION['siteusername'])) { ?> |
|
62
|
62
|
<div id="masthead-expanded" class="hid" style="display: none;"> |
|
63
|
63
|
<div id="masthead-expanded-container" class="with-sandbar"> |
|
64
|
64
|
<div class="yt-uix-slider yt-rounded" id="watch-channel-discoverbox" data-slider-slide-selected="3" data-slider-slides="4" |
|
@@ -79,7 +79,7 @@ discard block |
|
|
block discarded – undo |
|
79
|
79
|
$stmt = $__db->prepare("SELECT * FROM videos WHERE author = :username ORDER BY id DESC LIMIT 20"); |
|
80
|
80
|
$stmt->bindParam(":username", $_SESSION['siteusername']); |
|
81
|
81
|
$stmt->execute(); |
|
82
|
|
- while($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
|
82
|
+ while ($video = $stmt->fetch(PDO::FETCH_ASSOC)) { |
|
83
|
83
|
$video['age'] = $__time_h->time_elapsed_string($video['publish']); |
|
84
|
84
|
$video['duration'] = $__time_h->timestamp($video['duration']); |
|
85
|
85
|
$video['views'] = $__video_h->fetch_video_views($video['rid']); |
|
@@ -222,7 +222,7 @@ discard block |
|
|
block discarded – undo |
|
222
|
222
|
</div> |
|
223
|
223
|
<?php } ?> |
|
224
|
224
|
<div id="alerts"> |
|
225
|
|
- <?php if(isset($error['status'])) { ?> |
|
|
225
|
+ <?php if (isset($error['status'])) { ?> |
|
226
|
226
|
<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error yt-alert-player"> <div class="yt-alert-icon"> |
|
227
|
227
|
<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
|
228
|
228
|
</div> |
|
@@ -232,7 +232,7 @@ discard block |
|
|
block discarded – undo |
|
232
|
232
|
</div> |
|
233
|
233
|
</div></div></div> |
|
234
|
234
|
<?php } ?> |
|
235
|
|
- <?php if(isset($_GET['error'])) { ?> |
|
|
235
|
+ <?php if (isset($_GET['error'])) { ?> |
|
236
|
236
|
<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error "> <div class="yt-alert-icon"> |
|
237
|
237
|
<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
|
238
|
238
|
</div> |
|
@@ -242,7 +242,7 @@ discard block |
|
|
block discarded – undo |
|
242
|
242
|
</div> |
|
243
|
243
|
</div></div></div> |
|
244
|
244
|
<?php } ?> |
|
245
|
|
- <?php if(isset($_GET['success'])) { ?> |
|
|
245
|
+ <?php if (isset($_GET['success'])) { ?> |
|
246
|
246
|
<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-success "> <div class="yt-alert-icon"> |
|
247
|
247
|
<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
|
248
|
248
|
</div> |
|
@@ -252,7 +252,7 @@ discard block |
|
|
block discarded – undo |
|
252
|
252
|
</div> |
|
253
|
253
|
</div></div></div> |
|
254
|
254
|
<?php } ?> |
|
255
|
|
- <?php if(isset($_SESSION['error'])) { ?> |
|
|
255
|
+ <?php if (isset($_SESSION['error'])) { ?> |
|
256
|
256
|
<div id="masthead_child_div"><div class="yt-alert yt-alert-default yt-alert-error"> <div class="yt-alert-icon"> |
|
257
|
257
|
<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"> |
|
258
|
258
|
</div> |