-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnewquestion.php
123 lines (98 loc) · 3.32 KB
/
newquestion.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
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
session_start();
require('config.php');
if (empty($_SESSION['user']) || $_SESSION['user'] != USERNAME) {
header("Location:logon.php");
}
?>
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head>
<title>Welcome to Code Africa Education</title>
<?php require_once('includes/head.php'); ?>
</head>
<body>
<div id="header">
<?php require_once('includes/header.php'); ?>
</div>
<!-- <div class="row">
<div class="twelve columns">
<h2>Simple Education System</h2>
</div>
</div> -->
<?php require_once('includes/sidebar.php'); ?>
<section id="main" class="column">
<article class="module width_full">
<header><h3>Ask a Question</h3></header>
<div class="module_content">
<form id="send-sms" name="questionForm" class="nice form-wrapper" action="twilio_sendsms.php" method="POST">
<div class="w50">
<label for="question">Question</label>
<textarea required="required" id="question" name="question"></textarea>
</div>
<div class="w50">
<label for="answer">Answer</label>
<textarea required="required" id="answer" name="answer"></textarea>
</div>
<table class="student-answers">
<thead>
<tr>
<th class="header">Name</th>
<th class="header">Phone Number</th>
<th class="answer header">Answer</th>
<th class="indicator header">Correct?</th>
</tr>
</thead>
<?php
for($row = 0; $row < count($DEFAULT_USERS); ++$row) {
?>
<tr class="unanswered">
<td>
<input required="required" class="input-text" name="name[]" type="text" value="<?php echo( $DEFAULT_USERS[$row]['name'] ); ?>"/>
</td>
<td>
<input required="required" class="input-text" name="phone[]" type="text" value="<?php echo( $DEFAULT_USERS[$row]['phone'] ); ?>" />
</td>
<td class="answer">
-
</td>
<td class="indicator">
-
</td>
</tr>
<?php
}
?>
<tr class="actions">
<td colspan="4">
<button id="add_student_btn" class="small green button radius">Add Student »</button>
</td>
<tr>
</table>
<input type="submit" name="submitQuestion" class="submit-btn"/>
</form>
</div>
</article>
<div class="clear"></div>
<div class="spacer"></div>
</section>
</div>
<div id="footer">
<?php require_once('includes/footer.php'); ?>
</div>
<!-- container -->
<!-- Included JS Files -->
<script src="javascripts/app.js"></script>
<script>
var PUSHER_APP_KEY = "<?php echo(PUSHER_APP_KEY); ?>";
</script>
<script src="http://js.pusher.com/1.11/pusher.min.js"></script>
<script src="javascripts/pusher.js"></script>
<!-- do not include in production -->
<script src="javascripts/_pusher_tests.js"></script>
</body>
</html>