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