Ejemplo n.º 1
0
                        </div>
                    </div>
                    <div class="form-group has-feedback">
                        <label for="canopsis_vhost" class="col-sm-4 control-label">Vhost</label>
                        <div class="col-sm-4">
                            <input id="canopsis_vhost" class="form-control" type="text" name="global-config-input" value="' . $canopsis_vhost['config_value'] . '" data-config_id="' . $canopsis_vhost['config_id'] . '">
                            <span class="form-control-feedback">
    <i class="fa" aria-hidden="true"></i>
</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>';
$osticket_url = get_config_by_name('alert.transports.osticket.url');
$osticket_token = get_config_by_name('alert.transports.osticket.token');
echo '
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#osticket_transport_expand"><i class="fa fa-caret-down"></i> osTicket transport</a> <button name="test-alert" id="test-alert" type="button" data-transport="osticket" class="btn btn-primary btn-xs pull-right">Test transport</button>
                </h4>
            </div>
            <div id="osticket_transport_expand" class="panel-collapse collapse">
                <div class="panel-body">
                    <div class="form-group has-feedback">
                        <label for="osticket_url" class="col-sm-4 control-label">osTicket API URL</label>
                        <div class="col-sm-4">
                            <input id="osticket_url" class="form-control" type="text" name="global-config-input" value="' . $osticket_url['config_value'] . '" data-config_id="' . $osticket_url['config_id'] . '">
                            <span class="form-control-feedback">
    <i class="fa" aria-hidden="true"></i>
Ejemplo n.º 2
0
                    <a data-toggle="collapse" data-parent="#accordion" href="#pushover_transport_expand">Pushover transport</a>
                </h4>
            </div>
            <div id="pushover_transport_expand" class="panel-collapse collapse">
                <div class="panel-body">
                    <div class="form-group">
                        <div class="col-sm-8">
                            <button class="btn btn-success btn-xs" type="button" name="new_config" id="new_config_item" data-toggle="modal" data-target="#new-config-pushover">Add Pushover config</button>
                        </div>
                    </div>';
$pushover_appkeys = get_config_like_name('alert.transports.pushover.%.appkey');
foreach ($pushover_appkeys as $pushover_appkey) {
    unset($upd_pushover_extra);
    $new_pushover_extra = array();
    $pushover_extras = get_config_like_name('alert.transports.pushover.' . $pushover_appkey['config_id'] . '.%');
    $pushover_userkey = get_config_by_name('alert.transports.pushover.' . $pushover_appkey['config_id'] . '.userkey');
    foreach ($pushover_extras as $extra) {
        $split_extra = explode('.', $extra['config_name']);
        if ($split_extra[4] != 'appkey' && $split_extra[4] != 'userkey') {
            $new_pushover_extra[] = $split_extra[4] . '=' . $extra['config_value'];
        }
    }
    $upd_pushover_extra = implode(PHP_EOL, $new_pushover_extra);
    echo '<div id="' . $pushover_appkey['config_id'] . '">
                        <div class="form-group has-feedback">
                            <label for="pushover_appkey" class="col-sm-4 control-label">Pushover Appkey </label>
                            <div class="col-sm-4">
                                <input id="pushover_appkey" class="form-control" type="text" name="global-config-input" value="' . $pushover_appkey['config_value'] . '" data-config_id="' . $pushover_appkey['config_id'] . '">
                                <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
                            </div>
                            <div class="col-sm-2">
Ejemplo n.º 3
0
                        </div>
                    </div>
                    <div class="form-group has-feedback">
                        <label for="clickatell_to" class="col-sm-4 control-label">Mobile numbers</label>
                        <div class="col-sm-4">
                            <textarea class="form-control" name="global-config-textarea" id="clickatell_to" placeholder="Enter the config options" data-config_id="' . $clickatell['config_id'] . '" data-type="clickatell">' . $upd_mobiles . '</textarea>
                            <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>';
$playsms_url = get_config_by_name('alert.transports.playsms.url');
$playsms_user = get_config_by_name('alert.transports.playsms.user');
$playsms_token = get_config_by_name('alert.transports.playsms.token');
$playsms_from = get_config_by_name('alert.transports.playsms.from');
$mobiles = get_config_like_name('alert.transports.playsms.to.%');
$new_mobiles = array();
foreach ($mobiles as $mobile) {
    $new_mobiles[] = $mobile['config_value'];
}
$upd_mobiles = implode(PHP_EOL, $new_mobiles);
echo '
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#playsms_transport_expand"><i class="fa fa-caret-down"></i> PlaySMS transport</a> <button name="test-alert" id="test-alert" type="button" data-transport="playsms" class="btn btn-primary btn-xs pull-right">Test transport</button>
                </h4>
            </div>
            <div id="playsms_transport_expand" class="panel-collapse collapse">
                <div class="panel-body">
Ejemplo n.º 4
0
    //#002 add
    $conf = $row["conf"];
    //#004 add
    $scanMode = $row["expressEnable"];
    $scanTime = $row["expressTimeout"];
    mysqli_free_result($result);
    unset($row);
} else {
    if ($link) {
        mysqli_close($link);
        $link = 0;
    }
    echo DB_ERROR;
}
//#010 begin
$systemScanDirEnabled = get_config_by_name($link, $GUID, "systemScanDirEnabled");
if ($systemScanDirEnabled != 1) {
    $systemScanDirEnabled = 0;
}
//#010 end
////////////////
// #004 check the content of conf
////////////////
if ($conf[1] == "1") {
    // 是否顯示關鍵字掃瞄功能
    $keyword_conf = 1;
}
////////////////
// #004 end
////////////////
////////////////
Ejemplo n.º 5
0
                    </div>
                    <div class="form-group has-feedback">
                        <label for="clickatell_to" class="col-sm-4 control-label">Mobiles</label>
                        <div class="col-sm-4">
                            <textarea class="form-control" name="global-config-textarea" id="playsms_to" placeholder="Enter the config options" data-config_id="' . $playsms_url['config_id'] . '" data-type="playsms">' . $upd_mobiles . '</textarea>
                            <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>';
$canopsis_host = get_config_by_name('alert.transports.canopsis.host');
$canopsis_port = get_config_by_name('alert.transports.canopsis.port');
$canopsis_user = get_config_by_name('alert.transports.canopsis.user');
$canopsis_passwd = get_config_by_name('alert.transports.canopsis.passwd');
$canopsis_vhost = get_config_by_name('alert.transports.canopsis.vhost');
echo '
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#canopsis_transport_expand"><i class="fa fa-caret-down"></i> Canopsis transport</a> <button name="test-alert" id="test-alert" type="button" data-transport="canopsis" class="btn btn-primary btn-xs pull-right">Test transport</button>
                </h4>
            </div>
            <div id="canopsis_transport_expand" class="panel-collapse collapse">
                <div class="panel-body">
                    <div class="form-group has-feedback">
                        <label for="canopsis_host" class="col-sm-4 control-label">Canopsis Hostname </label>
                        <div class="col-sm-4">
                            <input id="canopsis_host" class="form-control" type="text" name="global-config-input" value="' . $canopsis_host['config_value'] . '" data-config_id="' . $canopsis_host['config_id'] . '">
                            <span class="glyphicon form-control-feedback" aria-hidden="true"></span>
                        </div>
Ejemplo n.º 6
0
</span>
                        </div>
                    </div>
                    <div class="form-group has-feedback">
                        <label for="osticket_token" class="col-sm-4 control-label">osTicket API Token</label>
                        <div class="col-sm-4">
                            <input id="osticket_token" class="form-control" type="text" name="global-config-input" value="' . $osticket_token['config_value'] . '" data-config_id="' . $osticket_token['config_id'] . '">
                            <span class="form-control-feedback">
    <i class="fa" aria-hidden="true"></i>
</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>';
$msteams_url = get_config_by_name('alert.transports.msteams.url');
echo '
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" href="#msteams_transport_expand"><i class="fa fa-caret-down"></i> Microsoft Teams transport</a> <button name="test-alert" id="test-alert" type="button" data-transport="msteams" class="btn btn-primary btn-xs pull-right">Test transport</button>
                </h4>
            </div>
            <div id="msteams_transport_expand" class="panel-collapse collapse">
                <div class="panel-body">
                    <div class="form-group has-feedback">
                        <label for="msteams_url" class="col-sm-4 control-label">Microsoft Teams Webhook URL</label>
                        <div class="col-sm-4">
                            <input id="msteams_url" class="form-control" type="text" name="global-config-input" value="' . $msteams_url['config_value'] . '" data-config_id="' . $msteams_url['config_id'] . '">
                            <span class="form-control-feedback">
    <i class="fa" aria-hidden="true"></i>