<?php

// RLD Creative common functions
// Copyright (C) 2018 RLD Creative
//

// include php configuration and definitions 
include_once(get_approot().'/include/base-creative.php');

/* ======================================================================
 * Function get_docroot()
 * Parameters: 
 * Returns: root document dir
 *
 * Get the root dir from the ccurrent webpage.
 * ====================================================================== */
function get_docroot() {
  $docroot = $_SERVER['BASE_ROOT'];
  
  //retourneer docuement root
  return $docroot.'/public';
} //get_docroot


/* ======================================================================
 * Function get_libroot()
 * Parameters: 
 * Returns: root document dir
 *
 * Get the root dir from the ccurrent webpage.
 * ====================================================================== */
function get_libroot() {
  $docroot = $_SERVER['BASE_ROOT'];
  
  //retourneer docuement root
  return $docroot.'/library';
} //get_docroot


/* ======================================================================
 * Function get_approot()
 * Parameters: 
 * Returns: root document dir
 *
 * Get the root dir from the ccurrent webpage.
 * ====================================================================== */
function get_approot() {
  $docroot = $_SERVER['BASE_ROOT'];
  
  //retourneer docuement root
  return $docroot.'/application';
} //get_approot
