diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..b4e3485 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,65 @@ + +body { + font-family: 'Roboto', sans-serif; + background-color: #f7fafc; + color: #4a5568; +} + +.navbar { + background-color: #ffffff; + box-shadow: 0 2px 4px rgba(0,0,0,.1); +} + +.hero { + background: linear-gradient(45deg, #2c5282, #38a169); + color: white; + padding: 100px 0; + text-align: center; +} + +.hero h1 { + font-size: 3.5rem; + font-weight: 700; +} + +.section { + padding: 60px 0; +} + +.section-title { + text-align: center; + margin-bottom: 40px; + font-size: 2.5rem; + font-weight: 700; + color: #2c5282; +} + +.card { + border: none; + border-radius: 0.5rem; + box-shadow: 0 4px 6px rgba(0,0,0,.1); + margin-bottom: 20px; +} + +.form-control { + border-radius: 0.5rem; +} + +.btn-primary { + background-color: #2c5282; + border-color: #2c5282; + border-radius: 0.5rem; + padding: 12px 30px; + font-weight: 700; +} + +.btn-primary:hover { + background-color: #2a4b73; + border-color: #2a4b73; +} + +.footer { + background-color: #2d3748; + color: white; + padding: 40px 0; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..2bec65b --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,51 @@ +document.addEventListener('DOMContentLoaded', function () { + const contactForm = document.getElementById('contactForm'); + if (contactForm) { + contactForm.addEventListener('submit', function (e) { + e.preventDefault(); + const name = document.getElementById('name').value; + const email = document.getElementById('email').value; + const message = document.getElementById('message').value; + const alertDiv = document.getElementById('form-messages'); + + if (name === '' || email === '' || message === '') { + showAlert('Please fill out all fields.', 'danger'); + return; + } + + if (!validateEmail(email)) { + showAlert('Please enter a valid email address.', 'danger'); + return; + } + + const formData = new FormData(contactForm); + + fetch('contact.php', { + method: 'POST', + body: formData + }) + .then(response => response.json()) + .then(data => { + if (data.success) { + showAlert(data.message, 'success'); + contactForm.reset(); + } else { + showAlert(data.message, 'danger'); + } + }) + .catch(error => { + showAlert('An error occurred. Please try again later.', 'danger'); + }); + }); + } + + function showAlert(message, type) { + const alertDiv = document.getElementById('form-messages'); + alertDiv.innerHTML = `
${message}
`; + } + + function validateEmail(email) { + const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(String(email).toLowerCase()); + } +}); diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..4d9967e --- /dev/null +++ b/contact.php @@ -0,0 +1,43 @@ + false, 'message' => 'Please fill out all fields.']); + exit; + } + + if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { + echo json_encode(['success' => false, 'message' => 'Invalid email format.']); + exit; + } + + $to = getenv('MAIL_TO') ?: 'your-email@example.com'; // Fallback email + $subject = 'New Contact Form Submission from ' . $name; + + $html_content = "

You have received a new message from your website contact form.

"; + $html_content .= "

Name: {$name}

"; + $html_content .= "

Email: {$email}

"; + $html_content .= "

Message:
{$message}

"; + + $text_content = "You have received a new message from your website contact form.\n"; + $text_content .= "Name: {$name}\n"; + $text_content .= "Email: {$email}\n"; + $text_content .= "Message:\n{$message}"; + + $result = MailService::sendMail($to, $subject, $html_content, $text_content, ['reply_to' => $email]); + + if ($result['success']) { + echo json_encode(['success' => true, 'message' => 'Thank you for your message. It has been sent.']); + } else { + echo json_encode(['success' => false, 'message' => 'Sorry, there was an error sending your message. Please try again later.']); + } +} else { + echo json_encode(['success' => false, 'message' => 'Invalid request method.']); +} diff --git a/index.php b/index.php index 7205f3d..2e23148 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,98 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + Mapping Agricultural Land Use and Crop Suitability + + + + + + + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- + + + +
+
+

Mapping Agricultural Land Use & Crop Suitability

+

A data-driven approach to agricultural planning in Balangkayan, Eastern Samar.

+
+
+ +
+
+

About the Project

+
+
+

This project leverages the power of QGIS and geospatial data to map agricultural land use and identify the most suitable crops for different areas within Balangkayan, Eastern Samar. Our goal is to empower local farmers, researchers, and government units with an interactive tool for sustainable agricultural planning and decision-making.

+
+
+
+
+ +
+
+

Contact Us

+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+ + + + + - + \ No newline at end of file diff --git a/privacy.php b/privacy.php new file mode 100644 index 0000000..ffe3526 --- /dev/null +++ b/privacy.php @@ -0,0 +1,68 @@ + + + + + + + Privacy Policy - Mapping Agricultural Land Use and Crop Suitability + + + + + + + + + + + + + + + + +
+
+

Privacy Policy

+
+
+

This is a placeholder for the Privacy Policy. You should update this to reflect your data handling practices.

+ +

Information We Collect

+

We collect information you provide to us directly, such as when you fill out the contact form. This may include your name, email address, and any message you send.

+ +

How We Use Information

+

We use the information we collect to respond to your inquiries and to improve our services.

+ +

Sharing of Information

+

We do not share your personal information with third parties except as required by law.

+ +

Contact Us

+

If you have any questions about this Privacy Policy, please contact us through the form on our homepage.

+
+
+
+
+ + + + + + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..fec6395 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,16 @@ + + + + + http://your-domain.com/index.php + 2025-10-09 + monthly + 1.0 + + + http://your-domain.com/privacy.php + 2025-10-09 + yearly + 0.5 + +