Пример #1
0
                     `connector`)
                VALUES
                    (?, ?, ?, ?, ?)', 5);
     DB::setParam($id, 'int');
     DB::setParam($options['variableids'][$k], 'int');
     DB::setParam($options['operatoren'][$k], 'int');
     DB::setParam($options['werte'][$k], 'str');
     DB::setParam(is_numeric($this->postVars['connectors'][$k]) ? $this->postVars['connectors'][$k] : '-1', 'str');
     DB::exec();
     $settings .= '#' . $variables[$options['variableids'][$k]] . ' ' . $operators[$options['operatoren'][$k]] . ' ' . $options['werte'][$k] . ' ' . (is_numeric($this->postVars['connectors'][$k]) ? $connectors[$this->postVars['connectors'][$k]] : '') . ' ';
 }
 if ($this->postVars['microblogCondition'] == 1 && count($microblogCondition) > 0) {
     require INCLUDE_PATH . '/class/oauth.php';
     require INCLUDE_PATH . '/class/streamoauth.php';
     foreach ($microblogCondition as $k => $v) {
         Funclib::sendStreamMessage($data[1][$v]['baseurl'], $data[1][$v]['name'], $data[1][$v]['authurl'], $data[1][$v]['requesturl'], $data[1][$v]['accessurl'], $data[1][$v]['costumerkey'], $data[1][$v]['costumersecret'], $data[1][$v]['oauth_token'], $data[1][$v]['oauth_token_secret'], $data[1][$v]['maxlength'], $_SESSION['unternehmenid'], $settings);
     }
 }
 foreach ($this->postVars['messages'] as $k => $v) {
     DB::query('INSERT INTO `condition_texts`
                    (`conditionid`,
                     `text`)
                VALUES
                    (?, ?)', 2);
     DB::setParam($id, 'int');
     DB::setParam($v[0], 'str');
     $id2 = DB::exec(true);
     foreach ($v[1] as $k2 => $v2) {
         DB::query('INSERT INTO `condition_texts_accounts`
                       (`textid`,
                        `accountid`,
Пример #2
0
     $textAnz = count($v['text']);
     for ($i = 0; $i < $textAnz; $i++) {
         $accAnz = count($v['text'][$i]['types']);
         $accName = array();
         $m = preg_replace($search, $replace, $v['text'][$i]['text']);
         for ($j = 0; $j < $accAnz; $j++) {
             $type =& $v['text'][$i]['types'][$j];
             $accid =& $v['text'][$i]['accountids'][$j];
             $acc =& $accounts[$type][$accid];
             $accName[] = $acc['name'];
             switch ($type) {
                 case 0:
                     Funclib::sendAlarmMail($acc['email'], $acc['name'], $data['unternehmenid'], $m);
                     break;
                 case 1:
                     Funclib::sendStreamMessage($acc['apibase'], $acc['name'], $acc['authurl'], $acc['requesturl'], $acc['accessurl'], $acc['costumerkey'], $acc['costumersecret'], $acc['oauth_token'], $acc['oauth_token_secret'], $acc['maxlength'], $data['unternehmenid'], $m);
                     break;
                 case 2:
                     Funclib::sendSMS($acc['url'], $acc['nummer'], $acc['name'], $acc['gatewayname'], $acc['maxlength'], $data['unternehmenid'], $m);
                     break;
             }
         }
         Funclib::messageLog($data['unternehmenid'], $m, implode(', ', $accName));
     }
     if ($v['dolock']) {
         Funclib::lockCondition($data['unternehmenid'], $k);
         Funclib::insertError($data['unternehmenid'], $signatur, 'now publish condition "' . $v['name'] . '" is locked. Please delete this message to unlock this condition.', 0, $k);
     }
 } else {
     Funclib::insertError($data['unternehmenid'], $signatur, 'couldn\'t execute publish condition "' . $v['name'] . '". Reason: condition is locked', 1);
 }