/
var
/
www
/
myprog.com.ua
/
admin
/
views
/
admin
/
js
/
forms
/
/var/www/myprog.com.ua/admin/views/admin/js/forms
mkdir
upload
Name
Size
Mode
Actions
order.php
3501
0644
edit
dl
rm
Edit:
/var/www/myprog.com.ua/admin/views/admin/js/forms/order.php
(3501B)
<div class="row"> <div class="col-xs-6"><div id="map" class="col-xs-12 img-thumbnail" style="height: 400px;"></div></div> <div class="col-xs-6"> <table class="table table-striped"> <thead> <tr> <th>Заказ <?php echo $this->order['id'];?></th> <th></th> </tr> <tr> <td>Город</td> <td><?php echo $this->order['country'].', '.$this->order['city'];?></td> </tr> <tr> <td>Адрес подачи</td> <td><?php echo '<span class="badge badge-info">'.chr(65).'</span> '.$this->order['json']['adres'].' '.$this->order['json']['house'];?></td> </tr> <tr> <td>Адрес поездки</td> <td> <?php if($this->order['json']['thecity']==0){ foreach($this->order['json']['adresX'] as $k => $v){ echo '<span class="badge badge-success">'.chr(65+$k+1).'</span> '.$v['adres']; echo $v['object']==0?' д. '.$v['house']:''; echo '<br>'; } }else{ echo '<i class="icon-road"></i> по городу'; } ?> </td> </tr> </thead> </table> </div> </div> <script> var city_zoom = <?php echo session::get('city_zoom'); ?>; var city_la = <?php echo isset($this->order['json']['la'])?$this->order['json']['la']:session::get('city_la'); ?>; var city_lo = <?php echo isset($this->order['json']['lo'])?$this->order['json']['lo']:session::get('city_lo'); ?>; ymaps.ready(init); function init () { init_map(); setRoute(); //thecity_click(<?php echo session::get('order_thecity');?>); } function callback_start_point(point) { //console.log(point); map.setCenter(point,city_zoom); } function setRoute() { var start = false; var finish = false; var adreses = new Array(); last_adreses = new Array(); start = true; <?php $finish = ''; echo "adreses.push('".$this->order['country'].", ".$this->order['region'].", ".$this->order['city'].", ".$this->order['json']['adres'].', '.$this->order['json']['house']."');"; //var_export($this->order['json']['adresX']);exit; if(isset($this->order['json']['adresX'])){ foreach($this->order['json']['adresX'] as $k => $v){ if($v['adres']!=''){ echo "adreses.push('".$this->order['country'].", ".$this->order['region'].", ".$this->order['city'].", ".$v['adres'].', '.$v['house']."');"; $finish = 'finish = true;'; } } } echo $finish; ?> if (start&finish) { getRoute(adreses); }else{ if (start) { setA(adreses[0]); } } } </script>
Save
cmd:
run