You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/webht/models/common_model.php

32 lines
1.0 KiB
PHP

<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Common_model extends CI_Model {
function __construct() {
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
}
function save_mail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $frominfo = '中华游在线', $M_Web = 'chtcdn') {
$sql = "INSERT INTO Email_AutomaticSend
(
M_ReplyToName,
M_ReplyToEmail,
M_ToName,
M_ToEmail,
M_Title,
M_Body,
M_Web,
M_FromName,
M_State
)
VALUES(?, ?, ?, ?, ?, ?, ?, ?, 0) ";
$query = $this->HT->query($sql, array($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_Web, $frominfo));
return $query;
}
}