-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
126 lines (125 loc) · 5.56 KB
/
index.php
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
<?php
include "conf.php";
include "func.php";
if(!empty($_GET))
{
if (isset($_GET["Network"])) {
$network = $_GET["Network"];
}
if (isset($_GET["Year"])) {
$year = $_GET["Year"];
}
if (isset($_GET["Month"])) {
$month = $_GET["Month"];
}
if (isset($_GET["Day"])) {
$day = $_GET["Day"];
}
if (isset($_GET["Channel"])) {
$channel = $_GET["Channel"];
}
if (isset($_GET["Network"]) && !isset($_GET["Year"]) && !isset($_GET["Month"]) && !isset($_GET["Day"]) && !isset($_GET["Channel"])
&& array_key_exists($_GET["Network"], $tomb)
)
{
$yearsArray = array_keys($tomb[$network]);
sort($yearsArray);
foreach($yearsArray as $year) {
if (!empty($year)) {
$logkiirlesz .= "<a href=\"".$webpath."?Network=".$network."&Year=".$year."\">".$year."</a><br/>\n";
}
}
}
elseif (isset($_GET["Network"]) && isset($_GET["Year"]) && !isset($_GET["Month"]) && !isset($_GET["Day"]) && !isset($_GET["Channel"])
&& array_key_exists($_GET["Network"], $tomb) && array_key_exists($_GET["Year"], $tomb[$_GET["Network"]])
)
{
$monthsArray = array_keys($tomb[$network][$year]);
sort($monthsArray);
foreach($monthsArray as $month) {
if (!empty($month)) {
$logkiirlesz .= "<a href=\"".$webpath."?Network=".$network."&Year=".$year."&Month=".$month."\">".$month."</a><br/>\n";
}
}
}
elseif (isset($_GET["Network"]) && isset($_GET["Year"]) && isset($_GET["Month"]) && !isset($_GET["Day"]) && !isset($_GET["Channel"])
&& array_key_exists($_GET["Network"], $tomb) && array_key_exists($_GET["Year"], $tomb[$_GET["Network"]])
&& array_key_exists($_GET["Month"], $tomb[$_GET["Network"]][$_GET["Year"]])
)
{
$daysArray = array_keys($tomb[$network][$year][$month]);
sort($daysArray);
foreach($daysArray as $day) {
if (!empty($day)) {
$logkiirlesz .= "<a href=\"".$webpath."?Network=".$network."&Year=".$year."&Month=".$month."&Day=".$day."\">".$day."</a><br/>\n";
}
}
}
elseif (isset($_GET["Network"]) && isset($_GET["Year"]) && isset($_GET["Month"]) && isset($_GET["Day"]) && !isset($_GET["Channel"])
&& array_key_exists($_GET["Network"], $tomb) && array_key_exists($_GET["Year"], $tomb[$_GET["Network"]])
&& array_key_exists($_GET["Month"], $tomb[$_GET["Network"]][$_GET["Year"]])
&& array_key_exists($_GET["Day"], $tomb[$_GET["Network"]][$_GET["Year"]][$_GET["Month"]])
)
{
$channelsArray = $tomb[$network][$year][$month][$day];
sort($channelsArray);
foreach($channelsArray as $channel) {
if (!empty($channel[0])) {
$channel_link = preg_replace("/\#/", "!pound", $channel[0]); // Kodolja a # jelet mert az anchor miatt bekavar.
$channel_link = preg_replace("/\+/", "!plus", $channel_link); // Atalakitjuk a + jelet mert ezt atkene.
$logkiirlesz .= "<a href=\"".$webpath."?Network=".$network."&Year=".$year."&Month=".$month."&Day=".$day."&Channel=".$channel_link."\">".$channel[0]."</a> - ".date("H:i:s", $channel[1])."<br/>\n";
}
}
}
elseif (isset($_GET["Network"]) && isset($_GET["Year"]) && isset($_GET["Month"]) && isset($_GET["Day"]) && isset($_GET["Channel"]) && preg_match("/!/", $_GET["Channel"])
&& array_key_exists($_GET["Network"], $tomb) && array_key_exists($_GET["Year"], $tomb[$_GET["Network"]])
&& array_key_exists($_GET["Month"], $tomb[$_GET["Network"]][$_GET["Year"]])
&& array_key_exists($_GET["Day"], $tomb[$_GET["Network"]][$_GET["Year"]][$_GET["Month"]])
// && array_key_exists($_GET["Channel"], $tomb[$_GET["Network"]][$_GET["Year"]][$_GET["Month"]][$_GET["Day"]])
)
{
$channel = preg_replace("/!pound/", "#", $channel);
$channel = preg_replace("/!plus/", "+", $channel);
$logfile = $holalog.$network."_".$channel."_".$year.$month.$day.".log";
if(file_exists($logfile))
{
$logkiirlesz .= "<pre>";
$dh = fopen($logfile,"r");
$logkiir = htmlspecialchars(fread($dh,524288));
$logkiir = preg_split("/\n/", $logkiir);
$logkiir_counter = count($logkiir)-2;
for ($ii = 0; $ii <= $logkiir_counter; $ii++)
{
$anchor = $ii+1;
$logkiirlesz .= "<a name=\"".$anchor."\" href=\"".$_SERVER["REQUEST_URI"]."#".$anchor."\">".$anchor."</a>\t".makeClickableLinks(fixEncoding($logkiir[$ii]))."\n";
}
$logkiirlesz .= "</pre>";
}
else
echo "<meta http-equiv='Refresh' content='0; URL=".$webpath."'>";
}
else
echo "<meta http-equiv='Refresh' content='0; URL=".$webpath."'>";
}
else {
$networksArray = array_keys($tomb); // Kiszedem a halozatokat egy tombbe
sort($networksArray); // Rendezem a tombot
foreach($networksArray as $network) {
if (!empty($network)) {
$logkiirlesz .= "<a href=\"".$webpath."?Network=".$network."\">".$network."</a><br/>\n"; // Es kiirom az elemeit
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $htmltitle." | Written by Invisible © 2012"; ?></title>
</head>
<body>
<?php
echo $logkiirlesz;
?>
</body>
</html>