Initial commit: legacy WOPS PHP application
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
#Datenbank Verbindung einbinden
|
||||
require 'Connections/Connections.php';
|
||||
#Header und Menü einbinden
|
||||
$webpagetitle = "Registierung abschließen";
|
||||
include "Includes/Header.php";
|
||||
include "Includes/Menu.php";
|
||||
#html Content ausgeben
|
||||
|
||||
echo '<div class="content"><div class="Rahmen"><div class="center">';
|
||||
#Get variablen in in normale schreiben
|
||||
$email = trim(mysqli_real_escape_string($con, $_GET['email']));
|
||||
$key = trim(mysqli_real_escape_string($con, $_GET['key']));
|
||||
#User aus datenbank lesen
|
||||
$result_verify_email = $con->query("select * from user where email = '$email' and isactive = 1");
|
||||
#Prüfen ob user existiert
|
||||
if (mysqli_num_rows($result_verify_email) == 1)
|
||||
{
|
||||
echo '<div>Account existiert bereits, bitte <a href="Login.php">hier einloggen</a></div>';
|
||||
} else {
|
||||
#Prüfen ob variablen gesetz sind
|
||||
if (isset($email) && isset($key)) {
|
||||
#user aktivieren
|
||||
$Userid = $con->query("select UserID from user where email = '$email' and isactive = 1")->fetch_object()->Userid;
|
||||
$produkte = $con->query("Select ArtNr from produkte");
|
||||
#Standard werte für Produkte auf 0 Setzen
|
||||
while($row = mysqli_fetch_array($produkte))
|
||||
{
|
||||
$ArtNr = $row['ArtNr'];
|
||||
$sql = $con->query("insert into standard_bestellung (userid_fk,produktid_fk,Anzahl) VALUES ('$Userid','$ArtNr','0');");
|
||||
}
|
||||
echo '<div>Ihr Account muss noch durch einen Moderator freigeben werden.Bitte <a href="Login.php">hier einloggen versuchen</a></div>';
|
||||
} else {
|
||||
echo '<div>Daten falsch übermittelt</div>';
|
||||
}
|
||||
}
|
||||
echo '</div></div></div>';
|
||||
#Footer einbinden
|
||||
include "Includes/Footer.php";
|
||||
?>
|
||||
Reference in New Issue
Block a user