![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/public_html/admin_includes/ |
<?php
// Social Media Tab
// This file handles social media integration management
// Social media platforms configuration
$social_platforms = [
'google' => [
'name' => 'Google',
'status' => 'active',
'api_key' => 'sk-google-api-key-123',
'api_secret' => 'google-secret-456',
'webhook_url' => 'https://soundstudiopro.com/webhooks/google',
'last_tested' => '2024-01-15 14:30:00',
'setup_instructions' => 'Configure OAuth 2.0 credentials in Google Cloud Console',
'icon' => 'fab fa-google'
],
'facebook' => [
'name' => 'Facebook',
'status' => 'inactive',
'api_key' => 'fb-app-id-789',
'api_secret' => 'fb-app-secret-012',
'webhook_url' => 'https://soundstudiopro.com/webhooks/facebook',
'last_tested' => '2024-01-10 09:15:00',
'setup_instructions' => 'Create Facebook App and configure login settings',
'icon' => 'fab fa-facebook'
],
'twitter' => [
'name' => 'Twitter',
'status' => 'active',
'api_key' => 'twitter-api-key-345',
'api_secret' => 'twitter-secret-678',
'webhook_url' => 'https://soundstudiopro.com/webhooks/twitter',
'last_tested' => '2024-01-12 16:45:00',
'setup_instructions' => 'Set up Twitter API v2 credentials and OAuth 2.0',
'icon' => 'fab fa-twitter'
],
'apple' => [
'name' => 'Apple',
'status' => 'inactive',
'api_key' => 'apple-key-id-901',
'api_secret' => 'apple-private-key-234',
'webhook_url' => 'https://soundstudiopro.com/webhooks/apple',
'last_tested' => '2024-01-08 11:20:00',
'setup_instructions' => 'Configure Sign in with Apple in Apple Developer Console',
'icon' => 'fab fa-apple'
],
'discord' => [
'name' => 'Discord',
'status' => 'active',
'api_key' => 'discord-client-id-567',
'api_secret' => 'discord-client-secret-890',
'webhook_url' => 'https://soundstudiopro.com/webhooks/discord',
'last_tested' => '2024-01-14 13:10:00',
'setup_instructions' => 'Create Discord application and configure OAuth2 scopes',
'icon' => 'fab fa-discord'
],
'github' => [
'name' => 'GitHub',
'status' => 'inactive',
'api_key' => 'github-client-id-123',
'api_secret' => 'github-client-secret-456',
'webhook_url' => 'https://soundstudiopro.com/webhooks/github',
'last_tested' => '2024-01-06 10:30:00',
'setup_instructions' => 'Register OAuth App in GitHub Developer Settings',
'icon' => 'fab fa-github'
]
];
// Social media statistics
$social_stats = [
'total_connections' => 847,
'active_platforms' => 3,
'total_shares' => 2341,
'engagement_rate' => 12.5
];
?>
<!-- Social Media Integration -->
<div class="section-header">
<h2><i class="fas fa-share-alt"></i> Social Media Integration</h2>
<p>Configure and manage social media platform integrations.</p>
</div>
<!-- Social Media Statistics -->
<div class="stats-grid" style="margin-bottom: 3rem;">
<div class="stat-card">
<div class="stat-number"><?= number_format($social_stats['total_connections']) ?></div>
<div class="stat-label">Total Connections</div>
</div>
<div class="stat-card">
<div class="stat-number"><?= $social_stats['active_platforms'] ?></div>
<div class="stat-label">Active Platforms</div>
</div>
<div class="stat-card">
<div class="stat-number"><?= number_format($social_stats['total_shares']) ?></div>
<div class="stat-label">Total Shares</div>
</div>
<div class="stat-card">
<div class="stat-number"><?= $social_stats['engagement_rate'] ?>%</div>
<div class="stat-label">Engagement Rate</div>
</div>
</div>
<div class="api-grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem;">
<?php foreach ($social_platforms as $provider => $config): ?>
<div class="api-card" style="background: rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 2rem;">
<div class="api-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;">
<div class="api-name" style="font-size: 1.6rem; font-weight: 600; color: white;">
<i class="<?= $config['icon'] ?>"></i>
<?= $config['name'] ?>
</div>
<div class="api-status <?= $config['status'] ?>" style="padding: 0.5rem 1rem; border-radius: 20px; font-size: 1.2rem; font-weight: 600; color: white; background: <?= $config['status'] === 'active' ? '#48bb78' : '#e53e3e' ?>;"><?= ucfirst($config['status']) ?></div>
</div>
<form class="api-form" onsubmit="saveSocialConfig('<?= $provider ?>')">
<div class="form-group" style="margin-bottom: 1rem;">
<label style="display: block; color: #a0aec0; margin-bottom: 0.5rem; font-weight: 600;">API Key</label>
<input type="text" name="api_key" value="<?= $config['api_key'] ?>" placeholder="Enter API Key" style="width: 100%; padding: 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: white;">
</div>
<div class="form-group" style="margin-bottom: 1.5rem;">
<label style="display: block; color: #a0aec0; margin-bottom: 0.5rem; font-weight: 600;">API Secret</label>
<input type="password" name="api_secret" value="<?= $config['api_secret'] ?>" placeholder="Enter API Secret" style="width: 100%; padding: 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: white;">
</div>
<div class="api-actions" style="display: flex; gap: 0.5rem; margin-bottom: 1.5rem;">
<button type="submit" class="btn btn-primary" style="flex: 1;">
<i class="fas fa-save"></i>
Save
</button>
<button type="button" class="btn btn-secondary" onclick="testSocialApi('<?= $provider ?>')" style="flex: 1;">
<i class="fas fa-vial"></i>
Test
</button>
<button type="button" class="btn <?= $config['status'] === 'active' ? 'btn-danger' : 'btn-success' ?>" onclick="toggleSocialApi('<?= $provider ?>', '<?= $config['status'] ?>')" style="flex: 1;">
<i class="fas="<?= $config['status'] === 'active' ? 'fa-pause' : 'fa-play' ?>"></i>
<?= $config['status'] === 'active' ? 'Disable' : 'Enable' ?>
</button>
</div>
</form>
<div class="api-info" style="margin-bottom: 1.5rem;">
<div class="info-item" style="display: flex; justify-content: space-between; margin-bottom: 0.5rem;">
<span class="info-label" style="color: #a0aec0;">Webhook URL:</span>
<span class="info-value" style="color: white; font-family: monospace;"><?= $config['webhook_url'] ?></span>
</div>
<div class="info-item" style="display: flex; justify-content: space-between;">
<span class="info-label" style="color: #a0aec0;">Last Tested:</span>
<span class="info-value" style="color: white;"><?= $config['last_tested'] ?></span>
</div>
</div>
<div class="setup-instructions" style="background: rgba(255, 255, 255, 0.03); padding: 1rem; border-radius: 8px;">
<h4 style="margin: 0 0 0.5rem 0; color: white; font-size: 1.4rem;"><i class="fas fa-info-circle"></i> Setup Instructions</h4>
<p style="margin: 0; color: #a0aec0; font-size: 1.3rem;"><?= $config['setup_instructions'] ?></p>
</div>
</div>
<?php endforeach; ?>
</div>
<!-- Social Media Features -->
<div class="section-header">
<h3><i class="fas fa-cog"></i> Social Media Features</h3>
</div>
<div style="background: rgba(255, 255, 255, 0.05); border-radius: 16px; padding: 2rem;">
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;">
<div>
<h4 style="color: white; margin-bottom: 1rem;">Auto-Sharing</h4>
<div style="display: flex; flex-direction: column; gap: 1rem;">
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" checked style="width: 18px; height: 18px;">
Share completed tracks automatically
</label>
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" checked style="width: 18px; height: 18px;">
Include track preview in posts
</label>
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" style="width: 18px; height: 18px;">
Share user achievements
</label>
</div>
</div>
<div>
<h4 style="color: white; margin-bottom: 1rem;">Social Login</h4>
<div style="display: flex; flex-direction: column; gap: 1rem;">
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" checked style="width: 18px; height: 18px;">
Enable Google login
</label>
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" checked style="width: 18px; height: 18px;">
Enable Facebook login
</label>
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" style="width: 18px; height: 18px;">
Enable Apple login
</label>
</div>
</div>
<div>
<h4 style="color: white; margin-bottom: 1rem;">Analytics</h4>
<div style="display: flex; flex-direction: column; gap: 1rem;">
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" checked style="width: 18px; height: 18px;">
Track social media referrals
</label>
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" checked style="width: 18px; height: 18px;">
Monitor engagement metrics
</label>
<label style="display: flex; align-items: center; gap: 1rem; color: #a0aec0;">
<input type="checkbox" style="width: 18px; height: 18px;">
Export social data
</label>
</div>
</div>
</div>
<div style="text-align: center; margin-top: 2rem;">
<button class="btn btn-primary" onclick="saveSocialFeatures()">
<i class="fas fa-save"></i> Save Social Features
</button>
</div>
</div>
<script>
// Social media management functions
function saveSocialConfig(provider) {
// Implementation for saving social media configuration
alert(`${provider} social media configuration saved!`);
}
function testSocialApi(provider) {
// Implementation for testing social media API connection
alert(`Testing ${provider} social media API connection...`);
}
function toggleSocialApi(provider, currentStatus) {
const newStatus = currentStatus === 'active' ? 'inactive' : 'active';
// Implementation for toggling social media API status
alert(`${provider} social media API ${newStatus === 'active' ? 'enabled' : 'disabled'}!`);
}
function saveSocialFeatures() {
// Implementation for saving social media features
alert('Social media features saved successfully!');
}
</script>