" type="text/css"> onload="" onload="hbquota()" > 0) { $lock = new \Nexus\Database\NexusLock("shoutbox:$userid", 60); } else { $lock = new \Nexus\Database\NexusLock("shoutbox:" . getip(), 60); } if (!$lock->acquire()) { die($lang_shoutbox['speaking_too_often']); } sql_query("INSERT INTO shoutbox (userid, date, text, type) VALUES (" . sqlesc($userid) . ", $date, " . sqlesc($text) . ", ".sqlesc($type).")") or sqlerr(__FILE__, __LINE__); print ""; } } $limit = ($CURUSER['sbnum'] ?? 70); 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" && isset($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 (isset($CURUSER)) { $sql = "SELECT * FROM shoutbox ORDER BY date DESC LIMIT ".$limit; } else { die("

".$lang_shoutbox['std_access_denied']."

"."

".$lang_shoutbox['std_access_denied_note']."

"); } $res = sql_query($sql) or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) print("\n"); else { print("\n"); while ($arr = mysql_fetch_assoc($res)) { $del = ''; if (user_can('sbmanage')) { $del .= "[".$lang_shoutbox['text_del']."]"; } if ($arr["userid"]) { $username = get_username($arr["userid"],false,true,true,true,false,false,"",true); if (isset($arr["type"]) && isset($_GET['type']) && $_GET["type"] != 'helpbox' && $arr["type"] == 'hb') $username .= $lang_shoutbox['text_to_guest']; } else $username = $lang_shoutbox['text_guest']; if (isset($CURUSER) && $CURUSER['timetype'] != 'timealive') $time = (new DateTime())->setTimestamp($arr["date"])->format('m.d H:i'); else $time = get_elapsed_time($arr["date"]).$lang_shoutbox['text_ago']; print("\n"); } print("
[".$time."] ". $del ." ". $username." " . format_comment($arr["text"],true,false,true,true,600,false,false)."
"); } ?>