-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
110 lines (108 loc) · 2.96 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/*
* Application Creator
* Created By Chris Cerne
* Copyright (C) 2014 Chris Cerne All Rights Reserved
*/
if(!file_exists("config.php")) {
header("Location: setup/index.php");
}
if(!file_exists(".off")) {
require("includes.php");
$config = include 'config.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<?php echo $config['site_header']; ?>
</title>
<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
<link rel="stylesheet" type="text/css" href="ext/bootstrap/css/bootstrap.min.css">
<style type = "text/css">
body {
background-color: <?php echo $config['site_color'] . ""; ?>;
}
h1, h3 {
text-align: center;
font-family: '<?php echo $config['site_font'] . ""; ?>', sans-serif;
font-weight: bold;
}
label {
font-family: '<?php echo $config['site_font'] . ""; ?>', sans-serif;
}
</style>
</head>
<body>
<div id="page-content">
<form action="submit.php" class = "form-signin" method="post">
<div id="inputArea">
<div class="container">
<h1 class = "form-signin-heading">
<?php echo $config['site_header'] . "\n" ?>
</h1>
<?php
$que = 0;
foreach(getHeaders() as $h) {
echo "<br />";
echo "<h3 class = \"form-signin-heading\">" . $h . "</h3>\n";
foreach(getQuestions($h) as $q) {
$que++;
echo "<label>" . $q . "</label>\n";
$getCatVar = getCat($q);
if($getCatVar[0] == "smalltext") {
echo "<input type = \"text\" class = \"form-control\" name = \"q" . $que . "\">\n";
} else if($getCatVar[0] == "bigtext") {
echo "<textarea class = \"form-control\" name = \"q" . $que . "\"></textarea>\n";
}
}
}
?>
<br />
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button class="btn btn-default btn-lg" type="submit">Submit</button>
</div>
<div class="btn-group">
<button class="btn btn-default btn-lg" type="reset">Reset</button>
</div>
</div>
</div>
</div>
</form>
</div>
</body>
</html>
<?php
}
else {
require("includes.php");
$config = include 'config.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type = "text/css">
body {
background-color: <?php echo $config['site_color'] . ""; ?>;
}
h1, h3 {
text-align: center;
font-family: '<?php echo $config['site_font'] . ""; ?>', sans-serif;
font-weight: bold;
}
</style>
<title><?php echo $config['site_header'] ?></title>
</head>
<body>
<div id="login">
<h1><?php echo $config['site_header'] ?></h1>
<h3>The application is closed at the moment. Please check back later.</h3>
</div>
</body>
</html>
<?php
}
?>