forked from shotonoff/kladr_geo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_content.php
131 lines (122 loc) · 4.34 KB
/
_content.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?
require "Autoloader.php";
Autoloader::RegisterAutoloader();
require "run.php";
?>
<div id="zpaymnet-map" style="width: 100%; height: 400px;"></div>
<div>
<div>IP Страна: <?=$geoLocationEntity->getCountry()?></div>
<div>IP Регион: <?=$geoLocationEntity->getRegion()?></div>
<div>IP Город: <?=$geoLocationEntity->getCity()?></div>
</div>
<form method="post">
<div>
<label>Укажите ваше место расположение</label>
</div>
<div>
<?if (isset($view['userEntity']) && $view['userEntity'] instanceof \Entities\UserLocation): ?>
<input size="100" name="location" value="<?=$view['userEntity']->getGeoAddress()?>"/>
<? else: ?>
<input size="100" name="location" value=""/>
<?endif?>
<input name="btn-search" type="button" value="показать на карте"/>
</div>
</form>
<? /* * * * * * * * * * * * * * * * * */ ?>
<br/><br/>
<hr/>
<div class="autobox">
<form action="" method="post">
<div class="geo-select wrap-country">
<select disabled="true" name="country">
<option value="0">Россия</option>
</select>
</div>
<div class="geo-select wrap-REGIONCODE">
<select name="REGIONCODE">
<option value="0">Выберите регион</option>
<?foreach ($view['regions'] as $code => $region): ?>
<option <?=($view['state']['region']->getCode('REGIONCODE') == $region->getCode('REGIONCODE')) ? "selected" : ""?>
value="REGIONCODE--<?=$region->getCode('REGIONCODE')?>"><?=kladr_name_filter($region, true)?></option>
<? endforeach?>
</select>
</div>
<div class="geo-select wrap-area">
<?if (isset($view['area'])): ?>
<select name="AREACODE">
<? foreach ($view['area'] as $area): ?>
<option value="AREACODE--<?=$area->getCode()?>"
<?= ($view['state']['area']->getCode('AREACODE') == $area->getCode('AREACODE')) ? "selected" : "" ?>
data-code="<?=$area->getCode()?>"><?=kladr_name_filter($area, true)?></option>
<? endforeach?>
</select>
<? endif?>
</div>
<div class="geo-select wrap-cities">
<?if (isset($view['cities'])): ?>
<select name="CITYCODE">
<? foreach ($view['cities'] as $city): ?>
<option value="CITYCODE--<?=$city->getCode()?>"
<?= ($view['state']['city']->getCode('CITYCODE') == $city->getCode('CITYCODE')) ? "selected" : "" ?>
data-code="<?=$city->getCode()?>"><?=kladr_name_filter($city, true)?></option>
<? endforeach?>
</select>
<? endif?>
</div>
<div style="clear: left;">
<b id="loading">Loading...</b>
</div>
<br/>
<div>
<div>
Улица
</div>
<div>
<input size="100" type="text" name="street"/>
</div>
<div class="description">
<div>
<i>Название улицы</i>
</div>
</div>
</div>
<br/>
<div>
<div>
Дом
</div>
<div>
<input size="100" type="text" name="home"/>
</div>
<div class="description">
<div>
<i>Номер дома</i>
</div>
</div>
</div>
<br/>
<div>
<div>Индекс</div>
<input type="text" name="zip"/>
</div>
<div>
<input type="submit" name="save" value="save"/>
<span></span>
</div>
</form>
</div>
<br/>
<br/>
<div style="border: 1px solid #ccc;padding: 10px;">
<div>Рассчёт стоимости</div>
<div>
<form id="delivery-calculate" action="delivery.php" method="post">
<select name="delivery">
<option value="ems">EMS</option>
<option value="ruspost">Russian Post</option>
</select>
<input type="submit"/>
<div class="calc-response"></div>
</form>
</div>
</div>