first commit
This commit is contained in:
73
cn/container/free_trail.php
Normal file
73
cn/container/free_trail.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
// Initialize variables with default values
|
||||
$small_heading_EN = '';
|
||||
$small_heading_CN = '';
|
||||
$large_heading_EN = '';
|
||||
$large_heading_CN = '';
|
||||
$btn_text_EN = '';
|
||||
$btn_text_CN = '';
|
||||
$btn_link = '';
|
||||
$long_description_EN = '';
|
||||
$long_description_CN = '';
|
||||
|
||||
$query = "SELECT * FROM cta_form_data LIMIT 1";
|
||||
$result = mysqli_query($conn, $query);
|
||||
|
||||
if (!$result) {
|
||||
// Handle query error
|
||||
die("Database query failed: " . mysqli_error($conn));
|
||||
}
|
||||
|
||||
if (mysqli_num_rows($result) > 0) {
|
||||
$rowss = mysqli_fetch_assoc($result);
|
||||
// Assign fetched data to variables
|
||||
$small_heading_EN = $rowss['small_heading_CTA_EN'];
|
||||
$small_heading_CN = $rowss['small_heading_CTA_CN'];
|
||||
$large_heading_EN = $rowss['Large_heading_CTA_EN'];
|
||||
$large_heading_CN = $rowss['Large_heading_CTA_CN'];
|
||||
$btn_text_EN = $rowss['btn_text_cta_EN'];
|
||||
$btn_text_CN = $rowss['btn_text_cta_CN'];
|
||||
$btn_link = $rowss['btn_link'];
|
||||
$long_description_EN = $rowss['long_description_CTA_EN'];
|
||||
|
||||
// Allow HTML in long_description_CN
|
||||
$long_description_CN = $rowss['long_description_CTA_CN']; // Output as-is
|
||||
} else {
|
||||
// Handle the case where no records are found
|
||||
$long_description_CN = "No data available.";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<section class="free-trail">
|
||||
<div class="container">
|
||||
<div class="free-trail__wrap">
|
||||
<div class="free-trail__shape-3" style="background-image: url(images/shapes/free-trail-shape-3.png);"></div>
|
||||
<div class="free-trail__shape-1 float-bob-x"></div>
|
||||
<div class="free-trail__start-1 zoominout">
|
||||
<img src="images/shapes/free-trail-start-1.png" alt="">
|
||||
</div>
|
||||
<div class="free-trail__start-2 float-bob-y">
|
||||
<img src="images/shapes/free-trail-start-2.png" alt="">
|
||||
</div>
|
||||
<div class="free-trail__start-3 float-bob-x">
|
||||
<img src="images/shapes/free-trail-start-3.png" alt="">
|
||||
</div>
|
||||
<div class="free-trail__start-4 zoominout">
|
||||
<img src="images/shapes/free-trail-start-4.png" alt="">
|
||||
</div>
|
||||
<div class="free-trail__inner">
|
||||
<div class="section-title text-center">
|
||||
<div class="section-title__tagline-box">
|
||||
<span class="section-title__tagline"><?php echo html_entity_decode($small_heading_CN); ?></span>
|
||||
</div>
|
||||
<h2 class="section-title__title"><?php echo html_entity_decode($large_heading_CN); ?></h2>
|
||||
</div>
|
||||
<p class="free-trail__text"><?php echo html_entity_decode($long_description_CN); ?></p> <!-- Output without escaping -->
|
||||
<div class="free-trail__btn-box">
|
||||
<a href="<?php echo $btn_link; ?>" class="thm-btn-two free-trail__btn"><?php echo $btn_text_CN; ?><i class="icon-up-right-arrow"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user