='$fromDate' AND date_start<'$toDate' ORDER BY date_start, time";
// ================================================================
// Building the end of the search query.
// ================================================================
//
//$query .= " ORDER BY team;";
$query = stripslashes($query);
// ================================================================
// Make a connection to the host.
// ================================================================
$connection=mysqli_connect($host,$user,$password,$database);
if(!$connection)
{
echo "Error while connecting to the host \"".$host."\" !
"; logDebug($host.$user.$password.$database, $tipps); //logDebug($host.$user.$password, $tipps); //mysqladmin flush-hosts; } else { mysqli_set_charset($connection,$charset); // ================================================================ // Selecting the database. // ================================================================ //if(!@mysql_select_db($database,$connection)) //{ // echo "The database \"".$database."\" could not be selected !
"; //} //else //{ // ================================================================ // Executing the query. // ================================================================ $result=mysqli_query($connection,$query); if(!$result) { logDebug("Query: ".$query." fehlgeschlagen !", $tipps); echo "The query could not be executed !
"; } else { // ================================================================ // Closing the connection to the host. // ================================================================ // if(!mysqli_close($connection)) { echo "Error while disconnecting from the host !
"; } else { // ================================================================ // Calculate how many records were found. // ================================================================ $found=mysqli_num_rows($result); logDebug("Anzahl gefundener Einträge: ".$found."
", $tipps); // ================================================================ // read all records // ================================================================ // Array für die Studio Veranstaltungsliste //$Veranstaltung; while( $row = mysqli_fetch_row($result) ) { // counter for reding the different parts of a record $dateIsPassed = true; // if true the date is in the past // $row[2] is the time // split 1st date and find day of the week if ( $row[0] != "0000-00-00" ) { //setlocale ("LC_TIME", "de_DE"); $dateIsPassed = getGermanDate( $row[0], $row[2], $Tag1, $Monat1, $Jahr1, $Wochentag1, $Monatsname1 ); logDebug("WochenTag: ".$Wochentag1." ".$Tag1.". ".$Monatsname1." ".$Jahr1, $tipps); } // split 2nd date and find day of the week if ( $row[1] != "0000-00-00" ) { $dateIsPassed = getGermanDate( $row[1], $row[2], $Tag2, $Monat2, $Jahr2, $Wochentag2, $Monatsname2 ); logDebug("WochenTag: ".$Wochentag2." ".$Tag2.". ".$Monatsname2." ".$Jahr2, $tipps); } // ================================================================ // A N Z E I G E V E R A N S T A L T U N G E N // ( show record only, if date is not in the past ) // ================================================================ // $noWebview == true, wenn logDebug("showTipps: ".$showTipps."
", $tipps); // set the colors if ($showTipps == "true") { logDebug("regular Tipps
", $tipps); $colorDate = 0; //(string)"ff0000"; $colorTitel = (string)"006600"; $colorLocation = 0; //(string)"3333ff"; $stylePrint = false; } else // forblack & white printer set black letters on white background { logDebug("Liste
", $tipps); $colorDate = 000000; $colorTitel = 000000; $colorLocation = 000000; $stylePrint = true; } if ( $dateIsPassed == false ) { ?>
";
?>
", $tipps);
}
} // Ende While (Ausgabe aller Veranstaltungen)
} // close DB ok
} // query ok
//} // DB selected
} // DB connect ok
require_once("htmlend.php");
// destroy the session on "logout"
if ($logout == "yes")
{
echo "ausloggen";
pause(2);
session_start();
session_unregister("login");
session_unset();
session_destroy();
}
?>
"; } } ?>
"; logDebug($host.$user.$password.$database, $tipps); //logDebug($host.$user.$password, $tipps); //mysqladmin flush-hosts; } else { mysqli_set_charset($connection,$charset); // ================================================================ // Selecting the database. // ================================================================ //if(!@mysql_select_db($database,$connection)) //{ // echo "The database \"".$database."\" could not be selected !
"; //} //else //{ // ================================================================ // Executing the query. // ================================================================ $result=mysqli_query($connection,$query); if(!$result) { logDebug("Query: ".$query." fehlgeschlagen !", $tipps); echo "The query could not be executed !
"; } else { // ================================================================ // Closing the connection to the host. // ================================================================ // if(!mysqli_close($connection)) { echo "Error while disconnecting from the host !
"; } else { // ================================================================ // Calculate how many records were found. // ================================================================ $found=mysqli_num_rows($result); logDebug("Anzahl gefundener Einträge: ".$found."
", $tipps); // ================================================================ // read all records // ================================================================ // Array für die Studio Veranstaltungsliste //$Veranstaltung; while( $row = mysqli_fetch_row($result) ) { // counter for reding the different parts of a record $dateIsPassed = true; // if true the date is in the past // $row[2] is the time // split 1st date and find day of the week if ( $row[0] != "0000-00-00" ) { //setlocale ("LC_TIME", "de_DE"); $dateIsPassed = getGermanDate( $row[0], $row[2], $Tag1, $Monat1, $Jahr1, $Wochentag1, $Monatsname1 ); logDebug("WochenTag: ".$Wochentag1." ".$Tag1.". ".$Monatsname1." ".$Jahr1, $tipps); } // split 2nd date and find day of the week if ( $row[1] != "0000-00-00" ) { $dateIsPassed = getGermanDate( $row[1], $row[2], $Tag2, $Monat2, $Jahr2, $Wochentag2, $Monatsname2 ); logDebug("WochenTag: ".$Wochentag2." ".$Tag2.". ".$Monatsname2." ".$Jahr2, $tipps); } // ================================================================ // A N Z E I G E V E R A N S T A L T U N G E N // ( show record only, if date is not in the past ) // ================================================================ // $noWebview == true, wenn logDebug("showTipps: ".$showTipps."
", $tipps); // set the colors if ($showTipps == "true") { logDebug("regular Tipps
", $tipps); $colorDate = 0; //(string)"ff0000"; $colorTitel = (string)"006600"; $colorLocation = 0; //(string)"3333ff"; $stylePrint = false; } else // forblack & white printer set black letters on white background { logDebug("Liste
", $tipps); $colorDate = 000000; $colorTitel = 000000; $colorLocation = 000000; $stylePrint = true; } if ( $dateIsPassed == false ) { ?>
Infos: | |
Web: ".$row[6].""; else echo $row[6]; // 2. Webadresse if ( $row[7] != "" ) { if ( $stylePrint == false) echo " | ".$row[7].""; else echo " | ".$row[7]; $Veranstaltung[$vCounter][7] = " | ".$row[7]; } // 3. Webadresse if ( $row[8] != "" ) { if ( $stylePrint == false) echo " | ".$row[8].""; else echo " | ".$row[8]; $Veranstaltung[$vCounter][8] = " | ".$row[8]; } ?> | |
E-Mail: ".$row[9].""; else echo $row[9]; // 2. email if ( $row[10] != "" ) { if ( $stylePrint == false) echo " | ".$row[10].""; else echo " | ".$row[10]; $Veranstaltung[$vCounter][10] = " | ".$row[10]; } // 3. email if ( $row[11] != "" ) { if ( $row[11] != "" ) echo " | ".$row[11].""; else echo " | ".$row[11]; $Veranstaltung[$vCounter][11] = " | ".$row[11]; } ?> | |
Ort: |
", $tipps ); for ( $i=0 ; $i < 13 ; $i++ ) { for ( $j=0 ; $j < $Datenspalten ; $j++ ) { if ( $Veranstaltung[$i][$j] != "" ) echo $Veranstaltung[$i][$j]; } echo "
"; } } ?>