<?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>"; ?>