PW
create("../img/vortraege/".$picname); $thumbnail->setQuality(90); $thumbnail->resize(200); $thumbnail->autocut(220,110,5); $thumbnail->save("../img/vortraege/_".$picname); // $thumbnail->output(); } function createThumbVortrag($picname) { include_once("thumbnail.php"); $thumbnail = new thumbnail(); $thumbnail->create("../img/vortraege/".$picname); $thumbnail->setQuality(90); $thumbnail->resize(400); $thumbnail->autocut(220,110,5); $thumbnail->save("../img/vortraege/_".$picname); // $thumbnail->output(); } ?> Uebersicht 'image/png', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg' ); //########################### UPDATES ################### //andere Reihe gewält if ($_POST['Reihe_waehlen']) { $rh_id = $_POST['reihe']; } //Veränderte Reihe updaten if($_POST['vortrag_update']) { if (!is_numeric($_POST['vortrag_update'])) die("..."); $curID = $_POST['vortrag_update']; if ($_POST['datum'][$curID]) { //datum $h = substr($_POST['datum'][$curID], 13,2); $m = substr($_POST['datum'][$curID], 16,2); $d = substr($_POST['datum'][$curID], 0,2); $m = substr($_POST['datum'][$curID], 3,2); $y = substr($_POST['datum'][$curID], 6,4); if (!is_numeric($h) || !is_numeric($m) || !is_numeric($d) || !is_numeric($m) || !is_numeric($y)) { die("Datum hat das falsche Format!"); } $_POST['datum'][$curID] = mktime($h, $m, 0, $m, $d, $y); } //Flyer rueck $filename = $_POST['flyer_rueck'][$curID]; $fileUpdated = "0"; if ($_FILES['flyer_new']['error'][$curID] != '4') { if (!in_array($_FILES['flyer_new']['type'][$curID], $mime_types)) { die ("Nur Bilder erlaubt!"); } $filename = md5(uniqid(rand(), TRUE)); move_uploaded_file($_FILES['flyer_new']['tmp_name'][$curID], "../img/vortraege/".$filename); createThumbVortrag($filename); $fileUpdated = "1"; } //Flyer vorn $filenamev = $_POST['flyer_vorne'][$curID]; $fileUpdatedv = "0"; if ($_FILES['flyer_new_vorne']['error'][$curID] != '4') { if (!in_array($_FILES['flyer_new_vorne']['type'][$curID], $mime_types)) { die ("Nur Bilder erlaubt!"); } $filenamev = md5(uniqid(rand(), TRUE)); move_uploaded_file($_FILES['flyer_new_vorne']['tmp_name'][$curID], "../img/vortraege/".$filenamev); createThumbVortrag($filenamev); $fileUpdatedv = "1"; } $sql = "UPDATE vortraege SET titel='".$_POST['titel'][$curID]."', ort='".$_POST['ort'][$curID]."', datum='".$_POST['datum'][$curID]."', beschr='".$_POST['beschr'][$curID]."', flyer_rueck='".$filename."', flyer_vorne='".$filenamev."', referent='".$_POST['R_id'][$curID]."' WHERE V_id='".$curID."'"; mysql_query($sql); } if ($_POST['vortrag_neu']) { if ($_POST['datum_neu']) { //datum $h = substr($_POST['datum_neu'], 13,2); $m = substr($_POST['datum_neu'], 16,2); $d = substr($_POST['datum_neu'], 0,2); $m = substr($_POST['datum_neu'], 3,2); $y = substr($_POST['datum_neu'], 6,4); if (!is_numeric($h) || !is_numeric($m) || !is_numeric($d) || !is_numeric($m) || !is_numeric($y)) { die("Datum hat das falsche Format!"); } $_POST['datum_neu'] = mktime($h, $m, 0, $m, $d, $y); } $filename = $_POST['flyer_rueck_neu']; $fileUpdated = "0"; if ($_FILES['flyer_rueck_neu']['error'] != '4') { if (!in_array($_FILES['flyer_rueck_neu']['type'], $mime_types)) { die ("Nur Bilder erlaubt!"); } $filename = md5(uniqid(rand(), TRUE)); move_uploaded_file($_FILES['flyer_rueck_neu']['tmp_name'], "../img/vortraege/".$filename); createThumbVortrag($filename); $fileUpdated = "1"; } //Flyer vorn $filenamev = $_POST['flyer_rueck_neu_vorne']; $fileUpdatedv = "0"; if ($_FILES['flyer_rueck_neu_vorne']['error'] != '4') { if (!in_array($_FILES['flyer_rueck_neu_vorne']['type'], $mime_types)) { die ("Nur Bilder erlaubt!"); } $filenamev =md5(uniqid(rand(), TRUE)); move_uploaded_file($_FILES['flyer_rueck_neu_vorne']['tmp_name'], "../img/vortraege/".$filenamev); createThumbVortrag($filenamev); $fileUpdatedv = "1"; } $sql = "INSERT INTO vortraege (reihe_id, titel, ort, datum, beschr, flyer_rueck, flyer_vorne, referent ) VALUES ( '".$_POST['reihe_id']."', '".$_POST['titel_neu']."', '".$_POST['ort_neu']."', '".$_POST['datum_neu']."', '".$_POST['beschr_neu']."', '".$filename."', '".$filenamev."', '".$_POST['R_id_neu']."')"; mysql_query($sql); } if ($_POST['vortrag_del']) { //TODO: Bilder loeschen $sql = "DELETE FROM vortraege WHERE V_id='".$_POST['del_V_id']."'"; mysql_query($sql); } //Neue Reihe? if ($_POST['reihe_neu']) { //reihe_name //reihe_zeitraum //reihe_ordnung $sql = "INSERT INTO reihen (name, zeitraum, zeitl_ordnung) VALUES ('".$_POST['reihe_name']."', '".$_POST['reihe_zeitraum']."', '".$_POST['reihe_ordnung']."')"; mysql_query($sql); } if ($_POST['reihe_update']) { $sql = "UPDATE reihen SET name='".$_POST['reihe_name']."', zeitraum = '".$_POST['reihe_zeitraum']."', zeitl_ordnung = '".$_POST['reihe_ordnung']."' WHERE Rh_id = '".$_POST['reihe_id']."'"; mysql_query($sql); } if ($_POST['reihe_del']) { $sql = "DELETE FROM vortraege WHERE reihe_id='".$_POST['reihe_id']."'"; mysql_query($sql); $sql = "DELETE FROM reihen WHERE Rh_id='".$_POST['reihe_id']."'"; mysql_query($sql); } if ($_POST['doz_neu']) { $filename = $_POST['doz_bild']; $fileUpdated = "0"; if ($_FILES['doz_bild']['error'] != '4') { if (!in_array($_FILES['doz_bild']['type'], $mime_types)) { die ("Nur Bilder erlaubt!"); } $filename = md5(uniqid(rand(), TRUE)); move_uploaded_file($_FILES['doz_bild']['tmp_name'], "../img/vortraege/".$filename); createThumbDoz($filename); $fileUpdated = "1"; } $sql = "INSERT INTO referent (name, bild_kl, sonstiges) VALUES ('".$_POST['doz_name']."', '".$filename."', '".$_POST['doz_woher']."')"; mysql_query($sql); } if ($_POST['doz_update']) { $filename = $_POST['doz_bild']; $fileUpdated = "0"; if ($_FILES['doz_bild']['error'] != '4') { if (!in_array($_FILES['doz_bild']['type'], $mime_types)) { die ("Nur Bilder erlaubt!"); } $filename = md5(uniqid(rand(), TRUE)); move_uploaded_file($_FILES['doz_bild']['tmp_name'], "../img/vortraege/".$filename); createThumbDoz($filename); $fileUpdated = "1"; } $sql = "UPDATE referent SET bild_kl = '".$filename."', name='".$_POST['doz_name']."', sonstiges='".$_POST['doz_woher']."' WHERE R_id='".$_POST['doz_name_aufruf']."'"; mysql_query($sql); } if ($_POST['doz_del']) { $sql = "DELETE FROM referent WHERE R_id='".$_POST['doz_name_aufruf']."'"; mysql_query($sql); } // ##################################################### ?> Auswahl // $sql = "SELECT DISTINCT name, Rh_id, zeitraum, zeitl_ordnung FROM reihen ORDER BY zeitl_ordnung DESC"; $query = mysql_query($sql); //Ausgabe von ROW ?>
Hilfe

Reihe:


Titel
Dozent
Beschreibung
Datum "/>Format: 29.01.2014 - 22:59
Ort
Flyer rueck
Flyer vorne
Speichern:

Vortrag

Titel
Dozent
Beschreibung
Datum Format: 29.01.2014 - 22:59
Ort
Flyer back
Flyer vorne

Reihe

Reihe
Zeitraum
Zeitl Ordnung

Dozent

Name
Name Woher Bild