forked from MattsShack/Plex-Movie-Poster-Display
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
146 lines (145 loc) · 6.67 KB
/
Copy pathindex.php
File metadata and controls
146 lines (145 loc) · 6.67 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<?php
session_start();
include('./control.php');
include('./config.php');
$tvlocations = glob($pseudochannelTrim . "*", GLOB_ONLYDIR);
foreach ($tvlocations as $tvbox) {
if ($tvbox . "/" == $pseudochannelMaster) {
$boxname = $configClientName;
$boxes .= "<li><a href='schedule.php?tv=$boxname' class='gn-icon gn-icon-videos'>TV: $boxname</a></li>";
} else {
$boxname = trim($tvbox, $pseudochannelTrim . "_");
$boxes .= "<li><a href='schedule.php?tv=$boxname' class='gn-icon gn-icon-videos'>TV: $boxname</a></li>";
}
}
$clientcount = 1;
foreach ($clientsxml->Server as $key => $xmlarray) {
$clientinfodump .= "<a class='dripdrop-title'>Plex Client #$clientcount</a></br><a class='dripdrop-header'>Name:</a></br><a href='schedule.php?tv=$xmlarray[name]' style='color:white'> $xmlarray[name] </a></br></br>";
$clientinfodump .= "<a class='dripdrop-header'>Local IP Address:</a></br><a> $xmlarray[address] </a></br></br>";
$clientinfodump .= "<a class='dripdrop-header'>Unique Identifier</a></br><a> $xmlarray[machineIdentifier] </a></br></br>";
$clientcount = $clientcount + 1;
}
?>
<html lang="en" class="no-js" style="height:100%">
<head>
<style type="text/css">a {text-decoration: none}</style>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0;">
<title>FakeTV Guide and Control</title>
<meta name="description" content="A page that works with Pseudo Channel and Plex to display now playing data and allow viewing and navigation of Pseudo Channel schedules" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16x16.png">
<link rel="manifest" href="assets/site.webmanifest">
<link rel="mask-icon" href="assets/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="assets/favicon.ico">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="assets/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script src="js/modernizr.custom.js"></script>
<script
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous">
</script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script>
$(document).ready(
function() {
setInterval(function() {
$.getJSON('getData.php',function(data) {
$.each(data, function(key, val) {
$('#'+key).html(val);
});
});
}, 1000);
});
</script>
<script language="JavaScript">
function channel() {
<?php $id="$ch_file"; ?>
}
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready( function() {
$("#topbar").load("topbar.php");
});
</script>
<?php if (!empty($_POST)) {
$myfile = fopen("psConfig.php", "w") or die("Unable to open file!");
$txt = "<?php //Pseudo Channel
\$pseudochannel = '$_POST[pseudochannel]';
\n//Display Type
\$DisplayType = '$_POST[DisplayType]';
?>
";
echo $txt;
fwrite($myfile, $txt);
fclose($myfile);
$update = "1";
} ?>
<?php include_once('config.php');
if ($DisplayType == "half" || $_POST['DisplayType'] == "half") {
$halfstatus = "checked";
$fullstatus = "";
} elseif ($DisplayType =="full" || $_POST['DisplayType'] == "full") {
$halfstatus = "";
$fullstatus = "checked";
} else {
$halfstatus = "";
$fullstatus = "";
}
?>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container">
<div class="container" style="position:absolute;top:60px" scrolling="no"><h3 style="color:white" class="gn-icon gn-icon-earth">Pseudo Channel Web Interface</h3>
<div class="container" name="schedulearea" type="text/html";>
<div class="container" name="schedulearea" type="text/html";>
</div>
</div>
</div>
<?php if($update == "1") {
echo "<div class='alert alert-info' style='color:white;padding-left:50px'>Settings File Updated.</div>";
} ?>
</form>
</div></br></br></br></br></br></br>
<div class="dripdrop-header" style="color:white;padding-left:10px">
<p>Welcome to Pseudo Channel, your homebrew television network.</p></div>
<div class="dripdrop-paragraph" style="color:white;padding-left:10px"><ul>
<li>Use this web interface to control your Pseudo Channel instance.</li>
<li>Click the menu icon in the top left to access the Now Playing pages.</li>
<li>Use the buttons at the top of the page to flip through your channels or to turn it off.</li></ul>
<p class="dripdrop-header">What is Pseudo Channel?</p>
<ul><li>Pseudo Channel is a near-recreation of the classic broadcast television experience using your Plex Server as a base.</li>
<li>Use Pseudo Channel to schedule shows and random movie blocks with user-defined commercials in between.</li></ul></div>
<div class="dripdrop-header" style="color:white;padding-left:10px"><p><a style="color:white" href="https://discord.gg/aPaybPp">Join us on Discord</a></div>
<div class="dripdrop-paragraph" style="color:white;padding-left:10px"><ul><li>Join the <u><a style="color:white" href="https://discord.gg/aPaybPp">FakeTV Discord Server</a></u> for operating help and ongoing development updates and discussion.</li></ul>
</div>
<div class="dripdrop" style="color:white;padding-left:10px"></br>
<a class="dripdrop-header">Plex Server: </a><a><?php echo $plexServer; ?>:<?php echo $plexport; ?></a></br>
<a class="dripdrop-header">Pseudo Channel: </a><a><?php echo $pseudochannelMaster; ?></a></div>
<div id="topbar" name="topbar"></div>
</div><!-- /container -->
<script src="js/classie.js"></script>
<script src="js/gnmenu.js"></script>
<script>
new gnMenu( document.getElementById( 'gn-menu' ) );
</script>
</body>
</html>