📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
otelscripti.demodesign.com.tr
/
application
/
models
📝
Room.php
← Geri Dön
<?php class Room extends CI_Model { /** * Ne olduğu belli değil * * @param array $kosul * @return $sorgu */ public function getOzelFiyat($kosul = []) { $sorgu = $this->db->where($kosul)->get('room_many')->row(); return $sorgu; } /** * Tüm odaları resimleri ve özellikleri ile birlikte çeker * * @return mixed */ public function all() { $results = $this->db ->from('rooms') ->where('language', $this->language) ->order_by('order', 'asc') ->order_by('id', 'asc') ->get() ->result(); foreach ($results as $result ) { $this->images($result); $this->extras($result); } return $results; } /** * Id'ye göre odayı resim ve özellikleri ile beraber çeker * * @param $id * @return mixed */ public function findId($id) { $result = $this->db ->from('rooms') ->where('id', $id) ->where('language', $this->language) ->get() ->row(); if ($result) { $this->images($result); $this->extras($result); } return $result; } /** * Odanın resimlerini odaya atar * * @param $room */ public function images($room) { $room->images = $this->db ->from('room_images') ->where('parentId', $room->id) ->order_by('order', 'asc') ->order_by('id', 'asc') ->get() ->result(); } /** * Odanın özelliklerini odaya atar * * @param $room */ public function extras($room) { $room->extras = $this->db ->select('room_extra.*') ->from('room_extra_validation') ->join('room_extra', 'room_extra.id = room_extra_validation.extraId') ->where('room_extra_validation.roomId', $room->id) ->get() ->result(); } /** * Tüm oda özelliklerini çeker * * @return mixed */ public function allExtras() { return $this->db ->from('room_extra') ->where('language', $this->language) ->order_by('id', 'asc') ->get() ->result(); } }
💾 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