-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
41 lines (33 loc) · 1.06 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
<?php
require_once('base.php');
// Check if we are a user
if( !OC_User::isLoggedIn()){
header( "Location: ".OC_Helper::linkTo( '', 'index.php' ));
exit();
}
OC_Util::addStyle('files', "files");
OC_Util::addStyle('neurocloud', "nc");
OC_App::setActiveNavigationEntry( 'neurocloud_index');
$tmpl = new OC_Template( 'neurocloud', 'main', 'user');
$message = "";
$action = "launch";
if (isset($_GET["message"])) {
$message = $_GET["message"];
}
if (isset($_GET["action"])) {
$action = $_GET["action"];
}
if (isset($_GET["jobid"])) {
if (isset($_GET["action"]) && $action === "kill") {
$tmpl->assign('infomessage', "Successfully killed job " . $_GET["jobid"]);
} elseif (isset($_GET["pid"]) && $_GET["pid"] !== "" && $action = "launch") {
$tmpl->assign('infomessage', "Launched job " . $_GET["jobid"] . " (pid = " . $_GET["pid"]. ")");
} else {
$tmpl->assign('errormessage', "Error launching job " . $_GET["jobid"]);
}
}
if (array_key_exists("error", $_GET)) {
$tmpl->assign("errormessage", $_GET["error"]);
}
$tmpl->printPage();
?>