-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshowApp.php
More file actions
60 lines (58 loc) · 2.06 KB
/
showApp.php
File metadata and controls
60 lines (58 loc) · 2.06 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
<?php
$APPNAME=$_GET["APPNAME"];
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
echo("<TITLE>".$APPNAME."</TITLE>");
?>
<script>
function install(){
console.log("SYSCALL:INSTALL:"+document.title);
window.history.back();
}
function uninstall(){
console.log("SYSCALL:UNINSTALL:"+document.title);
window.history.back();
}
</script>
</HEAD>
<BODY>
<button class="goBack" onClick="window.history.back();">GO BACK</button>
<div class="appHead">
<?php
echo('<IMG class="appIcon" width="120" src="DIRECTORY/'.$APPNAME.'/favicon.png" />');
echo('<div class="appTitle"><b>'.$APPNAME.'</b></div>');
if(isset($_GET["isInstalled"])){
echo('<button onClick="uninstall()" class="butnR">Remove</button>');
}else{
echo('<button onClick="install()" class="butn">Install</button>');
}
?>
</div>
<div>
<div class="appScreens">
<center>
<?php
$files = scandir('DIRECTORY/'.$APPNAME.'/SCREENS');
foreach($files as $file) {
if($file!=="." and $file!=="..")
echo('<IMG class="appScreen" height="200" src="DIRECTORY/'.$APPNAME.'/SCREENS/'.$file.'" />');
}
?>
</center>
</div>
<div class="appDescription">
<?php
$fh = fopen('DIRECTORY/'.$APPNAME.'/DESCRIPTION','r');
while ($line = fgets($fh)) {
echo($line."<br/>");
}
fclose($fh);
?>
</div>
</div>
</BODY>
</HTML>
<link rel="stylesheet" type="text/css" href="css/style.css" />