feat: wire discord and paypal configs to panel settings

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/6163aa0e-000d-4376-ad24-9f63a04f4d95

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-21 13:28:06 +00:00 committed by GitHub
parent c1d7c27b35
commit 428bccb6ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 336 additions and 134 deletions

View file

@ -297,28 +297,8 @@ function ogpHome()
//NOTIFY DISCORD WHEN ADMIN LOGS IN
$trust_admins = array("iaregamer","dimrod","CJB","Bebiano","Syru");
if ($userInfo['users_role'] == "admin" && in_array($userInfo['users_login'], $trust_admins) == false) {
//WEBHOOK Discord=======================================================================================
// Create new webhook in your Discord channel settings and copy&paste URL
//=======================================================================================================
$webhookurl = "https://discord.com/api/webhooks/1087810639390576650/sspI3frko8FLD6ybvzG-_BXhG4wjH7yujFBxffgtTw34uAL_AdrDxY36C-khqs--cEMu";
//========================================================================================================
$msg = "Admin Login :warning: \nIP:".$client_ip." \nID:".$userInfo['user_id']." \nUser:".$userInfo['users_login'];
$json_data = array ('content'=>"$msg");
$make_json = json_encode($json_data);
if(!function_exists('curl_init')){
error_log("OGP Discord webhook skipped: PHP curl extension is not loaded.");
}else{
$ch = curl_init( $webhookurl );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $make_json);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
curl_close($ch);
}
//end WEBHOOK Discord
ogp_send_discord_notification($settings, $msg, 'notify_admin_events');
}
$_SESSION['user_id'] = $userInfo['user_id'];
@ -487,4 +467,3 @@ function ogpHome()
?>