fix: database

This commit is contained in:
ssbg04 committed 2026-06-05 19:19:50 +08:00
1 parent 19fe6d30f4
commit 2d5a7850d5
7 files changed
+147 -149

No files matched your search

+44 -42
View File
@@ -1,16 +1,18 @@
<?php
// Load environment variables — PHP 7.x compatible
function loadEnv($path) {
if (!file_exists($path)) return;
$lines = file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if ($lines === false) return;
foreach ($lines as $line) {
$line = trim($line);
if ($line === '' || $line[0] === '#') continue;
$parts = explode('=', $line, 2);
if (count($parts) < 2) continue;
$key = trim($parts[0]); $value = trim($parts[1]);
if (!array_key_exists($key, $_ENV)) { $_ENV[$key] = $value; putenv("$key=$value"); }
if (!function_exists('loadEnv')) {
function loadEnv($path) {
if (!file_exists($path)) return;
$lines = file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if ($lines === false) return;
foreach ($lines as $line) {
$line = trim($line);
if ($line === '' || $line[0] === '#') continue;
$parts = explode('=', $line, 2);
if (count($parts) < 2) continue;
$key = trim($parts[0]); $value = trim($parts[1]);
if (!array_key_exists($key, $_ENV)) { $_ENV[$key] = $value; putenv("$key=$value"); }
}
}
}
loadEnv(__DIR__ . '/.env');
@@ -69,14 +71,14 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<div class="hero-text">
<div class="hero-badge">
<span class="dot"></span>
Available for opportunities
Available for work
</div>
<span style="display:block; color: var(--text-muted); font-size: 1rem; font-weight: 500; margin-bottom: 10px;">Hi, I'm Cris Charles Garcia</span>
<h1>Building digital products with <span class="highlight">purpose</span>.</h1>
<p class="subtitle">BSIT Software Development student based in Laguna, Philippines — turning ideas into scalable, polished web experiences.</p>
<span style="display:block; color: var(--text-muted); font-size: 1rem; font-weight: 500; margin-bottom: 10px;">Hi, I am Cris Charles Garcia.</span>
<h1>Software <span class="highlight">Developer</span>.</h1>
<p class="subtitle">I am an IT student majoring in Software Development based in Laguna, Philippines. I focus on building reliable web applications.</p>
<div class="hero-btns">
<a href="#projects" class="btn primary" id="btn-view-projects">View Projects ↗</a>
<a href="#contact" class="btn secondary" id="btn-get-in-touch">Get in Touch</a>
<a href="#projects" class="btn primary" id="btn-view-projects">My Projects ↗</a>
<a href="#contact" class="btn secondary" id="btn-get-in-touch">Contact Me</a>
</div>
</div>
<div class="hero-img-container">
@@ -95,12 +97,12 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<section id="about" class="section-pad reveal">
<div class="section-header">
<span class="section-label">About Me</span>
<h2 class="section-title">Passion meets craft.</h2>
<h2 class="section-title">About Me</h2>
</div>
<div class="about-content">
<div class="about-text">
<p>I am a senior <strong>BSIT student majoring in Software Development</strong> with a passion for building scalable web applications that solve real-world problems.</p>
<p>Currently focused on the <strong>MERN Stack</strong> and <strong>PHP</strong> ecosystems. I love solving complex challenges — whether it's architecting a database, designing a seamless UI, or squashing that one annoying bug.</p>
<p>I am a senior <strong>IT student majoring in Software Development</strong>. I write code to solve real-world problems.</p>
<p>My primary stack includes <strong>PHP</strong>, <strong>React</strong>, <strong>Node.js</strong>, and <strong>MySQL</strong>. I enjoy database design, front-end development, and bug fixing.</p>
</div>
<div class="tech-stack">
<h3>Tech Stack</h3>
@@ -129,14 +131,14 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<!-- ===== PROJECTS ===== -->
<section id="projects" class="section-pad reveal">
<div class="section-header">
<span class="section-label">Featured Work</span>
<h2 class="section-title">Things I've built.</h2>
<span class="section-label">Projects</span>
<h2 class="section-title">Recent Projects</h2>
</div>
<div class="project-grid">
<?php include('views/tprojects.php'); ?>
</div>
<div class="view-all-container">
<a href="projects.php" class="btn secondary" id="btn-all-projects">View All Projects →</a>
<a href="projects.php" class="btn secondary" id="btn-all-projects">All Projects →</a>
</div>
</section>
@@ -145,8 +147,8 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<!-- ===== CERTIFICATIONS ===== -->
<section id="certificates" class="section-pad reveal">
<div class="section-header">
<span class="section-label">Credentials</span>
<h2 class="section-title">Certifications.</h2>
<span class="section-label">Certifications</span>
<h2 class="section-title">My Certifications</h2>
</div>
<div class="cert-grid">
<div class="cert-card reveal reveal-delay-1">
@@ -175,7 +177,7 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
</div>
</div>
<div class="view-all-container">
<a href="certifications.php" class="btn secondary" id="btn-all-certs">View All Certifications →</a>
<a href="certifications.php" class="btn secondary" id="btn-all-certs">All Certifications →</a>
</div>
</section>
@@ -184,8 +186,8 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<!-- ===== BLOG ===== -->
<section id="blog" class="section-pad reveal">
<div class="section-header">
<span class="section-label">Writing</span>
<h2 class="section-title">Latest articles.</h2>
<span class="section-label">Articles</span>
<h2 class="section-title">Latest Articles</h2>
</div>
<div class="blog-grid">
<article class="blog-card reveal reveal-delay-1">
@@ -193,8 +195,8 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<span class="blog-date">Feb 10, 2026</span>
<span class="blog-tag">React</span>
</div>
<h3 class="blog-title">Understanding Custom Hooks in React</h3>
<p class="blog-excerpt">Why you should stop copying code and start abstracting logic into reusable hooks.</p>
<h3 class="blog-title">Guide to React Custom Hooks</h3>
<p class="blog-excerpt">Learn how to write clean, reusable React components.</p>
<a href="#" class="read-more">Read Article →</a>
</article>
<article class="blog-card reveal reveal-delay-2">
@@ -202,8 +204,8 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<span class="blog-date">Jan 22, 2026</span>
<span class="blog-tag">DevOps</span>
</div>
<h3 class="blog-title">Why I Switched from XAMPP to Docker</h3>
<p class="blog-excerpt">Setting up a consistent development environment for PHP and Node.js without the headache.</p>
<h3 class="blog-title">Using Docker for PHP Development</h3>
<p class="blog-excerpt">How to set up PHP and Node.js projects using Docker.</p>
<a href="#" class="read-more">Read Article →</a>
</article>
<article class="blog-card reveal reveal-delay-3">
@@ -211,13 +213,13 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<span class="blog-date">Dec 05, 2025</span>
<span class="blog-tag">Career</span>
</div>
<h3 class="blog-title">My Journey as a BSIT Student</h3>
<p class="blog-excerpt">Balancing capstone projects, freelance work, and learning new tech stacks in 2026.</p>
<h3 class="blog-title">My Experience as an IT Student</h3>
<p class="blog-excerpt">Balancing school projects, freelance work, and learning new skills.</p>
<a href="#" class="read-more">Read Article →</a>
</article>
</div>
<div class="view-all-container">
<a href="blog.php" class="btn secondary" id="btn-all-articles">Read All Articles →</a>
<a href="blog.php" class="btn secondary" id="btn-all-articles">All Articles →</a>
</div>
</section>
@@ -226,11 +228,11 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<!-- ===== CONTACT ===== -->
<section id="contact" class="section-pad reveal">
<div class="section-header" style="text-align:center;">
<span class="section-label">Let's Connect</span>
<h2 class="section-title">Start a conversation.</h2>
<span class="section-label">Contact</span>
<h2 class="section-title">Get in Touch</h2>
</div>
<div class="contact-container">
<p>Have a project in mind or want to discuss the latest tech trends? Reach out — I'd love to hear from you.</p>
<p>Feel free to reach out if you have a project idea, a job opportunity, or any questions.</p>
<div class="social-links">
<a href="https://github.com/ssbg04" target="_blank" class="social-btn" aria-label="GitHub" id="link-github">
@@ -249,19 +251,19 @@ $contactEmail = getenv('CONTACT_EMAIL') ?: ($_ENV['CONTACT_EMAIL']
<form action="https://formsubmit.co/<?php echo htmlspecialchars($contactEmail); ?>" method="POST" class="email-form" id="contact-form">
<input type="hidden" name="_captcha" value="false">
<input type="text" name="name" id="form-name" placeholder="Your Name" required>
<input type="text" name="name" id="form-name" placeholder="Name" required>
<input type="text" name="subject" id="form-subject" placeholder="Subject" required>
<textarea name="message" id="form-message" rows="5" placeholder="How can I help you?" required></textarea>
<textarea name="message" id="form-message" rows="5" placeholder="Message" required></textarea>
<?php if ($recaptchaSiteKey): ?>
<div class="g-recaptcha" data-sitekey="<?php echo htmlspecialchars($recaptchaSiteKey); ?>"></div>
<?php endif; ?>
<button type="submit" class="btn primary full-width" id="btn-send-message">Send Message ✉️</button>
<button type="submit" class="btn primary full-width" id="btn-send-message">Send Message</button>
</form>
</div>
</section>
<footer>
<p>&copy; <span id="year"></span> Cris Charles Garcia. Crafted in Laguna 🇵🇭</p>
<p>&copy; <span id="year"></span> Cris Charles Garcia. Based in Laguna, Philippines.</p>
</footer>
</div>