Test Failed
Push — main ( 9f2608...2c26f6 )
by chief
03:31
created

get_server_memory_usage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/config.inc.php"); ?>
2
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/db_helper.php"); ?>
3
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/time_manip.php"); ?>
4
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_helper.php"); ?>
5
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/video_helper.php"); ?>
6
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/s/classes/user_update.php"); ?>
7
<?php $__video_h = new video_helper($__db); ?>
8
<?php $__user_h = new user_helper($__db); ?>
9
<?php $__user_u = new user_update($__db); ?>
10
<?php $__db_h = new db_helper(); ?>
11
<?php $__time_h = new time_helper(); ?>
12
<?php if(!isset($_SESSION['siteusername'])) { header("Location: /sign_in"); } ?>
13
<?php if(!$__user_h->if_admin($_SESSION['siteusername'])) { header("Location: /"); } ?>
14
<?php
15
	$__server->page_embeds->page_title = "SubRocks - Admin Panel";
16
	$__server->page_embeds->page_description = "SubRocks is a site dedicated to bring back the 2012 layout of YouTube.";
17
	$__server->page_embeds->page_image = "/yt/imgbin/full-size-logo.png";
18
	$__server->page_embeds->page_url = "https://subrock.rocks/";
19
20
	function get_server_array_stats() {
21
		$stat1 = file('/proc/stat'); 
22
		sleep(1); 
23
		$stat2 = file('/proc/stat'); 
24
		$info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0])); 
25
		$info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0])); 
26
		$dif = array(); 
27
		$dif['user'] = $info2[0] - $info1[0]; 
28
		$dif['nice'] = $info2[1] - $info1[1]; 
29
		$dif['sys'] = $info2[2] - $info1[2]; 
30
		$dif['idle'] = $info2[3] - $info1[3]; 
31
		$total = array_sum($dif); 
32
		$cpu = array(); 
33
		foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
34
35
		return $cpu;
36
	}
37
38
	function adjustBrightness($hexCode, $adjustPercent) {
39
		$hexCode = ltrim($hexCode, '#');
40
41
		if (strlen($hexCode) == 3) {
42
			$hexCode = $hexCode[0] . $hexCode[0] . $hexCode[1] . $hexCode[1] . $hexCode[2] . $hexCode[2];
43
		}
44
45
		$hexCode = array_map('hexdec', str_split($hexCode, 2));
0 ignored issues
show
Bug introduced by
It seems like str_split($hexCode, 2) can also be of type true; however, parameter $array of array_map() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

45
		$hexCode = array_map('hexdec', /** @scrutinizer ignore-type */ str_split($hexCode, 2));
Loading history...
46
47
		foreach ($hexCode as & $color) {
48
			$adjustableLimit = $adjustPercent < 0 ? $color : 255 - $color;
49
			$adjustAmount = ceil($adjustableLimit * $adjustPercent);
50
51
			$color = str_pad(dechex($color + $adjustAmount), 2, '0', STR_PAD_LEFT);
0 ignored issues
show
Bug introduced by
$color + $adjustAmount of type double is incompatible with the type integer expected by parameter $num of dechex(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

51
			$color = str_pad(dechex(/** @scrutinizer ignore-type */ $color + $adjustAmount), 2, '0', STR_PAD_LEFT);
Loading history...
52
		}
53
54
		return '#' . implode($hexCode);
55
	}
56
57
	function get_server_memory_usage() {
58
		$free = shell_exec('free');
59
		$free = (string)trim($free);
60
		$free_arr = explode("\n", $free);
61
		$mem = explode(" ", $free_arr[1]);
62
		$mem = array_filter($mem);
63
		$mem = array_merge($mem);
64
		$memory_usage = $mem[2]/$mem[1]*100;
65
	
66
		return $memory_usage;
67
	}
68
69
	function get_server_cpu_usage() {
70
		$load = sys_getloadavg();
71
		return $load[0];
72
	}	
73
?>
74
<!DOCTYPE html>
75
<html dir="ltr">
76
	<head>
77
		<title><?php echo $__server->page_embeds->page_title; ?></title>
78
		<meta property="og:title" content="<?php echo $__server->page_embeds->page_title; ?>" />
79
		<meta property="og:url" content="<?php echo $__server->page_embeds->page_url; ?>" />
80
		<meta property="og:description" content="<?php echo $__server->page_embeds->page_description; ?>" />
81
		<meta property="og:image" content="<?php echo $__server->page_embeds->page_image; ?>" />
82
		<script>
83
			var yt = yt || {};yt.timing = yt.timing || {};yt.timing.tick = function(label, opt_time) {var timer = yt.timing['timer'] || {};if(opt_time) {timer[label] = opt_time;}else {timer[label] = new Date().getTime();}yt.timing['timer'] = timer;};yt.timing.info = function(label, value) {var info_args = yt.timing['info_args'] || {};info_args[label] = value;yt.timing['info_args'] = info_args;};yt.timing.info('e', "904821,919006,922401,920704,912806,913419,913546,913556,919349,919351,925109,919003,920201,912706");if (document.webkitVisibilityState == 'prerender') {document.addEventListener('webkitvisibilitychange', function() {yt.timing.tick('start');}, false);}yt.timing.tick('start');yt.timing.info('li','0');try {yt.timing['srt'] = window.gtbExternal && window.gtbExternal.pageT() ||window.external && window.external.pageT;} catch(e) {}if (window.chrome && window.chrome.csi) {yt.timing['srt'] = Math.floor(window.chrome.csi().pageT);}if (window.msPerformance && window.msPerformance.timing) {yt.timing['srt'] = window.msPerformance.timing.responseStart - window.msPerformance.timing.navigationStart;}    
84
		</script>
85
		<link id="www-core-css" rel="stylesheet" href="/yt/cssbin/www-core-vfluMRDnk.css">
86
		<link rel="stylesheet" href="/yt/cssbin/www-guide-vflx0V5Tq.css">
87
		<link rel="stylesheet" href="/yt/cssbin/www-videos-nav-vflYGt27y.css">
88
        <link rel="stylesheet" href="/yt/cssbin/www-extra.css">
89
		<script src="//s.ytimg.com/yt/jsbin/www-browse-vflu1nggJ.js" data-loaded="true"></script>
90
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
91
		<script>
92
			if (window.yt.timing) {yt.timing.tick("ct");}    
93
		</script>
94
        <style>
95
			.box-gray {
96
				position: relative;
97
				padding: 15px;
98
				border: 1px solid #c5c5c5;
99
				background-color: #f7f7f7;
100
				border-radius: 10px;
101
				-moz-border-radius: 10px;
102
				-webkit-border-radius: 10px;
103
				width:300px;
104
			}
105
106
            .master-myaccount-top {
107
                border-bottom: 1px solid #CACACA;
108
            }
109
110
            .www-home-left a {
111
                padding-bottom: 3px;
112
                padding-top: 4px;
113
                font-weight: 700;
114
                text-align: left;
115
                color: black;
116
                padding-left: 2px;
117
                width: 193px;
118
                display: inline-block;
119
            }
120
121
            .www-home-left {
122
                width: 200px;
123
                border-right: 1px solid #aaa;
124
            }
125
126
            .www-home-right {
127
                width: 754px;
128
                padding: 5px;
129
            }
130
131
            .www-home-left a:hover {
132
                background-color: rgb(239, 239, 239);
133
                background: -moz-linear-gradient(0deg,rgb(192,192,192,1)0%,rgb(239,239,239,1)115%);
134
                background: -webkit-linear-gradient(0deg,rgb(192,192,192,1)0%,rgb(239,239,239,1)115%);
135
                background: linear-gradient(0deg,rgb(192,192,192)0%, rgb(239,239,239)115%);
136
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="c0c0c0",endColorstr="#efefef",GradientType=1);
137
            }
138
139
            a[href="/inbox/send"] {
140
                margin: 0px !important;
141
                padding: 0px !important;
142
                position: relative;
143
                top: 0px !important;
144
            }
145
146
            #search-button {
147
                margin: 0px;
148
                margin-bottom: 7px;
149
                margin-top: 4px;
150
            }
151
152
            table {
153
                font-family: arial, sans-serif;
154
                border-collapse: collapse;
155
                width: 100%;
156
            }
157
158
            td, th {
159
                text-align: left;
160
                padding: 3px;
161
            }
162
163
            th {
164
                border: 1px solid #dddddd;
165
                background: rgb(215,215,215);
166
                background: -moz-linear-gradient(0deg, rgba(215,215,215,1) 0%, rgba(255,255,255,1) 100%);
167
                background: -webkit-linear-gradient(0deg, rgba(215,215,215,1) 0%, rgba(255,255,255,1) 100%);
168
                background: linear-gradient(0deg, rgba(215,215,215,1) 0%, rgba(255,255,255,1) 100%);
169
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#d7d7d7",endColorstr="#ffffff",GradientType=1); 
170
                height: 14px;
171
                font-weight: lighter;
172
            }
173
174
            tr:nth-child(even) {
175
                background-color: #f9f9f9;
176
            }
177
178
            .video-manager-info {
179
                width: 462px;
180
            }
181
182
            .video-filter-options a {
183
                margin-left: 5px;
184
                margin-right: 5px;
185
            }
186
187
            .selected {
188
                font-weight: bold;
189
                color: black;
190
            }
191
        </style>
192
	</head>
193
	<body id="" class="date-20120930 en_US ltr   ytg-old-clearfix guide-feed-v2 " dir="ltr">
194
		<form name="logoutForm" method="POST" action="/logout">
195
			<input type="hidden" name="action_logout" value="1">
196
		</form>
197
		<!-- begin page -->
198
		<div id="page" class="browse-base">
199
			<!-- begin pagetop -->
200
			<div id="masthead-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/header.php"); ?></div>
201
			<!-- end pagetop -->
202
			<!-- begin pagemiddle -->
203
			<div id="content-container">
204
				<div id="baseDiv" class="date-20120930 video-info   browse-base browse-videos">
205
					<div id="alerts"></div>
206
					<div id="masthead-subnav" class="yt-nav yt-nav-dark ">
207
						<ul>
208
                            <a href="/my_videos">
209
							<li>
210
								<span class="yt-nav-item">
211
								My Channel
212
								</span>
213
							</li>
214
                            </a>
215
                            <a href="/inbox/">
216
                            <li>
217
								<span class="yt-nav-item">
218
								Inbox
219
								</span>
220
							</li>
221
                            </a>
222
							<a href="/admin/">
223
                            <li class=" selected">
224
								<span class="yt-nav-item">
225
								Admin
226
								</span>
227
							</li>
228
                            </a>
229
						</ul>
230
					</div>
231
					<div class="browse-container ytg-wide ytg-box no-stage browse-bg-gradient">
232
						<div class="ytg-fl browse-content">
233
                            <?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/sidebar_admin.php"); ?>
234
							<div id="browse-main-column" style="float: right;margin: 0px 0 0 14px;" class="ytg-4col">
235
								<div class="browse-collection  has-box-ad">
236
                                    <div class="box-gray">
237
                                        <h3>Statistics</h3>
238
                                        <ul class="disc">
239
											<?php 
240
												$stmt = $__db->prepare("SELECT id FROM videos");
241
												$stmt->execute();
242
												$videos = $stmt->rowCount();
243
244
												$stmt = $__db->prepare("SELECT id FROM users");
245
												$stmt->execute();
246
												$users = $stmt->rowCount();
247
											?>
248
											<li>Videos uploaded: <b><?php echo $videos; ?></b></li>
249
											<li>
250
												Users registered: <b><?php echo $users; ?></b>
251
											</li>
252
                                        </ul><br>
253
										<div style="width: 200px;">
254
											<?php $server = get_server_array_stats(); ?>
255
											CPU User Usage: 
256
												<b style="float:right;color:<?php echo adjustBrightness("#FF0000", $server['user']); ?>">
257
													<?php echo $server['user']; ?>%</b><br>
258
											CPU NICE Usage: 
259
												<b style="float:right;color:<?php echo adjustBrightness("#FF0000", $server['nice']); ?>">
260
													<?php echo $server['nice']; ?>%</b><br>
261
											CPU Idle Usage: 
262
												<b style="float:right;color:<?php echo adjustBrightness("#FF0000", $server['idle']); ?>">
263
													<?php echo $server['idle']; ?>%</b><br>
264
											RAM Usage: <b style="float:right;"><?php echo round(get_server_memory_usage(), 3)	; ?> megabytes</b>
265
										</div><br>
266
                                        <button href="/admin/stats" type="button" class=" yt-uix-button yt-uix-button-default" onclick=";window.location.href=this.getAttribute('href');return false;" role="button"><span class="yt-uix-button-content">See more statistics </span></button>
267
                                    </div>
268
								</div>
269
							</div>
270
						</div>
271
					</div>
272
					<div class="clear"></div>
273
				</div>
274
			</div>
275
			<!-- end pagemiddle -->
276
			<!-- begin pagebottom -->
277
			<div id="footer-container"><?php require($_SERVER['DOCUMENT_ROOT'] . "/s/mod/footer.php"); ?></div>
278
			<div id="playlist-bar" class="hid passive editable" data-video-url="/watch?v=&amp;feature=BFql&amp;playnext=1&amp;list=QL" data-list-id="" data-list-type="QL">
279
				<div id="playlist-bar-bar-container">
280
					<div id="playlist-bar-bar">
281
						<div class="yt-alert yt-alert-naked yt-alert-success hid " id="playlist-bar-notifications">
282
							<div class="yt-alert-icon">
283
								<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
284
							</div>
285
							<div class="yt-alert-content" role="alert"></div>
286
						</div>
287
						<span id="playlist-bar-info"><span class="playlist-bar-active playlist-bar-group"><button onclick=";return false;" title="Previous video" type="button" id="playlist-bar-prev-button" class="yt-uix-tooltip yt-uix-tooltip-masked  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-playlist-bar-prev" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Previous video"><span class="yt-valign-trick"></span></span></button><span class="playlist-bar-count"><span class="playing-index">0</span> / <span class="item-count">0</span></span><button type="button" class="yt-uix-tooltip yt-uix-tooltip-masked  yt-uix-button yt-uix-button-default yt-uix-button-empty" onclick=";return false;" id="playlist-bar-next-button" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-playlist-bar-next" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><span class="yt-valign-trick"></span></span></button></span><span class="playlist-bar-active playlist-bar-group"><button type="button" class="yt-uix-tooltip yt-uix-tooltip-masked  yt-uix-button yt-uix-button-default yt-uix-button-empty" onclick=";return false;" id="playlist-bar-autoplay-button" data-button-toggle="true" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-playlist-bar-autoplay" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><span class="yt-valign-trick"></span></span></button><button type="button" class="yt-uix-tooltip yt-uix-tooltip-masked  yt-uix-button yt-uix-button-default yt-uix-button-empty" onclick=";return false;" id="playlist-bar-shuffle-button" data-button-toggle="true" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-playlist-bar-shuffle" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><span class="yt-valign-trick"></span></span></button></span><span class="playlist-bar-passive playlist-bar-group"><button onclick=";return false;" title="Play videos" type="button" id="playlist-bar-play-button" class="yt-uix-tooltip yt-uix-tooltip-masked  yt-uix-button yt-uix-button-default yt-uix-tooltip yt-uix-button-empty" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-playlist-bar-play" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Play videos"><span class="yt-valign-trick"></span></span></button><span class="playlist-bar-count"><span class="item-count">0</span></span></span><span id="playlist-bar-title" class="yt-uix-button-group"><span class="playlist-title">Unsaved Playlist</span></span></span>
288
						<a id="playlist-bar-lists-back" href="#">
289
						Return to active list
290
						</a>
291
						<span id="playlist-bar-controls"><span class="playlist-bar-group"><button type="button" class="yt-uix-tooltip yt-uix-tooltip-masked  yt-uix-button yt-uix-button-text yt-uix-button-empty" onclick=";return false;" id="playlist-bar-toggle-button" role="button"><span class="yt-uix-button-icon-wrapper"><img class="yt-uix-button-icon yt-uix-button-icon-playlist-bar-toggle" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""><span class="yt-valign-trick"></span></span></button></span><span class="playlist-bar-group"><button type="button" class="yt-uix-tooltip yt-uix-tooltip-masked yt-uix-button-reverse flip yt-uix-button yt-uix-button-text" onclick=";return false;" data-button-menu-id="playlist-bar-options-menu" data-button-has-sibling-menu="true" role="button"><span class="yt-uix-button-content">Options </span><img class="yt-uix-button-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt=""></button></span></span>      
292
					</div>
293
				</div>
294
				<div id="playlist-bar-tray-container">
295
					<div id="playlist-bar-tray" class="yt-uix-slider yt-uix-slider-fluid">
296
						<button class="yt-uix-button playlist-bar-tray-button yt-uix-button-default yt-uix-slider-prev" onclick="return false;"><img class="yt-uix-slider-prev-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Previous video"></button><button class="yt-uix-button playlist-bar-tray-button yt-uix-button-default yt-uix-slider-next" onclick="return false;"><img class="yt-uix-slider-next-arrow" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Next video"></button>
297
						<div class="yt-uix-slider-body">
298
							<div id="playlist-bar-tray-content" class="yt-uix-slider-slide">
299
								<ol class="video-list"></ol>
300
								<ol id="playlist-bar-help">
301
									<li class="empty playlist-bar-help-message">Your queue is empty. Add videos to your queue using this button: <img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="addto-button-help"><br> or <a href="https://accounts.google.com/ServiceLogin?passive=true&amp;continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dplaylist%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fvideos%253Ffeature%253Dmh&amp;uilel=3&amp;hl=en_US&amp;service=youtube">sign in</a> to load a different list.</li>
302
								</ol>
303
							</div>
304
							<div class="yt-uix-slider-shade-left"></div>
305
							<div class="yt-uix-slider-shade-right"></div>
306
						</div>
307
					</div>
308
					<div id="playlist-bar-save"></div>
309
					<div id="playlist-bar-lists" class="dark-lolz"></div>
310
					<div id="playlist-bar-loading"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Loading..."><span id="playlist-bar-loading-message">Loading...</span><span id="playlist-bar-saving-message" class="hid">Saving...</span></div>
311
					<div id="playlist-bar-template" style="display: none;" data-video-thumb-url="//i4.ytimg.com/vi/__video_encrypted_id__/default.jpg">
312
						<!--<li class="playlist-bar-item yt-uix-slider-slide-unit __classes__" data-video-id="__video_encrypted_id__"><a href="__video_url__" title="__video_title__" class="yt-uix-sessionlink" data-sessionlink="ei=CPjwu5ji3bICFS4RIQod9j-M-A%3D%3D&amp;feature=BFa"><span class="video-thumb ux-thumb yt-thumb-default-106 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="__video_title__" data-thumb-manual="true" data-thumb="__video_thumb_url__" width="106" ><span class="vertical-align"></span></span></span></span><span class="screen"></span><span class="count"><strong>__list_position__</strong></span><span class="play"><img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"></span><span class="yt-uix-button yt-uix-button-default delete"><img class="yt-uix-button-icon-playlist-bar-delete" src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" alt="Delete"></span><span class="now-playing">Now playing</span><span dir="ltr" class="title"><span>__video_title__  <span class="uploader">by __video_display_name__</span>
313
							</span></span><span class="dragger"></span></a></li>-->
314
					</div>
315
					<div id="playlist-bar-next-up-template" style="display: none;">
316
						<!--<div class="playlist-bar-next-thumb"><span class="video-thumb ux-thumb yt-thumb-default-74 "><span class="yt-thumb-clip"><span class="yt-thumb-clip-inner"><img src="//i4.ytimg.com/vi/__video_encrypted_id__/default.jpg" alt="Thumbnail" width="74" ><span class="vertical-align"></span></span></span></span></div>-->
317
					</div>
318
				</div>
319
				<div id="playlist-bar-options-menu" class="hid">
320
					<div id="playlist-bar-extras-menu">
321
						<ul>
322
							<li><span class="yt-uix-button-menu-item" data-action="clear">
323
								Clear all videos from this list
324
								</span>
325
							</li>
326
						</ul>
327
					</div>
328
					<ul>
329
						<li><span class="yt-uix-button-menu-item" onclick="window.location.href='//support.google.com/youtube/bin/answer.py?answer=146749&amp;hl=en-US'">Learn more</span></li>
330
					</ul>
331
				</div>
332
			</div>
333
			<div id="shared-addto-watch-later-login" class="hid">
334
				<a href="https://accounts.google.com/ServiceLogin?passive=true&amp;continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dplaylist%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fvideos%253Ffeature%253Dmh&amp;uilel=3&amp;hl=en_US&amp;service=youtube" class="sign-in-link">Sign in</a> to add this to a playlist
335
			</div>
336
			<div id="shared-addto-menu" style="display: none;" class="hid sign-in">
337
				<div class="addto-menu">
338
					<div id="addto-list-panel" class="menu-panel active-panel">
339
						<span class="yt-uix-button-menu-item yt-uix-tooltip sign-in" data-possible-tooltip="" data-tooltip-show-delay="750"><a href="https://accounts.google.com/ServiceLogin?passive=true&amp;continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dplaylist%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Fvideos%253Ffeature%253Dmh&amp;uilel=3&amp;hl=en_US&amp;service=youtube" class="sign-in-link">Sign in</a> to add this to a playlist
340
						</span>
341
					</div>
342
					<div id="addto-list-saved-panel" class="menu-panel">
343
						<div class="panel-content">
344
							<div class="yt-alert yt-alert-naked yt-alert-success  ">
345
								<div class="yt-alert-icon">
346
									<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
347
								</div>
348
								<div class="yt-alert-content" role="alert">
349
									<span class="yt-alert-vertical-trick"></span>
350
									<div class="yt-alert-message">
351
										<span class="message">Added to <span class="addto-title yt-uix-tooltip yt-uix-tooltip-reverse" title="More information about this playlist" data-tooltip-show-delay="750"></span></span>
352
									</div>
353
								</div>
354
							</div>
355
						</div>
356
					</div>
357
					<div id="addto-list-error-panel" class="menu-panel">
358
						<div class="panel-content">
359
							<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif">
360
							<span class="error-details"></span>
361
							<a class="show-menu-link">Back to list</a>
362
						</div>
363
					</div>
364
					<div id="addto-note-input-panel" class="menu-panel">
365
						<div class="panel-content">
366
							<div class="yt-alert yt-alert-naked yt-alert-success  ">
367
								<div class="yt-alert-icon">
368
									<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon">
369
								</div>
370
								<div class="yt-alert-content" role="alert">
371
									<span class="yt-alert-vertical-trick"></span>
372
									<div class="yt-alert-message">
373
										<span class="message">Added to playlist:</span>
374
										<span class="addto-title yt-uix-tooltip" title="More information about this playlist" data-tooltip-show-delay="750"></span>
375
									</div>
376
								</div>
377
							</div>
378
						</div>
379
						<div class="yt-uix-char-counter" data-char-limit="150">
380
							<div class="addto-note-box addto-text-box"><textarea id="addto-note" class="addto-note yt-uix-char-counter-input" maxlength="150"></textarea><label for="addto-note" class="addto-note-label">Add an optional note</label></div>
381
							<span class="yt-uix-char-counter-remaining">150</span>
382
						</div>
383
						<button disabled="disabled" type="button" class="playlist-save-note yt-uix-button yt-uix-button-default" onclick=";return false;" role="button"><span class="yt-uix-button-content">Add note </span></button>
384
					</div>
385
					<div id="addto-note-saving-panel" class="menu-panel">
386
						<div class="panel-content loading-content">
387
							<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif">
388
							<span>Saving note...</span>
389
						</div>
390
					</div>
391
					<div id="addto-note-saved-panel" class="menu-panel">
392
						<div class="panel-content">
393
							<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif">
394
							<span class="message">Note added to:</span>
395
						</div>
396
					</div>
397
					<div id="addto-note-error-panel" class="menu-panel">
398
						<div class="panel-content">
399
							<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif">
400
							<span class="message">Error adding note:</span>
401
							<ul class="error-details"></ul>
402
							<a class="add-note-link">Click to add a new note</a>
403
						</div>
404
					</div>
405
					<div class="close-note hid">
406
						<img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="close-button">
407
					</div>
408
				</div>
409
			</div>
410
			<!-- end pagebottom -->
411
		</div>
412
		<!-- end page -->
413
<script id="www-core-js" src="/yt/jsbin/www-core-vfl1pq97W.js" data-loaded="true"></script>
414
        <script id="www-core-js" src="/yt/jsbin/www-core-vfl1pq97W.js" data-loaded="true"></script>
415
		<script>yt.www.thumbnaildelayload.init(0);</script>
416
		<script>
417
			yt.setMsg({
418
			  'LIST_CLEARED': "List cleared",
419
			  'PLAYLIST_VIDEO_DELETED': "Video deleted.",
420
			  'ERROR_OCCURRED': "Sorry, an error occurred.",
421
			  'NEXT_VIDEO_TOOLTIP': "Next video:\u003cbr\u003e \u0026#8220;${next_video_title}\u0026#8221;",
422
			  'NEXT_VIDEO_NOTHUMB_TOOLTIP': "Next video",
423
			  'SHOW_PLAYLIST_TOOLTIP': "Show playlist",
424
			  'HIDE_PLAYLIST_TOOLTIP': "Hide playlist",
425
			  'AUTOPLAY_ON_TOOLTIP': "Turn autoplay off",
426
			  'AUTOPLAY_OFF_TOOLTIP': "Turn autoplay on",
427
			  'SHUFFLE_ON_TOOLTIP': "Turn shuffle off",
428
			  'SHUFFLE_OFF_TOOLTIP': "Turn shuffle on",
429
			  'PLAYLIST_BAR_PLAYLIST_SAVED': "Playlist saved!",
430
			  'PLAYLIST_BAR_ADDED_TO_FAVORITES': "Added to favorites",
431
			  'PLAYLIST_BAR_ADDED_TO_PLAYLIST': "Added to playlist",
432
			  'PLAYLIST_BAR_ADDED_TO_QUEUE': "Added to queue",
433
			  'AUTOPLAY_WARNING1': "Next video starts in 1 second...",
434
			  'AUTOPLAY_WARNING2': "Next video starts in 2 seconds...",
435
			  'AUTOPLAY_WARNING3': "Next video starts in 3 seconds...",
436
			  'AUTOPLAY_WARNING4': "Next video starts in 4 seconds...",
437
			  'AUTOPLAY_WARNING5': "Next video starts in 5 seconds...",
438
			  'UNDO_LINK': "Undo"  });
439
			
440
			
441
			yt.setConfig({
442
			  'DRAGDROP_BINARY_URL': "\/\/s.ytimg.com\/yt\/jsbin\/www-dragdrop-vflWKaUyg.js",
443
			  'PLAYLIST_BAR_PLAYING_INDEX': -1  });
444
			
445
			  yt.setAjaxToken('addto_ajax_logged_out', "rmWO31ZGdmAjKQm23MH57ZskA6Z8MTM0OTExMDQ0NkAxMzQ5MDI0MDQ2");
446
			
447
			  yt.pubsub.subscribe('init', yt.www.lists.init);
448
			
449
			
450
			
451
			
452
			
453
			
454
			
455
			
456
			
457
			  yt.setConfig({'SBOX_JS_URL': "\/\/s.ytimg.com\/yt\/jsbin\/www-searchbox-vflsHyn9f.js",'SBOX_SETTINGS': {"CLOSE_ICON_URL": "\/\/s.ytimg.com\/yt\/img\/icons\/close-vflrEJzIW.png", "SHOW_CHIP": false, "PSUGGEST_TOKEN": null, "REQUEST_DOMAIN": "us", "EXPERIMENT_ID": -1, "SESSION_INDEX": null, "HAS_ON_SCREEN_KEYBOARD": false, "CHIP_PARAMETERS": {}, "REQUEST_LANGUAGE": "en"},'SBOX_LABELS': {"SUGGESTION_DISMISS_LABEL": "Dismiss", "SUGGESTION_DISMISSED_LABEL": "Suggestion dismissed"}});
458
			
459
			
460
			
461
			
462
			
463
		</script>
464
		<script>
465
			yt.setMsg({
466
			  'ADDTO_WATCH_LATER_ADDED': "Added",
467
			  'ADDTO_WATCH_LATER_ERROR': "Error"
468
			});
469
		</script>
470
	</body>
471
</html>