예제 #1
0
$name6 = "";
if (!empty($_SESSION['login'])) {
    $name1 = "";
    $name2 = $_SESSION['login'];
    $name3 = "";
    $name4 = "";
    $name5 = "Logout";
    $name6 = "logout.php";
}
if (!empty($_POST['varname'])) {
    $var_value = $_POST['varname'];
    if ($_SESSION['type'] == 'student') {
        if ($control->appliedcheck($name2, $var_value) == true) {
            echo "<script>alert('You have already applied for this job')</script>";
        } else {
            $control->apply($var_value, $_SESSION['login']);
        }
    } else {
        if ($_SESSION['type'] == 'employee') {
            echo "<script>alert('Employee can not apply for job')</script>";
        } else {
            header('Location: Login.php');
        }
    }
}
?>
<html>
	<head>
		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<link href="css/Formstyle.css" rel="stylesheet" type="text/css" />
	</head>