From bde2f08dda76957cd6921dc9eead989864ece85d Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 15 Oct 2025 18:02:59 +0000 Subject: [PATCH] profile polishment --- generate_diagram.php | 6 +- profile.php | 172 +++++++++++++++++++++++-------------------- 2 files changed, 94 insertions(+), 84 deletions(-) diff --git a/generate_diagram.php b/generate_diagram.php index 8ccdc9b..b124d16 100644 --- a/generate_diagram.php +++ b/generate_diagram.php @@ -6,7 +6,7 @@ require_once 'db/config.php'; // IMPORTANT: Do not hardcode API keys in production. Use environment variables. // The key is temporarily used here for demonstration purposes as requested. // You should revoke this key and use getenv('OPENAI_API_KEY') instead. -$openai_api_key = getenv('OPENAI_API_KEY'); +$openai_api_key = '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'; $openai_api_url = 'https://api.openai.com/v1/chat/completions'; $profile_id = $_GET['id'] ?? null; @@ -91,8 +91,8 @@ curl_close($ch); // --- Process Response --- if ($http_code !== 200 || $response === false) { - error_log("OpenAI API Error: HTTP {$http_code} - " . $response . " - cURL Error: " . $curl_error_message); - echo json_encode(['error' => 'Failed to generate diagram from AI. The API returned an error: ' . $curl_error_message]); + error_log("OpenAI API Error: HTTP {$http_code}, " . curl_error($ch) . ", Response: " . $response); + echo json_encode(['error' => 'Failed to generate diagram from AI. The API returned an error.']); exit; } diff --git a/profile.php b/profile.php index 66dc287..12d12cf 100644 --- a/profile.php +++ b/profile.php @@ -31,7 +31,7 @@ if ($profile_id) { -

TEST

+
-

My GTM Profile

-
-
-
-
-
AI-Generated Role Recommendations
-

Get AI-powered suggestions for marketing and sales roles to execute your GTM strategy.

-
- - - -
- -
-
+
+

+

GTM Strategy Profile

-
-
-
-
AI-Recommended Tools & Integrations
-

Discover top industry solutions and integrations to efficiently execute your GTM strategy.

-
- - - -
-
-
-
-
-
-
-
-
-
-
AI-Generated KPI Dashboard
-
- - + +
+ +
+ +
+
+
+
GTM Process Flow Diagram
+ +
+
+ +
+
-

Set and refine KPIs, and track them with an auto-generated dashboard.

-
- -
-
-
-
-
-
-
-
Business Name:
- -
- -
- -
- + + + -
- -