<?php

// database connections test
$host = 'localhost';
$username = 'root';
$password = '';
$conn = new PDO("mysql:host=$host;dbname=asiashopdb", $username, $password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8mb4"));
$site_url = "http://localhost/";


// database connections true
// $host = 'localhost';
// $username = 'lab_pro';
// $password = 'N^ZJbJG5F#R#bsXk';
// $conn = new PDO("mysql:host=$host;dbname=lab_pro",$username,$password,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
// $site_url = "http://localhost/avioschool/";
// $api_key = "0Qwk2ndsNMijuJ2oGPYT";
?>





<?php
if (isset($_SESSION['user_login'])) {
  $user_access = $_SESSION['user_login'];
  $user_id_sess = $user_access["id"];
  try {
    $user_show_me = $conn->prepare("select * from users where id = :id");
    $user_show_me->bindParam(':id', $user_id_sess);
    $user_show_me->execute();
    $users = $user_show_me->fetchAll(PDO::FETCH_OBJ);
  } catch (Exception $e) {
    echo $e->getMessage();
  }
  foreach ($users as $users_info_show)
    $my_profile_id = $users_info_show->id;
  $my_profile_phone_number = $users_info_show->phone_number;
  $my_profile_name = $users_info_show->name;
  $my_profile_role = $users_info_show->role;
  $my_profile_nation_code = $users_info_show->nation_code;
  $my_profile_avatar = $users_info_show->avatar;
  $my_profile_place = $users_info_show->place;
  $my_profile_adress = $users_info_show->adress;
}

?>




<?php
try {
  $users_show = $conn->query("select * from settings where id=1");
  $users = $users_show->fetchAll(PDO::FETCH_OBJ);
} catch (Exception $e) {
  echo $e->getMessage();
}
?>

<?php foreach ($users as $settings_item): ?>
  <?php
  $setting_site_name = $settings_item->site_name;
  $setting_site_logo = $settings_item->site_logo;
  $setting_site_description = $settings_item->site_description;
  $setting_support_number = $settings_item->support_number;
  $setting_about_page = $settings_item->about_page;
  $setting_support_page = $settings_item->support_page;
  $setting_questions_page = $settings_item->questions_page;
?>
<?php endforeach; ?>