Example #1
0
                                $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);
                    }
                }
            } else {
                Funclib::insertError($data['unternehmenid'], $signatur, 'couldn\'t execute publish condition "' . $v['name'] . '". Reason: not all required variables are set', 1);
            }
        }
    }
}