-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.php
More file actions
58 lines (58 loc) · 2.68 KB
/
template.php
File metadata and controls
58 lines (58 loc) · 2.68 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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta charset="utf-8">
<title><?php print($title);?></title>
<link href="style.css" rel="stylesheet"/>
<link href="flatpickr.min.css" rel="stylesheet"/>
</head>
<body>
<form method="post">
<h1>Сокращатель</h1>
<p>Автоматическое сокращение ссылок с добавлением UTM меток. Используется для размещения в социальных сетях.</p>
<label for="link">
<span>Ссылка</span>
<input id="link" type="text" name="link" onFocus="this.select()" autofocus="autofocus" placeholder="Скопируйте ссылку, которую необходимо сократить" value="<?php if(isset($result)):?><?php print($result);?><?php endif;?>">
<?php if(isset($empty_link)): ?>
<span style="color: red; margin-top: 5px;"><?php print($empty_link); ?></span>
<?php endif; ?>
</label>
<?php if ($result == ''): ?>
<label for="date">
<span>Дата размещения (по умолчанию всегда сегодня)</span>
<input class="flatpickr-input" id="date" type="text" name="date" placeholder="Выберите дату в формате ГГГГ-ММ-ДД">
</label>
<span>Тип трафика</span>
<div class="radio_buttons">
<label class="adv_hide-field" for="organik_traffic">
<input type="radio" name="type_traffic" id="organik_traffic" checked="" value="post">
<span>Органика</span>
</label>
<label class="adv_hide-field" for="adv_traffic">
<input type="radio" name="type_traffic" id="adv_traffic" value="adv">
<span>Реклама</span>
</label>
<label class="adv_show-field" for="adv_other">
<input type="radio" name="type_traffic" id="adv_other" value="other">
<span>Другой</span>
</label>
</div>
<label class="field hidden" for="adv_other_value">
<span>Укажите тип трафика латиницей без пробелов</span>
<input id="adv_other_value" type="text" name="type_traffic_other" placeholder="Введите тип трафика латицицей без пробелов">
</label>
<?php endif; ?>
<?php if ($result == ''): ?>
<button class="button" name="submit">
<span class="get_link">Получить ссылку</span>
<span class="download hidden">Загрузка...</span>
</button>
<?php else: ?>
<button class="button" name="reset"><span>Сократить еще ссылку</span></button>
<?php endif; ?>
</form>
<script src="flatpickr.js"></script>
<script type="text/javascript" src="main.js"></script>
</body>
</html>