📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv11.demodesign.com.tr
/
propanel
/
model
/
extension
📝
me_product_video.php
← Geri Dön
<?php class ModelExtensionMeproductvideo extends Model { public function Createtable(){ $this->db->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "me_product_video` (`video_id` int(11) NOT NULL AUTO_INCREMENT,`product_id` int(11) NOT NULL,`status` tinyint(2) NOT NULL,`sort_order` int(11) NOT NULL,`video_type` int(11) NOT NULL,`video_link` varchar(250) NOT NULL,`image` varchar(250) NOT NULL,PRIMARY KEY (`video_id`))"); } public function addVideo($videos,$product_id){ $this->db->query("DELETE FROM `" . DB_PREFIX . "me_product_video` WHERE product_id = '" . (int)$product_id . "'"); if(!empty($videos)){ foreach($videos as $video){ if(isset($video['status']) && ($video['status'] == 'on' || $video['status'] == 1)){ $status = 1; }else{ $status = 0; } $this->db->query("INSERT INTO " . DB_PREFIX . "me_product_video SET product_id = '" . (int)$product_id . "', status = '" . $status . "',sort_order = '" . (int)$video['sort_order'] . "',video_type = '" . (int)$video['video_type'] . "',video_link = '" . $this->db->escape($video['video_link']) . "',image = '" . $video['image'] . "'"); } } } public function getVideos($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "me_product_video WHERE product_id = '" . (int)$product_id . "' ORDER BY video_id ASC"); return $query->rows; } }
💾 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