Changeset 1410

Show
Ignore:
Timestamp:
03/10/07 11:34:17 (2 years ago)
Author:
jm3
Message:

now you can only view the email address of peeps who have YOU as a peep.
peep cannot hurt peep!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/modules/utils.inc.php

    r1403 r1410  
    1818        else 
    1919                return false; 
     20} 
     21 
     22function get_bot_link() { 
     23        return "aim:goim?screenname=cityoflinks"; 
    2024} 
    2125 
     
    28582862%> 
    28592863</table> 
    2860 <% 
     2864<?php 
    28612865      } else if( $argMode == "USERS" ) { 
    2862 %
    2863 found <%= $matchingLinks %> similar links by these users:<br /> 
     2866?
     2867found <?= $matchingLinks ?> similar links by these users:<br /> 
    28642868&#160;&#160; 
    2865 <% 
     2869<?php 
    28662870          for( $i = 0; $i < $matchingLinks && ($argMaxUrls ? $i < $argMaxUrls : 1); $i++ ) { 
    28672871            $id = mysql_result($q,$i,"ID" ); 
    2868 %
     2872?
    28692873<%= $i != 0 ? "," : "" %> 
    28702874      <%= makeUserLink( getOwnerForLink( $id )) %>'s <%= makePermaLink( $id ) %> 
    2871 <% 
     2875<?php 
    28722876          } 
    28732877          if( $matchingLinks > $argMaxUrls ) 
     
    28752879            # FIXME: not working: (<a href=\"/urls-like?id=$id\">show all similar</a>)"; 
    28762880 
    2877 %> 
    2878 <% 
    28792881        conClose( $con ); 
    28802882      } else if( $argMode == "COUNT" ) { 
     
    30783080  $f = get_thumbnail_image( $u ); 
    30793081  if( $f ) { 
    3080 %
    3081   <img src="<%= $f %>" width="<%= $pxl_size %>" class="profileImage" alt="" border="0" > 
    3082 <% 
     3082?
     3083  <img src="<%= $f %>" width="<?= $pxl_size ?>" class="profileImage" alt="" border="0" > 
     3084<?php 
    30833085  } else { 
    3084 %
    3085   <img src="/img/new-user/thumb" height="<%= $pxl_size %>" class="profileImage" alt="" border="0" > 
    3086 <% 
     3086?
     3087  <img src="/img/new-user/thumb" height="<?= $pxl_size ?>" class="profileImage" alt="" border="0" > 
     3088<?php 
    30873089  } 
    30883090  $ret = ob_get_clean(); 
     
    32863288                                        $lines = get_file_safe( $linkfile ); 
    32873289 
    3288   %
     3290  ?
    32893291  <h4> <a href="/comments">Comments</a>: </h4> 
    3290   <% 
     3292  <?php 
    32913293  #<p> 
    32923294  #(comments by link owner have a dark border,<br /> 
     
    33683370function addUser( $argUserId, $argEmail, $argPassword, $argName, $argPostCode, $argIM, $argIMType, $argPostCode, $argIM, $argIMType ) { 
    33693371 
     3372        # FIXME: we manhandled this pretty badly 
     3373 
    33703374  # check to see if weve seen any new accounts from this IP recently 
    33713375  $ip = get_ip(); 
     3376 
     3377  l( "new_user: $argUserId, $argEmail" ); 
     3378 
    33723379  $q = run_query( getQuery( "multiple_accounts_from_this_ip", $ip )); 
    33733380  $num_rows = mysql_num_rows($q); 
    33743381  if( $num_rows > 1 ) { 
    33753382    #disabled because it got too noisy: 
    3376     #fire( "Possible spammer-birth in progress!", "Multiple accounts being requested from the same IP ($ip) -- user: http://feedmelinks.com/u/$argUserId, $argEmail" ); 
    33773383    log_mesg_to( "$ip: potential spammer $argUserId ($argEmail) creating multiple accounts from the same IP", "security" ); 
    33783384    $q = run_query( getQuery( "log_ip", $argUserId, $argEmail, $ip )); 
     
    33923398  $im_type   = urlencode( $argIMType ); 
    33933399 
    3394   $qs = "INSERT INTO users VALUES(NULL,'$userId','$email', '$password', '$name','', 2, 1, NULL, now(), now(), NULL, NULL, NULL );"; 
     3400  $qs = "INSERT INTO users VALUES(NULL,'$userId','$email', '$password', '$name','', 2, 1, NULL, now(), now(), NULL, NULL, NULL, NULL );"; 
    33953401 
    33963402  l( "new_user: $argUserId, $argEmail" ); 
     
    34653471<div class="notice"> 
    34663472<b>Notice.</b> 
    3467 <%= $mesg %
     3473<?= $mesg ?
    34683474</div> 
    34693475 
    3470 <% 
     3476<?php 
    34713477  } 
    34723478} 
     
    37343740} 
    37353741 
    3736 function get_mail_headers() { 
     3742function get_mail_headers( $from_user ) { 
    37373743  $headers = ""; 
    3738   $headers .= "From: Feed Me Links <do-not-reply@" . get_domain() . ">\n"; 
     3744  $headers .= "From: " . ( $from_user ? $from_user . " <" . getEmailAddressForUser( $from_user ) . ">" : "Feed Me Links <do-not-reply@" . get_domain()) . ">\n"; 
    37393745  $headers .= "X-Mailer: feedmelinks-mailer-daemon\n"; 
    37403746  return $headers; 
  • feedmelinks/users.php

    r1376 r1410  
    8181<% 
    8282                        $id   = mysql_result($q,$i,"ID"); 
    83                         $email = urldecode( mysql_result($q,$i,"email")); 
     83                        if( has_me_as_a_peep( $userId, $u )) 
     84                                $email = urldecode( mysql_result($q,$i,"email")); 
    8485 
    8586                        $qs2 = getQuery( "links_per_user", $userId ); 
     
    9596 
    9697        <h1> 
    97                 <%= encodeAddress( $email, $userId ) %> 
     98                <%= $email ? encodeAddress( $email, $userId ) : $userId %> 
    9899                <small><small><%= get_verbose_contact_link( $userId ) %></small></small> 
    99100        </h1> 
     
    102103                <a href="/u/<%= $userId %>/<%= getCatsName() %>"><%= getCatsName() %></a> 
    103104        </h3> 
    104          
    105105 
    106106        <%