Author |
Topic |
|
vmplanet
Junior Member
112 Posts |
Posted - 14 August 2002 : 08:31:34
|
Hi,
Can someone please help me in making an e-mail list. It must be a list for public use. The list is for a soccer manager game, so other members can find the e-mails,
Club Nr.: Club Manager e-mail address
an example is the e-maillist from maxwebportal but that's only for admins.
|
|
crash
Advanced Member
Netherlands
2064 Posts |
Posted - 14 August 2002 : 08:33:28
|
you can use the admin email list for that purpose. copy it and rename it. also, remove the admin level check from it. |
cHosting.nl |
|
|
vmplanet
Junior Member
112 Posts |
Posted - 14 August 2002 : 10:31:40
|
quote: <% '*********************************************************************** '** Copyright (C) 2001 - 2002 Max Yuan All Rights Reserved '** '** By using this program, you are agreeing to the terms of the '** GNU General Public License. '** '** This program is free software; you can redistribute it and/or '** modify it under the terms of the GNU General Public License '** as published by the Free Software Foundation; either version 2 '** of the License, or any later version. '** '** All copyright notices regarding MaxWebPortal must remain intact '** in the scripts and in the outputted HTML. '** The "powered by" text/logo with a link back to '** http://www.maxwebportal.com in the footer of the pages MUST '** remain visible when the pages are viewed on the internet or intranet. '** '** Support can be obtained from support forums at: '** http://www.maxwebportal.com '** '** Email: maxwebportal@hotmail.com '** ICQ: 148111300 '*********************************************************************** '** This Page Contains source code of Snitz Forums 2000 '*********************************************************************** '################################################################################# '## Copyright (C) 2000 Michael Anderson and Pierre Gorissen '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# %><% server.scripttimeout = 6000 %> <!--#INCLUDE FILE="config.asp" --> <!--#INCLUDE FILE="inc_functions.asp" --> <!--#INCLUDE file="inc_top.asp" --> <script language="JavaScript"> <!-- hide from JavaScript-challenged browsers function selectAll(formObj, isInverse) { with (formObj) { for (var i=0;i < length;i++) { fldObj = elements[i]; if(isInverse) { if (fldObj.name != 'inverse') { if (fldObj.name == 'selectall') fldObj.checked = false; else fldObj.checked = (fldObj.checked) ? false : true; } else fldObj.checked = true; } else { fldObj.checked = true; if (fldObj.name == 'inverse') fldObj.checked = false; } } } } // done hiding --> </script> <% PageName = request.form("pagename") if PageName = "" then My_Sort = request.form("sortme") My_Order = request.form("order") My_Order2 = request.form("order2")
if My_Sort = "" then Sort_Name = "All Users" elseif My_Sort = "1" then Sort_Name = "General Users Only" elseif My_Sort = "2" then Sort_Name = "Moderators Only" elseif My_Sort = "3" then Sort_Name = "Administrators Only" elseif My_Sort = "4" then Sort_Name = "Inactive - 6mo" My_Last = DateToStr(DateAdd("m", -6, now())) elseif My_Sort = "5" then Sort_Name = "Inactive - 1yr" My_Last = DateToStr(DateAdd("yyyy", -1, now())) elseif My_Sort = "6" then Sort_Name = "Never Posted" elseif My_Sort = "7" then Sort_Name = "Refuse Email" end if
if My_Order = "" then Order_Name = "Username" elseif My_Order ="2" then Order_Name = "Ranking" elseif My_Order ="3" then Order_Name = "Posts" elseif My_Order ="4" then Order_Name = "Start Date" end if
if My_Order2 = "" then Order_By = "Desc" elseif My_Order2 = "1" then Order_By = "Asc" end if
If Request.form("reccount") = "" Then PageSize = 10 Else PageSize = Request.form("reccount") End If If PageSize = 1000000 then PageSize2 = "All" Else PageSize2 = PageSize End If If Request.form("pageno") = "" Then intPage = 1 Else intPage = Request.form("pageno") End If %> <% strSql = "SELECT * FROM " &strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''"
if My_Sort > "" then if My_Sort = "1" then strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_LEVEL = " & 1 elseif My_Sort = "2" then strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_LEVEL = " & 2 elseif My_Sort = "3" then strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_LEVEL = " & 3 elseif My_Sort = "6" then strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_POSTS = " & 0 elseif My_Sort = "7" then '--------------------------------------------------------------- strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_RECMAIL = " & 1 elseif My_Sort = "4" or "5" then strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE < '" & My_Last & "'" end if end if if My_Order = "2" then strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_LEVEL " & Order_By elseif My_Order = "3" then strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_POSTS " & Order_By elseif My_Order = "4" then strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_DATE " & Order_By else strSql = strSql & " ORDER BY " & strMemberTablePrefix & "MEMBERS.M_NAME " & Order_By end if set rs = Server.CreateObject("ADODB.Recordset") rs.CursorLocation = 3 'adUseClient rs.CursorType = 3 'adOpenStatic rs.ActiveConnection = My_Conn rs.open strSql rs.PageSize = PageSize rs.CacheSize = rs.PageSize intPageCount = rs.PageCount intRecordCount = rs.RecordCount
If CInt(intPage) > CInt(intPageCount) Then intPage = intPageCount If CInt(intPage) <= 0 Then intPage = 1 If intRecordCount > 0 Then rs.AbsolutePage = intPage intStart = rs.AbsolutePosition If CInt(intPage) = CInt(intPageCount) Then intFinish = intRecordCount Else intFinish = intStart + (rs.PageSize - 1) End if End If '--------------------/paging
%> <table border="0" width="100%"> <tr> <td width="33%" align="left" nowrap><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> <img src="icon_folder_open.gif" height=15 width=15 border="0"> <a href="default.asp">Home</a><br> <img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_blank.gif" height=15 width=15 border="0"><img src="icon_folder_open_topic.gif" height=15 width=15 border="0"> User Email List<br> </font></td> </tr> </table> <center> <table border="0" cellpadding="0" cellspacing="10"> <tr><form method="post" action="admin_emaillist.asp"> <td nowrap> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Select user group:</font><BR> <font face="Verdana, Arial, Helvetica" size="2"> <select name="sortme" size="1"> <option value="<%=My_Sort%>" SELECTED> <% =Sort_Name%></option> <option value=""> All Users</option> <option value="3"> Admins Only</option> <option value="2"> Moderators Only</option> <option value="1"> General Users Only</option> <option value="4"> Inactive - 6mo</option> <option value="5"> Inactive - 1yr</option> <option value="6"> Never Posted</option> <option value="7"> Refuse Email</option> </select> </font> </td><td align="right"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Order by:</font><BR> <font face="Verdana, Arial, Helvetica" size="2"> <select name="order" size="1"> <option value="<%=My_Order%>" SELECTED> <%=Order_Name%></option> <option value=""> Username</option> <option value="2"> Ranking</option> <option value="3"> Posts</option> <option value="4"> Start Date</option> </select> </font> </td> <td align="right"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Ordering:</font><BR> <font face="Verdana, Arial, Helvetica" size="2"> <select name="order2" size="1"> <option value="<%=My_Order2%>" SELECTED> <%=Order_By%></option> <option value=""> Descending</option> <option value="1"> Ascending</option> </select> <input type="submit" value="Go"> </font> </td> </tr> <tr> <td align="center"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><B>There are a total of<BR><%=intRecordCount%> records in this group.</B></font> </td> <td valign="top" align="right"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">View page:</font><BR> <select name="pageno" size="1"> <option value="<%=cInt(intPage)%>" SELECTED> <%=cInt(intPage)%></option> <% for counter = 1 to intPageCount response.write"<option value=" & counter & "> "& counter &"</option>" Next %> </select> </td><td valign="top" align="right"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Per page:</font><BR> <select name="reccount" size="1"> <option value="<%= PageSize %>" SELECTED> <%= PageSize2 %></option> <option value="10"> 10</option> <option value="25"> 25</option> <option value="50"> 50</option> <option value="100"> 100</option> <option value="200"> 200</option> <option value="1000000"> All</option> </select> <input type="submit" value="Go"> </td></form> <form action="admin_emaillist.asp" method="post"></tr> </table> <hr width="90%" size="1" noshade> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Select Message:
<% '------------------------------------ strSql = "SELECT * FROM " &strMemberTablePrefix & "SPAM WHERE ARCHIVE = '0'" set rsSP = Server.CreateObject("ADODB.Recordset") rsSP.open strSql, my_Conn, 3 %> <% if rsSP.EOF or rsSP.BOF then %> Create New Message <% else %> <select name="MSG" size="1"> <option value="" SELECTED> - Create New - </option> <% do until rsSP.EOF %>
<option value="<% =rsSP("ID") %>"> <% =Server.HTMLEncode(rsSP("Subject")) %></option> <% rsSP.MoveNext %> <%loop %> </select> <% end if set rsSP = nothing %> or <a href="admin_emailmanager.asp">Manage Messages ></a></font>
<table border="0" width="95%" cellspacing="0" cellpadding="0" align="center"> <tr> <input type="hidden" name="pagename" value="compose"> <td align=center> <input type="button" value="Select visible" onClick="selectAll(this.form,1)"> <input type="submit" name="action" value="Send Message To Selected"> <input type="submit" name="action" value="Send Message To All"> <input type="reset" name="Reset" value="- Reset -"> <BR><BR></td></tr> <td bgcolor="<% =strTableBorderColor %>"> <table border="0" width="100%" cellspacing="1" cellpadding="4"> <tr align=center> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Mail</font></b></td> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Naam:</font></b></td> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Club:</font></b></td> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Email Address</font></b></td> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Posts</font></b></td> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Ranking</font></b></td> <td bgColor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Registered</font></b></td> <td bgColor="<% =strHeadCellColor %>"> </td> </tr>
<% if rs.EOF or rs.BOF then %> <tr> <td bgcolor="<% =strForumCellColor %>" colspan="7"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>No Members Found</b></font></td> </tr> <% else %> <%
'-------------------------paging For intRecord = 1 to rs.PageSize MyRank = rs("M_LEVEL") if MyRank = 1 then MyRank = "General User" elseif MyRank = 2 then MyRank = "Moderator" elseif MyRank = 3 then MyRank = "Administrator" end if %> <tr> <td bgcolor="<% =strForumCellColor %>" align="center"> <% '--------Does user want spam? if rs("M_RECMAIL") = "1" then %> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><B>X</B></font> <% else %> <input type="checkbox" name="ID" value="<% =rs("MEMBER_ID") %>"><input type="hidden" name="Mail_ALL" value="<% =rs("MEMBER_ID") %>"> <% end if %> </td> <td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="pop_profile.asp?mode=display&id=<%=RS("MEMBER_ID")%>"><% =rs("M_NAME") %></a></font></td> <td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_STATE") %></a></font></td> <td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="mailto:<% =rs("M_EMAIL") %>"><% =rs("M_EMAIL") %></a></font></td> <td align=right bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_POSTS") %></font></td><td align=right bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =MyRank %></td><td align=right bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =ChkDate(rs("M_DATE"))%></font> </td><td bgcolor="<% =strForumCellColor %>" align=center> <a href="pop_profile.asp?mode=Modify&ID=<% =rs("MEMBER_ID") %>&name=<% =rs("M_NAME") %>"><img src="icon_pencil.gif" alt="Edit Member" border="0" hspace="0"></a> <a href="JavaScript:openWindow('pop_delete.asp?mode=Member&MEMBER_ID=<% =rs("MEMBER_ID") %>')"><img src="icon_trashcan.gif" alt="Delete Member" border="0" hspace="0"></a> </td> </tr> <% rs.MoveNext If rs.EOF Then Exit for Next %> <% end if %> </table> </td> </tr> <tr> <td align="center"><BR><input type="button" value="Select visible" onClick="selectAll(this.form,1)"> <input type="submit" name="action" value="Send Message To Selected"> <input type="submit" name="action" value="Send Message To All"> <input type="reset" name="Reset" value="- Reset -"></td> <BR></tr> </table>
<% elseif pagename="send" then %> <% My_ID = request.form("id") Mail_All = request.form("Mail_All") if My_ID = "*" then THISESCUELL = "select * from " & strMemberTablePrefix & "MEMBERS where MEMBER_ID in (" & Mail_All & ")" THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''" else THISESCUELL = "select * from " & strMemberTablePrefix & "MEMBERS where MEMBER_ID in (" & My_ID & ")" THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 THISESCUELL = THISESCUELL & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''" end if strSQL= THISESCUELL set RS=Server.CreateObject("ADODB.Recordset") RS.Open strSQL, my_Conn, 1, 3 rs.MoveFirst while not rs.EOF strRecipientsName = RS.Fields("M_NAME") strRecipients = RS.Fields("M_email") strFrom = strSender strSubject = request.form("SUBJECT") strMessage = request.form("MESSAGE") strArchive = request.form("ARCHIVE") strL_DATE = DateToStr(now()) %> <!--#INCLUDE FILE="inc_mail.asp" --> <% rs.MoveNext wend %> <font face="<% =strDefaultFontFace %>"><h2>Message Sent</h2></font> <p><center><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">The message was sent to the selected recipients. <a href="admin_emaillist.asp">Click here</a> to continue.</center></font></p> <% if request.form("save") <> "" then strSubject = replace(request.form("SUBJECT"),"'","''") strMessage = replace(request.form("MESSAGE"),"'","''")
set conn = server.createobject ("adodb.connection") conn.open My_Conn conn.Execute "insert into " & strTablePrefix & "SPAM (SUBJECT, MESSAGE, F_SENT, ARCHIVE) values (" _ & "'" & strSubject & "', " _ & "'" & strMessage & "', " _ & "'" & strL_DATE & "', " _ & "'" & request.form("ARCHIVE") & "')"
end if %>
<% '---------end sending elseif pagename="compose" then '-------------Start composing %> <% myMSG = Request.Form("MSG") function getFormObject () if Request.ServerVariables("REQUEST_METHOD") = "GET" then set getFormObject=Request.QueryString else set getFormObject=Request.Form end if end function %> <% set oFormVars=GetFormObject() if inStr(ucase(oFormVars("Action")),"SELECTED") > 0 then selected=true if oFormVars("ID") = "" then %> <h1>No Recipients Selected</h1> <% response.end end if strSQL="select * from " & strMemberTablePrefix & "Members where MEMBER_ID in (" & request.form("id") & ")" strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''" else selected=false strSQL="select * from " & strMemberTablePrefix & "Members where MEMBER_ID in (" & request.form("Mail_All") & ")" strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_EMAIL <> " & "''" end if
set RS=Server.CreateObject("ADODB.Recordset") RS.Open strSQL, My_Conn, 1, 2
if myMSG <> "" then strSql2 = "SELECT * FROM " & strTablePrefix & "SPAM WHERE ID =" & myMSG set rsSP = Server.CreateObject("ADODB.Recordset") rsSP.open strSql2, My_Conn, 3 mySUBJECT = Server.HTMLEncode(rsSP("SUBJECT")) myMESSAGE = rsSP("MESSAGE") else end if Mail_All = request.form("Mail_All") %> <h2>Send Message</h2> <form method="post" action="admin_emaillist.asp"> <input type="hidden" name="pagename" value="send"> <input type="hidden" name="Mail_All" value="<%= Mail_All %>"> <table bordercolor="<% =strTableBorderColor %>" border="1" cellspacing="0" cellpadding="5"> <tr> <td><font face="arial">Subject:</font></td><td><input type="text" name="SUBJECT" size="50" value="<%= mySUBJECT%>"></td> </tr> <tr> <td colspan="2"><font face="arial">Message:</font></td> </tr> <tr> <td colspan="2" align="center"><textarea name="MESSAGE" cols="50" rows="10" wrap="PHYSICAL"><%= myMESSAGE %></textarea></td> </tr> </table>
<input type="checkbox" name="save" value="1"> <font face="arial">Save this message?</font> <font face="Verdana, Arial, Helvetica" size="2"> <select name="ARCHIVE" size="1"> <option value="0" SELECTED> Live List</option> <option value="1"> Archive</option> </select> </font>
<input type="Submit" value="Send"> <input type="reset"> <% if selected then %> <h4><i>This message will be sent to the following clients:</i></h4> <TABLE width="50%" BORDER=1 bordercolor="<% =strTableBorderColor %>" CELLSPACING=0 align="center" width="100%"> <TR> <TH BGCOLOR=<% =strHeadCellColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Username</FONT></TH> <TH BGCOLOR=<% =strHeadCellColor %>><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Email Address</FONT></TH> </TR> <% On Error Resume Next RS.MoveFirst do while Not RS.eof %> <TR VALIGN=TOP> <td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input type="hidden" name="ID" value="<%=RS("MEMBER_ID")%>"><a href="pop_profile.asp?mode=display&id=<%=RS("MEMBER_ID")%>"><% =rs("M_NAME") %></a></FONT> </TD> <td bgcolor="<% =strForumCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><% =rs("M_EMAIL") %></FONT> </TD> </TR> <% RS.MoveNext loop%> </table> <% else %> <h4><i>This message will be sent all users.</i></h4> <input type="hidden" name="ID" value="*"><% end if %></form> <% else %> <h1>Unknown Action</h1> <p>You have specified an unknown action. Please try again.</p> <% response.end end if %><% set rsSP = nothing set rs = nothing %><!--#INCLUDE file="inc_footer.asp" -->
This is the code in de page. The page shows up fine, but there are buttons and searchs functions on the page. I don't want that, i just want it to show the table with the data. Nothing else. |
|
|
|
Topic |
|
|
|