Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!-- Authored by Iu-Wei Sze and Ashley Dumaine -->
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Profile</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('div.toshow').fadeIn(20);
// OR $('div.toshow').show(2200);
//$('div.toshow').slideDown("slow");
});
</script>
<style type="text/css">
* { margin: 0; padding: 0; }
body { font: 16px Helvetica, Sans-Serif; line-height: 24px; background: url(images/noise.jpg); }
.clear { clear: both; }
#page-wrap { width: 800px; margin: 40px auto 60px; }
#pic { float: right; margin: -30px 0 0 0; }
h1 { margin: 0 0 16px 0; padding: 0 0 16px 0; font-size: 42px; font-weight: bold; letter-spacing: -2px; border-bottom: 1px solid #999; }
h2 { font-size: 20px; margin: 0 0 6px 0; position: relative; }
h2 span { position: absolute; bottom: 0; right: 0; font-style: italic; font-family: Georgia, Serif; font-size: 16px; color: #999; font-weight: normal; }
p { margin: 0 0 16px 0; }
a { color: #999; text-decoration: none; border-bottom: 1px dotted #999; }
a:hover { border-bottom-style: solid; color: black; }
ul { margin: 0 0 32px 17px; }
#objective { width: 500px; float: left; }
#objective p { font-family: Georgia, Serif; font-style: italic; color: #666; }
dt { font-style: italic; font-weight: bold; font-size: 18px; text-align: right; padding: 0 26px 0 0; width: 150px; float: left; height: 100px; border-right: 1px solid #999; }
dd { width: 600px; float: right; }
dd.clear { float: none; margin: 0; height: 15px; }
</style>
<link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel="stylesheet">
<link rel="stylesheet" href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css">
<link rel="stylesheet" href="seeker_formatting.css">
</head>
<body>
<div class="nav">
<div class="container">
<ul class="pull-left">
<!-- <li><a href=<img><></li> -->
<li><a href="http://localhost/UConnJobSearch/index.php">UConnJobSearch</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/about.php">About</a></li>
</ul>
<ul class="pull-right">
<?php if ($_SESSION): ?>
<?php if ($_SESSION['type'] == "Admin"): ?>
<li><a href="http://localhost/UConnJobSearch/admin_dashboard.php">Dashboard</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/admin.php">My Account</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/logout.php">Log Out</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/faq.php">Help</a></li>
<?php elseif ($_SESSION['type'] == "Poster"): ?>
<li><a href="http://localhost/UConnJobSearch/posterDashboard.php">Dashboard</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/poster.php">My Account</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/logout.php">Log Out</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/faq.php">Help</a></li>
<?php elseif ($_SESSION['type'] == "Seeker"): ?>
<li><a href="http://localhost/UConnJobSearch/dashboard.php">Dashboard</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/seeker.php">My Account</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/logout.php">Log Out</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/faq.php">Help</a></li>
<?php endif; ?> <!-- not logged in -->
<?php else: header("location:error.php"); ?>
<li><a href="http://localhost/UConnJobSearch/register.php">Register</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/login.php">Log In</a></li>
<li>|</li>
<li><a href="http://localhost/UConnJobSearch/faq.php">Help</a></li>
<?php endif; ?>
</ul>
</div>
</div>
<div class="jumbotron">
<div class="container">
<h1>My Profile</h1>
</div>
</div>
<div class="toshow" style="display:none;">
<form name="form1" method="post" action="getProfileData.php">
<a href="http://localhost/UConnJobSearch/editMyAccount.php" style="margin-left: 200px">Edit Account</a><br><br>
<a href="http://localhost/UConnJobSearch/editMyProfile.php" style="margin-left: 200px">Edit Profile</a><br><br>
<a href="http://localhost/UConnJobSearch/resume.php" style="margin-left: 200px">Add Resume</a>
<div id="page-wrap">
<img src="images/cthulu.png" alt="Photo of Cthulu" id="pic" />
<div id="contact-info" class="vcard">
<!-- Microformats! -->
<?php
if(session_status() == PHP_SESSION_NONE)
session_start();
$conn = mysqli_connect("localhost", "root", "", "databasesproject") or die(mysql_error()); //-- This might be an easier way to
//-- connect to the database if you want to use it; it's also not deprecated, so it shouldn't give the same warnings
$UName = $_SESSION['myusername'];
$sql= "SELECT * FROM resume WHERE UName= '" . $UName . "'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($result);
unset($row['RFile']);
for($x = 0; $x < 5; $x++){
unset($row[$x]);
}
$conn = mysqli_connect("localhost", "root", "", "databasesproject") or die(mysql_error());
$UName = $_SESSION['myusername'];
$sql2= "SELECT * FROM user WHERE UName= '" . $UName . "'";
$result2 = mysqli_query($conn, $sql2);
$row2 = mysqli_fetch_array($result2);
unset($row2['RFile']);
for($x = 0; $x < 5; $x++){
unset($row2[$x]);
}
?>
<h1 class="fn"><?php print_r($row2['UFName']); echo " "; print_r($row2['ULName']); ?></h1>
<p>
<?php
//echo "<pre>"; //-- Now, an array from print_r will be in human readable format
echo "Username: ";
echo $UName."<br>";
echo "Objective: ";
print_r($row['RObjective']);
echo "<br>";
echo "Minimum Salary: ";
print_r($row['RSalaryMin']);
echo"<br>";
//the next three lines prints the contents of the array so you can check it to find the label of the column
//echo "<pre>"; //-- Now, an array from print_r will be in human readable format
//print_r($row);
//echo "</pre>";
$_SESSION['fu'] = $row;
?>
</p>
</div>
<div id="objective">
<p>
<?php
$conn = mysql_connect("localhost","root","");
$tbl_name="user";mysql_select_db("databasesproject",$conn)or die("cannot select DB");
$UName = $_SESSION['myusername'];
$sql="SELECT RObjective FROM resume WHERE UName= $UName";
$result=mysql_query($sql);
echo $result; ?>
</p>
</div>
<div class="clear"></div>
<dl>
<dd class="clear"></dd>
<dt>Contact Info</dt>
<dd>
<p>
<strong>Street Address 1: </strong>
<?php
$conn = mysqli_connect("localhost", "root", "", "databasesproject") or die(mysql_error());
$UName = $_SESSION['myusername'];
$sql= "SELECT * FROM user WHERE UName= '" . $UName . "'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($result);
unset($row['RFile']);
for($x = 0; $x < 5; $x++){
unset($row[$x]);
}
$stateID = $row['StateID'];
$sql2= "SELECT * FROM state WHERE StateID= '" . $stateID . "'";
$result2 = mysqli_query($conn, $sql2);
$row2 = mysqli_fetch_array($result2);
unset($row2['RFile']);
for($x = 0; $x < 5; $x++){
unset($row2[$x]);
}
print_r($row['UStreet1']);
echo "<br>";
echo"<strong>Street Address 2: </strong>";
print_r($row['UStreet2']);
echo"<br /> <strong>City: </strong>";
print_r($row['UCity']);
echo"<br/><strong>State: </strong>";
print_r($row2['StateName']);
echo"<br /><strong>Zip: </strong>";
print_r($row['Zipcode']);
echo"<br /><strong>Phone: </strong>";
print_r($row['UPhone']);
echo"<br /><strong>Cellphone: </strong>";
print_r($row['UCell']);
echo"<br /><strong>Fax: </strong>";
print_r($row['UFax']);
echo"<br /><strong>Homepage: </strong>";
print_r($row['UHomePage']);
echo"<br /><strong>Email: </strong>";
print_r($row['UEmail']);
?>
</p>
</dd>
<dd class="clear"></dd>
<?php
$sql3= "SELECT * FROM resume WHERE UName= '" . $UName . "'";
$result3 = mysqli_query($conn, $sql3);
$row3 = mysqli_fetch_array($result3);
unset($row3['RFile']);
for($x = 0; $x < 5; $x++){
unset($row3[$x]);
}
$resumeid = $row3['ResumeID'];
#education
$sql4= "SELECT * FROM education WHERE ResumeID= '" . $resumeid . "'";
$result4 = mysqli_query($conn, $sql4);
$row4 = mysqli_fetch_array($result4);
unset($row4['RFile']);
for($x = 0; $x < 5; $x++){
unset($row4[$x]);
}
#degree area
$degreeareaid = $row4['DegreeAreaID'];
$sql6= "SELECT * FROM degreearea WHERE DegreeAreaID= '" . $degreeareaid . "'";
$result6 = mysqli_query($conn, $sql6);
$row6 = mysqli_fetch_array($result6);
unset($row6['RFile']);
for($x = 0; $x < 5; $x++){
unset($row6[$x]);
}
#degree type
$degreetypeid = $row4['DegreeTypeID'];
$sql7= "SELECT * FROM degreetype WHERE DegreeTypeID= '" . $degreetypeid . "'";
$result7 = mysqli_query($conn, $sql7);
$row7 = mysqli_fetch_array($result7);
unset($row7['RFile']);
for($x = 0; $x < 5; $x++){
unset($row7[$x]);
}
$euniveristyid = $row4['EUniversityID'];
#university name
$sql5= "SELECT * FROM university WHERE UniversityID= '" . $euniveristyid . "'";
$result5 = mysqli_query($conn, $sql5);
$row5 = mysqli_fetch_array($result5);
unset($row5['RFile']);
for($x = 0; $x < 5; $x++){
unset($row5[$x]);
}
#not working, how to grab all skills and not just one???? *********************
#skillset
$sql8= "SELECT * FROM skillset WHERE ResumeID= '" . $resumeid . "'";
$result8 = mysqli_query($conn, $sql8);
$row8 = mysqli_fetch_array($result8);
unset($row8['RFile']);
for($x = 0; $x < 5; $x++){
unset($row8[$x]);
}
#skill names
$skillid = $row8['SSkillID'];
$sql9= "SELECT * FROM skill WHERE SSkillID= '" . $skillid . "'";
$result9 = mysqli_query($conn, $sql9);
$row9 = mysqli_fetch_array($result9);
unset($row9['RFile']);
for($x = 0; $x < 5; $x++){
unset($row9[$x]);
}
?>
<dt>Education</dt>
<dd>
<h2><?php print_r($row5['UniversityName'])?></h2>
<p><strong>Degree:</strong> <?php print_r($row7['DegreeType'])?><br />
<strong>Major:</strong> <?php print_r($row6['DegreeArea'])?></p>
</dd>
<dd class="clear"></dd>
<dt>Skills</dt>
<dd>
<p><?php
print_r($row9['SSkillName']);
echo"</br>";
while($row8 = mysqli_fetch_array($result8))
{
$skillid = $row8['SSkillID'];
$sql9= "SELECT * FROM skill WHERE SSkillID= '" . $skillid . "'";
$result9 = mysqli_query($conn, $sql9);
$row9 = mysqli_fetch_array($result9);
print_r($row9['SSkillName']);
echo "</br>";
unset($row9['RFile']);
for($x = 0; $x < 5; $x++){
unset($row9[$x]);
}
}
#print_r($row9['SSkillName']);?></p>
</dd>
<dd class="clear"></dd>
<!--
<dt>Experience</dt>
<dd>
<h2>Doomsday Cult <span>Leader/Overlord - Baton Rogue, LA - 1926-2010</span></h2>
<ul>
<li>Inspired and won highest peasant death competition among servants</li>
<li>Helped coordinate managers to grow cult following</li>
<li>Provided untimely deaths to all who opposed</li>
</ul>
<h2>The Watering Hole <span>Bartender/Server - Milwaukee, WI - 2009</span></h2>
<ul>
<li>Worked on grass-roots promotional campaigns</li>
<li>Reduced theft and property damage percentages</li>
<li>Janitorial work, Laundry</li>
</ul>
</dd>
<dd class="clear"></dd>
<dt>Hobbies</dt>
<dd>World Domination, Deep Sea Diving, Murder Most Foul</dd>
<dd class="clear"></dd>
<dt>References</dt>
<dd>Available on request</dd>
<dd class="clear"></dd>-->
</dl>
<div class="clear"></div>
</div>
</form>
</div>
<div class="credits">
<footer> <!-- site wide footer -->
<nav>
<p><a href="http://localhost/UConnJobSearch/credits.php">Credits</a>
<a>|</a>
<a href="">Terms of Service</a>
<a>|</a>
<a herf="">Blog Index</a>
</p>
</nav>
<p>Copyright &#169 2015 UConn</p>
</footer>
</div>
</body>
</html>