<?php

  $kp_url = sprintf ( "http://%s%s", $_SERVER['HTTP_HOST'], $_SERVER['SCRIPT_NAME'] );
  $last = array_pop ( explode ( "/", $kp_url ) );
  $kp_url = str_replace ( $last, "", $kp_url );

  if ( substr ( $_SERVER['DOCUMENT_ROOT'], -1 ) === "/" ) { $percR = $_SERVER['DOCUMENT_ROOT']; }
  else { $percR = $_SERVER['DOCUMENT_ROOT'] . "/"; }

  define ( "KiP_url", $kp_url ); // Url of Gallery
  define ( "KiP_root", "kp_upload/" ); // Default directory for the Gallery
  define ( "KiP_pub", "2010" );
  define ( "KiP_version", "0.2.3" ); // Version of Gallery
  define ( "KiP_flang", "locale/" ); // Folder of language files
  define ( "KiP_lang", "it-IT" ); // Default Language
  define ( "KiP_tpl", "template/" ); // Folder for Template of the Gallery
  define ( "KiP_hroot", $percR ); // Full path name
  define ( "KiP_iFade", "false" ); // Set true for fade effect
  define ( "KiP_modR", "false" ); // Set true to activate mod_rewrite
  define ( "KiP_date", "1" ); // Set 1 to view full name of month, 2 to view contracted name of month, 3 to view number of month

  require_once ( "./inc/function.php" );