<?php
  include_once("background.php");
  
  //If the Smarty compile directory is supposed to be a subdirectory then
  // then use that to get determine the path. 
  $CompileDir = FullSmartyCompileDir();

  //If $CompileDir does not exist then try to create it.
  if (!is_dir($CompileDir))
  {
    @mkdir($CompileDir, 0755);
  }
  
  if (!is_dir($CompileDir))
  {
    echo ("Can not create \"$CompileDir\".");
    return;
  }

  //Make certain that the director has the correct permissions.
  if (!chmod($CompileDir, 0755))
  {
    echo ("Could not set \"$CompileDir\" to have the correct permissions.");  
  }
  else//All is well.
  {
    echo ("The setup is complete.<br>Please delete this file.");
  }
?>