0){ //then give a user back their slot $sql = "update users_purchased_slots set NUMBER_LEFT = NUMBER_LEFT + 1, NUMBER_USED = NUMBER_USED - 1 where USER_ID = '$selfID' limit 1 "; $result = mysql_query($sql) or die(mysql_error()); //get the user's prem date $sqlNW = "select * from users where ID = '$selfID' "; $resultNW = MySQL($dbName,$sqlNW) or die(mysql_error()); if($myrowNW=MySQL_fetch_array($resultNW)){ $self_Prem_Date = $myrowNW['Prem_Date']; } //now see if we can add someone else to the available slot $nbrFriendsSlotted = 0; $sqlNW = "select * from privacy, users where (privacy.user_id = '$selfID') and (privacy.deleted = '0') and (users.ID = privacy.friend_id) and (MASTER_ACCOUNT <> '$selfID') order by privacy.txn_ts"; $resultNW = MySQL($dbName,$sqlNW) or die(mysql_error()); while($myrowNW=MySQL_fetch_array($resultNW)){ $friend_id = $myrowNW['friend_id']; $friend_Prem_Ind = $myrowNW['Prem_Ind']; $friend_Prem_Date = $myrowNW['Prem_Date']; $MASTER_ACCOUNT = $myrowNW['MASTER_ACCOUNT']; //if they are under someone else's master account, get that person's premium date if($MASTER_ACCOUNT > 0){ $sqlNW = "select * from users where ID = '$MASTER_ACCOUNT' "; $resultNW = MySQL($dbName,$sqlNW) or die(mysql_error()); if($myrowNW=MySQL_fetch_array($resultNW)){ $master_Prem_Date = $myrowNW['Prem_Date']; if($friend_Prem_Date < $master_Prem_Date){ $friend_Prem_Date = $master_Prem_Date; } } } //see if this friend should go under the user's account - //should if friend: is not a premium, is a premium but prem date < this user's prem date, biggybacked w/ someone else but their prem date < this user's prem date if ( ($friend_Prem_Ind <> 'Y') or ($friend_Prem_Date < $self_Prem_Date) ){ if($nbrFriendsSlotted == 0){ $sql = "update users set Prem_Ind = 'Y', MASTER_ACCOUNT = '$selfID' where ID = '$friend_id' limit 1 "; $result = mysql_query($sql) or die(mysql_error()); //now decrement the invitees slots $sql = "update users_purchased_slots set NUMBER_LEFT = NUMBER_LEFT - 1, NUMBER_USED = NUMBER_USED + 1 where USER_ID = '$selfID' limit 1"; $result = mysql_query($sql) or die(mysql_error()); } $nbrFriendsSlotted++; } } //end of look for someone to take the slot }//end of see if we freed up a slot } //end of remove someone ?> YadaHome | Sharing Center
yada home
my fridge
   
   

Overstock.com, Inc.

My Privacy Settings   My Family    
my family



  " ") { ?> " class="profileLinks">" alt="avatar" class="friendImage" /> " class="profileLinks">avatar
" "){?> Birthday:
" "){?> Gender:
" " && $myrow["State_Reside"] > " "){?> Location: , " " && $myrow["State_Reside"] < " "){?> Location: " "){?> Location:
" class="profileLinks">View Profile
" class="profileLinks">Send a Message
from your network?')" href="networkFriendsNew.php?fid=&remove=y" class="profileLinks">Remove
       


1-800-FLOWERS.COM

  More Friends    
   

free profile