|
@@ 4918-4922 (lines=5) @@
|
| 4915 |
|
public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
| 4916 |
|
{ |
| 4917 |
|
$private = ($private) ? 1 : 0; |
| 4918 |
|
if (!is_numeric($to)) { |
| 4919 |
|
// Query for the To ID |
| 4920 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
| 4921 |
|
$to = $this->db->getValue($rs); |
| 4922 |
|
} |
| 4923 |
|
if (!is_numeric($from)) { |
| 4924 |
|
// Query for the From ID |
| 4925 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 4923-4927 (lines=5) @@
|
| 4920 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
| 4921 |
|
$to = $this->db->getValue($rs); |
| 4922 |
|
} |
| 4923 |
|
if (!is_numeric($from)) { |
| 4924 |
|
// Query for the From ID |
| 4925 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
| 4926 |
|
$from = $this->db->getValue($rs); |
| 4927 |
|
} |
| 4928 |
|
// insert a new message into user_messages |
| 4929 |
|
$this->db->insert(array( |
| 4930 |
|
'type' => $type, |