File "webpage.php"

Full Path: /home/ovanhxso/public_html/panel/admin/webpage.php
File size: 1.78 KB
MIME-type: text/x-php
Charset: utf-8

<?php
session_start();
include '../assets/constant/config.php';

try {
  $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
  $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
  echo "Connection failed: " . $e->getMessage();
}
?>


<?php include('include/sidebar.php'); ?>
<!-- Top Bar End -->
<?php include('include/header.php'); ?>
<div class="page-content-wrapper ">

  <div class="container-fluid">

    <div class="row">
      <div class="col-sm-12">
        <div class="page-title-box">
          <div class="btn-group float-right">

          </div>
          <h4 class="page-title">Website Pages</h4>
        </div>
      </div>
      <div class="clearfix"></div>
    </div>
    <!-- end page title end breadcrumb -->
    <div class="row">
      <div class="col-lg-12">
        <div class="card">
          <div class="card-body">
  <?php
  $stmt1 = $conn->prepare("SELECT * FROM `manage_web` ");
                                    $stmt1->execute();
                                    $web = $stmt1->fetch();
$web_email=$web['email'];
$web_title=$web['title'];
                  $stmt = $conn->prepare("SELECT * FROM `terms` WHERE id='1' ");
                  $stmt->execute();
                  $record = $stmt->fetchAll();

                  foreach ($record as $key) {
$terms_content = str_replace(
        ['{web_email}', '{web_name}'],
        [$web_email, $web_title],
        $key['terms']
    );
    echo $terms_content;
                   }

                    ?>


          </div>
        </div><!--end card-->
      </div><!--end col-->
    </div><!--end row-->
  </div> <!-- Page content Wrapper -->
</div> <!-- content -->

<?php include('include/footer.php'); ?>