Skip to content
Snippets Groups Projects
Commit 53ffb581 authored by Bob Mottram's avatar Bob Mottram
Browse files

Adding output from app install button

parent 4a3d2c25
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html>
<head>
<style>
#headerpic {
width: 60%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 220px;
}
.header {
text-align: center;
padding: 32px;
}
#iconpic {
width: 20%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 120px;
}
.appurl {
color: grey;
font-size: 100%;
}
.appdesc {
color: black;
font-size: 65%;
}
button {
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
}
a {
text-decoration: none;
color: black;
}
button:hover, a:hover {
opacity: 0.7;
}
</style>
</head>
<body>
<div>
<a href="apps_add.html"><img id="headerpic" class="img-responsive" src="logo.png"></a>
</div>
<h2>Beginning app install</h2>
<form action="apps_add.html">
<input type="submit" value="Go Back" />
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
#headerpic {
width: 60%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 220px;
}
.header {
text-align: center;
padding: 32px;
}
#iconpic {
width: 20%;
height: auto;
margin-right : auto;
margin-left : auto;
min-width : 120px;
}
.appurl {
color: grey;
font-size: 100%;
}
.appdesc {
color: black;
font-size: 65%;
}
button {
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
}
a {
text-decoration: none;
color: black;
}
button:hover, a:hover {
opacity: 0.7;
}
</style>
</head>
<body>
<div>
<a href="apps_add.html"><img id="headerpic" class="img-responsive" src="logo.png"></a>
</div>
<h2>App is scheduled to be installed</h2>
<form action="apps_add.html">
<input type="submit" value="Go Back" />
</form>
</body>
</html>
<?php
$output_filename = "apps_add.html";
if (isset($_POST['install'])) {
$app_name = htmlspecialchars($_POST['app_name']);
$install_domain = $_POST['install_domain'];
echo "domain: ".$install_domain;
if(! file_exists("pending_installs.txt")) {
$pending_installs = fopen("pending_installs.txt", "w") or die("Unable to create installs file");
......@@ -14,7 +15,16 @@ if (isset($_POST['install'])) {
$pending_installs = fopen("pending_installs.txt", "a") or die("Unable to append to installs file");
fwrite($pending_installs, "install_".$app_name."\n");
fclose($pending_installs);
$output_filename = "app_installing.html";
}
else {
// The app is already scheduled for installation
$output_filename = "app_scheduled.html";
}
}
$htmlfile = fopen("$output_filename", "r") or die("Unable to open $output_filename");
echo fread($htmlfile,filesize("$output_filename"));
fclose($htmlfile);
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment