|
@@ 5194-5198 (lines=5) @@
|
| 5191 |
|
public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
| 5192 |
|
{ |
| 5193 |
|
$private = ($private) ? 1 : 0; |
| 5194 |
|
if (!is_numeric($to)) { |
| 5195 |
|
// Query for the To ID |
| 5196 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$to}'"); |
| 5197 |
|
$to = $this->getDatabase()->getValue($rs); |
| 5198 |
|
} |
| 5199 |
|
if (!is_numeric($from)) { |
| 5200 |
|
// Query for the From ID |
| 5201 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 5199-5203 (lines=5) @@
|
| 5196 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$to}'"); |
| 5197 |
|
$to = $this->getDatabase()->getValue($rs); |
| 5198 |
|
} |
| 5199 |
|
if (!is_numeric($from)) { |
| 5200 |
|
// Query for the From ID |
| 5201 |
|
$rs = $this->getDatabase()->select('id', $this->getDatabase()->getFullTableName("manager_users"), "username='{$from}'"); |
| 5202 |
|
$from = $this->getDatabase()->getValue($rs); |
| 5203 |
|
} |
| 5204 |
|
// insert a new message into user_messages |
| 5205 |
|
$this->getDatabase()->insert(array( |
| 5206 |
|
'type' => $type, |