" type="text/css"> onload="" onload="hbquota()" > parent.document.forms['shbox'].shbox_text.value='';"; } } $limit = ($CURUSER['sbnum'] ? $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" && $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("

".$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)."
"); } ?>