コード例 #1
0
ファイル: form_action.php プロジェクト: ryankane/semrs
        case 3:
            // Pharmacist
            $user = "******";
            break;
    }
    header("location:interface/{$user}");
}
if ($_POST['action'] == "sendmessage") {
    if ($log->sendmessage($_POST['recipient'], $_POST['subject'], $_POST['message']) == true) {
        echo "Message Sent!";
    } else {
        echo "Failed to send message!";
    }
}
if ($_POST['action'] == "addvisit") {
    if ($log->addvisit($_POST['type'], $_POST['date'], $_POST['time'], $_POST['physician'], $_POST['patient'], $_POST['facility'], $_POST['notes']) == true) {
        echo "Appointment Added!";
    } else {
        echo "Failed to create appointment!";
    }
}
if ($_POST['action'] == "logout") {
    $log->logout();
    //echo "Redirecting...";
    //alertbox("Successfully logged out!", "index.php");
}
function alertbox($message, $origin_page)
{
    return '
	<script type="text/javascript">
	if ($message.length < 1) alert("' . $message . '");