forked from shotonoff/kladr_geo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
184 lines (166 loc) · 6.98 KB
/
index.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?
require "Autoloader.php";
Autoloader::RegisterAutoloader();
require "run.php";
?>
<!doctype html>
<html>
<head>
<title>geo kladr</title>
<meta charset=utf-8>
<script src="http://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU" type="text/javascript"></script>
<script src="<?=BaseUrl?>js/jquery-1.7.2.js"></script>
<script src="<?=BaseUrl?>js/plugins/jquery.form.js"></script>
<script src="<?=BaseUrl?>js/plugins/autocomplete/jquery.autocomplete.js"></script>
<script src="<?=BaseUrl?>js/plugins/jquery.validate.js"></script>
<script src="<?=BaseUrl?>js/plugins/additional-methods.js"></script>
<script src="<?=BaseUrl?>js/initialize.js"></script>
<script src="<?=BaseUrl?>js/cabinet.js"></script>
<link rel="stylesheet" href="<?=BaseUrl?>css/960/reset.css"/>
<link rel="stylesheet" href="<?=BaseUrl?>css/960/text.css"/>
<link rel="stylesheet" href="<?=BaseUrl?>css/960/960.css"/>
<link rel="stylesheet" href="<?=BaseUrl?>css/layout.css"/>
<??>
<script type="text/javascript">
ZPayment.location = {
lng: <?=$geoLocationEntity->getLongitude()?>,
lat: <?=$geoLocationEntity->getLatitude()?>
}
</script>
<script type="text/javascript">
ZPayment.BaseUlr = "<?=BaseUrl?>";
</script>
</head>
<body>
<div class="wrapper">
<header>
<div class="container_12"></div>
</header>
<div id="page" class="container_12">
<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>
</div>
</div>
<div id="footer">
<div id="footer-inner" class="container_12 clear-block">
<div id="footer-message" class="grid_12"></div>
</div>
</div>
<div id="debug"></div>
</body>
</html>