This commit is contained in:
Flatlogic Bot 2025-09-16 17:15:03 +00:00
parent d9d53de693
commit 4272510c2c
2 changed files with 56 additions and 0 deletions

23
chat_logic.php Normal file
View File

@ -0,0 +1,23 @@
<?php
$message = strtolower($_POST['message'] ?? '');
if (str_contains($message, 'hello') || str_contains($message, 'hi')) {
echo "Hello! I'm Gemini, your in-app assistant. Ask me anything about this application.";
} elseif (str_contains($message, 'vibe')) {
echo "The 'Vibe Generator' (`vibe.php`) lets you generate random color palettes and CSS gradients. You can even save and share your favorite themes.";
} elseif (str_contains($message, 'seo')) {
echo "The 'SEO Checker' (`seo.php`) analyzes the on-page SEO of a given URL. It checks for title tags, meta descriptions, headings, and more.";
} elseif (str_contains($message, 'sandbox')) {
echo "The 'PHP Sandbox' (`sandbox.php`) is a safe environment where you can execute arbitrary PHP code and see the output.";
} elseif (str_contains($message, 'contact')) {
echo "The 'Contact' page (`contact.php`) contains a form that allows you to send an email using the app's built-in mail service.";
} elseif (str_contains($message, 'admin')) {
echo "The 'Admin' page (`admin.php`) is for managing the 'Nokia Facts'. It's a full CRUD interface for creating, reading, updating, and deleting facts.";
} elseif (str_contains($message, 'chat')) {
echo "This is the 'Chat' page (`chat.php`). You're talking to me right now! I can tell you about the different features of this application.";
} elseif (str_contains($message, 'home') || str_contains($message, 'index')) {
echo "The 'Home' page (`index.php`) is the main landing page of the application.";
} else {
echo "I'm sorry, I don't have information about that. I can answer questions about the Vibe Generator, SEO Checker, PHP Sandbox, Contact Form, Admin page, and the Chat feature.";
}

33
navbar.php Normal file
View File

@ -0,0 +1,33 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="index.php">Flatlogic</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="vibe.php">Vibe Generator</a>
</li>
<li class="nav-item">
<a class="nav-link" href="sandbox.php">PHP Sandbox</a>
</li>
<li class="nav-item">
<a class="nav-link" href="seo.php">SEO Checker</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="chat.php">Chat</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin.php">Admin</a>
</li>
</ul>
</div>
</div>
</nav>