if (!defined("BLOCK_FILE")) { Header("Location: ../index.php"); exit; } global $prefix, $db, $conf, $confu; include_once("modules/forum/conf_global.php"); $table_prefix = $INFO['sql_tbl_prefix']; if (is_user()) { $userinfo = getusrinfo(); $uname = $userinfo['user_name']; $user_id = intval($userinfo['user_id']); $user_avatar = ($userinfo['user_avatar']) ? $userinfo['user_avatar'] : "00.gif"; $content = "<center><img src=\"".$confu['adirectory']."/".$user_avatar."\"><br>" ."<b>"._BWEL.",<br>$uname</b></center><hr>" ."<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\"><tr valign=\"middle\"><td><a href=\"index.php?name=account&op=logout\" title=\""._LOGOUT."\"><img src=\"".img_find("all/exit")."\" border=\"0\" alt=\""._LOGOUT."\"></td><td><a href=\"index.php?name=account&op=logout\" title=\""._LOGOUT."\">"._LOGOUT."</a></td></tr></table>"; } else { $content = "<center><img src=\"".$confu['adirectory']."/0.gif\"><br>" ."<b>"._WELCOMETO.",<br>".$confu['anonym']."</b></center><hr>" ."<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\"><form action=\"index.php?name=account\" method=\"post\">" ."<tr valign=\"middle\"><td><a href=\"index.php?name=account&op=newuser\" title=\""._BREG."\"><img src=\"".img_find("all/newuser")."\" border=\"0\" alt=\""._BREG."\"></td><td><a href=\"index.php?name=account&op=newuser\" title=\""._BREG."\">"._BREG."</a></td></tr>" ."<tr valign=\"middle\"><td><a href=\"index.php?name=account&op=passlost\" title=\""._PASSFOR."\"><img src=\"".img_find("all/passlost")."\" border=\"0\" alt=\""._PASSFOR."\"></td><td><a href=\"index.php?name=account&op=passlost\" title=\""._PASSFOR."\">"._PASSFOR."</a></td></tr></table><hr>" ."<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\">" ."<tr><td>"._NICKNAME.":</td><td><input type=\"text\" name=\"user_name\" size=\"10\" maxlength=\"25\" class=\"binput\"></td></tr>" ."<tr><td>"._PASSWORD.":</td><td><input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"25\" class=\"binput\"></td></tr>"; if (extension_loaded("gd") && ($conf['gfx_chk'] == 2 || $conf['gfx_chk'] == 4 || $conf['gfx_chk'] == 5 || $conf['gfx_chk'] == 7)) { $content .= "<tr><td>"._CODE.":</td><td><img src=\"captcha.php\" onclick=\"if(!this.adress)this.adress = this.src; this.src=adress+'?rand='+Math.random();\" border=\"1\" title=\"Нажмите, чтобы обновить картинку\" style=\"cursor:pointer;\" alt=\""._SECURITYCODE."\"></td></tr>" ."<tr><td>"._TYPESECCODE.":</td><td><input type=\"text\" name=\"check\" size=\"10\" maxlength=\"6\" style=\"width: 75px;\" class=\"binput\"></td></tr>"; } $content .= "<tr><td colspan=\"2\" align=\"center\"><input type=\"hidden\" name=\"op\" value=\"login\"><input type=\"submit\" value=\""._LOGIN."\" class=\"fbutton\"></td></tr></form></table>"; } if (is_user()) { $content .= "<hr>"; $newpms = $db->sql_numrows($db->sql_query("SELECT * FROM ".$table_prefix."message_topics WHERE mt_to_id='$user_id' AND mt_read='0' AND mt_vid_folder='in'")); if ($newpms != 0) { $content .= "<table border=\"0\"><tr valign=\"middle\"><td><a href=\"index.php?name=forum&act=Msg&CODE=01\"><img src=\"images/private/pm.gif\" border=\"0\" title=\""._BUNREAD."\" hspace=\"4\" alt=\"\"></a></td><td><a href=\"index.php?name=forum&act=Msg&CODE=01\" title=\""._BUNREAD."\"> Cообщения</a> : $newpms</td></tr></table>"; } else { $content .= "<table border=\"0\"><tr valign=\"middle\"><td><a href=\"index.php?name=forum&act=Msg&CODE=01\"><img src=\"".img_find("all/private")."\" border=\"0\" title=\"Нет новых сообщений\" alt=\"\"></a></td><td><a href=\"index.php?name=forum&act=Msg&CODE=01\" title=\"Нет новых сообщений\">Cообщения</a> : $newpms</td></tr></table>"; }} if ($conf['session']) $content .= "<div id=\"repsinfo\">".user_sinfo(1)."</div>";
Сделал для себя, может кому пригодиться, все работает и настроено, только ссылки на личку:
forum.html&act=Msg&CODE=01
Замените на оригинальные.
Версия системы: Open SLAED 1.*
Версия PHP: PHP 5
Сервер: Локальный сервер