* * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. Please see LICENSE.txt at the top level of * the source code distribution for details. */ if (isset($_GET['error'])) { print_error('We had issues connecting to your Pager Duty account, please try again'); } if (isset($_GET['account']) && isset($_GET['service_key']) && isset($_GET['service_name'])) { set_config_name('alert,transports,pagerduty',$_GET['service_key']); set_config_name('alert,pagerduty,account',$_GET['account']); set_config_name('alert,pagerduty,service',$_GET['service_name']); } $admin_config = get_config_by_name('alert,admins'); if (strcasecmp($admin_config[0]['config_value'],"true") == 0) { $admin_checked = 'checked'; } else { $admin_checked = ''; } $read_config = get_config_by_name('alert,globals'); if (strcasecmp($read_config[0]['config_value'],"true") == 0) { $read_checked = 'checked'; } else { $read_checked = ''; } $default_only_config = get_config_by_name('alert,default_only'); if (strcasecmp($default_only_config[0]['config_value'],"true") == 0) { $default_only_checked = 'checked'; } else { $default_only_checked = ''; } $default_mail_config = get_config_by_name('alert,default_mail'); if (isset($config['base_url'])) { $callback = $config['base_url'].'/'.$_SERVER['REQUEST_URI'].'/'; } else { $callback = get_url().'/'; } $callback = urlencode($callback); echo '