-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_subject.php
51 lines (49 loc) · 1.73 KB
/
new_subject.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
<?php require_once("includes/sessions.php"); ?>
<?php
if (!isset($_SESSION['username'])) {
header("Location: index.php");
exit;
}
?>
<?php require_once("includes/dbconnection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php
find_selected_page();
?>
<?php require_once("includes/top.php"); ?>
<div id="contentLoad">
<h2>Add Subject</h2>
<form action="create_subject.php" method="post">
<p>Subject name:
<input type="text" name="menu_name" value="Enter Subject Here" id="menu_name" />
</p>
<p>Position:
<select name="position">
<?php
$subject_set = get_all_subjects();
$subject_count = mysql_num_rows($subject_set);
for($count=1; $count <= $subject_count+1; $count++) {
echo "<option value=\"{$count}\">{$count}</option>";
}
?>
</select>
</p>
<p>Visible:
<input type="radio" name="visible" value="0" /> No
<input name="visible" type="radio" value="1" checked="checked" />
Yes
</p>
<input type="submit" value="Add Subject" /> <a href="content.php">Cancel Add Subject</a>
</form>
<br />
</div> <!--ENDS CONTENTLOAD-->
</div> <!--ENDS CONTENT_MAIN-->
<div id="content_sub">
<?php echo navigation($sel_subject, $sel_page); ?>
<br />
<a href="content.php">Back</a>
<br />
<a href="logout.php">Logout</a>
</div> <!--ENDS CONTENT_SUB-->
<?php require_once("includes/site_info.php"); ?>