· 6 years ago · Jan 15, 2020, 12:44 PM
1<?PHP
2/**
3 * Streamers Admin Panel
4 *
5 * Originally written by Sebastian Graebner <djcrackhome>
6 * Fixed and edited by David Schomburg <dave>
7 *
8 * The Streamers Admin Panel is a web-based administration interface for
9 * Nullsoft, Inc.'s SHOUTcast Distributed Network Audio Server (DNAS),
10 * and is intended for use on the Linux-distribution Debian.
11 *
12 * LICENSE: This work is licensed under the Creative Commons Attribution-
13 * ShareAlike 3.0 Unported License. To view a copy of this license, visit
14 * http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
15 * Creative Commons, 444 Castro Street, Suite 900, Mountain View, California,
16 * 94041, USA.
17 *
18 * @author Sebastian Graebner <djcrackhome@streamerspanel.com>
19 * @author David Schomburg <dave@streamerspanel.com>
20 * @copyright 2009-2012 S. Graebner <djcrackhome> D. Schomburg <dave>
21 * @license http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 Unported License
22 * @link http://www.streamerspanel.com
23
24 */
25//ini_set('display_errors', 1);
26//ini_set('error_reporting', E_ALL | E_STRICT);
27
28
29
30//Verbindung
31if (!include("database.php"))
32 die("database.php could not be loaded!");
33if ($db_host == "" || !isset($db_host))
34 die("please reinstall this panel");
35//MySQL Verbindung wird getestet
36require_once 'functions.php';
37require_once 'meekrodb.2.0.class.php';
38
39$errors = array();
40$notifi = array();
41$correc = array();
42
43$connection = mysqli_connect($db_host, $db_username, $db_password) or die("database could not be connected");
44$db = mysqli_select_db($connection, $database) or die("database could not be selected");
45DB::$host = $db_host;
46DB::$user = $db_username;
47DB::$password = $db_password;
48DB::$dbName = $database;
49
50sendUsageStatisticsIfAllowed();
51
52session_start();
53
54$captcha_sql = mysqli_query($connection, "SELECT language FROM settings WHERE id='0'");
55
56$language_setting = mysqli_result($captcha_sql, 0);
57// Check if Language-file exists and include, else load English
58
59if (!file_exists('./pages/messages/' . $language_setting . '.php')) {
60 $errors[] = "<h2>The language file could not be found, English is the default language!</h2>";
61 $language_setting = 'german'; // Language Change
62}
63require_once './pages/messages/' . $language_setting . '.php';
64// Get variable for include
65if (!isset($_GET['include'])) {
66 $include_php = 'main';
67} else {
68 $include_php = filter_var($_GET['include'], FILTER_SANITIZE_STRING);
69}
70// Logout of Panel
71
72
73if (isset($_GET['login']) && $_GET['login'] == "logout") {
74 $loggedin = FALSE;
75 session_destroy();
76 header('Location: index.php?login=logout');
77}
78$loggedin = FALSE;
79
80
81if (isset($_SESSION['username']) && isset($_SESSION['user_password']) || !empty($_POST['username']) && !empty($_POST['user_password'])) {
82
83
84 if (isset($_POST['login_submit'])) {
85 $loginun = mysqli_real_escape_string($connection, $_POST['username']);
86 $loginpw = mysqli_real_escape_string($connection, $_POST['user_password']);
87 } else {
88 $loginun = $_SESSION['username'];
89 $loginpw = $_SESSION['user_password'];
90 }
91 if (isset($_POST['login_submit'])) {
92 $captcha_sql = mysqli_query($connection, "SELECT login_captcha FROM settings WHERE id='0'");
93
94 if (mysqli_result($captcha_sql, 0) == "1") {
95 if ($_POST['captcha_field'] != $_SESSION['captcha_streamerspanel']) {
96 if ($include_php !== "main" || $include_php !== "") {
97 header('Location: index.php?login=captcha&redir=' . $include_php . '');
98 die();
99 } else {
100 header('Location: index.php?login=captcha');
101 die();
102 }
103 }
104 }
105 }
106 $hash = md5($loginun . $loginpw);
107 $free_space = 980999;
108 $selectuser = mysqli_query($connection, "SELECT * FROM users WHERE md5_hash='" . mysqli_real_escape_string($connection, $hash) . "'");
109 if (mysqli_num_rows($selectuser) == 1) {
110 $_SESSION['username'] = $loginun;
111 $_SESSION['user_password'] = $loginpw;
112 $userdata = mysqli_fetch_array($selectuser);
113 $loginun = $userdata['username'];
114 $user_level = $userdata['user_level'];
115 $_SESSION['user_level'] = $user_level;
116 $_SESSION['user_tb_id'] = $userdata['id'];
117
118 // Abfrage Server
119 if ($user_level == 'dj') {
120 $selectuser = mysqli_query($connection, "SELECT dj_of_user FROM users WHERE md5_hash='" . mysqli_real_escape_string($connection, $hash) . "'");
121 $selectit = mysqli_fetch_object($selectuser);
122
123 $user_id = $selectit->dj_of_user;
124
125
126 // REWRITE LOGINNUM
127
128 $ergebnis = mysqli_query($connection, "SELECT username FROM users WHERE id = '$user_id'");
129 $row = mysqli_fetch_object($ergebnis);
130 $loginun = $row->username;
131
132
133 } else {
134 $user_id = $userdata['id'];
135 }
136
137 $loggedin = TRUE;
138 if (isset($_POST['login_submit'])) {
139 $correc[] = "<h2>" . $messages["15"] . "</h2>";
140 }
141
142 if ($user_level == 'banned') {
143 session_destroy();
144 $loggedin = FALSE;
145 }
146
147
148 } else {
149 session_destroy();
150 $loggedin = FALSE;
151
152 }
153}
154if (isset($loggedin) && $loggedin == TRUE) {
155} else {
156 if ($include_php !== "main" || $include_php !== "") {
157 header('Location: index.php?login=data&redir=' . $include_php . '');
158 } else {
159 header('Location: index.php?login=data');
160 }
161}
162
163
164
165 // Alter Uplaoder
166 /*
167
168
169if ($include_php == "upload" && isset($_GET['upport'])) {
170 $target_path = "uploads/" . $_GET['upport'] . '/';
171 $allowedExts = array();
172 $maxFileSize = 0;
173
174 $new_free_space = 50;
175 function ByteSize($bytes)
176 {
177 $size = $bytes / 1024;
178 if ($size < 1024) {
179 $size = number_format($size, 2);
180 $size .= ' KB';
181 } else {
182 if ($size / 1024 < 1024) {
183 $size = number_format($size / 1024, 2);
184 $size .= ' MB';
185 } else if ($size / 1024 / 1024 < 1024) {
186 $size = number_format($size / 1024 / 1024, 2);
187 $size .= ' GB';
188 }
189 }
190 return $size;
191 }
192
193 function getHeaders()
194 {
195 $headers = array();
196 foreach ($_SERVER as $k => $v) {
197 if (substr($k, 0, 5) == "HTTP_") {
198 $k = str_replace('_', ' ', substr($k, 5));
199 $k = str_replace(' ', '-', ucwords(strtolower($k)));
200 $headers[$k] = $v;
201 }
202 }
203 return $headers;
204 }
205
206 $headers = getHeaders();
207
208 if ($headers['X-Requested-With'] == 'XMLHttpRequest') {
209 $fileName = $headers['X-File-Name'];
210 $fileSize = $headers['X-File-Size'];
211 $ext = substr($fileName, strrpos($fileName, '.') + 1);
212 if (in_array($ext, $allowedExts) or empty($allowedExts)) {
213 if ($fileSize < $maxFileSize or empty($maxFileSize) ) {
214 $input = fopen("php://input", 'r');
215 $output = fopen($target_path . $fileName, 'a');
216 if ($output != false) {
217 while (!feof($input)) {
218 $buffer = fread($input, 4096);
219 fwrite($output, $buffer);
220 }
221 fclose($output);
222 echo '{"success":true, "file": "' . $target_path . $fileName . '"}';
223 } else
224 echo ('{"success":false, "details": "Can\'t create a file handler."}');
225 fclose($input);
226 } else {
227 echo ('{"success":false, "details": "Maximum file size: ' . ByteSize($maxFileSize) . '."}');
228 }
229 ;
230 } else {
231 echo ('{"success":false, "details": "File type ' . $ext . ' not allowed."}');
232 }
233 } else {
234 if ($_FILES['file']['name'] != '') {
235
236 $fileName = $_FILES['file']['name'];
237 $fileSize = $_FILES['file']['size'];
238
239 $ext = substr($fileName, strrpos($fileName, '.') + 1);
240 if (in_array($ext, $allowedExts) or empty($allowedExts)) {
241 if ($fileSize < $maxFileSize or empty($maxFileSize) ) {
242 $target_path = $target_path . basename($_FILES['file']['name']);
243 if (move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
244 echo '{"success":true, "file": "' . $target_path . '"}';
245 } else {
246 // echo '{"success":false, "details": "move_uploaded_file failed"}';
247 }
248 } else {
249 echo ('{"success":false, "details": "Maximum file size: ' . ByteSize($maxFileSize) . '."}');
250 }
251 ;
252 } else
253 echo ('{"success":false, "details": "File type ' . $ext . ' not allowed."}');
254 } else
255 echo '{"success":false, "details": "No file received."}';
256 }
257 die();
258}
259
260
261 */
262
263
264
265if (isset($_GET['playlist']) && $_GET['playlist'] == "left") {
266 if (isset($_GET['portbase'])) {
267 $port = $_GET['portbase'];
268 $selectowner = mysqli_query($connection, "SELECT * FROM servers WHERE portbase='" . $port . "' AND owner='" . $loginun . "'");
269 if (mysqli_num_rows($selectowner) == 1) {
270 header("Content-type:text/xml");
271 echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
272 $listing_start = 1;
273 $listing_end = 10000;
274 $dirlisting = @scandir(dirname(__FILE__) . '/uploads/' . $port) or die();
275 $dirlistingsearch = array(
276 '&',
277 '<',
278 '>',
279 '"',
280 "'"
281 );
282 $dirlistingreplace = array(
283 '&',
284 '<',
285 '>',
286 '"',
287 '''
288 );
289 if (!isset($dirlisting[$listing_start]))
290 die();
291 echo '<tree id="0">';
292 for ($i = $listing_start; $i <= $listing_end; $i++) {
293 if (!isset($dirlisting[$i])) {
294 continue;
295 }
296
297 if (($dirlisting[$i] != ".") && ($dirlisting[$i] != "..") && ($dirlisting[$i] != "")) {
298 $itemId = sprintf('%s/uploads/%d/%s', dirname(__FILE__), $port, str_replace($dirlistingsearch, $dirlistingreplace, $dirlisting[$i]));
299 $itemText = str_replace($dirlistingsearch, $dirlistingreplace, $dirlisting[$i]);
300 printf('<item id="%s" text="%s"/>', $itemId, $itemText);
301 }
302 }
303 echo '</tree>';
304 die();
305 }
306 }
307} elseif ((isset($_GET['playlist']) && $_GET['playlist'] == "right") && (isset($_GET['listname']))) {
308 if (isset($_GET['portbase'])) {
309 $port = $_GET['portbase'];
310 $selectowner = mysqli_query($connection, "SELECT * FROM servers WHERE portbase='" . $port . "' AND owner='" . $loginun . "'");
311 if (mysqli_num_rows($selectowner) == 1) {
312 header("Content-type:text/xml");
313 print("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>");
314 if (base64_decode($_GET['listname']) !== "new playlist.lst") {
315 $filehandle = fopen("" . dirname(__FILE__) . "/temp/" . $port . "/playlist/" . base64_decode($_GET['listname']) . "", "r");
316 $contents = fread($filehandle, filesize("" . dirname(__FILE__) . "/temp/" . $port . "/playlist/" . base64_decode($_GET['listname']) . ""));
317 $entrys = explode("\n", $contents);
318 $dirlistingsearch = array(
319 '&',
320 '<',
321 '>',
322 '"',
323 "'"
324 );
325 $dirlistingreplace = array(
326 '&',
327 '<',
328 '>',
329 '"',
330 '''
331 );
332 }
333 echo ("<tree id='0'>");
334 if (base64_decode($_GET['listname']) !== "new playlist.lst") {
335 $inta = 0;
336 foreach ($entrys as $entry) {
337 $inta++;
338 $entry1 = str_replace(dirname(__FILE__) . "/uploads/" . $port . "/", "", $entry);
339 if ($entry1 != "") {
340 $magix = str_replace($dirlistingsearch, $dirlistingreplace, $entry1);
341 printf('<item child="0" id="%s" text="%s"></item>', $magix, $magix);
342 }
343 }
344 fclose($filehandle);
345 }
346 echo ("</tree>");
347 die();
348 }
349 }
350}
351
352
353// additional message insert by $_GET
354if (!isset($_GET['message_ext']) or !isset($_GET['message_lang'])) {
355} else {
356 if ($_GET['message_ext'] == "1") {
357 $errors[] = $messages[$_GET['message_lang']];
358 }
359 if ($_GET['message_ext'] == "2") {
360 $notifi[] = $messages[$_GET['message_lang']];
361 }
362 if ($_GET['message_ext'] == "3") {
363 $correc[] = $messages[$_GET['message_lang']];
364 }
365}
366
367// MySQL connection
368$connection = mysqli_connect($db_host, $db_username, $db_password) or die($messages["g1"]);
369$db = mysqli_select_db($connection, $database) or die($messages["g2"]);
370// ?install_cancel=1 deactivates installcheck
371if (file_exists("./install/install.php")) {
372 $errors[] = "<h2>" . $messages["16"] . "</h2>";
373}
374// if including file doesn't exist then load main page
375if (file_exists("./pages/" . $include_php . "_bottom.php")) {
376 $include_php = $include_php;
377} else {
378 if (file_exists("./pages/main_bottom.php")) {
379 $errors[] = $messages["g3"];
380 $include_php = "main";
381 } else {
382 $errors[] = $messages["g3"];
383 $include_php = "_no";
384 }
385}
386
387// Überprüfung ob User passende Rechte hat diese Seite zu öffnen
388if (($include_php == "admserver") || ($include_php == "admradio")) {
389 if ($user_level != "Super Administrator") {
390 $include_php = "main";
391 $errors[] = "<h2>" . $messages["17"] . "</h2>";
392 }
393}
394// check messages on headlines
395$newsq = mysqli_query($connection, "SELECT * FROM headlines order by id DESC LIMIT 20") or die($messages["g4"]);
396$newsq_quant = mysqli_num_rows($newsq);
397if ($user_level == "Super Administrator" && (isset($_GET['action']) && $_GET['action'] == "remove" && isset($_GET['delmessid']))) {
398 if (mysqli_query($connection, " DELETE FROM notices WHERE id='" . $_GET['delmessid'] . "' ")) {
399 $correc[] = "<h2>" . $messages["18"] . "</h2>";
400 } else {
401 $errors[] = "<h2>" . $messages["19"] . "</h2>";
402 }
403}
404
405// include functions of php file
406if ((file_exists("./pages/" . $include_php . "_top.php")) && ($include_php != "_no")) {
407 @include("./pages/" . $include_php . "_top.php");
408}
409
410// get all settings of db
411$settingsq = mysqli_query($connection, "SELECT * FROM settings WHERE id='0'") or die($messages["g5"]);
412foreach (mysqli_fetch_array($settingsq) as $key => $pref) {
413 if (!is_numeric($key)) {
414 $setting[$key] = stripslashes($pref);
415 }
416}
417
418// update check
419$currentVersion = SAP_VERSION;
420
421if ($setting['update_check'] == 1 && $include_php == 'main') {
422 require_once './pages/update.php';
423}
424if (isset($_GET['request']) && $_GET['request'] == 'html') {
425 require_once './pages/' . $include_php . '_bottom.php';
426 die();
427}
428?>
429<!DOCTYPE HTML>
430<html class="no-js">
431<head>
432 <title><?php
433 echo htmlspecialchars($setting['title']) . ' - ' . htmlspecialchars($setting['slogan']);
434 ?></title>
435 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
436 <link rel="icon" href="./images/favicon.ico" type="image/x-icon"/>
437 <link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon"/>
438 <link rel="stylesheet" type="text/css" href="./css/framework.css"/>
439 <script src="./js/jquery-1.5.min.js" type="text/javascript" charset="utf-8"></script>
440 <script src="./js/modernizr.2.06.js" type="text/javascript" charset="utf-8"></script>
441 <script src="./js/adminpanel.js" type="text/javascript" charset="utf-8"></script>
442 <script src="./js/jquery.nyroModal-1.6.2.pack.js" type="text/javascript" charset="utf-8"></script>
443 <?php
444 if ($include_php == "main") {
445 ?>
446 <script type="text/javascript">
447 $(function () {
448 function preloadImg(image) {
449 var img = new Image();
450 img.src = image;
451 }
452
453 preloadImg('images/modalwin/ajaxLoader.gif');
454 });
455 </script>
456 <?php
457 }
458 ?>
459 <?php
460if ($include_php == "upload") {
461 ?>
462 <script src="./js/shCore.js" type="text/javascript"></script>
463 <script src="./js/shBrushJScript.js" type="text/javascript" ></script>
464 <script src="./js/shBrushXml.js" type="text/javascript" ></script>
465
466 <!-- SET UP AXUPLOADER -->
467 <script src="./js/jquery-1.5.min.js" type="text/javascript"></script>
468 <script src="./js/ajaxupload.js" type="text/javascript"></script>
469
470 <link rel="stylesheet" href="./css/fancyTheme/style.css" type="text/css" media="all" />
471 <!-- /SET UP AXUPLOADER -->
472
473
474 <link rel="stylesheet" href="./mcss/shCore.css" type="text/css" media="all" />
475 <link rel="stylesheet" href="./css/shThemeEclipse.css" type="text/css" media="all" />
476 <link rel="stylesheet" href="./css/shCoreDefault.css" type="text/css"/>
477
478 <script type="text/javascript">
479 SyntaxHighlighter.all({toolbar:false});
480 </script>
481
482 <?php
483}
484
485 ?>
486 <?php
487 if ($include_php == 'playlist') {
488 ?>
489 <script language="javascript">
490
491 function clearPlaylist() {
492 var itemId = this.tree2.rootId;
493 var temp = this.tree2._globalIdStorageFind(itemId);
494 this.tree2.deleteChildItems(itemId);
495 }
496 function setValue() {
497 var i = 0;
498 var j = 0;
499 var n = 0;
500 arvArray = new Array();
501 arvArray = getChilds(this.tree2.htmlNode, arvArray, "<?php
502 echo "/";
503 ?>")
504 var arv = arvArray.toString();
505 document.treeform.arv.value = arv;
506 }
507 function getChilds(Childs, arr, label) {
508 var i = 0;
509 for (i = 0; i < Childs.childsCount; i++) {
510 if (Childs.childNodes[i].childsCount == 0) {
511 if (Childs.childNodes[i].label[0] != "/") {
512 arr.push(label + Childs.childNodes[i].label);
513 }
514 else arr.push(Childs.childNodes[i].label);
515 }
516 else {
517 arr = getChilds(Childs.childNodes[i], arr, label + Childs.childNodes[i].label + "/")
518 }
519 }
520 return arr;
521 }
522 </script>
523 <?php
524 }
525 ?>
526
527</head>
528<body>
529<div id="mainContainer">
530<header>
531 <div class="header logo">
532 <a href="loadContent-main" title=""><img src="./images/logo.png" alt=""/></a>
533 </div>
534 <span class="header profileStatus"><?php
535 echo htmlspecialchars($messages["20"]) . ' <strong>' . htmlspecialchars($_SESSION['username']) . '</strong> (<a href="content.php?login=logout" title="Sign out">' . htmlspecialchars($messages["21"]) . '</a>)</span>';
536 ?>
537</header>
538<div class="clear"></div>
539<div id="menuContainer">
540 <div id="menuFrame">
541 <div id="menuHead">
542 <span id="headContent"><?php
543 echo htmlspecialchars($messages["22"]);
544 ?> <b id="menuHead.username"><?PHP
545 echo htmlspecialchars($loginun);
546 ?></b></span>
547 <?php
548 if ($user_level == 'Super Administrator') {
549 $noticesq = mysqli_query($connection, "SELECT * FROM notices");
550 if (mysqli_num_rows($noticesq) == 0) {
551 echo '<span id="headContent_under">' . htmlspecialchars($messages["23"]) . '</span>';
552 } else {
553 $noticesqquant = mysqli_num_rows($noticesq);
554 if ($noticesqquant == 1) {
555 echo '<span id="headContent_under">' . htmlspecialchars($messages["24"]) . ' <b id="menuHead.amount">' . htmlspecialchars($noticesqquant) . "</b> " . htmlspecialchars($messages["25"]) . "</span>";
556 } else {
557 echo '<span id="headContent_under">' . htmlspecialchars($messages["26"]) . ' <b id="menuHead.amount">' . htmlspecialchars($noticesqquant) . "</b> " . htmlspecialchars($messages["27"]) . " </span>";
558 }
559 }
560 } elseif ($user_level == 'User') {
561 echo '<span id="headContent_under">Shoutcast Admin Panel 3 - ' . htmlspecialchars($messages["28"]) . '</span>';
562 } else {
563 echo '<span id="headContent_under">Shoutcast Admin Panel 3 - ' . htmlspecialchars($messages["add28"]) . '</span>';
564 }
565 ?>
566 </div>
567 <div id="navHead">
568
569 <h4><?php
570 echo htmlspecialchars($messages["29"]);
571 ?></h4>
572 <h5><?php
573 echo htmlspecialchars($messages["30"]);
574 ?></h5>
575 </div>
576 <?php
577
578 if ($user_level == 'User' OR $user_level == 'Super Administrator') {
579 ?>
580 <nav class="navFirst">
581 <ul class="navMenu">
582 <ul class="navMenu">
583 <li><a href="loadContent-main" title="">Schnellübersicht</a></li>
584 </ul>
585 <li><a href="loadContent-contact" title=""><?php
586 echo htmlspecialchars($messages["31"]);
587 ?></a></li>
588 <li><a href="loadContent-public" title=""><?php
589 echo htmlspecialchars($messages["32"]);
590 ?></a></li>
591 <li><a href="loadContent-account" title=""><?php
592 echo htmlspecialchars($messages["33"]);
593 ?></a></li>
594
595 <?php if ($user_level == 'User') { ?>
596 <li><a href="loadContent-admuser" title=""><?php
597 echo htmlspecialchars($messages["add33"]);
598 ?></a></li>
599 <?php } ?>
600
601 <li><a href="loadContent-server" title=""><?php
602 if ($user_level == 'Super Administrator') {
603 echo htmlspecialchars($messages["add34"]);
604 } else {
605 echo htmlspecialchars($messages["34"]);
606 }
607 ?></a></li>
608
609
610 </ul>
611 </nav>
612
613 <?php
614 }
615 if ($setting['os'] == 'linux') {
616 ?>
617
618
619 <div id="navHeadSub">
620 <h4><?php
621 echo htmlspecialchars($messages["35"]);
622 ?></h4>
623 <h5><?php
624 echo htmlspecialchars($messages["36"]);
625 ?></h5>
626 </div>
627
628
629 <nav class="navBottom">
630 <ul class="navMenu">
631 <li><a href="loadContent-music" title=""><?php
632
633 if ($user_level == 'dj') {
634
635 } else {
636 echo htmlspecialchars($messages["37"]);
637 }
638 ?></a></li>
639 <li><a href="loadContent-autodj" title=""><?php
640 echo htmlspecialchars($messages["38"]);
641 ?></a></li>
642 </ul>
643 </nav>
644 <?php
645 }
646 ?>
647 <?php
648 if ($user_level == 'Super Administrator') {
649 ?>
650 <div id="navHeadSub_2">
651 <h4><?php
652 echo htmlspecialchars($messages["39"]);
653 ?></h4>
654 <h5><?php
655 echo htmlspecialchars($messages["40"]);
656 ?></h5>
657 </div>
658 <nav class="navBottom">
659 <ul class="navMenu">
660 <li><a href="loadContent-admserver" title=""><?php
661 echo htmlspecialchars($messages["41"]);
662 ?></a></li>
663 <li><a href="loadContent-admradio" title=""><?php
664 echo htmlspecialchars($messages["42"]);
665 ?></a></li>
666 <li><a href="loadContent-admuser" title=""><?php
667 echo htmlspecialchars($messages["43"]);
668 ?></a></li>
669
670 <li><a href="loadContent-admnews" title=""><?php
671 echo htmlspecialchars($messages["nws1"]);
672 ?></a></li>
673
674 </ul>
675 </nav>
676 <?php
677 }
678 ?>
679 <div id="navHeadSub_3">
680 <h4><?php
681 echo htmlspecialchars($messages["44"]);
682 ?></h4>
683 <h5><?php
684 echo htmlspecialchars($messages["45"]);
685 ?></h5>
686 </div>
687 <div id="infoBox">
688 <table class="ip_table">
689 <tbody>
690 <tr>
691 <td class="ip_table"><?php
692 echo $messages["46"];
693 ?></td>
694 <td class="ip_table_under"><?PHP
695 echo ($_SESSION['username']);
696 ?></td>
697 </tr>
698 <tr>
699 <td class="ip_table"><?php
700 echo $messages["47"];
701 ?></td>
702 <td class="ip_table_under"><?PHP
703 echo ($_SERVER['SERVER_NAME']);
704 ?></td>
705 </tr>
706 <tr>
707 <td class="ip_table"><?php
708 echo $messages["48"];
709 ?></td>
710 <td class="ip_table_under"><?php
711 echo $currentVersion;
712 ?></td>
713 </tr>
714 </tbody>
715 </table>
716 </div>
717 </div>
718</div>
719<div id="rightFrame">
720 <div id="contentload">
721 </div>
722 <?PHP
723
724
725 if (count($errors) > 0) {
726 echo array_reduce($errors, function($initial, $value)
727 {
728 return $initial . sprintf('<div class="error">%s</div>', $value);
729 }, '');
730 }
731
732 if (count($notifi) > 0) {
733 echo array_reduce($notifi, function($initial, $value)
734 {
735 return $initial . sprintf('<div class="notifi">%s</div>', $value);
736 }, '');
737 }
738
739 if (count($correc) > 0) {
740 echo array_reduce($correc, function($initial, $value)
741 {
742 return $initial . sprintf('<div class="correct">%s</div>', $value);
743 }, '');
744 }
745
746 echo '<section id="content">';
747 echo '<div class="box">';
748 require_once './pages/' . $include_php . '_bottom.php';
749 echo '</div>';
750 echo '</section>';
751 ?>
752</div>
753<div class="clear"></div>
754<footer>
755 <p>
756 Streamers Admin Panel | djcrackhome | Dave | <a href="http://www.streamerspanel.com/" target="_blank">http://www.streamerspanel.com</a>
757 | <a href="http://www.nagualmedia.de/" target="_blank">Design by Zephon</a> | Translated by: <i><?php
758
759 ?></i> | <a href="http://www.facebook.com/streamers.admin.panel" target="_blank"><img
760 src="./images/facebook.png" alt=""></a><a href="http://www.twitter.com/streamerspanel" target="_blank"><img
761 src="./images/twitter.png" alt=""></a>
762 </p>
763</footer>
764</div>
765</body>
766</html>