-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.php
82 lines (69 loc) · 2.67 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
<?php $dep = htmlspecialchars($_GET["dep"]);
if(file_exists($dep . ".php")){
require($dep . ".php");
include("template/index/head2.php");
echo "<title>$name</title></head>";
include("template/index/description.php");
if ($isUDIDProtected){
echo "<p style=\"color: red;\">This package is UDID protected! You must be have your device registered to download this package</p>";
}
if ($compatibleVersions) {
$uaString = $_SERVER["HTTP_USER_AGENT"];
if (preg_match("/(.*) OS ([0-9]*)_([0-9]*)_([0-9]*) (.*)/", $uaString)) {
$version = preg_replace("/(.*) OS ([0-9]*)_([0-9]*)_([0-9]*) (.*)/","$2.$3.$4", $uaString);
} else if (preg_match("/(.*) OS ([0-9]*)_([0-9]*) (.*)/", $uaString)) {
$version = preg_replace("/(.*) OS ([0-9]*)_([0-9]*) (.*)/","$2.$3", $uaString);
}
if ($version) {
if (in_array($version, $compatibleVersions)) {
echo "<p style=\"color: green;\">This package is compatible with your iOS version :)</p>";
} else {
echo "<p style=\"color: #FFCC00\">This package is not comfirmed to work on your iOS version</p>";
}
}
}
foreach($description as $p){
echo "<p>$p</p>";
};
echo "</li>";
$dir = glob("screenshots/" . $dep . "/*.png");
sort($dir);
foreach($dir as $file ){ //echo "<script type='text/javascript'>alert('$file');</script>";
$x += 1;
}
if($x > 0){
include("template/index/screenshots2.php");
} else{
echo "</ul>";
}
if(strlen($devText) > 1){
include("template/index/devLink.php");
echo "<a class=\"devLink\" target=\"_blank\" href=\"$devLink\">$devText</a></li></ul>";
}
$file="stats.txt";
$handle = @fopen($file, "r");
$count = 0;
if($handle){
while (($b = fgets($handle, 4096)) !== false){
$c = explode(":", $b);
if(strpos($c[0], $dep) !== false){
$count += $c[1];
}
}
}
/*echo "<ul><li id='downloads'>
Total Downloads: ".$count."
</li></ul>";*/
if(count($changelog) > 0){
include("template/index/changelog.php");
foreach($changelog as $c){
echo "<p>$c</p>";
}
echo "</li></ul>";
}
include("template/index/footer.php");
}
else{
echo "Depiction does not exist";
}
?>