<?php
/*
    CREATIVE COMMONS - Attribution-No Derivative Works 3.0 Germany:
    - You may not alter, transform, or build upon this work.
    - Dieses Werk darf nicht bearbeitet oder in anderer Weise verändert werden.
*/
$daten = fgetcsv($datei, 10000, ';');
        while ($daten)
        {
          for ($i=0; $i<count($daten); $i++)
          {
            $daten[$i] = str_replace('\'', '', $daten[$i]);
            $daten[$i] = utf8_encode($daten[$i]);
          }
            if ( $daten[12]=='' )
            {
              echo 'Error: Setup UserMaximumInactivityTime is missing!<br />';
              echo "=> UserMaximumInactivityTime set to '10' minutes.<br />";
              $daten[12]='10';
            }
            $sql = "UPDATE ".$prefix."setup SET
              SetupRefreshtime = '$daten[1]',
              SetupRowsTextareas = '$daten[2]',
              SetupExportSeparator = '$daten[6]',
              SetupFrontendLanguage = '$daten[7]',
              SetupGuestbookEntriesPerPage = '$daten[8]',
              SetupGuestbookMail = '$daten[9]',
              SetupFrontendCssFile = '',
              SetupGuestbookEntriesUnlock = 1,
              SetupGuestbookSpamDomains = '$daten[12]',
              SetupGuestbookSpamIPs = '$daten[13]',
              SetupGuestbookSpamWords = '$daten[14]',
              SetupUserMaximumInactivityTime = '10',
              SetupNewsEntriesPerPage = '10',
              SetupFrontendAllowOptionalGigs = '0',
              SetupFrontendAllowPrivateGigs = '0',
              SetupAllowDoubleDates = '0',
              SetupCalendarAttributeInAddGigForm = '$allBackendCalenderFormAttributes',
              SetupFrontendAttributes = '$StandardFrontendAttributes',
              SetupFrontendDetailAttributes = '$StandardFrontendDetailAttributes',
              SetupNewsChannelTitle = 'Band-News',
              SetupNewsChannelURL = '$GigKalenderPath',
              SetupNewsChannelDescription = 'Band-News...',
              SetupNewsChannelLanguage = 'de-DE',
              SetupNewsChannelCopyright = 'Max Mustermann',
              SetupFrontendCalendarCharsInFields = '20',
              SetupFrontendCalendarShowTableHeads = '1',
              SetupFrontendCalendarSelector = 'list',
              SetupFrontendCalendarMaxAmountOfGigs = '20',
              SetupFrontendCalendarPeriodSelector = 'future',
              SetupFrontendCalendarShowMonthlySeparator = '1',
              SetupShowEditorInAddGigForm = '1'";
            $resultat = mysqli_query($db, $sql);
            if ($resultat) { echo $L_Setup_successfully_imported.'<br />'; }
            else { echo '<span class="ErrorMessage">'.$L_ERROR_Setup_NOT_imported.'</span><br />'; }
        $daten = fgetcsv($datei, 10000, ';');
      }
?>