Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/kanvakanva.com/public_html/application/views/account/ |
Upload File : |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?> <!-- BEGIN CONTENT PAGE --> <section class="all-content-page"> <!-- Banner Categories --> <div class="baner-top-categories"> <div class="categories-text-hero"> <?php if(isset($id_address)) : ?> <h1>EDIT SHIPPING ADDRESS</h1> <?php else: ?> <h1>ADD SHIPPING ADDRESS</h1> <?php endif; ?> </div> <img src="<?=base_url()?>assets/frontend_new/images/banner/11.jpg" alt="banner"> </div> <div class="container"> <div class="breadcrumbs"> <a href="<?=base_url()?>">Home</a> <a href="<?=base_url()?>account">Account</a> <a href="<?=base_url()?>account/shipping">Shipping Details</a> <?php if(isset($id_address)) : ?> <span>Edit Shipping Address</span> <?php else: ?> <span>Add Shipping Address</span> <?php endif; ?> </div> <div class="row"> <div class="col-sm-2" style="border-right:1px solid #ccc;padding-bottom:190px"> <h4>MY ACCOUNT</h4> <p>view & edit your details</p> <p style="font-size: 18px;color: #dd9b5e;font-weight: 600;">Point : <?= number_format($point,0,",","."); ?> <br> <p><a href="<?= base_url('account/profile'); ?>">MY PROFILE</a></p> <p><a href="<?= base_url('account/shipping'); ?>">SHIPPING DETAILS</a></p> <p><a href="<?= base_url('account/order_history'); ?>">ORDER HISTORY</a></p> <p><a href="<?= base_url('account/point_history'); ?>">POINT HISTORY</a></p> <!-- <p><a href="<?= base_url('account/wishlist'); ?>">MY WISHLIST</a></p> --> </div><!-- end col-sm-4--> <div class="col-sm-10"> <?php if(isset($id_address)) : ?> <h4>EDIT SHIPPING ADDRESS</h4> <?php else: ?> <h4>ADD SHIPPING ADDRESS</h4> <?php endif; ?> <?= $this->session->flashdata('success'); //to display success message ?> <br> <!-- Form Start --> <?php echo form_open('account/edit_shipping'); ?> <?php if(isset($id_address)) : ?> <input type="hidden" name="id_address" value="<?= $id_address ?>"> <?php else: ?> <input type="hidden" name="id_address" value=""> <?php endif; ?> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">Recipient Name</div> <div class="col-md-6"> <?php $data = array( 'name' => 'recipient_name', 'id' => 'recipient_name', 'value' => $shipping->recipient_name, 'maxlength' => '200', 'class' => 'form-control', ); echo form_input($data); echo '<span>' . form_error('recipient_name') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">Address Type</div> <div class="col-md-6"> <?php $data = array( 'name' => 'address_name', 'id' => 'address_name', 'value' => isset($shipping->address_name) ? $shipping->address_name: '', 'placeholder' => 'eg: home address, office address', 'maxlength' => '200', 'class' => 'form-control', ); echo form_input($data); echo '<span>' . form_error('address_name') . '</span>'; ?> </div> </div> <div class="left" style="width:125px; float:left; margin-bottom: 16px; display:none">Country</div> <div class="right" style="margin-bottom: 16px; display:none"> <select id="country" name="country" class="input-xlarge" style="width:50%; height: 30px; border:1px solid #9c989a; color:grey; padding:0; margin-left: 0;"> <option value="IDN" selected="selected">Indonesia</option> </select> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">State / Province</div> <div class="col-md-6"> <select required id="province" name="province" class="form-control"> <option value="">Choose State / Province...</option> <?php foreach($provinces['rajaongkir']['results'] as $province) : ?> <option value="<?= $province['province_id']; ?>" <?php if ($province['province_id'] == $shipping->id_province): ?> selected <?php endif ?> ><?= ucwords($province['province']); ?></option> <?php endforeach; ?> </select> <?php echo '<span>' . form_error('province') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">City / District</div> <div class="col-md-6"> <select required id="district" name="district" class="form-control"> <?php if (isset($district_lists)) : ?> <?php foreach($district_lists['rajaongkir']['results'] as $district) : ?> <option value="<?= $district['city_id']; ?>" <?php if ($district['city_id'] == $shipping->id_district) : ?> selected <?php endif; ?> ><?= ucwords($district['city_name']); ?></option> <?php endforeach; ?> <?php endif; ?> </select> <?php echo '<span>' . form_error('district') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">Subdistrict</div> <div class="col-md-6"> <select id="subdistrict" name="subdistrict" class="form-control"> <option value="">Choose Subdistrict...</option> <?php if (isset($subdistrict_lists)) : ?> <?php foreach($subdistrict_lists['rajaongkir']['results'] as $subdistrict) : ?> <option value="<?= $subdistrict['subdistrict_id']; ?>" <?php if ($subdistrict['subdistrict_id'] == $shipping->id_subdistrict) : ?> selected <?php endif; ?> ><?= ucwords($subdistrict['subdistrict_name']); ?></option> <?php endforeach; ?> <?php endif; ?> </select> <?php echo '<span style="font-size:10px;">' . form_error('subdistrict') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">Address</div> <div class="col-md-6"> <?php $data = array( 'name' => 'address', 'id' => 'address', 'value' => ucfirst($shipping->address), 'maxlength' => '200', 'class' => 'form-control', ); echo form_input($data); echo '<span>' . form_error('address') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">Post Code</div> <div class="col-md-6"> <?php $data = array( 'name' => 'postcode', 'id' => 'postcode', 'value' => $shipping->postcode, 'maxlength' => '200', 'class' => 'form-control', ); echo form_input($data); echo '<span>' . form_error('postcode') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2">HP/Phone</div> <div class="col-md-6"> <?php $data = array( 'name' => 'phone', 'id' => 'phone', 'value' => $shipping->phone, 'maxlength' => '200', 'size' => '50', 'class' => 'form-control', ); echo form_input($data); echo '<span>' . form_error('phone') . '</span>'; ?> </div> </div> <div class="row" style="margin-bottom:10px"> <div class="col-md-2"></div> <div class="col-md-6"> <input type="submit" name="update_shipping" value="SAVE DETAILS" class="button submit place-order w-m-100" /> </div> </div> <?php echo form_close(); ?> </div><!-- end col-sm-8--> </div><!-- end row--> </div><!-- end container --> </section> <script> $( document ).ready(function() { var controller = 'account'; var base_url = '<?php echo base_url(); ?>'; $('#province').change(function() { var id_province = $(this).val(); load_data_ajax(id_province); }); $('#district').change(function() { var id_district = $(this).val(); load_data_ajax2(id_district); }); function load_data_ajax(id_province) { $.ajax({ 'url' : base_url + controller + '/ajax_edit_district', 'type' : 'POST', 'data' : {'id_province' : id_province}, 'success' : function(data) { var container = $('#district'); if (data) { container.html(data); $("#district").trigger("chosen:updated"); }; } }); } function load_data_ajax2(id_district) { $.ajax({ 'url' : base_url + controller + '/ajax_edit_subdistrict', 'type' : 'POST', 'data' : {'id_district' : id_district}, 'success' : function(data) { var container = $('#subdistrict'); if (data) { container.html(data); $("#subdistrict").trigger("chosen:updated"); }; } }); } }); </script>