|
Number of Jobs Posted |
( )
|
|
(For Individuals) |
(For Businesses) |
|
";
echo " | ";
echo "";
echo "";
echo "".fieldError()." | ";
echo " ";
echo " | ";
echo " ";
echo " ";
}
?>
|
|
Currently posted
|
|
$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 user_type,
project_id,
photo_1,
title,
description,
active
FROM projects
WHERE user_id = '$user_id'
AND active > 0";
$res = mysqli_query($mysqli, $sql);
if ($res)
{
if (mysqli_num_rows($res) > 0)
{
$project_number = 1;
while($row = mysqli_fetch_array($res))
{
$user_type = $row['user_type' ];
$project_id = $row['project_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;
case 3 : $status = "Completed"; break;
default : $status = "Error";
}
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
//echo "User Type: $user_type";
if ($user_type == 2)
{
echo " | ";
}
else
{
echo " | ";
}
echo "$title ";
echo "$description | ";
echo "Status: $status | ";
echo " ";
echo "";
echo " | ";
echo "";
echo "";
if ($user_type == 2)
{
echo " | ";
echo " | ";
}
else
{
echo " | ";
echo " | ";
}
echo " ";
echo " | ";
echo " ";
echo " | ";
echo " ";
$project_number++;
}
}
mysqli_free_result($res);
}
}
mysqli_close($mysqli);
?>
|