📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv11.demodesign.com.tr
/
catalog
/
controller
/
extension
/
module
📝
city.php
← Geri Dön
<?php class ControllerExtensionModuleCity extends Controller { public function index() { $json = array(); if (isset($this->request->get['zone_id'])) { $sql = "SELECT c.* FROM " . DB_PREFIX . "city as c," . DB_PREFIX . "zone z WHERE c.zone_id = '" . (int) $this->request->get['zone_id'] . "' AND c.zone_id = z.zone_id AND z.status = 1 and c.status = 1 ORDER BY sort_order ASC"; $query = $this->db->query($sql); if ($query->rows) { foreach ($query->rows as $city) { if($this->config->get('module_city_postcode')) { $post_code = $city['code']; } else { $post_code = ''; } $json['cities'][] = array('city_id' => $city['city_id'], 'name' => $city['name'], 'post_code' => $post_code ); } } } $json['text_none'] = $this->language->get('text_none'); $json['text_select'] = $this->language->get('text_select'); $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } public function loadjs() { if (isset($this->request->get['route'])) { $route = (string) $this->request->get['route']; } else { $route = 'common/home'; } if ($route == 'account/register') { $this->document->addScript('catalog/view/javascript/city.js'); } elseif ($route == 'account/address/add') { $this->document->addScript('catalog/view/javascript/city.js'); } elseif ($route == 'account/address/edit') { $this->document->addScript('catalog/view/javascript/city.js'); } elseif ($route == 'checkout/checkout') { $this->document->addScript('catalog/view/javascript/city.js'); } elseif ($route == 'affiliate/register') { $this->document->addScript('catalog/view/javascript/city.js'); } } } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula