forked from server0707/PHPCalnedar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
52 lines (46 loc) · 2.24 KB
/
index.php
File metadata and controls
52 lines (46 loc) · 2.24 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
<?php
include 'vendor/Calendar.php';
use vendor\Calendar;
$calendar = new Calendar();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PHP Calendar</title>
<link href="assets/calendar.css" type="text/css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-4">
<form action="<?= $_SERVER['PHP_SELF'] ?>" class="was-validated">
<div class="mb-3 mt-3">
<label for="year" class="form-label">Year:</label>
<input type="number" class="form-control" id="year" placeholder="Enter year number" name="year" required min="1000" max="9999" value="<?= $_GET['year'] ?>">
<div class="valid-feedback">Valid.</div>
<div class="invalid-feedback">Ushbu maydonni to'ldirish va yil raqami to'g'ri yozilishi shart.</div>
</div>
<div class="mb-3">
<label for="month" class="form-label">Month:</label>
<input type="number" class="form-control" id="month" placeholder="Enter month number" name="month" required max="12" min="1" value="<?= $_GET['month'] ?>">
<div class="valid-feedback">Valid.</div>
<div class="invalid-feedback">Ushbu maydonni to'ldirish va oy raqami to'g'ri yozilishi shart.</div>
</div>
<button type="submit" class="btn btn-primary">View</button>
</form>
</div>
<div class="col-8">
<?php
echo $calendar->show();
?>
</div>
</div>
</div>
</body>
</html>