I got this code from the privatemess.asp file.
In the inc_top.asp file find this code around line 362
<% if (mlev = 4) or (lcase(strNoCookies) = "1") then %>
<tr>
<td align="center">
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<a href="admin_home.asp">Admin Options</a>
</font>
</td>
</tr>
<% end if %>
</form>
<% end if %>
After that add this
<% if strDBNTUserName <> "" then
' Get Private Message count for display on Default.asp
if strDBType = "access" then
strSqL = "SELECT count(M_TO) as [pmcount] "
else
strSqL = "SELECT count(M_TO) as pmcount "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "
Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")
rsPM.close
set rsPM = nothing
if pmCount > 0 then
response.write"you have mail"
end if
end if
%>
you could change the response.write"you have mail" bit to output an image if you had one etc. I only had a quick look to see if it appeared on the dafault.asp page, but it should appear on every page.
I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.
--Frank Sinatra
Edited by - Hamlin on 27 June 2002 06:51:22