<?php if($access<2) { echo $noacc; } else { ?>
<table style="width:90%" border="0" cellspacing="2" cellpadding="0">
<tr><td class="left"></td><td class="right">
<a href="index.php?show=mysms">empfangen</a> -
<a href="index.php?show=mysmsto">gesendet</a> -
<a href="index.php?show=mysmsdo">erstellen</a>
</td></tr></table><br />
<form method="post" action="index.php?show=mysmsmsg">
<table style="width:90%" border="0" cellspacing="1" cellpadding="0" class="forum">
<tr>
<td class="headb">Neue Nachrichten:</td>
</tr>
</table>
<table style="width:90%" border="0" cellspacing="1" cellpadding="0" class="forum">
<tr>
<td style="width:149px" align="center"><b>Absender</b></td>
<td style="width:478px" align="center"><b>Betreff</b></td>
<td style="width:155px" align="center"><b>Datum</b></td>
</tr>
<?php $sql="SELECT * FROM sms WHERE senduser='$myid' AND viewed='0' ORDER BY date DESC";
$data=mysql_query($sql, $db);
while ($mysms = mysql_fetch_object ($data)) { ?>
<tr>
<td style="width:149px" class="leftb">
<?php $sql2="SELECT nick,id FROM users WHERE id='$mysms->fromuser'";
$data2=mysql_query($sql2, $db);
while ($users = mysql_fetch_object ($data2)) {
print "<strong><a href=\"index.php?show=users&userid=$users->id\">";
secure($users->nick); echo "</a></strong>"; } ?>
</td>
<td style="width:478px" class="leftb">
<?php print "<strong><a href=\"index.php?show=mysmsdet&msid=$mysms->id\">";
secure($mysms->headline); echo "</a></strong>"; ?>
</td>
<td style="width:155px"class="centerb">
<?php $date = date("d.m.y",$mysms->date);
$day = date("H:i",$mysms->date);
echo "<strong>$date - $day</strong>"; ?>
</td>
<td style="width:20px" class="leftb" align="center"><input type="checkbox" name="msgselect"></td>
</tr>
<?php } ?>
</table>
<br>
<table style="width:90%" border="0" cellspacing="1" cellpadding="0" class="forum">
<tr><td>
<div align="right">
<select class="form" name="act">
<option selected>Aktion wählen...</option>
<option>löschen</option>
</select>
</div>
</td></tr>
</table><br>
<table style="width:90%" border="0" cellspacing="1" cellpadding="0" class="forum">
<tr>
<td class="headb">Gelesene Nachrichten:</td>
</tr>
</table>
<table style="width:90%" border="0" cellspacing="1" cellpadding="0" class="forum">
<tr>
<td style="width:149px" align="center"><b>Absender</b></td>
<td style="width:478px" align="center"><b>Betreff</b></td>
<td style="width:155px" align="center"><b>Datum</b></td>
</tr>
<?php ?>
<?php $sql="SELECT * FROM sms WHERE senduser='$myid' AND viewed='1' ORDER BY date DESC";
$data=mysql_query($sql, $db);
while ($mysms = mysql_fetch_object ($data)) { ?>
<tr>
<td style="width:149px" class="leftb">
<?php $sql2="SELECT nick,id FROM users WHERE id='$mysms->fromuser'";
$data2=mysql_query($sql2, $db);
while ($users = mysql_fetch_object ($data2)) {
print "<a href=\"index.php?show=users&userid=$users->id\">";
secure($users->nick); echo "</a>"; } ?>
</td>
<td style="width:478px" class="leftb">
<?php print "<a href=\"index.php?show=mysmsdet&msid=$mysms->id\">";
secure($mysms->headline); echo "</a>"; ?>
</td>
<td style="width:155px" style="width:30%" class="centerb">
<?php $date = date("d.m.y",$mysms->date);
$day = date("H:i",$mysms->date);
echo "$date - $day"; ?>
</td>
<td style="width:20px" class="leftb"align="center"><input type="checkbox" name="checkbox" value="<?php $mysms->id ?>"></td>
</tr>
<?php } ?>
</table>
<br>
<table style="width:90%" border="0" cellspacing="1" cellpadding="0" class="forum">
<tr><td>
<div align="right">
<select class="form" name="act">
<option selected>Aktion wählen...</option>
<option value="del">löschen</option>
</select>
<input type="submit" class="form" value="Go">
</div>
</td></tr>
</table><br>
<?php } ?>
</form>