|
@@ 4939-4943 (lines=5) @@
|
| 4936 |
|
public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
| 4937 |
|
{ |
| 4938 |
|
$private = ($private) ? 1 : 0; |
| 4939 |
|
if (!is_numeric($to)) { |
| 4940 |
|
// Query for the To ID |
| 4941 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
| 4942 |
|
$to = $this->db->getValue($rs); |
| 4943 |
|
} |
| 4944 |
|
if (!is_numeric($from)) { |
| 4945 |
|
// Query for the From ID |
| 4946 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 4944-4948 (lines=5) @@
|
| 4941 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
| 4942 |
|
$to = $this->db->getValue($rs); |
| 4943 |
|
} |
| 4944 |
|
if (!is_numeric($from)) { |
| 4945 |
|
// Query for the From ID |
| 4946 |
|
$rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
| 4947 |
|
$from = $this->db->getValue($rs); |
| 4948 |
|
} |
| 4949 |
|
// insert a new message into user_messages |
| 4950 |
|
$this->db->insert(array( |
| 4951 |
|
'type' => $type, |