|
@@ 5107-5111 (lines=5) @@
|
| 5104 |
|
public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
| 5105 |
|
{ |
| 5106 |
|
$private = ($private) ? 1 : 0; |
| 5107 |
|
if (!is_numeric($to)) { |
| 5108 |
|
// Query for the To ID |
| 5109 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
| 5110 |
|
$to = $this->db->getValue($rs); |
| 5111 |
|
} |
| 5112 |
|
if (!is_numeric($from)) { |
| 5113 |
|
// Query for the From ID |
| 5114 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 5112-5116 (lines=5) @@
|
| 5109 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
| 5110 |
|
$to = $this->db->getValue($rs); |
| 5111 |
|
} |
| 5112 |
|
if (!is_numeric($from)) { |
| 5113 |
|
// Query for the From ID |
| 5114 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
| 5115 |
|
$from = $this->db->getValue($rs); |
| 5116 |
|
} |
| 5117 |
|
// insert a new message into user_messages |
| 5118 |
|
$this->db->insert(array( |
| 5119 |
|
'type' => $type, |