-
Notifications
You must be signed in to change notification settings - Fork 8
/
settings.php
38 lines (36 loc) · 887 Bytes
/
settings.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
<?php require_once('auth.php'); ?>
<html>
<head>
<title>Websheets Settings</title>
</head>
<body>
<div id='info'><?php echo $GLOBALS['WS_AUTHINFO']['info_span']; ?> </div>
<p>
<?php
global $WS_AUTHINFO;
if (!$WS_AUTHINFO['logged_in']) {
echo "You have to log in to change your settings.";
}
else {
require_once('edit.php');
$_REQUEST['action'] = 'settings';
$editout = run_edit_py();
// echo $editout;
$result = json_decode($editout, true);
if (is_string($result))
echo $result;
else {
?>
<p>
<form action='./settings.php' method='post'>
Your instructor can see which problems you have completed, and when.
<p>
Instructor (enter their Websheets account email address): <input type='text' name='instructor' value='<?php echo $result['settings']['instructor']; ?>' >
<input type="submit" value="Save settings">
</form>
<?php
}
}
?>
</body>
</html>