echo 'Gender: <br> <input type="radio" name="gender" value="m" ' . ($user_gender == "m" ? 'checked="checked"' : '') . '> Male<br> <input type="radio" name="gender" value="f" ' . ($user_gender == "f" ? 'checked="checked"' : '') . '> Female<br>'; echo 'Preference: <br>'; echo '<input type="checkbox" name="interestedInMen" value="m" ' . (strpos($user_preference, 'm') === FALSE ? '' : 'checked') . '> Men</checkbox><br>'; echo '<input type="checkbox" name="interestedInWomen" value="f" ' . (strpos($user_preference, 'f') === FALSE ? '' : 'checked') . '> Women</checkbox><br>'; echo "{$errmsg}<br>"; ?> <input type="submit" class="btn btn-default" value="Edit" action="editUserProfile.php" name="editUserProfile"> <input type="button" class="btn btn-default" value="Return to profile" onclick="backToProfile();"> </form> <?php /* Print photos */ echo "<h1>Edit Photos</h1>"; $result = query_images($user_userid); for ($i = 0; $i < 3; $i++) { echo "<p><img src=\"" . $result[$i] . "\" width=100></img></p>"; echo '<form method="POST" class="form-inline">'; echo '<input type="text" class="form-control" name="img" size="80" value=' . $result[$i] . '>'; echo '<input type="hidden" name="imgindex" value="' . $i . '"">'; echo '<input type="submit" class="btn btn-default" value="Edit" action="editUserProfile.php" name="editUserImage">'; echo '<input type="submit" class="btn btn-default" value="Delete" action="editUserProfile.php" name="deleteUserImage"><br>'; echo '</form>'; } echo "</ul>"; echo "{$picErrmsg}<br>"; ?> <h1>Delete Account</h1>
if ($i % 3 == 0) { if ($i != 0) { echo "</div>"; } echo "<div class='container jumbotron'>"; } 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>";
if (array_key_exists('not', $_POST)) { insert_match($user_userid, $_POST['matchwith'], 'f'); } } /* Get all users this user has yet to try matching with */ $result = query_getPremiumUnmatchedusers($user_userid); /* Grab the first one */ $unmatchedUser = $result['unmatchedUsers'][0]; 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 '