-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewContestServer.php
66 lines (66 loc) · 2.11 KB
/
newContestServer.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
<html>
<head>
<title> Новое соревнование </title>
<style>
</style>
<script src="assest/js/jquery-3.2.0.min.js"></script>
<script>
</script>
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="assest/css/style.css">
</head>
<body>
<?php include("srcaccount");
if (($type > 1)and(!isset($_POST['countQ']))and(!isset($_POST['name']))and($_POST['name'] === none)) {
header('URL=error.php');
} else if (($_POST['countQ'] >= 1)and($_POST['countQ'] <= 20)) { ?>
<style>
textarea.check{
width: 1116px;
height: 100px;
}
</style>
<div id="body">
<div id="general_content" style="width: 100%;">
<div id="post">
<form name="loginServerContest" action="addContest.php">
<?php
$name = $_POST['name'];
$countQ = $_POST['countQ'];
echo "<h1>Создать соревнование</h1><br>Название: ".$name."<br>Количество задач: ".$countQ;
echo("<input type=\"hidden\" name=\"countQ\" value=\"".$countQ."\"><input type=\"hidden\" name=\"name\" value=\"".$name."\">");
for ($i = 0; $i < $countQ; $i++) {
?>
<legend>
<?php echo(($i+1)." задача<br><textarea name=\"question_".$i."\" class=\"check\"></textarea>");
if ($i < $countQ-1) {echo("<br><br>");}
?>
</legend>
<?php
} ?>
<br>
<button>Создать соревнование</button>
</form>
</div>
</div>
</div>
<?php } else {
?>
<div id="body">
<div id="general_content" style="width: 100%;">
<div id="post">
Error. Такой параметр недоступен.
<br>
Максимальное колличество задач - 20.
<br>
Минимальное колличество задач - 1.
<br>
<a href="contest.php">Вернуться назад</a>
</div>
</div>
</div>
<?php
}
?> ?>
</body>
</html>