Пример #1
0
 //We're using 'r' for compatibility purposes
 //Get the first user's info
 $r = $personInfo[0];
 $fname = $r["fname"];
 //First Name
 $lname = $r["lname"];
 //Last Name
 $profile_pic = $r["profile_pic"];
 //Profile picture
 $join_date = $r["join_date"];
 //Join Date
 $dob = $r["dob"];
 //Date of Birth
 $gender_index = $r["gender"];
 //Gender
 $gender = Lookup::Gender($gender_index);
 //Gender string
 $pronoun = Lookup::Pronoun($gender_index);
 //Pronoun to describe user's gender
 $lastlogin = $r["last_login"];
 //Last time they were logged in
 $lastseen = json_decode($r["last_location"], true);
 //Last location they logged in
 $privacy = json_decode($r["privacy"], true);
 //The privacy array
 $privacy = !$privacy ? array() : $privacy;
 //If a load parameter is specified and this is 'image'
 if (isset($_GET["load"]) && $_GET["load"] == "image") {
     //We're just going to print the user's image
     header("Content-type: image/jpg");
     //Set JPG image header
Пример #2
0
"/>
			<input type="text" id="user_dob"   name="dob"   class="datebox small_text uk-width-2-3" 	placeholder="Date of Birth"	value="<?php 
echo date("m/d/Y", $dob);
?>
 "/>

			<textarea id="user_bio" class="small_text uk-width-2-3" name="bio" placeholder="Enter a short bio here."><?php 
echo $bio;
?>
</textarea>

			<div class="uk-width-2-3 uk-align-center">
				<select id="user_gender" name="gender" class="chosen-select select small_text" data-placeholder="Gender"/>
					<option></option>
					<?php 
$gender_options = Lookup::Gender();
foreach ($gender_options as $gender_option) {
    ?>
							<option <?php 
    echo $gender_option["code"] == $gender_index ? "selected" : "";
    ?>
 ><?php 
    echo $gender_option["text"];
    ?>
</option>
					<?php 
}
?>
				</select>		
			</div>
			
Пример #3
0
$offers = $gotItem[0]['offers'];
$offers = json_decode($offers, true);
//Convert the status of the item to a number
$status = intval($gotItem[0]["status"]);
//Get info about the owner of the item
$authorUser = new User(array("action" => "get", "id" => $gotItem[0]["usr"]));
$userGet = $authorUser->run(true);
$profpic = $userGet[0]['profile_pic'];
//The owner's profile picture
$afname = $userGet[0]['fname'];
//The owner's first name
$alname = $userGet[0]['lname'];
//The owner's last name
$adob = $userGet[0]["dob"];
//The owner's date of birth
$agender = Lookup::Gender($userGet[0]["gender"]);
//The owner's gender
//Get other items in by this user
$other_itemReq = new Item(array("action" => "get", "filter" => array("usr" => $aid)));
$other_items = $other_itemReq->run();
//Get other items in this category
$sim_itemReq = new Item(array("action" => "get", "filter" => array("category" => $category)));
$sim_items = $sim_itemReq->run();
$user_items = array();
if (isset($_SESSION["userid"])) {
    //Get items available for offer
    $user_itemReq = new Item(array("action" => "get", "filter" => array("usr" => $_SESSION["userid"], "status" => "1")));
    $user_items = $user_itemReq->run();
}
//Store the owner's privacy settings in an array
$privacy = is_array(json_decode($userGet[0]["privacy"], true)) ? json_decode($userGet[0]["privacy"], true) : array();