|
@@ 4657-4661 (lines=5) @@
|
| 4654 |
|
public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
| 4655 |
|
{ |
| 4656 |
|
$private = ($private) ? 1 : 0; |
| 4657 |
|
if (!is_numeric($to)) { |
| 4658 |
|
// Query for the To ID |
| 4659 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$to}'"); |
| 4660 |
|
$to = $this->getDatabase()->getValue($rs); |
| 4661 |
|
} |
| 4662 |
|
if (!is_numeric($from)) { |
| 4663 |
|
// Query for the From ID |
| 4664 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 4662-4666 (lines=5) @@
|
| 4659 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$to}'"); |
| 4660 |
|
$to = $this->getDatabase()->getValue($rs); |
| 4661 |
|
} |
| 4662 |
|
if (!is_numeric($from)) { |
| 4663 |
|
// Query for the From ID |
| 4664 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$from}'"); |
| 4665 |
|
$from = $this->getDatabase()->getValue($rs); |
| 4666 |
|
} |
| 4667 |
|
// insert a new message into user_messages |
| 4668 |
|
$this->getDatabase()->insert(array( |
| 4669 |
|
'type' => $type, |