prepare("SELECT COUNT(*) FROM portfolio WHERE industry_slug = :cat"); $total_stmt->execute(['cat' => $category]); $total = $total_stmt->fetchColumn(); $total_pages = ceil($total / $limit); // ๐Ÿ”ฅ ๋ฆฌ์ŠคํŠธ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ (lawyer๋งŒ) $sql = "SELECT * FROM portfolio WHERE industry_slug = :cat ORDER BY id DESC LIMIT :offset, :limit"; $stmt = $pdo->prepare($sql); $stmt->bindValue(':cat', $category, PDO::PARAM_STR); $stmt->bindValue(':offset', $offset, PDO::PARAM_INT); $stmt->bindValue(':limit', $limit, PDO::PARAM_INT); $stmt->execute(); $items = $stmt->fetchAll(); // ====================================== // โ˜… META ์„ธํŒ… (head.sub.php ์—ฐ๋™) // ====================================== // ์—…์ข…๋ช… (ํŒŒ์ผ๋ช… ๋˜๋Š” ๋ผ์šฐํŒ…๊ฐ’) $industry_slug = 'lawyer'; $industry_name = '๋ฒ•๋ฅ '; // $meta_title_raw = "{$industry_name} ํ™ˆํŽ˜์ด์ง€ ์ œ์ž‘ ์‚ฌ๋ก€"; $meta_title = htmlspecialchars($meta_title_raw . " | ๋ฆฌ๋”๋„ฅ์Šค"); // Description (150์ž ์ œํ•œ) $meta_description_raw = "๋ณ€ํ˜ธ์‚ฌยท๋ฒ•๋ฌด๋ฒ•์ธยท๋ฒ•๋ฅ ์‚ฌ๋ฌด์†Œ ๋“ฑ ๋ฒ•๋ฅ  ์—…์ข…์— ์ตœ์ ํ™”๋œ ํ™ˆํŽ˜์ด์ง€ ์ œ์ž‘ ์‚ฌ๋ก€๋ฅผ ํ†ตํ•ด ๋ธŒ๋žœ๋“œ ์‹ ๋ขฐ๋„, ๊ฒ€์ƒ‰ ๋…ธ์ถœ, ์ƒ๋‹ด ๋ฌธ์˜ ์„ฑ๊ณผ๋ฅผ ๋†’์ด๋Š” ๋ฐฉ๋ฒ•์„ ํ™•์ธํ•˜์„ธ์š”."; $meta_description = strip_tags($meta_description_raw); $meta_description = mb_substr($meta_description, 0, 150, 'UTF-8'); // Keywords $meta_keywords = "{$industry_name}, ๋ณ€ํ˜ธ์‚ฌ ํ™ˆํŽ˜์ด์ง€ ์ œ์ž‘, ๋ฒ•๋ฌด๋ฒ•์ธ ํ™ˆํŽ˜์ด์ง€, ๋ฒ•๋ฅ ์‚ฌ๋ฌด์†Œ ์›น์‚ฌ์ดํŠธ, ๋ฆฌ๋”๋„ฅ์Šค"; // OG ์ด๋ฏธ์ง€ ์ž๋™ ์„ ํƒ $og_path = $_SERVER["DOCUMENT_ROOT"] . "/portfolio/assets/images/og/works-{$industry_slug}.jpg"; $og_url = G5_URL . "/portfolio/assets/images/og/works-{$industry_slug}.jpg"; if (file_exists($og_path)) { $meta_image = $og_url; } else { $meta_image = G5_URL . "/img/og-default.jpg"; } // Canonical URL $canonical_url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; // OG ํƒ€์ž… (์นดํ…Œ๊ณ ๋ฆฌ ํŽ˜์ด์ง€๋Š” ์›นํŽ˜์ด์ง€๊ฐ€ ๋งž์Œ) $meta_og_type = "website"; include_once(G5_THEME_PATH.'/head.php'); // ============================== // โ˜… ํฌํŠธํด๋ฆฌ์˜ค ๋ฆฌ์ŠคํŠธ ์Šคํ‚ค๋งˆ ์ž๋™ ์ƒ์„ฑ โ˜… // ============================== $schema = [ "@context" => "https://schema.org", "@type" => "CollectionPage", "name" => $meta_title, "description" => $meta_description, "url" => $canonical_url, "image" => $meta_image, "publisher" => [ "@type" => "Organization", "name" => "๋ฆฌ๋”๋„ฅ์Šค", "url" => "https://leadernex.com", "logo" => [ "@type" => "ImageObject", "url" => G5_URL . "/theme/basic/images/logo-c.svg" ] ], "mainEntity" => [ "@type" => "ItemList", "itemListOrder" => "https://schema.org/ItemListOrderAscending", "numberOfItems" => count($items), "itemListElement" => [] ] ]; foreach ($items as $index => $it) { $schema["mainEntity"]["itemListElement"][] = [ "@type" => "ListItem", "position" => $index + 1, "url" => G5_URL . "/works/" . $it['slug'], "name" => $it['client_name'] . " - " . $it['industry_name'], "image" => !empty($it['thumb']) ? G5_URL . "/portfolio/assets/images/thumb/" . $it['thumb'] : null, ]; } echo '<script type="application/ld+json">' . json_encode($schema, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . '</script>'; echo '<link rel="stylesheet" href="'.G5_URL.'/portfolio/assets/css/portfolio.css">'; echo '<script src="'.G5_URL.'/portfolio/assets/js/portfolio.js"></script>'; ?> <div class="portfolio-list-wrap"> <section class="hero-title-wrap"> <div class="inner"> <header class="hero-title"> <h1>๋ฒ•๋ฅ  ํ™ˆํŽ˜์ด์ง€ ์ œ์ž‘ ์‚ฌ๋ก€</h1> <h2 class="textflow"> <span class="hl">๋ณ€ํ˜ธ์‚ฌยท๋ฒ•๋ฌด๋ฒ•์ธ</span><br class="mbr"> ํ™ˆํŽ˜์ด์ง€ ์ œ์ž‘์œผ๋กœ<br> ์ „๋ฌธ์„ฑ๊ณผ ๊ฒ€์ƒ‰๋…ธ์ถœ์„ ๋†’์ด์„ธ์š” </h2> <p> <strong>๋ฆฌ๋”๋„ฅ์Šค</strong>๋Š” ๋ณ€ํ˜ธ์‚ฌยท๋ฒ•๋ฌด๋ฒ•์ธยท๋ฒ•๋ฅ ์‚ฌ๋ฌด์†Œ ๋“ฑ ๋ฒ•๋ฅ  ์—…์ข…์— ์ตœ์ ํ™”๋œ ๊ตฌ์กฐ์™€<br> ์ฝ˜ํ…์ธ ๋ฅผ ์„ค๊ณ„ํ•˜์—ฌ ๊ฒ€์ƒ‰ ๋…ธ์ถœ, ์ƒ๋‹ด ๋ฌธ์˜, ๋ธŒ๋žœ๋“œ ์‹ ๋ขฐ๋„๋ฅผ ํšจ๊ณผ์ ์œผ๋กœ ๋†’์—ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค. </p> </header> </div> </section> <nav class="subnav" aria-label="ํ™ˆํŽ˜์ด์ง€ ์ œ์ž‘ ์—…์ข…๋ณ„ ์‚ฌ๋ก€"> <ul> <li><a href="/works/lawyer" class="active">๋ฒ•๋ฅ </a></li> <li><a href="/works/hospital">์˜์›ยท๋ณ‘์›</a></li> <li><a href="/works/interior">์ธํ…Œ๋ฆฌ์–ด</a></li> </ul> </nav> <div class="grid"> <?php foreach ($items as $it): ?> <?php // ์ธ๋„ค์ผ ๊ฒฝ๋กœ $thumb = ''; if (!empty($it['thumb'])) { $thumb = '/portfolio/assets/images/thumb/' . $it['thumb']; } ?> <a href="<?= G5_URL ?>/works/<?= $it['slug'] ?>" class="card"> <div class="thumb"> <?php if ($thumb): ?> <img src="<?= $thumb ?>" alt=""> <?php else: ?> <div class="noimg">NO IMAGE</div> <?php endif; ?> <div class="info"> <div class="df"> <div class="year"><?= htmlspecialchars($it['project_year']) ?></div> <div class="industry"><?= htmlspecialchars($it['industry_name']) ?></div> </div> <div class="client"><?= htmlspecialchars($it['client_name']) ?></div> </div> </div> </a> <?php endforeach; ?> </div> <div class="pagination"> <?php if ($page > 1): ?> <a href="?page=<?= $page - 1 ?>" class="prev">์ด์ „</a> <?php endif; ?> <?php for ($p = 1; $p <= $total_pages; $p++): ?> <a href="?page=<?= $p ?>" class="num <?= $p == $page ? 'on' : '' ?>"><?= $p ?></a> <?php endfor; ?> <?php if ($page < $total_pages): ?> <a href="?page=<?= $page + 1 ?>" class="next">๋‹ค์Œ</a> <?php endif; ?> </div> </div> <?php include_once(G5_THEME_PATH.'/tail.php'); ?>