34866-vm/index.php
2025-10-10 23:34:21 +00:00

120 lines
5.6 KiB
PHP

<?php
$successMessage = '';
$errorMessage = '';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
require_once __DIR__ . '/mail/MailService.php';
$name = htmlspecialchars($_POST['name'] ?? '');
$email = htmlspecialchars($_POST['email'] ?? '');
$message = htmlspecialchars($_POST['message'] ?? '');
if (!empty($name) && !empty($email) && !empty($message)) {
$to = 'knwace@gmail.com';
$res = MailService::sendContactMessage($name, $email, $message, $to, 'Contact form from KNWACE Studio');
if (!empty($res['success'])) {
$successMessage = 'Your message has been sent successfully!';
} else {
$error_details = isset($res['error']) ? htmlspecialchars($res['error']) : 'No specific error message was provided.';
$errorMessage = 'There was an error sending your message. Please try again later. (Details: ' . $error_details . ')';
}
} else {
$errorMessage = 'Please fill out all fields.';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>KNWACE Studio</title>
<meta name="description" content="AI-Powered Music Creation Studio built with Flatlogic Generator.">
<meta name="keywords" content="music production, ai music, beat maker, online daw, music studio, song generator, lyric generator, chord progression, flatlogic">
<meta property="og:title" content="KNWACE Studio">
<meta property="og:description" content="The Future of Music Creation. AI-powered tools to bring your ideas to life.">
<meta property="og:image" content="<?php echo $_SERVER['PROJECT_IMAGE_URL']; ?>">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="<?php echo $_SERVER['PROJECT_IMAGE_URL']; ?>">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.css">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<div class="sidebar">
<div class="logo">KNWACE</div>
<nav>
<a href="#home" class="active"><i data-feather="home"></i> Home</a>
<a href="#about"><i data-feather="info"></i> About</a>
<a href="#features"><i data-feather="star"></i> Features</a>
<a href="#contact"><i data-feather="mail"></i> Contact</a>
</nav>
</div>
<div class="main-content">
<section id="home">
<h1>KNWACE Studio</h1>
<p class="lead">The Future of Music Creation. Your AI-powered partner in the studio.</p>
<a href="#" class="btn btn-primary">Launch Studio</a>
</section>
<section id="about">
<h2>About The Vision</h2>
<p class="lead text-center" style="max-width: 800px; margin: 0 auto;">KNWACE Studio is designed to be your personal, intelligent music production environment. We combine cutting-edge AI with intuitive design to help you capture, develop, and finalize your musical ideas faster than ever before. From generating chord progressions to providing hit-potential feedback, our goal is to empower your creativity.</p>
</section>
<section id="features">
<h2>Key Features</h2>
<div class="feature-grid">
<div class="feature-card">
<i data-feather="cpu"></i>
<h3>AI Songwriting</h3>
<p>Generate melodies, lyrics, and chord progressions "in the style of" your favorite artists.</p>
</div>
<div class="feature-card">
<i data-feather="disc"></i>
<h3>Vast Instrument Library</h3>
<p>Access a huge, free library of instruments, synths, and effects without needing expensive plugins.</p>
</div>
<div class="feature-card">
<i data-feather="trending-up"></i>
<h3>Hit Potential Score</h3>
<p>Get real-time feedback on your track's potential based on analysis of current chart-topping hits.</p>
</div>
</div>
</section>
<section id="contact">
<h2>Get In Touch</h2>
<?php if ($successMessage): ?>
<div class="alert alert-success"><?php echo $successMessage; ?></div>
<?php endif; ?>
<?php if ($errorMessage): ?>
<div class="alert alert-danger"><?php echo $errorMessage; ?></div>
<?php endif; ?>
<form class="contact-form" method="post" action="#contact">
<div class="mb-3">
<input type="text" name="name" class="form-control" placeholder="Your Name" required>
</div>
<div class="mb-3">
<input type="email" name="email" class="form-control" placeholder="Your Email" required>
</div>
<div class="mb-3">
<textarea name="message" class="form-control" rows="5" placeholder="Your Message" required></textarea>
</div>
<button type="submit" class="btn btn-primary">Send Message</button>
</form>
</section>
</div>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
feather.replace()
</script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>