Archived
1
0

you can now view the inbox

This commit is contained in:
nilsding
2014-08-18 16:03:17 +02:00
parent e0224f867b
commit fa53942b17
2 changed files with 20 additions and 1 deletions

19
ucp.php
View File

@@ -78,6 +78,25 @@ switch ($_GET['page']) {
default: {
check_privileges();
$sql_str = "SELECT `word1`, `word2`, `word3`, `author`, `new` FROM `words`;";
$res = $sql->query($sql_str);
$words = array();
while ($r = $res->fetch_assoc()) {
array_push($words, array(
"word1" => $r['word1'],
"word2" => $r['word2'],
"word3" => $r['word3'],
"author" => $r['author'],
"new" => ($r['new'] == 1 ? true : false)
));
}
$sql_str = "UPDATE `words` SET `new` = 0;";
$sql->query($sql_str);
$tpl->assign("words", $words);
$tpl->draw("inbox");
}
}