Beispiel #1
0
                     `d1`.`nummerid` = ?
                 AND
                     `d2`.`unternehmenid` = ?', 2);
     DB::setParam($this->_post('id'), 'int');
     DB::setParam($_SESSION['unternehmenid'], 'int');
     DB::exec();
     if (DB::numRows() == 0) {
         $this->_jsonOutput(2, 'the sms account does not exist');
     }
     $allowonid = $this->_post('id');
 case 'create_sms':
     if ($this->_post('name') && strlen($this->_post('name')) > 0) {
         if ($this->_post('aktion') == 'create_sms') {
             $allowonid = '';
         }
         if (Funclib::checkAccountName($this->_post('name'), 2, $allowonid)) {
             if (is_numeric($this->_post('number'))) {
                 DB::query('SELECT
                              `gatewayid`
                          FROM
                              `sms_gateways`
                          WHERE
                              `gatewayid` = ?
                          AND
                              `unternehmenid` = ?', 2);
                 DB::setParam($this->_post('gatewayid'), 'int');
                 DB::setParam($_SESSION['unternehmenid'], 'int');
                 DB::exec();
                 if (DB::numRows() == 1) {
                     if ($this->_post('aktion') == 'create_sms') {
                         DB::query('INSERT INTO `sms`