예제 #1
0
function signoutChoice()
{
    $var_schoolState = schoolState(strtotime('now'));
    //$var_schoolState =  'lunch';
    if ($var_schoolState == 'no school') {
        return 0;
    } elseif ($var_schoolState == 'lunch' && $_SESSION['cakeNum'] > 0 && $_SESSION['prefectNum'] > 0) {
        return 'choice';
    } elseif ($var_schoolState == 'lunch' && $_SESSION['prefectNum'] > 0) {
        return 'prefectNum';
    } elseif ($var_schoolState == 'school day' && $_SESSION['cakeNum'] > 0) {
        return 'cakeNum';
    }
}
예제 #2
0
<?php

include_once 'auth.php';
authDirect('/function/nosignout.php');
if (schoolState(strtotime('now')) == 'no school') {
    $msg = "No school! Unable to sign out.";
} else {
    $msg = "You don't have enough signouts to leave school at this time.";
}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="../img/favicon.ico">

    <title>Hockerill Sign Out system</title>

    <!-- Bootstrap core CSS -->
    <link href="/css/bootstrap.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/css/main.css" rel="stylesheet">

  </head>

  <body>
  <img class="center-block" src="/img/logo.png" height="125" width="125">