first commit

This commit is contained in:
Konstantin
2026-05-30 09:27:58 +03:00
commit de0344d218
2371 changed files with 661486 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
class ModelLocalisationZone extends Model {
public function getZone($zone_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone WHERE zone_id = '" . (int)$zone_id . "' AND status = '1'");
return $query->row;
}
public function getZonesByCountryId($country_id) {
$zone_data = $this->cache->get('zone.' . (int)$country_id);
if (!$zone_data) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone WHERE country_id = '" . (int)$country_id . "' AND status = '1' ORDER BY name");
$zone_data = $query->rows;
$this->cache->set('zone.' . (int)$country_id, $zone_data);
}
return $zone_data;
}
}