<?php 
include '../connection.php'; 
if(!isset($_SESSION)) session_start();
if(!isset($_SESSION["ID"])){header('Location: index.php');}
$direction = "../assets/img/goshan/";

$sqlretriveAR = "SELECT labelAbout, contentAbout, LabelGuarantee, Guarantee1, Guarantee2, image1, image2 FROM goshan_ar WHERE ID = 1";
$executeSqlAR = mysqli_query($connection,$sqlretriveAR);
$retriveDataAR = mysqli_fetch_row($executeSqlAR);
$strContentAbout= $retriveDataAR[1];
$arrContentAbout =  explode("@",$strContentAbout);
$dataAbout = "";
foreach($arrContentAbout as $singleContent)
{
    $dataAbout .= "<h3>$singleContent</h3>";
}
$sqlretriveEN = "SELECT labelAbout, contentAbout, LabelGuarantee, Guarantee1, Guarantee2, image1, image2 FROM goshan_en WHERE ID = 1";
$executeSqlEN = mysqli_query($connection,$sqlretriveEN);
$retriveDataEN = mysqli_fetch_row($executeSqlEN);
$strContentAboutEN= $retriveDataEN[1];
$arrContentAboutEN =  explode("@",$strContentAboutEN);
$dataAboutEN = "";
foreach($arrContentAboutEN as $singleContentEN)
{
    $dataAboutEN .= "<h3 class='text-left' style='direction:ltr'>$singleContentEN</h3>";
}
?>
<!doctype html>
<html lang="ar">
  <head>
    <title>خذ فرصة</title>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- assets / css -->
    <?php include 'cssFile.php'; ?>
<style>
    h5 
{
    line-height: initial;
}
</style>
  </head>
  <body  dir="rtl">

<?php include 'navbar.php'; ?>
<div class="content-body">
    <div class='container' style='margin-top:30px;'>
        <div class="row justify-content-center">
            <div class="col-md-3 text-center col-goshan">
                <h3>قوشان المستقبل</h3>
            </div>
        </div>
        <div class='row justify-content-center'>
            <div class='col-md-5 text-right' style='margin:0 10px 10px 0px;padding-left:50px;'>
                <a href='edit-goshan.php' class='btn btn-blue' style='font-weight:bold'>تعديل اللغة العربية </a>
            </div>
            <!-- End col -->
            <div class='col-md-5 text-left' style='margin:0 10px 10px 0px;padding-left:50px;'>
                <a href='edit-goshanEN.php' class='btn btn-blue' style='font-weight:bold'>تعديل اللغة الإنجليزية </a>
            </div>
            <!-- End col -->
        </div>
        <!-- End row -->
        <br>
            <div class="row justify-content-center" id="row-about">
        <div class="col-10 text-right">
            <h2 class='text-center' style='color:#FC5272'><?php echo $retriveDataAR[0];?></h2>
            <hr>
        <h5 style='text-align:justify'>
            <?php echo $dataAbout;?>
        </h5>
        </div>
    </div><br>
    <!-- End row -->
    <div class="row justify-content-center" id="row-about">
        <div class="col-10 text-right">
            <h2 class='text-center' style='color:#FC5272'><?php echo $retriveDataEN[0];?></h2>
            <hr>
        <h5 style='text-align:justify;direction:ltr'>
            <?php echo $dataAboutEN;?>
        </h5>
        </div>
    </div>
    <!-- End row -->
    <br>
    <div class="row justify-content-center" id="row-Ourvision">
        <div class="col-10 text-right">
            <h2 class='text-center' style='color:#0080BB'><?php echo $retriveDataAR[2];?></h2>
            <hr>
        <h5 style='text-align:justify'>
            <?php echo $retriveDataAR[3];?>
        </h5>
        <h5 style='text-align:justify'>
            <?php echo $retriveDataAR[4];?>
        </h5>
        </div>
    </div>
    <!-- End row -->
    <br>
    <div class="row justify-content-center" id="row-Ourvision">
        <div class="col-10 text-right">
            <h2 class='text-center' style='color:#0080BB'><?php echo $retriveDataEN[2];?></h2>
            <hr>
        <h5 style='text-align:justify;direction:ltr'>
            <?php echo $retriveDataEN[3];?>
        </h5>
        <h5 style='text-align:justify;direction:ltr'>
            <?php echo $retriveDataEN[4];?>
        </h5>
        </div>
    </div>
    <!-- End row -->
    
    </div>
    <!-- End container -->
</div>
<!-- End content body -->
<!-- assets / js -->
    <?php include 'jsFile.php'; ?>
    <script>

<?php
if(!isset($_SESSION))
  session_start();
if(isset($_SESSION["updatesuccess"]) && $_SESSION["updatesuccess"] == 1)
{ 
?>
Swal.fire(
  'تم تعديل المعلومات بنجاح',
  '',
  'success'
)
<?php
$_SESSION["updatesuccess"] = 0;
}
?>

  </script>
  </body>
</html>
<!-- onload="reloader()" -->

