Hi, ich würde gerne die Anfragen verschieben, habe aber leider keine Ahnung wie
Bin schon seit gestern am Rumbasteln...Ich möchte, das es mir oben (mittig) angezeigt wird und nicht unten rechts.
if ($session['user']['superuser']>2){
// $sql = "SELECT count(petitionid) AS c,status FROM petitions GROUP BY status";
$sql = "SELECT max(lastact) AS lastact, count(petitionid) AS c,status FROM petitions GROUP BY status";
$result = db_query($sql);
$petitions=array(0=>0,1=>0,2=>0);
$petitions['unread'] = false;
for ($i=0;$i<db_num_rows($result);$i++){
$row = db_fetch_assoc($result);
$petitions[(int)$row['status']] = $row['c'];
if ($row['lastact']>$session['lastlogoff']) $petitions['unread'] = true;
}
db_free_result($result);
// Neue Petitionen; schauen, ob Sternchen nötig ist
$petitions['star'] = '';
if ($petitions['unread']) {
$sql = 'SELECT petitionid, lastact FROM petitions WHERE lastact > "'.$session['lastlogoff'].'"';
$result = db_query($sql);
while ($row = db_fetch_assoc($result)) {
if (!$session['petitions'][$row['petitionid']]) {
$petitions['star'] = '<span class="colDkRed">*</span>';
}
}
db_free_result($result);
}
$footer = "<table border='0' cellpadding='5' cellspacing='0' align='right'><tr><td><b><a href='viewpetition.php'>Anfragen</a>$petitions[star]:</b> $petitions[0] Ungelesen, $petitions[1] Gelesen, $petitions[2] Geschlossen.</td></tr></table>".$footer;
// $footer = "<table border='0' cellpadding='5' cellspacing='0' align='right'><tr><td><b>Anfragen:</b> $petitions[0] Ungelesen, $petitions[1] Gelesen, $petitions[2] Geschlossen.</td></tr></table>".$footer;
addnav('','viewpetition.php');
}
LG