示例#1
0
<?php

session_start();
require 'connection.php';
$conn = new createConnection();
$conn->connectToDatabase();
$conn->selectDatabase();
$employerId = 2;
//This is the directory where images will be saved
$target = "images/logos/";
$target = $target . basename($_FILES['companyLogo']['name']);
$pic = $_FILES['companyLogo']['name'];
$sql = "UPDATE employer_agent_company SET FirstName = '{$_POST['fname']}', LastName = '{$_POST['lname']}', Address = '{$_POST['address']}', Company_Agent_Logo = '{$pic}', MobilePhone = '{$_POST['mobPhone']}', WorkPhone = '{$_POST['workPhone']}', EmailForApplication = '{$_POST['email']}', Company_Agent_URL = '{$_POST['companyUrl']}', EMPLOYER_TYPE_ID = '{$_POST['empType']}', AGENT_COMPANY_NAME = '{$_POST['agentComName']}' WHERE EMPLOYER_ID = {$employerId}";
var_dump($sql);
$res = $conn->queryDatabase($sql);
if ($res === TRUE) {
    echo "Congratulation on successfully updated profile.";
} else {
    echo "Could Not update your profile, please try again.";
}
//Writes the photo to the server
if (move_uploaded_file($_FILES['companyLogo']['tmp_name'], $target)) {
    //Tells you if its all ok
    echo "The file " . basename($_FILES['companyLogo']['name']) . " has been uploaded, and your information has been added to the directory";
} else {
    //Gives and error if its not
    echo "Sorry, there was a problem uploading your file.";
}
$conn->closeConnection();
示例#2
0
<?php 
if (!empty($_GET['message'])) {
    $message = $_GET['message'];
    echo $message;
}
?>
<table border="2px">
<tr><th>Job Title</th><th>Job Description</th><th>Work Type</th><th>Location</th><th>Category</th><th>Date of Advertisement</th><th>End date of advertisement</th><th>Experience Level</th><th>Edit Job Option</th></tr>
<?php 
$conn = new createConnection();
$conn->connectToDatabase();
$conn->selectDatabase();
$employerId = 2;
$sql = "SELECT * from job where EMPLOYER_ID = {$employerId}";
var_dump($sql);
$res = $conn->queryDatabase($sql);
if ($res) {
    $num_rows = mysqli_num_rows($res);
    for ($i = 0; $i < $num_rows; $i++) {
        $row = mysqli_fetch_array($res);
        $jobId = $row['JobID'];
        $jobTitle = $row['JobTitle'];
        $jobDesc = $row['JobDescription'];
        $workType = $row['WorkTypeID'];
        $district = $row['DistrictID'];
        $subCategory = $row['SubCategoryID'];
        $dateAdStart = $row['DateOfAdvertisement'];
        $dateAdEnd = $row['EndDateOfAdvertisement'];
        $experience = $row['ExperienceLevel'];
        $res1 = $conn->queryDatabase("SELECT WorkType from work_type where WorkTypeID = {$workType}");
        $workRow = $res1->fetch_assoc();
</p></td></tr>

<tr><td><p><label for="companyUrl">Company/Agent URL:</label></td>
<td><input name="companyUrl" type="text" id="companyUrl" class="grayField" value="<?php 
echo $companyUrl;
?>
" /></p></td></tr>

<tr><td><p><label for="empType"> <span id="astrick">*</span> Employer Type:</label></td>

<td><?php 
$conn1 = new createConnection();
// created a new object
$conn1->connectToDatabase();
$conn1->selectDatabase();
$result = $conn1->queryDatabase("select EMPLOYER_TYPEID, EMPLOYER_TYPE_DESCRIPTION from employer_type");
printf("Select returned %d rows.\n", $result->num_rows);
?>
<select id="empType" name="empType" class="grayField" value="<?php 
echo $employerType;
?>
" >
     <option value="">Select employer type</option>  
    <?php 
// echo "$result->EMPLOYER_TYPEID";
//echo "$result->EMPLOYER_TYPE_DESCRIPTION";
while ($row = $result->fetch_assoc()) {
    unset($EMPLOYER_TYPEID, $EMPLOYER_TYPE_DESCRIPTION);
    $id = $row['EMPLOYER_TYPEID'];
    $desc = $row['EMPLOYER_TYPE_DESCRIPTION'];
    echo '<option value="' . $id . '" name="' . $id . '">' . $desc . '</option>';
示例#4
0
}
$conn1->closeConnection();
?>
</select>
                  <select id="district" name="district">
                  <option value="">Please select district</option>
                  </select></p></td></tr>    
                  
<tr><td><p><label for="category"> <span id="astrick">*</span> Which Category:</label></td>

<td><?php 
$conn1 = new createConnection();
// created a new object
$conn1->connectToDatabase();
$conn1->selectDatabase();
$result = $conn1->queryDatabase("select CategoryID, CategoryName from job_category");
// printf("Select returned %d rows.\n", $result->num_rows);
?>
<select id="category" name="category" <?php 
if (isset($missing)) {
    echo 'value="' . htmlentities($_POST['category']) . '"';
}
?>
 >
     <option value="">Select Category</option>  
    <?php 
while ($row = $result->fetch_assoc()) {
    unset($CategoryID, $CategoryName);
    $id = $row['CategoryID'];
    $desc = $row['CategoryName'];
    echo '<option value="' . $row['CategoryID'] . '" name="' . $row['CategoryID'] . '">' . $row['CategoryName'] . '</option>';
echo $seeker_email;
?>
">

	<input type="submit" value="SEND" name="submit" />
	</form>

	<br /><br />

<?php 
$conn = new createConnection();
$conn->connectToDatabase();
$conn->selectDatabase();
$sql = "SELECT SeekerID from seeker_appliedjobs where JobID = {$JodID}";
var_dump($sql);
$result = $conn->queryDatabase($sql);
$num = mysql_numrows($result);
$seeker_idx = 1;
if ($num) {
    echo "<table>";
    echo "<tr>";
    echo "<th>Index</th>";
    echo "<td>Name</td>";
    echo "<td>Email</td>";
    echo "<td>View Detail</td>";
    echo "<td>View Resume</td>";
    echo "<td>Conact</td>";
    echo "</tr>";
    while ($row = mysql_fetch_assoc($result)) {
        $SeekerID = $row["SeekerID"];
        $condition = "SeekerID = {$SeekerID} AND ( ";