@@ 5184-5188 (lines=5) @@ | ||
5181 | public function sendAlert($type, $to, $from, $subject, $msg, $private = 0) |
|
5182 | { |
|
5183 | $private = ($private) ? 1 : 0; |
|
5184 | if (!is_numeric($to)) { |
|
5185 | // Query for the To ID |
|
5186 | $rs = $this->getDatabase()->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
|
5187 | $to = $this->getDatabase()->getValue($rs); |
|
5188 | } |
|
5189 | if (!is_numeric($from)) { |
|
5190 | // Query for the From ID |
|
5191 | $rs = $this->getDatabase()->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
|
@@ 5189-5193 (lines=5) @@ | ||
5186 | $rs = $this->getDatabase()->select('id', $this->getFullTableName("manager_users"), "username='{$to}'"); |
|
5187 | $to = $this->getDatabase()->getValue($rs); |
|
5188 | } |
|
5189 | if (!is_numeric($from)) { |
|
5190 | // Query for the From ID |
|
5191 | $rs = $this->getDatabase()->select('id', $this->getFullTableName("manager_users"), "username='{$from}'"); |
|
5192 | $from = $this->getDatabase()->getValue($rs); |
|
5193 | } |
|
5194 | // insert a new message into user_messages |
|
5195 | $this->getDatabase()->insert(array( |
|
5196 | 'type' => $type, |