🚨 CRITICAL: Fixed deployment blockers by adding missing core directories: **Community System (CRITICAL)** - includes/community/ - Login_Handler and all community classes - templates/community/ - Community login forms **Certificate System (CRITICAL)** - includes/certificates/ - 8+ certificate classes and handlers - templates/certificates/ - Certificate reports and generation templates **Core Individual Classes (CRITICAL)** - includes/class-hvac-event-summary.php - includes/class-hvac-trainer-profile-manager.php - includes/class-hvac-master-dashboard-data.php - Plus 40+ other individual HVAC classes **Major Feature Systems (HIGH)** - includes/database/ - Training leads database tables - includes/find-trainer/ - Find trainer directory and MapGeo integration - includes/google-sheets/ - Google Sheets integration system - includes/zoho/ - Complete Zoho CRM integration - includes/communication/ - Communication templates system **Template Infrastructure** - templates/attendee/, templates/email-attendees/ - templates/event-summary/, templates/status/ - templates/template-parts/ - Shared template components **Impact:** - 70+ files added covering 10+ missing directories - Resolves ALL deployment blockers and feature breakdowns - Plugin activation should now work correctly - Multi-machine deployment fully supported 🔧 Generated with Claude Code Co-Authored-By: Ben Reed <ben@tealmaker.com>
57 lines
No EOL
1.7 KiB
PHP
57 lines
No EOL
1.7 KiB
PHP
<?php
|
|
/**
|
|
* Simple OAuth Callback Server
|
|
*
|
|
* This script creates a local server to capture the OAuth callback
|
|
* Usage: php auth-server.php
|
|
*/
|
|
|
|
echo "Starting OAuth callback server on http://localhost:8080\n";
|
|
echo "Waiting for authorization callback...\n\n";
|
|
|
|
// Start built-in PHP server
|
|
$server = stream_socket_server("tcp://127.0.0.1:8080", $errno, $errstr);
|
|
|
|
if (!$server) {
|
|
die("Error: $errstr ($errno)\n");
|
|
}
|
|
|
|
while ($conn = stream_socket_accept($server)) {
|
|
$request = fread($conn, 1024);
|
|
|
|
// Parse the request
|
|
if (preg_match('/GET \/callback\?code=([^\s&]+)/', $request, $matches)) {
|
|
$auth_code = $matches[1];
|
|
|
|
// Send response
|
|
$response = "HTTP/1.1 200 OK\r\n";
|
|
$response .= "Content-Type: text/html\r\n\r\n";
|
|
$response .= "<html><body>";
|
|
$response .= "<h1>Authorization Successful!</h1>";
|
|
$response .= "<p>Authorization code received. You can close this window.</p>";
|
|
$response .= "<p>Code: <code>$auth_code</code></p>";
|
|
$response .= "<p>Copy this code and paste it in the terminal.</p>";
|
|
$response .= "</body></html>";
|
|
|
|
fwrite($conn, $response);
|
|
fclose($conn);
|
|
|
|
echo "Authorization code received: $auth_code\n";
|
|
echo "Copy this code to your terminal.\n";
|
|
|
|
// Keep server running to display the page
|
|
sleep(10);
|
|
break;
|
|
} else {
|
|
// Send 404 for other requests
|
|
$response = "HTTP/1.1 404 Not Found\r\n";
|
|
$response .= "Content-Type: text/html\r\n\r\n";
|
|
$response .= "<html><body><h1>404 Not Found</h1></body></html>";
|
|
|
|
fwrite($conn, $response);
|
|
fclose($conn);
|
|
}
|
|
}
|
|
|
|
fclose($server);
|
|
echo "\nServer stopped.\n"; |