<?php
// whh 2020.02.19 data loader for js
//
//require_once 'data/contacts.json';
########################################################
# make sure you are logged in to run this
########################################################
// $logged_in = false;
session_start();
$login_in = $_SESSION['logged_in'];

// echo "session_start: " . $login_in . "<br>";

if (!$login_in) {
    die ('You do not have permission to access this page. Please login');
}
  // load Contact Data
  $allClientsfile = "data/contacts.json"; //Get existing JSON file
  $clientData = file_get_contents($allClientsfile); //Get data from existing JSON file
  //$arr_data = json_decode($jsondata, true); // converts existing JSON data into an Array
echo $clientData; // makes data avaiable for jScript AJAX call
?>
