added inbox
This commit is contained in:
parent
d9f811f19f
commit
2ec2e2f6dc
1 changed files with 42 additions and 0 deletions
42
inbox.php
Normal file
42
inbox.php
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* smzint/* (c) schmamazon.com 2025
|
||||||
|
*/
|
||||||
|
|
||||||
|
include('../Auth/index.php');
|
||||||
|
|
||||||
|
$conn = new mysqli($dbservername, $dbusername, $dbpassword, $dbname);
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
die("Connection failed: " . $conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM smz_messages_metadata WHERE receiver='$uid' ORDER BY smz_messages_metadata.datetime DESC";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
$conn->close();
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
include ('search.php');
|
||||||
|
echo "<table>";
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
echo "<tr><td><b>Absender:</b><br><abbr title='ID: ".$row["sender"]."'>".uid($row["sender"])."</abbr></td><td><b>Zeit:</b><br>".$row["datetime"]."</td><td><br><form action='read.php' method='POST'><input type='hidden' id='id' name='id' value='".$row["message"]."'><input type='hidden' id='upass' name='upass'><input type='submit' value='Öffnen'></form></td></tr>";
|
||||||
|
}
|
||||||
|
echo "</table>";
|
||||||
|
} else {
|
||||||
|
echo "Keine Nachrichten";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let pass = prompt("Bitte geben Sie Ihr Passwort an");
|
||||||
|
if(pass == null || pass == ""){
|
||||||
|
alert("Eingabe abgebrochen.")
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var field = document.getElementsByName("upass");
|
||||||
|
for (var i = 0; i<field.length; i++){
|
||||||
|
field[i].value = pass;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Add table
Reference in a new issue