[go: up one dir, main page]

Menu

[r122]: / admin / addstudent.php  Maximize  Restore  History

Download this file

82 lines (63 with data), 3.1 kB

 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
<?php session_start();
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\" />
<title>Кафедра \"Компьютерные системы автоматизации производства\" МГТУ им.Н.Э.Баумана</title>
<link href=\"design/style1.css\" rel=\"stylesheet\" type=\"text/css\" />
</head>
<body marginheight=\"0\">
<p>";
include("chkadmin.php");
require("sqlstart.php");
//http://contingent.bmstu.ru/
echo "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"\">\n";
echo " <label>Фаимлия\n";
echo " <input type=\"text\" name=\"famil\"><br>\n";
echo " <label>Имя\n";
echo " <input type=\"text\" name=\"imya\"><br>\n";
echo " <label>Отчество\n";
echo " <input type=\"text\" name=\"otchestvo\"><br>\n";
echo " <label>Номер зачетки\n";
echo " <input type=\"text\" name=\"markbook\"><br>\n";
echo " <label>Год поступления\n";
if($save_year) {
echo " <input type=\"text\" name=\"godpostup\" value=\"$godpostup\">\n";
echo " <input type=\"checkbox\" name=\"save_year\" checked=\"checked\"/> Не стирать</label><br>\n";
}
else {
echo " <input type=\"text\" name=\"godpostup\">\n";
echo " <input type=\"checkbox\" name=\"save_year\" /> Не стирать</label><br>\n";
}
echo " <label>Семестр\n";
if($save_semestr) {
echo " <input type=\"text\" name=\"semestr\" value=\"$semestr\">\n";
echo " <input type=\"checkbox\" name=\"save_semestr\" checked=\"checked\"/> Не стирать</label><br>\n";
}
else {
echo " <input type=\"text\" name=\"semestr\">\n";
echo " <input type=\"checkbox\" name=\"save_semestr\" /> Не стирать</label><br>\n";
}
echo " <label>Группа\n";
if($save_groupe) {
echo " <input type=\"text\" name=\"gruppa\" value=\"$gruppa\">\n";
echo " <input type=\"checkbox\" name=\"save_groupe\" checked=\"checked\"/> Не стирать</label><br>\n";
}
else {
echo " <input type=\"text\" name=\"gruppa\">\n";
echo " <input type=\"checkbox\" name=\"save_groupe\"/> Не стирать</label><br>\n";
}
echo " <input type=\"submit\" name=\"add\" id=\"add\" value=\"Добавить\" />\n";
echo "</form>\n";
echo "</p>";
if (!empty($famil)and !empty($imya) and !empty($otchestvo) and !empty($markbook)and isset($semestr) and isset($gruppa) and isset($godpostup)) {
$page_request = "INSERT INTO `rk9site`.`students` (`ID` ,`surname` ,`name` ,`patronymic` ,`mark_book` ,`semester` ,`groupe` ,`come_year` ,`password` ,`e_maile` ,`site_status` ,`idkp5` ,`idkp6` ,`idkp7` ,`idkp8` ,`idkp9` ,`idkp10` ,`iddiplom` ,`foto`, `siteid`)
VALUES (NULL, '$famil', '$imya', '$otchestvo', '$markbook', '$semestr', '$gruppa', '$godpostup', '', '', '3', NULL , NULL , NULL , NULL , NULL , NULL , NULL , '', NULL);";
echo $page_request;
$pr = mysql_query($page_request);
}
echo "<hr>";
echo "<br><br><a href=\"/admin/adminka.php\">Вернуться в администраторскую</a>";
echo "
</body>
</html>"; ?>