-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjsubmit.php
executable file
·91 lines (76 loc) · 2.59 KB
/
jsubmit.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
<!--
Elementi da implementare:
* Upload files
* generazione dello script di
* inserimento di una console ssh implementata in ruby magari?
* visualizzazione dello stato dell coda
* visualizzazione dello stato del singolo job
test di modifica
-->
<!-- HTTPS CONTROL -->
<?
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){
$redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("Location: $redirect");
}
?>
<!-- SESSION CONTROL -->
<?
session_start();
include_once('globals.php');
$redirect = "https://".$_SERVER['HTTP_HOST']."/index.php";
if (!isset($_SESSION['username'])) { header("Location:$redirect"); }
if (!isset($_SESSION['password'])) { header("Location:$redirect"); }
if (!isset($_SESSION['home'])) { header("Location:$redirect"); }
?>
<html>
<!-- ##################################### -->
<head>
<title>Submit | <? echo $world['ClusterName']; ?> | FORCE - Torque Web Interface</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Styles and scripts -->
<? include('html_include/styles.php'); ?>
<script>
$(document).ready( function() {
var tabsel = '#myTab a[href="#' + location.hash.slice(1) + '"]';
$(tabsel).tab('show');
});
</script>
<!-- ###################################### -->
<body>
<!-- Header and navigation bar -->
<? $active = 'submit'; include('html_include/header.php'); ?>
<!-- Suddivisione in Tab: Selezione della tab -->
<!-- Body -->
<div class="container" id="common-page">
<ul class="nav nav-tabs" id="myTab">
<li>
<a id="qsubForm" href="#FormCreate" data-toggle="tab"><h3>Use form to create script</h3></a>
</li>
<li>
<a id="Uploader" href="#UploadFiles" data-toggle="tab"><h3>Upload script or files</h3></a>
</li>
<li>
<a id="Reloader" href="#ReloadExisting" data-toggle="tab"><h3>Run script</h3></a>
</li>
</ul>
<!-- Suddivisione in Tab: Contenuto delle tab -->
<div id="myTabContent" class="tab-content">
<div class="tab-pane" id="FormCreate">
<? include('html_include/qsubform.php'); ?>
</div>
<div class="tab-pane" id="UploadFiles">
<? include('html_include/qsubupload.php'); ?>
</div>
<div class="tab-pane" id="ReloadExisting">
<!-- run script file già nella home -->
<? include('html_include/qsub_run.php'); ?>
</div>
</div> <!-- div myTabContent -->
</div> <!-- /container -->
<!-- Fine Body -->
<!-- FOOTER -->
<? include('html_include/footer.php'); ?>
<!-- FINE FOOTER -->
</body>
</html>