예제 #1
0
<?php

require_once 'function.php';
verificaLogin();
$username = $_SESSION['user'];
checkHeader('id');
$id = mysql_real_escape_string($_GET['id']);
$org = getOrganizacao($id);
if ($org == NULL) {
    header('Location: 404.php');
    exit;
}
?>
<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<title>CRM-Aiesec</title>
	
	<!-- Stylesheets -->
	<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet'>
	<link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
	
	<!-- Optimize for mobile devices -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	
	<!-- jQuery & JS files -->
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
function checkHeader($header)
{
    if (array_key_exists($header, $_SERVER)) {
        echo $header . " is present. Its value is: " . $_SERVER[$header] . "<br>";
        return true;
    }
    return false;
}
if ($_GET["content"] == "true") {
    echo "headers CONTENT_TYPE and CONTENT_LENGTH should be present.<br>";
} else {
    echo "headers CONTENT_TYPE and CONTENT_LENGTH should not be present.<br>";
}
$content_type = checkHeader("CONTENT_TYPE");
$content_length = checkHeader("CONTENT_LENGTH");
if (!$content_type && !$content_length) {
    echo "headers CONTENT_TYPE and CONTENT_LENGTH are not present.<br>";
}
echo "<br>";
if ($_GET["content"] == "true") {
    echo "POST data should be present.<br>";
} else {
    echo "no POST data should be present.<br>";
}
if (sizeof($_POST) > 0 || sizeof($_FILES) > 0) {
    echo "POST data is present.<br>";
} else {
    echo "no POST data is present.<br>";
}
echo "<script>if (window.layoutTestController) layoutTestController.notifyDone();</script>";