REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 2.64 KB
Close
/home/jambtst2015/public_html/eschoolengine Installer/application/models/Email_model.php
Text
Base64
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Email_model extends CI_Model { function __construct() { parent::__construct(); } function account_opening_email($account_type = '' , $email = '') { $system_name = $this->db->get_where('settings' , array('type' => 'system_name'))->row()->description; $email_msg = "Welcome to ".$system_name."<br />"; $email_msg .= "Your account type : ".$account_type."<br />"; $email_msg .= "Your login password : ".$this->db->get_where($account_type , array('email' => $email))->row()->password."<br />"; $email_msg .= "Login Here : ".base_url()."<br />"; $email_sub = "Account opening email"; $email_to = $email; $this->do_email($email_msg , $email_sub , $email_to); } function password_reset_email($new_password = '' , $account_type = '' , $email = '') { $query = $this->db->get_where($account_type , array('email' => $email)); if($query->num_rows() > 0) { $email_msg = "Your account type is : ".$account_type."<br />"; $email_msg .= "Your password is : ".$new_password."<br />"; $email_sub = "Password reset request"; $email_to = $email; $this->do_email($email_msg , $email_sub , $email_to); return true; } else { return false; } } /***custom email sender****/ function do_email($msg=NULL, $sub=NULL, $to=NULL, $from=NULL) { $config = array(); $config['useragent'] = "CodeIgniter"; $config['mailpath'] = "/usr/bin/sendmail"; // or "/usr/sbin/sendmail" $config['protocol'] = "smtp"; $config['smtp_host'] = "localhost"; $config['smtp_port'] = "25"; $config['mailtype'] = 'html'; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['wordwrap'] = TRUE; $this->load->library('email'); $this->email->initialize($config); $system_name = $this->db->get_where('settings' , array('type' => 'system_name'))->row()->description; if($from == NULL) $from = $this->db->get_where('settings' , array('type' => 'system_email'))->row()->description; $this->email->from($from, $system_name); $this->email->from($from, $system_name); $this->email->to($to); $this->email->subject($sub); $msg = $msg."<br /><br /><br /><br /><br /><br /><br /><hr /><center><a href=\"http://codecanyon.net/item/eschool-school-management-system-pro/6087521?ref=joyontaroy\">© 2013 eschool School Management System Pro</a></center>"; $this->email->message($msg); $this->email->send(); //echo $this->email->print_debugger(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.DS_Store
6.00 KB
lrwxrwxrwx
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Crud_model.php
13.58 KB
lrwxrwxrwx
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Email_model.php
2.64 KB
lrwxrwxrwx
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.html
131 B
lrwxrwxrwx
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Sms_model.php
3.22 KB
lrwxrwxrwx
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).