-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage.php
185 lines (184 loc) · 10.7 KB
/
manage.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php
session_start();
if($_SESSION["user_name"]==""){
echo "<script language=javascript>alert('请先登陆!');location.href='/login.php';</script>";
exit;
}
?>
<html>
<head>
<title>iBlog</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/iblog.css">
</head>
<body>
<?php include "navbar.php" ?>
<div class="header-content">
<div class="container">
<div class="header-content-title">
<h1 class="text-center" id="title"><?php echo $_SESSION["user_name"]."个人管理"; ?></h1>
</div>
</div>
</div>
<div class="mian-content">
<div class="container">
<div class="mian-content-nav">
<ul class="nav nav-tabs" role="tablist" id="tab">
<li role="presentation" class="active" id="u2l"><a href="#">编辑课表</a></li>
<li role="presentation" id="transcript"><a href="#">成绩录入</a></li>
<li role="presentation" id="lessons"><a href="#">新建课程</a></li>
<li role="presentation" id="photo"><a href="#">上传图片</a></li>
<li role="presentation" id="newusers"><a href="#">注册账号</a></li>
</ul>
</div>
<div class="mian-content" id="data">
<div id="u2l-form" class="tab-container">
<div>
<table class="table table-striped">
<thead><tr><th>课程名</th><th>任课教师</th><th>星期</th><th>节次</th><th>选退课</th></tr></thead>
<tbody>
<tr><th colspan="5" class="text-center">已选课程</th></tr>
<tr v-for="(lesson, index) in havelessons">
<td>{{ lesson.lessonname }}</td><td>{{ lesson.teachername }}</td>
<td>{{ lesson.day }}</td><td>{{ 2*lesson.section-1 }}-{{ 2*lesson.section }}</td>
<td><button v-on:click="deleteclass(lesson.lessonname)" type="button" class="btn btn-default deletebutton" id=("delete"+index)>删课</button></td>
</tr>
<tr><th colspan="5" class="text-center">未选课程</th></tr>
<tr v-for="(lesson, index) in otherlessons">
<td>{{ lesson.lessonname }}</td><td>{{ lesson.teachername }}</td>
<td>{{ lesson.day }}</td><td>{{ 2*lesson.section-1 }}-{{ 2*lesson.section }}</td>
<td><button v-on:click="addclass(lesson.lessonname)" type="button" class="btn btn-default addbutton" id=("add"+index)>选课</button></td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="lessons-form" class="tab-container">
<div class="row">
<form class="form-horizontal" role="form" action="/api/editlesson.php" method="post">
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">课程名</label>
<div class="col-md-4">
<input type="text" class="form-control" placeholder="" name="lessonname">
</div>
</div>
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">任课教师</label>
<div class="col-md-4">
<input type="text" class="form-control" placeholder="" name="teachername">
</div>
</div>
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">上课时间</label>
<div class="col-md-2">
<select class="form-control" name="lessontime-day">
<option value="1">星期一</option>
<option value="2">星期二</option>
<option value="3">星期三</option>
<option value="4">星期四</option>
<option value="5">星期五</option>
<option value="6">星期六</option>
<option value="7">星期日</option>
</select>
</div>
<div class="col-md-2">
<select class="form-control" name="lessontime-section">
<option value="1">第1-2节</option>
<option value="2">第3-4节</option>
<option value="3">第5-6节</option>
<option value="4">第7-8节</option>
<option value="5">第9-10节</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<button type="submit" class="btn btn-default">提交</button>
</div>
</div>
</form>
</div>
</div>
<div id="transcript-form" class="tab-container">
<div class="row">
<form class="form-horizontal" role="form" action="/api/edittranscript.php" method="post">
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">课程名</label>
<div class="col-md-4">
<select class="form-control" name="lessonname">
<option v-for="lesson in havelessons" v-bind:value="lesson.lessonname">{{ lesson.lessonname }}</option>
</select>
</div>
</div>
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">分数</label>
<div class="col-md-4">
<input type="number" min="0" max="100" class="form-control" placeholder="" name="score">
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<button type="submit" class="btn btn-default">提交</button>
</div>
</div>
</form>
</div>
</div>
<div id="photo-form" class="tab-container">
<div class="row">
<form class="form-horizontal" action="/api/photoup.php" method="post" enctype="multipart/form-data">
<div class="form-group">
<label class="col-md-offset-2 col-md-2 control-label">上传图片</label>
<div class="col-md-4">
<input type="file" name="file">
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<button type="submit" class="btn btn-default">提交</button>
</div>
</div>
</form>
</div>
</div>
<div id="newusers-form" class="tab-container">
<div class="row">
<form class="form-horizontal" role="form" action="/api/register.php" method="post">
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">用户名</label>
<div class="col-sm-4">
<input type="text" class="form-control" placeholder="Username" name="username">
</div>
</div>
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">密码</label>
<div class="col-sm-4">
<input type="password" class="form-control" placeholder="Password" name="password1">
</div>
</div>
<div class="form-group">
<label for="" class="col-md-offset-2 col-md-2 control-label">确认密码</label>
<div class="col-sm-4">
<input type="password" class="form-control" placeholder="Password" name="password2">
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<button type="submit" class="btn btn-default">提交</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include "script.php" ?>
<script>
$(document).ready(function(){
manageInit();
});
</script>
</body>
</html>