Location: PHPKode > scripts > GigKalender > functions/import/gigs.php
<?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.
*/
  // Variablen definieren
    
    global $prefix;
    global $Path;
    $ImportFehler = '0';
    $FileName = 'gigs.csv';
  // Datei checken
    if ( !$datei = fopen($Path."/".$FileName, 'r') )
       { echo 'Error: File not Found! ('.$FileName.')<br /><br />'; }
    else
    {
      // Alte Datensätze löschen
        if ( $ImportOverwriteGigs )
        {
          $SQL = "DELETE FROM ".$prefix."gigs";
          $resultat = mysql_query($SQL);
          if ( $resultat ) { echo $L_Old_gigs_were_deleted.'<br />'; }
          else  { echo '<span class="ERROR">'.$_ERROR_Old_gigs_NOT_deleted.'</span><br />'; }
          
          $SQL = "DELETE FROM ".$prefix."artists";
          $resultat = mysql_query($SQL);
          if ( $resultat ) { echo $L_Old_artists_were_deleted.'<br />'; }
          else  { echo '<span class="ERROR">'.$_ERROR_Old_artists_NOT_deleted.'</span><br />'; }

          $SQL = "DELETE FROM ".$prefix."organizers";
          $resultat = mysql_query($SQL);
          if ( $resultat ) { echo $L_Old_organizers_were_deleted.'<br />'; }
          else  { echo '<span class="ERROR">'.$_ERROR_Old_organizers_NOT_deleted.'</span><br />'; }

          $SQL = "DELETE FROM ".$prefix."venues";
          $resultat = mysql_query($SQL);
          if ( $resultat ) { echo $L_Old_venues_were_deleted.'<br />'; }
          else  { echo '<span class="ERROR">'.$_ERROR_Old_venues_NOT_deleted.'</span><br />'; }
        }
      // Datensätze importieren
        include ('functions/import/'.$Version.'/gigs.php');
    }
    if ( $ImportFehler=='0' ) { echo $L_Gigs_successfully_imported.'<br />'; }
    else { echo '<span class="ERROR">'.$L_ERROR_Gigs_NOT_imported.' ('.$ImportFehler.')</span><br />'; }
  echo '<br />';
  clearCache();
?>
Return current item: GigKalender