„;
} else {
$err = „Fehler bei Datenbank-Verbindung: “ . mysql_error();
die($err);
}

if($_SESSION[‚team‘]==““){
header(‚Location:../../teammanager/‘);
}
?>

Vorname: | First name: Nachname: | Last name: Geburtsdatum: | D.O.B.
E-Mail: Foto: | Picture:
Format: jpg,gif,png

zurück zum Teammanager | back to teammanager

login error

„;
}

if($subm == „Spieler erstellen“) {

$sql2 = „insert into player (TID,VName,NName,Mail,BDay,BMonth,BYear) Values(“ . $id . „, ‚“ . $_POST[‚vname‘] . „‚, ‚“ . $_POST[’nname‘] . „‚, ‚“ . $_POST[‚mail‘] . „‚, „. $_POST[‚bday‘] .“ , „. $_POST[‚bmonth‘] .“, „. $_POST[‚byear‘] .“)“;

if(mysql_query($sql2, $db)) {
} else {
echo „

Fehler beim Eintragen der Daten: “ . mysql_error() . „

„;
}

$sql8 = „select PID from player where VName ='“. $_POST[‚vname‘] .“‚ and NName = ‚“. $_POST[’nname‘] .“‚ and BDay = “ . $_POST[‚bday‘] .“ and BMonth = “ . $_POST[‚bmonth‘] .“ and BYear =“ . $_POST[‚byear‘] ;

if($ergebnis = mysql_query($sql8, $db)) {

while($treffer = mysql_fetch_assoc($ergebnis)) {

$pid = $treffer[„PID“]; }

if ( ! function_exists( ‚wp_handle_upload‘ ) ) require_once( ABSPATH . ‚wp-admin/includes/file.php‘ );
$uploadedfile = $_FILES[‚file‘];
$upload_overrides = array( ‚test_form‘ => false );
$movefile = wp_handle_upload( $uploadedfile, $upload_overrides );

if (strtolower(substr($movefile[„file“],-3))== „jpg“ or strtolower(substr($movefile[„file“],-3))== „gif“ or strtolower(substr($movefile[„file“],-3))== „png“) {

if ( $movefile ) {
// echo „File is valid, and was successfully uploaded.\n“;
rename ($movefile[„file“],“/home/catiooca/paintballbundesliga.at/wp-content/uploads/tmmgr/playerpics/pid“ . $pid . „.jpg“);
//var_dump( $movefile);
unlink ($movefile[„file“]);

$sql9 = „update player set Pic = 1 where PID =“ . $pid ;

if($ergebnis = mysql_query($sql9, $db)) {

while($treffer = mysql_fetch_assoc($ergebnis)) {

}
}

} else {
echo „Possible file upload attack!\n“;
}

}else{
echo „Falsches Dateiformat“;
unlink ($movefile[„file“]);

}
header(‚Location: ../‘);
}
}

?>