0) { echo ""; echo "Please complete the following prior to posting a skill:
"; if (isset($errors["account_incomplete"])) { echo $errors["account_incomplete"]."
"; } if (isset($errors["profile_incomplete"])) { echo $errors["profile_incomplete"]."
"; } echo ""; } unset($_SESSION["errors"]); } if (!isset($_SESSION["id"])) { $_SESSION["error"] = "The action requested is not allowed. Please log in or sign up."; header("Location: Login.html"); exit(); } $mysqli = mysqli_connect("localhost", "skillini_Ann", "bbalsk94544", "skillini_hatcreek"); if (mysqli_connect_errno()) { echo "Your request cannot be processed at this time. Please try again later."; exit(); } else { $user_id = $_SESSION["id"]; $sql = "SELECT Count(*) FROM skills WHERE user_id = '$user_id' AND active = 1"; $res = mysqli_query($mysqli, $sql); $row = mysqli_fetch_row($res); $num_skills = $row[0]; mysqli_free_result($res); } //mysqli_close($mysqli); ?> Account Info - My Skills
My Skills
 
$height) { $percentage = ($target / $width); } else { $percentage = ($target / $height); } //gets the new value and applies the percentage, then rounds the value $width = round($width * $percentage); $height = round($height * $percentage); //returns the new sizes in html image tag format...this is so you //can plug this function inside an image tag and just get the return "width=\"$width\" height=\"$height\""; } $mysqli = mysqli_connect("localhost", "skillini_Ann", "bbalsk94544", "skillini_hatcreek"); if (mysqli_connect_errno()) { echo "Your request cannot be processed at this time. Please try again later."; exit(); } else { $user_id = $_SESSION["id"]; $sql = "SELECT skill_id, photo_1, title, description, active FROM skills WHERE user_id = '$user_id' AND active > 0"; $res = mysqli_query($mysqli, $sql); if ($res) { if (mysqli_num_rows($res) > 0) { $skill_number = 1; while($row = mysqli_fetch_array($res)) { $skill_id = $row['skill_id' ]; $photo = $row['photo_1' ]; $title = $row['title' ]; $description = $row['description']; $status = $row['active' ]; if (isset($photo)) { $mysock = getimagesize("uploads/$photo"); $image_size = imageResize($mysock[0], $mysock[1], 75); } $max_string = 125; if (strlen($description) > $max_string) { $description = substr($description, 0, $max_string)."..."; } switch ($status) { case 1 : $status = "Active"; break; case 2 : $status = "On Hold"; break; default : $status = "Error"; } echo ""; echo ""; echo ""; $skill_number++; } } mysqli_free_result($res); } } mysqli_close($mysqli); ?>
Account Info
Public Profile
Skills Posted
Jobs Posted
Testimonials
Messages
"; echo ""; echo ""; echo "
Posted Skills

Number of Skills for Sale
( )

"; echo "
"; echo ""; echo ""; echo ""; echo "
".fieldError()."
"; } ?>
Currently Posted
 
"; echo ""; echo ""; echo ""; echo ""; echo "
"; echo ""; echo ""; echo ""; } echo ""; echo ""; echo ""; echo ""; echo "
"; if (isset($photo)) { echo "\"\"/$title
"; echo "$description
Status: $status
"; echo ""; echo ""; echo ""; echo ""; echo "