|
@@ 5222-5226 (lines=5) @@
|
| 5219 |
|
public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
| 5220 |
|
{ |
| 5221 |
|
$private = ($private) ? 1 : 0; |
| 5222 |
|
if (!is_numeric($to)) { |
| 5223 |
|
// Query for the To ID |
| 5224 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$to}'"); |
| 5225 |
|
$to = $this->getDatabase()->getValue($rs); |
| 5226 |
|
} |
| 5227 |
|
if (!is_numeric($from)) { |
| 5228 |
|
// Query for the From ID |
| 5229 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 5227-5231 (lines=5) @@
|
| 5224 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$to}'"); |
| 5225 |
|
$to = $this->getDatabase()->getValue($rs); |
| 5226 |
|
} |
| 5227 |
|
if (!is_numeric($from)) { |
| 5228 |
|
// Query for the From ID |
| 5229 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$from}'"); |
| 5230 |
|
$from = $this->getDatabase()->getValue($rs); |
| 5231 |
|
} |
| 5232 |
|
// insert a new message into user_messages |
| 5233 |
|
$this->getDatabase()->insert(array( |
| 5234 |
|
'type' => $type, |