block-chat.php
Код:
<?php if (!defined('BLOCK_FILE')) { Header("Location: ../index.php"); exit; } global $tracker_lang, $CURUSER; ?> <script language=javascript> function SmileIT(smile,form,text){ document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" "; document.forms[form].elements[text].focus(); } </script> <script LANGUAGE="JavaScript"><!-- function mySubmit() { setTimeout('document.shbox.reset()',10); } //--></SCRIPT> <? $content = "<table width=\"100%\" border=\"2\" cellspacing=\"0\" cellpadding=\"0\"><td class=text>"; $resource = sql_query("SELECT * FROM news") or sqlerr(__FILE__, __LINE__); $content .= "<script language=\"javascript\" type=\"text/javascript\" src=\"js/show_hide.js\"></script>"; if (mysql_num_rows($resource)) { $content .= "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td class=\"text\">\n<ul>"; while($array = mysql_fetch_array($resource)) { if ($news_flag == 0) { $content .= "<span style=\"cursor: pointer;\" onclick=\"javascript: show_hide('s".$array["id"]."')\"><img border=\"0\" src=\"pic/minus.gif\" id=\"pics".$array["id"]."\" title=\"Скрыть\"></span> " ."<span style=\"cursor: pointer;\" onclick=\"javascript: show_hide('s".$array["id"]."')\"> \n" ."<b>".$array['subject']."</b></span>\n"; if (get_user_class() >= UC_ADMINISTRATOR) { $content .= " <font size=\"-2\">[<a class=\"altlink\" href=\"news.php?action=edit&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "\"><b>E</b></a>]</font>"; } $content .= " <span id=\"ss".$array["id"]."\" style=\"display: block;\">".format_comment($array['body'])."</span>"; $content .= "<br />"; $news_flag = 1; } else { $content .= "<span style=\"cursor: pointer;\" onclick=\"javascript: show_hide('s".$array["id"]."')\"><img border=\"0\" src=\"pic/plus.gif\" id=\"pics".$array["id"]."\" title=\"Показать\"></span> " ."<span style=\"cursor: pointer;\" onclick=\"javascript: show_hide('s".$array["id"]."')\"> \n" ."<b>".$array['subject']."</b></span>\n"; if (get_user_class() >= UC_ADMINISTRATOR) { $content .= " <font size=\"-2\">[ <a class=\"altlink\" href=\"news.php?action=edit&newsid=" . $array['id'] . "&returnto=" . urlencode($_SERVER['PHP_SELF']) . "\"><b>E</b></a>]</font>"; } $content .= "<span id=\"ss".$array["id"]."\" style=\"display: none;\">".format_comment($array['body'])."</span>"; $content .= "<br />"; } } $content .= "</ul></td></tr></table>\n"; } else { $content .= "<table class=\"main\" align=\"center\" border=\"1\" cellspacing=\"0\" cellpadding=\"10\"><tr><td class=\"text\">"; $content .= "<div align=\"center\"><h3>".$tracker_lang['no_news']."</h3></div>\n"; $content .= "</td></tr></table>"; } $content .= "<iframe src=\"shoutbox.php\" width=\"100%\" height=\"180\" align=\"center\" frameborder=\"0\" name=\"sbox\" marginwidth=\"0\" marginheight=\"0\"></iframe><br><br>"; if($CURUSER){ $content .= "<form action=\"shoutbox.php\" method=\"get\" target=\"sbox\" name=\"shbox\" onSubmit=\"mySubmit()\">"; $content .= "<p align=\"center\">Сообщение: <input type=\"text\" name=\"shbox_text\" size=\"80\">"; $content .= "<input type=\"hidden\" name=\"sent\" value=\"yes\">"; $content .= "<center><input type=\"submit\" value=\" Сказать \"><input type=\"hidden\" name=\"sent\" value=\"yes\"> <a href=\"shoutbox.php\" target=\"sbox\"><b>Обновить</b></a></center>"; $content .= "</td><td valign=top><hr><b><font bgcolor=\"blue\" color=\"red\"></font></b>"; $title_who = array(); $dt = sqlesc(time() - 600); $result = sql_query("SELECT s.uid, u.username, s.class, s.ip FROM sessions AS s LEFT JOIN users AS u ON s.uid = u.id WHERE s.time > $dt GROUP BY u.username ORDER BY s.class DESC"); while (list($uid, $uname, $class, $ip) = mysql_fetch_row($result)) { if ($CURUSER && $uid > 0) { $title_who[] = "<a href=\"userdetails.php?id=".$uid."\" class=\"online\">".get_user_class_color($class, $uname)."</a>"; } elseif ($uid > 0) { $title_who[] = get_user_class_color($class, $uname); } if ($class >= UC_MODERATOR) { $staff++; } elseif ($class < 0) { $guests++; } elseif ($class < UC_MODERATOR) { $users++; } $total++; } } $content .= "</td></table></form>"; ?>
takesignup.php
После:
Код:
write_log("Зарегистрирован новый пользователь $wantusername","FFFFFF","tracker");
Вставить:
Код:
$text = "[b]Зарегистрирован новый пользователь [color=red]".$wantusername."[/color][/b]"; mysql_query("INSERT INTO shoutbox (id, userid, class, warned, donor, username, date, text, orig_text) VALUES ('id='," . sqlesc($CURUSER["id"]) . ", " . sqlesc($CURUSER["class"]) . ", " . sqlesc($CURUSER["warned"]) . ", " . sqlesc($CURUSER["donor"]) . ", " . sqlesc($CURUSER["username"]) . ", ".time().", " . sqlesc($text) . ", " . sqlesc($text) . ")") or sqlerr(__FILE__, __LINE__);
takeupload.php
Перед:
Код:
//header("Location: $DEFAULTBASEURL/details.php?id=$id");
Вставить:
Код:
$text = "<a href='details.php?id=".$id."' target='_blank'>".$name."</a> <b><font color='red'> - Моя Новая Раздача!!!</font></a>"; mysql_query("INSERT INTO shoutbox (id, userid, class, warned, donor, username, date, text, orig_text) VALUES ('id='," . sqlesc($CURUSER["id"]) . ", " . sqlesc($CURUSER["class"]) . ", " . sqlesc($CURUSER["warned"]) . ", " . sqlesc($CURUSER["donor"]) . ", " . sqlesc($CURUSER["username"]) . ", ".time().", " . sqlesc($text) . ", " . sqlesc($text) . ")") or sqlerr(__FILE__, __LINE__);