<?php
class ModelModulePreOrder extends Model {
	
    //Вывод емайла на который будет отправка
    public function getMail() {
        $query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "setting WHERE `group` = 'less' AND `key` = 'mail'");
        
        if(isset($query->row['value']))
        {
            return $query->row['value'];
        }

        $this->db->query("INSERT INTO `" . DB_PREFIX . "setting` (`group`, `key`, `value`) VALUES ('less', 'mail', '')");
        
        return '';
    }        
}
?>
