} echo "<div class='col-xs-4'>"; /* Display the match's name */ $receiverUser = query_getNameFromId($matchId); echo "<h2>{$receiverUser}</h2>"; /* Display the user's location */ $locationResult = query_userInformationWithUserID($matchId); $location = $locationResult['location']; echo "<h4>{$location}</h4>"; /* Display the match's first photo */ $images = query_images($matchId); if ($images[0]) { echo "<p><img src=\"" . $images[0] . "\" width=75></img></p>"; } /* Display the common interests between two users */ $commonInterestResult = query_getCommonInterests($id, $matchId); $commonInterests = $commonInterestResult['commonInterests']; if (!isset($commonInterests)) { echo "<h4>Find something in common through messaging!</h4></br>"; } else { echo "<h4>Common Interests: </h4><br>"; foreach ($commonInterests as $commonInterest) { echo "{$commonInterest}<br>"; } } echo "<br>"; /* Display convo */ $convo = query_getConversation($user_userid, $matchId); foreach ($convo as $msg) { echo "<b>" . ($msg[sender] == $user_userid ? $user_name : $receiverUser) . "</b>: "; echo "{$msg['message']}<br>";
if ($unmatchedUser) { /* If unmatchedUser exists, display their profile */ /* Get their profile information */ $result = query_userInformationWithUserID($unmatchedUser); $name = $result['name']; $age = $result['age']; /* Get this user's images */ $result = query_images($unmatchedUser); echo "<h1>{$name} </h1>"; echo "<p>Age: {$age} <b></b></p>"; /* Display the images */ foreach ($result as $img) { echo "<p><img src=\"" . $img . "\" width=150></img></p>"; } /* Get common interests */ $result = query_getCommonInterests($user_userid, $unmatchedUser); /* Display the interests */ echo "<b>Common Interests</b><br>"; foreach ($result['commonInterests'] as $commonint) { echo "{$commonint}<br>"; } /* Display HOT/NOT buttons */ echo ' <p> <form method="POST" action="supermatch.php"> <input type="hidden" value=' . $unmatchedUser . ' name="matchwith"> <input type="submit" value="HOT" name="hot"> <input type="submit" value="NOT" name="not"> </form></p> '; } else {