in

Community Server

The platform that enables you to build rich, interactive communities

List user and contact info

Last post 09-14-2010 7:39 AM by raider_nation. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-30-2010 5:42 PM

    List user and contact info

    I need to be able to list the user and their contact info.  We are using that field to help track who got that user to join the pool.  I know the contact (and email) field are encrypted, so I can't view them directly via MS Access. 

      Therefore I am trying to right a page that would show the user and their contact info.  My coding is not that great so if anyone has any tips that would be great.  In the mean time I will plug away and see if I can get it to work.  Thanks

     

  • 08-30-2010 5:55 PM In reply to

    • drizzt09
    • Top 10 Contributor
    • Joined on 08-22-2009
    • Ontario Canada
    • Posts 399

    Re: List user and contact info

     I have wanted these type of deal for awhile but wasnt important enough to care...lol

    want so when they sign up they must supply first/last name too. which menas thoes fields would need to be in signup, DB and any admin screen that can alter(add/delete/suspend) or view the users details.

    Dont need other users to be able to tell who is who, but the admin should be able to

  • 09-07-2010 9:36 AM In reply to

    Re: List user and contact info

     I was able to code a page to display Username, Email and Contact information.  I am not sure if that would help you, if so let me know.  Are we allowed to post code in the forum?

    Thanks

  • 09-08-2010 3:26 AM In reply to

    • drizzt09
    • Top 10 Contributor
    • Joined on 08-22-2009
    • Ontario Canada
    • Posts 399

    Re: List user and contact info

     yes u can post code, just make sure smilies r off. Or you can zip the file(s) and post a link. but if it just a litle code that goes inside something just post here, Easiest way i find so there are no errors is the below format so we know your code, and where it gets inserted.
    example:

    Goes in name.asp

    <snip>

    line from original code

     your code

    your code

    your code

    line from original code

    <end snip>

  • 09-11-2010 2:15 AM In reply to

    Re: List user and contact info

    I made one for Username and Email..

    You can easily add Contact Info if you want...

    Copy to Notepad and call listallUsers.asp or whatever you want....

    ________________________________

    <%@ LANGUAGE="VBScript" %>
    <!-- #include file="includes/config.asp" -->
    <!-- #include file="includes/common.asp" -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <!-- #include file="includes/encryption.asp" -->
    <%    'Require login to access the page.
        call CheckAccess(false)

        'Open the database.
        call OpenDb() %>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <%    PageSubTitle = "User-Email List"
        call BuildPageHeader("", "") %>
    </head>
    <body>
    <!-- #include file="includes/header.asp" -->
    <!-- #include file="includes/menu.asp" -->
        <div id="contentSection">
        <table id="mainWrapper" border="0" cellpadding="0" cellspacing="0"><tr><td>
    <%    dim users
        users = GetUserList(true)

        'For the Administrator, build a user selection list and display email addresses.
        if IsAdmin() then %>
                <p>Personal information is for use by the Administrator and <em>will not</em> be shared with other players.</p>
                        <table class="main fixed" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align=left><strong>Username:</strong></td>
                                <td align=left><strong>Email address:</strong></td>
                            </tr>
                        <% dim sql, rs, i, name, email
                            for i = 0 to UBound(users)
                            sql = "SELECT EmailAddress FROM Users" _
                                   & " WHERE Username = '" & SqlEscape(users(i)) & "'"
                            set rs = DbConn.Execute(sql)
                            email = Decrypt(rs.Fields("EmailAddress").Value)
                           
                            do while not rs.EOF %>
                            <tr class="header topEdge bottomEdge">
                                <td><% = users(i) %></td>
                                <td><% = Server.HtmlEncode(email) %></td>
                            </tr>
                        <% rs.MoveNext
                        loop
                        Next%>
                         </table>
    <% end if %>
        </td></tr></table>
        </div>
    <!-- #include file="includes/footer.asp" -->
    </body>
    </html>

     

    ---------------------

     

    D>

  • 09-11-2010 7:26 AM In reply to

    • drizzt09
    • Top 10 Contributor
    • Joined on 08-22-2009
    • Ontario Canada
    • Posts 399

    Re: List user and contact info

    Username, email I have setup along with password fro signup. your code just lists the users and email right for quick access? As that would be kewl too, I want user,email,first,lastname and pass on signup, then this listing would be kewl ...but... first/last names columns would also need to be added to the DB.
  • 09-12-2010 7:03 PM In reply to

    Re: List user and contact info

     Yes, this is just a list so you can easily see the Users and Email Addresses.

    You want to Add First Name and Last Name to your User Info and Update all Pages to show, update and delete this info?

    I can help you do it, just need to know what you specifically want added and what pages you want the info reflected on, and be able to update.

  • 09-13-2010 3:00 AM In reply to

    • drizzt09
    • Top 10 Contributor
    • Joined on 08-22-2009
    • Ontario Canada
    • Posts 399

    Re: List user and contact info

     When a user signs up they have to fill in all below:

    1, Username

    2. First Name

    3. Last Name

    4. Email Address

    5. Password

    6. Confirm Password

    And submit

    For all users, on any page will only see Usernames of others

    For all users in their own "edit Profile" they can see their own info. (1st/last would be embedded like username)

    Admin in anything administrative(add user, delete user, view user account details, money management, would see all info but password)

     

    Hope that helps. Thanks

     

  • 09-14-2010 7:39 AM In reply to

    Re: List user and contact info

    Well, I am by no means a coding expert.  But I came up with the following:

     _______________

    <div id="contentSection">
    <table id="mainWrapper" border="0" cellpadding="0" cellspacing="0"><tr><td>
    <table class="main fixed" border="0" cellpadding="0" cellspacing="0">
    <% 'Open the database.
     call OpenDB()
     

    dim rs, strsql, field, dbcon

      set rs = server.createobject("adodb.recordset")
      strsql = "SELECT username, emailaddress, contactinformation FROM Users"
     rs.open strsql, Dbconn
     %>


    <TABLE BORDER="1" width="80%">

    <% rs.movefirst %> &nbsp;<TR>

    <% For Each Field In RS.Fields %>

    <TH>  

    <% If Field.Name <> "ID" Then
    response.write Field.name
    End If %> &nbsp;</TH>

    <% Next %>

    </TR>
    <% Do While Not RS.EOF %>
    <TR>

    <% For Each Field In RS.Fields %>

    <TD ALIGN=center>

    <%If IsNull(Field) Then
    Response.Write ""
    Else

     If Field.name = "username" then
     response.write field.value
     end if

    Response.Write decrypt(Field.Value)

    End If %> &nbsp;</TD>
    <% Next
    RS.MoveNext %>
    </TR>
    <% Loop %>
    </TABLE>
     </table>
     
    </div>
    </table>
    _____________________

Page 1 of 1 (9 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems