mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
fix shoutbox.php
This commit is contained in:
@@ -96,18 +96,16 @@ else
|
||||
}
|
||||
|
||||
$limit = ($CURUSER['sbnum'] ? $CURUSER['sbnum'] : 70);
|
||||
if ($where == "helpbox")
|
||||
{
|
||||
$sql = "SELECT * FROM shoutbox WHERE type='hb' ORDER BY date DESC LIMIT ".$limit;
|
||||
}
|
||||
elseif ($CURUSER['hidehb'] == 'yes' || $showhelpbox_main != 'yes'){
|
||||
$sql = "SELECT * FROM shoutbox WHERE type='sb' ORDER BY date DESC LIMIT ".$limit;
|
||||
}
|
||||
elseif ($CURUSER){
|
||||
$sql = "SELECT * FROM shoutbox ORDER BY date DESC LIMIT ".$limit;
|
||||
}
|
||||
else {
|
||||
die("<h1>".$lang_shoutbox['std_access_denied']."</h1>"."<p>".$lang_shoutbox['std_access_denied_note']."</p></body></html>");
|
||||
if ($where == "helpbox" && $showhelpbox_main == 'yes') {
|
||||
//request helpbox, not require login
|
||||
$sql = "SELECT * FROM shoutbox WHERE type='hb' ORDER BY date DESC LIMIT ".$limit;
|
||||
} elseif ($where == "shoutbox" && $CURUSER && ($CURUSER['hidehb'] == 'yes' || $showhelpbox_main != 'yes')) {
|
||||
//request shoutbox, exclude helpbox content, require login
|
||||
$sql = "SELECT * FROM shoutbox WHERE type='sb' ORDER BY date DESC LIMIT ".$limit;
|
||||
} elseif ($CURUSER) {
|
||||
$sql = "SELECT * FROM shoutbox ORDER BY date DESC LIMIT ".$limit;
|
||||
} else {
|
||||
die("<h1>".$lang_shoutbox['std_access_denied']."</h1>"."<p>".$lang_shoutbox['std_access_denied_note']."</p></body></html>");
|
||||
}
|
||||
$res = sql_query($sql) or sqlerr(__FILE__, __LINE__);
|
||||
if (mysql_num_rows($res) == 0)
|
||||
|
||||
Reference in New Issue
Block a user