示例#1
0
while (true) {
    if (isset($_REQUEST['idfacolt' . $fac])) {
        $idfacolt[$fac] = $_REQUEST['idfacolt' . $fac];
    } else {
        break;
    }
    $url_params .= '&idfacolt' . $fac . '=' . $idfacolt[$fac];
    $fac = chr(ord($fac) + 1);
}
if (isset($_REQUEST['data'])) {
    $data = $_REQUEST['data'];
} else {
    $data = 'oggi';
}
// create jenti request unibg object
$request = new AuleRequestUnibg($config);
// get day user wants to visualize
$result = $request->get_classroom_free_hours($file_name, $db, $idfacolt, $data);
?>
<html>
	<head>
        <title>AULELIBERE 1.0 - INGEGNERIA</title>
        <link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel="stylesheet">
		<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="style.css">
	</head>
	<body>
		<div class="choose-course">
			<div class="course">
				<ul id="course">
					<li><a href="index.1.1.php?file_name=orario_giornaliero.php&db=IN&idfacolta=1">Ingegneria</a></li>
<?php

require_once '../AuleConfig.php';
require_once '../AuleRequestUnibg.1.3.php';
require_once '../AuleAjax.php';
$elemento = $_REQUEST["url_elemento"];
$data = $_REQUEST["url_data"];
// create jenti request unibg object
$request = new AuleRequestUnibg($config);
// get day user wants to visualize
$result["free_hours"] = $request->get_classroom_free_hours($config[$elemento]["url_params"], $data);
$result["source"] = $request->url;
if ($config["refresh_interval"] - $request->cache_age >= 0) {
    $result["next_update"] = $config["refresh_interval"] - $request->cache_age;
} else {
    $result["next_update"] = $config["refresh_interval"];
}
echo ajax_json_response($result);
示例#3
0
<?php

require_once '../AuleConfig.php';
require_once "../AuleRequestUnibg.1.2.php";
// set timezone
date_default_timezone_set('Europe/Rome');
$facolta = $_REQUEST["facolta"];
if (isset($_REQUEST['data'])) {
    $data = $_REQUEST['data'];
} else {
    $data = 'oggi';
}
// create jenti request unibg object
$request = new AuleRequestUnibg($config);
// get day user wants to visualize
$result = $request->get_classroom_free_hours($config[$facolta]["file_name"], $config[$facolta]["db"], $config[$facolta]["idfacolt"], $data);
?>
<html>
	<head>
        <title><?php 
echo $config["application"];
?>
</title>
        <link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel="stylesheet">
		<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="style.css">
	</head>
	<body>
		<div class="title">
			<h1><?php 
echo $config["application"];
<?php

//phpinfo();
//exit;
require_once "AuleConfig.php";
require_once "AuleRequestUnibg.1.3.php";
date_default_timezone_set('Europe/Rome');
$idfacolt['a'] = '1';
$request = new AuleRequestUnibg($config);
$result = $request->get_classroom_free_hours('orario_giornaliero.php', 'IN', $idfacolt, 'oggi');
if ($request->error) {
    echo $request->error;
}
echo "<PRE>" . print_r($result, true) . "</PRE>";
$request->debug_echo_dom(null, 0, null, null);