you can now view the inbox
This commit is contained in:
parent
e0224f867b
commit
fa53942b17
19
ucp.php
19
ucp.php
@ -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");
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
<table class="table table-responsive table-bordered table-condensed">
|
||||
<tbody>
|
||||
{loop="$words"}
|
||||
<td>{$value.author} wrote that you are <span class="label label-default">{$value.first}</span>, <span class="label label-default">{$value.second}</span> and <span class="label label-default">{$value.third}</span></td>
|
||||
<td>{$value.author} wrote that you are <span class="label label-default">{$value.word1}</span>, <span class="label label-default">{$value.word2}</span> and <span class="label label-default">{$value.word3}</span></td>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user