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:
parent
c1d7c27b35
commit
428bccb6ac
14 changed files with 336 additions and 134 deletions
|
|
@ -154,21 +154,8 @@ function exec_ogp_module() {
|
|||
if (isset($userInfo['users_role']) && isset($_POST['newrole']) && $userInfo['users_role'] != $_POST['newrole']) {
|
||||
$client_ip = getClientIPAddress();
|
||||
//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 = "User Role Changed :warning: \nIP: ".$client_ip." \nUser: ".$login." \nUser Role: ".$userInfo['users_role']." \nNew Role: ".$_POST['newrole'];
|
||||
$json_data = array ('content'=>"$msg");
|
||||
$make_json = json_encode($json_data);
|
||||
$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 );
|
||||
ogp_send_discord_notification($settings, $msg, 'notify_admin_events');
|
||||
//end WEBHOOK Discord
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue