📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv11.demodesign.com.tr
/
catalog
/
model
/
mmstock
📝
mmstock.php
← Geri Dön
<?php class ModelMmstockMmstock extends Model { public function addnotification($data) { $this->db->query("INSERT INTO " . DB_PREFIX . "mmstock SET name='".$this->db->escape($data['name'])."', email='".$this->db->escape($data['email'])."', phone='".$this->db->escape($data['phone'])."', customer_id='".$this->customer->getId()."',p_id='".$this->db->escape($data['proid'])."', status =0, date_added =NOW()"); // 14-12-20 admin email notify alert $this->load->model('catalog/product'); $product_info = $this->model_catalog_product->getProduct($data['proid']); // echo "<pre>"; // print_r($product_info); $pro_name =""; if(!empty($product_info)){ $pro_name = $product_info['name']; } $module_info = $this->config->get('emoutstock_status'); if (!empty($module_info) && $module_info['emailtemp_description']) { $emailtemp_description = $module_info['emailtemp_description'][$this->config->get('config_language_id')]['adminalert']; } else { $emailtemp_description = ''; } // print_r($module_info['emailtemp_description'][(int)$this->config->get('config_language_id')]); $message = $emailtemp_description; if($message){ $format = html_entity_decode($message); $find = array( '{name}', '{email}', '{telephone}', '{productname}', '{productlink}' ); $replace = array( 'name' => $data['name'], 'email' => $data['email'], 'telephone' => $data['phone'], 'productname' => $pro_name, 'productlink' => HTTP_SERVER . 'index.php?route=product/product&product_id=' . $data['proid'] ); $message = str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format)))); } echo $message; $mail = new Mail(); $mail->protocol = $this->config->get('config_mail_protocol'); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname'); $mail->smtp_username = $this->config->get('config_mail_smtp_username'); $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8'); $mail->smtp_port = $this->config->get('config_mail_smtp_port'); $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout'); $mail->setTo($this->config->get('config_email')); $mail->setFrom($data['email']); $mail->setSender(html_entity_decode($data['name'], ENT_QUOTES, 'UTF-8')); $mail->setSubject(html_entity_decode($this->language->get('text_ticket_requested'), ENT_QUOTES, 'UTF-8')); $mail->setHtml(html_entity_decode($message, ENT_QUOTES, 'UTF-8')); $mail->send(); // 14-12-20 admin email notify alert } }
💾 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