![]() 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/private_html/utils/ |
<?php
// Add login and signup buttons to homepage navigation
$indexFile = '/home/gositeme/domains/soundstudiopro.com/public_html/index.php';
// Create backup
$backupFile = $indexFile . '.backup.auth.' . date('Y-m-d-H-i-s');
copy($indexFile, $backupFile);
echo "ā
Backup created: " . basename($backupFile) . "\n";
// Read the file
$content = file_get_contents($indexFile);
// Find the navigation section and add auth buttons
$oldNav = ' <nav class="nav">
<a href="#features" class="nav-link">Features</a>
<a href="#pricing" class="nav-link">Pricing</a>
<a href="admin.html" class="nav-link">Admin</a>
<a href="#create" class="btn btn-primary">Create Music</a>
</nav>';
$newNav = ' <nav class="nav">
<a href="#features" class="nav-link">Features</a>
<a href="#pricing" class="nav-link">Pricing</a>
<a href="admin.html" class="nav-link">Admin</a>
<a href="auth/login.php" class="nav-link">Login</a>
<a href="auth/register.php" class="btn btn-secondary">Sign Up</a>
<a href="#create" class="btn btn-primary">Create Music</a>
</nav>';
// Replace the navigation
$newContent = str_replace($oldNav, $newNav, $content);
// Write back
if (file_put_contents($indexFile, $newContent)) {
echo "ā
Login and Signup buttons added to navigation!\n";
echo "š Users can now easily access authentication\n";
echo "š Login: auth/login.php\n";
echo "š Sign Up: auth/register.php\n";
} else {
echo "ā Failed to modify index.php\n";
exit(1);
}
echo "\nš AUTHENTICATION BUTTONS ADDED:\n";
echo "1. ā
Login button (nav-link style)\n";
echo "2. ā
Sign Up button (btn btn-secondary style)\n";
echo "3. ā
Backup created for safety\n";
echo "\nš NAVIGATION NOW INCLUDES:\n";
echo "- Features\n";
echo "- Pricing\n";
echo "- Admin\n";
echo "- Login (NEW)\n";
echo "- Sign Up (NEW)\n";
echo "- Create Music\n";
?>