<?php

  # Change these variables BEFORE the installation and later if required:
  # Diese Variablen VOR der Installation anpassen und später nach Bedarf:
    $db_name = 'xxx...';
    $db_host = 'xxx...';
    $db_user = 'xxx...';
    $db_password = 'xxx...';
    $prefix = 'gigkalender_';
    $GigKalenderPath = './';
    
  # These variables can be changed at ANY TIME to configure the GigKalender:
  # Diese Variablen können JEDERZEIT verändert werden um den GigKalender zu konfigurieren:
    $CharsCalenderListFields = 22; // 22
    $CharsGuestbookListFields = 36; // 36
    $SetupBackendDateFormat = 'Y-m-d'; // Y-m-d -> www.php.net/date
    $SetupBackendTimeFormat = 'H:i'; // H:i -> www.php.net/date
    $SetupFrontendTimeFormat = 'H:i'; // H:i -> www.php.net/date
    $SetupFrontendCalendarDateFormat = 'Y-m-d'; // Y-m-d -> www.php.net/date
    $SetupFrontendCalendarGigDetailsDateFormat = 'Y-m-d'; // Y-m-d -> www.php.net/date
    $SetupFrontendCalendarCurrentMonthLimitFuture = 12; // 12 Month
    $SetupFrontendCalendarCurrentMonthLimitPast = 6; // 6 Month
    $SetupFrontendGuestbookDateFormat = 'Y-m-d - H:i'; // Y-m-d - H:i -> www.php.net/date
    $SetupFrontendGuestbookPrivacyPolicy = TRUE; // TRUE, FALSE
    $SetupFrontendNewsDateFormat = 'Y-m-d - H:i'; // Y-m-d - H:i -> www.php.net/date
    $SetupFrontendGallerySorting = 'DESC'; // DESC, ASC
    $SetupFrontendGalleryImagesWidth = 760; // 760
    $SetupFrontendGalleryImagesInterlacing = TRUE; // TRUE
    //$SetupFrontendGalleryImageFormat = 'jpeg'; // auto, jpeg, pgn
    $SetupFrontendGalleryJpegQuality = 88; // 88
    $SetupFrontendGalleryPNGQuality = 1; // 1, Compression level: from 0 (no compression) to 9
    $SetupFrontendGalleryThumbnailsWidth = 120; // 120
    $SetupFrontendGuestbookBlockedIPsLimit = 200; // 200
    $SetupBackendCSVDelimiter = ";"; // ;
    $SetupBackendCSVEnclosure = "\""; // \"
    $SetupBackendCSVEscape = "\\"; // \\

    $SetupCalendarLocationShowCountry = TRUE; // TRUE, FALSE
    $SetupCalendarLocationShowDistrict = TRUE;  // TRUE, FALSE
    $SetupCalendarLocationShowPostalCode = TRUE; // TRUE, FALSE
    $SetupCalendarLocationShowCity = TRUE; // TRUE, FALSE

    //$SetupBackendFirstDayOfWeek = 'Monday'; // Monday
    //$SetupFrontendFirstDayOfWeek = 'Monday'; // Monday

    $SetupFrontendCalendarCurrentMonthShowPastGigs = TRUE; // TRUE, FALSE
    $SetupFrontendCalendarGigDetailsShowEmptyAttributes = FALSE; // FALSE, TRUE
    $SetupFrontendCalendarArtistFilter = ''; // '', Name of an artist
    $SetupWriteGuestbookSpamLog = FALSE; // FALSE, TRUE
    $SetupUseCache = TRUE; // TRUE, FALSE

    $SetupGalleryURL = ''; // absolute path
    $SetupGuestbookURL = ''; // absolute path
    $SetupGuestbookFormURL = ''; // absolute path
    $SetupGuestbookEmailURL = ''; // absolute path
    $SetupFrontendCalendarURL = ''; // absolute path
    $SetupFrontendCalendarGigDetailsURL = ''; // absolute path
    $SetupFrontendCalendarCurrentMonthURL = ''; // absolute path
    $SetupFrontendPrivacyPolicyURL = ''; // absolute path

  # If required change these variables ONLY BEFORE the installation:
  # Diese Variablen bei Bedarf NUR VOR der Installation ändern:
    $CharsGigCountry = 3;
    $CharsGigDistrict = 3;
    $CharsGigPostcode = 10;
    $CharsGigCity = 40;
    $CharsGigEvent = 40;
    $CharsGigEventURL = 255;
    $CharsGigVenue = 40;
    $CharsGigVenueURL = 255;
    $CharsGigOrganizer = 40;
    $CharsGigOrganizerURL = 255;
    $CharsGigLineup = 40;
    $CharsGigVisitors = 6;
    $CharsGigStageBuilding = 40;
    $CharsGigBeginning = 40;
    $CharsGigDuration = 40;
    $CharsGigEnding = 40;
    $CharsGigStatus = 20;
    $CharsGigArtist = 50;
    $CharsGigArtistURL = 255;
    $CharsGigEntranceFee = 40;
    $CharsNewsTitle = 50;
    $CharsUserName = 20;
    $CharsSetupUserMaximumInactivityTime = 3;
    $CharsSetupNewsChannelTitle = 50;
    $CharsSetupNewsChannelURL = 255;
    $CharsSetupNewsChannelDescription = 255;
    $CharsSetupNewsChannelLanguage = 10;
    $CharsSetupNewsChannelCopyright = 50;
    $CharsSetupUserCurrentPassword = 24;
    $CharsMenuItemName = 20;
    $CharsMenuItemFile = 20;
    $MinUserPasswordChars = 4;

  # NEVER change these variables:
  # Diese Variablen NIEMALS ändern:
    $db = @mysqli_connect ($db_host, $db_user, $db_password)
          or die ('ERROR: No connection to database server! Check your settings in gigkalender.ini.php.');
    $Result = @mysqli_select_db($db, $db_name)
      or die ('ERROR: Database server found, but not the database! Wrong database name in gigkalender.ini.php?');
    mysqli_set_charset($db, 'utf8');
    $GigKalenderPath = rtrim($GigKalenderPath,"/").'/'; // ensure one final trailing slash
    define ('PATH', $GigKalenderPath);
    include_once('includes/version.php');
    $allGigAttributes = 'GigArtist, GigBeginning, GigDateOfAdding, GigDateOfLastEdit, GigNotes, GigDuration, GigEnding, GigEntranceFee, GigIsPrivate, GigLineup, GigLocation, GigEvent, GigOrganizer, GigPublish, GigStageBuilding, GigStatus, GigVenue, GigVisitors';
    $allBackendCalenderFormAttributes = 'GigCountry, GigDistrict, GigPostalCode, GigCity, GigEvent, GigEventURL, GigEntranceFee, GigVenue, GigVenueURL, GigOrganizer, GigOrganizerURL, GigArtist, GigArtistURL, GigLineup, GigVisitors, GigStageBuilding, GigBeginning, GigDuration, GigEnding, GigNotes';
    $allFrontendAttributes = 'GigLocation, GigEvent, GigEntranceFee, GigVenue, GigOrganizer, GigArtist, GigLineup, GigVisitors, GigStageBuilding, GigDuration, GigEnding, GigNotes, GigStatus, GigIsPrivate, GigDateOfAdding, GigDateOfLastEdit, GigDetailsLink';
    $allFrontendDetailAttributes = 'GigLocation, GigEvent, GigEntranceFee, GigVenue, GigOrganizer, GigArtist, GigLineup, GigVisitors, GigStageBuilding, GigBeginning, GigDuration, GigEnding, GigNotes, GigStatus, GigIsPrivate, GigDateOfAdding, GigDateOfLastEdit';
    $StandardUserBackendCalenderListCols = 'GigBeginning, GigArtist, GigLocation, GigEvent, GigVenue, GigLineup, GigStageBuilding, GigNotes, GigIsPrivate, GigPublish';
    $StandardFrontendAttributes = 'GigLocation, GigArtist, GigVenue, GigEvent, GigDetailsLink';
    $StandardFrontendDetailAttributes = 'GigLocation, GigEvent, GigEntranceFee, GigVenue, GigArtist, GigIsPrivate';
    $ShowCMS = 0; // 0, 1
    $ContentPath = '../content/'; // frontend/content/
    $PossibleImageExtensions = array ('jpg','png','gif','jpeg','JPG');
    $PossibleTextExtensions = array ('txt','php','html','htm');
?>
