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

$sqlretriveAR = "select ID,about_app,image_app,download_app_ios,download_app_android from app_ar";
$executeSqlAR = mysqli_query($connection,$sqlretriveAR);
$retriveDataAR = mysqli_fetch_row($executeSqlAR);
$sqlretriveEN = "select ID,about_app,image_app,download_app_ios,download_app_android from app_en";
$executeSqlEN = mysqli_query($connection,$sqlretriveEN);
$retriveDataEN = mysqli_fetch_row($executeSqlEN);
?>
<!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'; ?>

  </head>
  <body onload="reloader()" data-default-color="navyblue" dir="rtl">
  <div class='text-center' id="loading">
    <h2 id='loadingText'><h2>
    </div>
<?php include 'navbar.php'; ?>
<div class="content-body" style='margin-bottom:30px;'>
    <div class='container' style='margin-top:30px;'>
        <div class="row justify-content-center">
            <div class="col-md-3 text-center col-app">
                <h3>عن التطبيق</h3>
            </div>
            
        </div>
        <!-- End row -->
        <div class="row">
            <div class='col-md-5 text-center' style='margin:0 10px 10px 0px;'>
                <a class='btn btn-yellow' href='edit-app.php'>تعديل المحتوى </a>
            </div>
            <!-- End col -->
            <div class='col-md-5 text-left' style='margin:0 10px 10px 0px;'>
                <div class="btn-group">
                    <button type="button" class="btn btn-yellow dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        تعديل الصور
                    </button>
                    <div class="dropdown-menu dropdown-menu-right text-right">
                        <a href='edit-image-app.php?Type=our' class="dropdown-item" >عن التطبيق</a>
                        <a href='edit-image-app.php?Type=image' class="dropdown-item" >صور التطبيق</a>
                        <a href='edit-image-app.php?Type=download' class="dropdown-item" >حمل التطبيق</a>
                    </div>
                </div>
            </div>
            <!-- End col -->
        </div>
        <div class='row text-right justify-content-center ' style='margin-top:30px;'>
            <div class="col-md-10 col-aboutapp">
                <h4>عن التطبيق</h4><hr>
                <p>
                    <?php echo $retriveDataAR[1];?>
                </p><br>
                <h4 class='text-left'>ABOUT APP</h4><hr>
                <p class='text-left'>
                    <?php echo $retriveDataEN[1];?>
                </p>
            </div>
        </div>
        <!-- End row -->
        <div class='row text-right justify-content-center ' style='margin-top:30px;'>
            <div class="col-md-10 col-imgapp">
                <h4>صور التطبيق</h4><hr>
                <p>
                    <?php echo $retriveDataAR[2];?>
                <p><br>
                <h4 class='text-left'>IMAGE APP</h4><hr>
                <p class='text-left'>
                    <?php echo $retriveDataEN[2];?>
                </p>
            </div>
        </div>
        <!-- End row -->
        <div class='row text-right justify-content-center ' style='margin-top:30px;'>
            <div class="col-md-10 col-download">
                <h4>حمل التطبيق</h4><hr>
                <p>
                    <a href="<?php echo $retriveDataAR[3];?>">IOS</a> |
                    <a href="<?php echo $retriveDataAR[4];?>">ANDROID</a>
                <p><br>
                <h4 class='text-left'>DOWNLOAD APP</h4><hr>
                <p class='text-left'>
                    <a href="<?php echo $retriveDataEN[3];?>">IOS</a> |
                    <a href="<?php echo $retriveDataEN[4];?>">ANDROID</a>
                </p>
            </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["updatesuccessapp"]) && $_SESSION["updatesuccessapp"] == 1)
{ 
?>
Swal.fire(
  'تم تعديل المعلومات بنجاح',
  '',
  'success'
)
<?php
$_SESSION["updatesuccessapp"] = 0;
}
?>
  </script>
      <script>

<?php
if(!isset($_SESSION))
  session_start();
if(isset($_SESSION["updatesuccessappimage"]) && $_SESSION["updatesuccessappimage"] == 1)
{ 
?>
Swal.fire(
  'تم تعديل الصورة بنجاح',
  '',
  'success'
)
<?php
$_SESSION["updatesuccessappimage"] = 0;
}
?>
  </script>
  </body>
</html>
<!-- onload="reloader()" -->

