Simples Backup des Wettkampfplaners
zum Commit vorgemerkte Änderungen: neue Datei: addEvent.php neue Datei: addFahrt.php neue Datei: addStarter.php neue Datei: addStarterDev.php neue Datei: admin/.htaccess neue Datei: admin/addEvent.php neue Datei: admin/addMitfahrer.php neue Datei: admin/adminAddStarter.php neue Datei: admin/adminFunctions.php neue Datei: admin/adminFunctions.php.inc neue Datei: admin/adminUpdateStarterErgebnis.php neue Datei: admin/config.inc.php neue Datei: admin/index.php neue Datei: admin/listEvents.php neue Datei: admin/listUsers.php neue Datei: admin/newsLetter.php neue Datei: admin/register.php neue Datei: admin/resetPassword.php neue Datei: admin/reseteMitfahrer.php neue Datei: admin/showEvent.php neue Datei: admin/showFahrt.php neue Datei: admin/showUser.php neue Datei: admin/verteileMitfahrer.php neue Datei: auth.php neue Datei: authLogin.php neue Datei: calendar.php neue Datei: changePassword.php neue Datei: editFahrt.php neue Datei: eventKalender.php neue Datei: galImgPicker.php neue Datei: horstWolfJudosport.php neue Datei: index.php neue Datei: infoZettel.php neue Datei: lib/wkParticipoLib.php.inc neue Datei: local/.htaccess neue Datei: local/db.php.inc neue Datei: local/wkParticipoConf.php.inc neue Datei: login.php neue Datei: loginDev.php neue Datei: logout.php neue Datei: showWkEvent.php neue Datei: style.css neue Datei: styleDev.css neue Datei: test.php neue Datei: userInfo.php
This commit is contained in:
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
require_once('./local/wkParticipoConf.php.inc');
|
||||
require_once('./auth.php');
|
||||
require_once('./local/db.php.inc');
|
||||
require_once('./lib/wkParticipoLib.php.inc');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Bilderauswahl für die Galerien</title>
|
||||
<meta name="description" content="App zum Auswählen der besten Bilder der Galerien">
|
||||
|
||||
<link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $login_status; ?>
|
||||
<?php echo htmlRetMessage( $message );?>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./index.php">
|
||||
<div>Zur Übersichtsseite</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<h1>Bilderauswahl</h1>
|
||||
<?php
|
||||
$galJahr = isset($_GET["jahr"]) ? $_GET["jahr"] : "";
|
||||
|
||||
$message['error'] = "";
|
||||
// Daten der Datenbank laden
|
||||
require_once($_SERVER['DOCUMENT_ROOT']."/bonus/db.inc");
|
||||
|
||||
// Datenbankverbindung herstellen
|
||||
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
if($mysqlConn->connect_error){
|
||||
$message['error'] += "Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
||||
}
|
||||
else{
|
||||
// mögliche Werte für das Jahr herausfinden
|
||||
$galJahresListe = array();
|
||||
|
||||
$queryJahresListe = "
|
||||
SELECT DISTINCT DATE_FORMAT( datum, '%Y')
|
||||
AS jahr
|
||||
FROM cwsvjudo.wkGalerien
|
||||
WHERE 1
|
||||
ORDER BY DATE_FORMAT( datum, '%Y' ) DESC;
|
||||
";
|
||||
|
||||
$mysqlResults = $mysqlConn->query($queryJahresListe);
|
||||
if( !$mysqlResults ){
|
||||
$message['error'] += "Fehler bei Datenbankabfrage '".$queryJahresListe."'<br />";
|
||||
}
|
||||
else{
|
||||
while( $mysqlResult = $mysqlResults->fetch_assoc() ){
|
||||
array_push( $galJahresListe, $mysqlResult['jahr']);
|
||||
}
|
||||
}
|
||||
// standardmäßig frage die letzten 12 Galerien ab
|
||||
$queryGals = "
|
||||
SELECT *
|
||||
FROM cwsvjudo.wkGalerien
|
||||
WHERE typ='Bilder'
|
||||
ORDER BY datum DESC LIMIT 12
|
||||
";
|
||||
// Falls ein Konkretes Jahr angegebe wurde, fragen wir dies ab
|
||||
if($galJahr != ""){
|
||||
$minDate = $galJahr."-01-01";
|
||||
$maxDate = $galJahr."-12-31";
|
||||
$queryGals = sprintf("
|
||||
SELECT id,datum,name,url,typ,teaserBildUrl
|
||||
FROM cwsvjudo.wkGalerien
|
||||
WHERE datum >= '%s' AND datum <= '%s' ORDER BY datum ASC;",
|
||||
$mysqlConn->real_escape_string($minDate),
|
||||
$mysqlConn->real_escape_string($maxDate)
|
||||
);
|
||||
}
|
||||
|
||||
$galListe = array();
|
||||
$mysqlResults = $mysqlConn->query($queryGals);
|
||||
if( !$mysqlResults ){
|
||||
$message['error'] += "Fehler bei Datenbankabfrage '".$queryGals."'<br />";
|
||||
}
|
||||
else{
|
||||
while( $mysqlResult = $mysqlResults->fetch_assoc() ){
|
||||
array_push( $galListe, $mysqlResult);
|
||||
}
|
||||
}
|
||||
$mysqlConn->close();
|
||||
}
|
||||
?>
|
||||
|
||||
<?php echo htmlRetMessage( $message );?>
|
||||
|
||||
Jahresauswahl:
|
||||
<form class="yearSelector">
|
||||
<select name="jahr" onchange="javascript: this.form.submit();" >
|
||||
<optgroup label="Jahresauswahl">
|
||||
<option value=""<?php echo $galJahr!="" ? "" : " selected";?> >Neueste</option>
|
||||
<?php
|
||||
foreach($galJahresListe as $jahr){
|
||||
?>
|
||||
<option value="<?php echo $jahr?>"<?php echo $galJahr==$jahr ? " selected" : "";?>><?php echo $jahr?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</optgroup>
|
||||
</select>
|
||||
<noscript>
|
||||
<button type="submit">Submit</button>
|
||||
</noscript>
|
||||
</form>
|
||||
|
||||
<h1>
|
||||
<?php echo $galJahr != "" ? "Wettkampfgalerien ".$galJahr : "Die neuesten Wettkampfgalerien"?>
|
||||
</h1>
|
||||
|
||||
<style type="text/css">
|
||||
.galleryTable{
|
||||
width: 100%;
|
||||
}
|
||||
.galleryTable th{
|
||||
background-color: #666;
|
||||
color: #fff;
|
||||
}
|
||||
.galleryTable tr{
|
||||
/* background-color: #FFAE00;*/
|
||||
color: #000;
|
||||
}
|
||||
.galleryTable tr:nth-child(odd){
|
||||
background-color: #FF8100 ;
|
||||
}
|
||||
</style>
|
||||
|
||||
<table class="galleryTable">
|
||||
<thead><tr><th>Datum</th><th>Link zur Bildauswahl</th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// Jede Galerie ausgeben
|
||||
foreach($galListe as $gal){
|
||||
?>
|
||||
<tr onclick="window.document.location='<?php echo mb_convert_encoding($gal['url'], 'UTF-8', 'ISO-8859-1') . "?chooseMode=true&galId=" . mb_convert_encoding($gal['id'], 'UTF-8', 'ISO-8859-1');?>';">
|
||||
<td class="noWrap">
|
||||
<time datetime="<?php echo mb_convert_encoding($gal['datum'], 'UTF-8', 'ISO-8859-1');?>"><?php echo mb_convert_encoding($gal['datum'], 'UTF-8', 'ISO-8859-1');?></time>
|
||||
</td>
|
||||
<td class="floatClearBoth">
|
||||
<a href="<?php echo( mb_convert_encoding($gal['url'], 'UTF-8', 'ISO-8859-1') . "?chooseMode=true&galId=" . mb_convert_encoding($gal['id'], 'UTF-8', 'ISO-8859-1') );?>">
|
||||
<?php if( $gal['teaserBildUrl'] != "" ){
|
||||
?>
|
||||
<div>
|
||||
<img title="<?php echo mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1');?> - Bilder der Judoka des Chemnitzer WSV" alt="Teaserbild <?php echo mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1');?>" src="<?php echo mb_convert_encoding($gal['teaserBildUrl'], 'UTF-8', 'ISO-8859-1');?>"/>
|
||||
</div>
|
||||
<?php
|
||||
}?>
|
||||
<div>
|
||||
<?php echo mb_convert_encoding($gal['name'], 'UTF-8', 'ISO-8859-1');?> (<?php echo mb_convert_encoding($gal['typ'], 'UTF-8', 'ISO-8859-1');?>)
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./index.php">
|
||||
<div>Zur Übersichtsseite</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<!--Beginn der Einbindung des Counters-->
|
||||
<?php
|
||||
$chCounter_page_title = "Wettkampfplaner -- Bilderauswahlübersicht";
|
||||
$chCounter_page_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "?user=".$_SESSION['user']['username'];
|
||||
$chCounter_visible=0;
|
||||
// include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user