This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aggiunta sistema ajax su voti e registro. Aggiunta la sezione circolari. Aggiunta la possibilità di avere più componenti nello stesso account.
- Loading branch information
Showing
2,340 changed files
with
1,164,525 additions
and
468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
// server should keep session data for AT LEAST 1 hour | ||
ini_set('session.gc_maxlifetime', 7200); | ||
|
||
// each client should remember their session id for EXACTLY 1 hour | ||
session_set_cookie_params(7200); | ||
|
||
session_start(); // ready to go! | ||
|
||
//Controllo login | ||
if (strpos($_SERVER['PHP_SELF'], 'login') === false) { | ||
if (empty($_SESSION["cookies"]["__AntiXsrfToken"]) || empty($_SESSION["cookies"]["ASP.NET_SessionId"]) || $_SESSION["expire"] < time()){ | ||
header("location: /login?page=".$_SERVER['PHP_SELF']); | ||
exit; | ||
} | ||
} | ||
|
||
include "../../vendor/autoload.php"; | ||
include "../class.php"; | ||
|
||
use DiDom\Document; | ||
use DiDom\Query; | ||
use DiDom\Element; | ||
|
||
$axios = new axios; | ||
|
||
$axios->postREFamilyData = $_SESSION["getPostREFamily"]; | ||
$axios->QuadrimestreFT = $_COOKIE["QuadrimestreFT"]; | ||
$axios->QuadrimestreFTAll = $_SESSION["QuadrimestreFTAll"]; | ||
$axios->student = $_SESSION["getStudentId"][$_COOKIE['studentNumber']]; | ||
$axios->cookies = $_SESSION["cookies"]; | ||
|
||
$result = $axios->getCommunication(); | ||
|
||
echo json_encode($result); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
// server should keep session data for AT LEAST 1 hour | ||
ini_set('session.gc_maxlifetime', 7200); | ||
|
||
// each client should remember their session id for EXACTLY 1 hour | ||
session_set_cookie_params(7200); | ||
|
||
session_start(); // ready to go! | ||
|
||
//Controllo login | ||
if (strpos($_SERVER['PHP_SELF'], 'login') === false) { | ||
if (empty($_SESSION["cookies"]["__AntiXsrfToken"]) || empty($_SESSION["cookies"]["ASP.NET_SessionId"]) || $_SESSION["expire"] < time()){ | ||
header("location: /login?page=".$_SERVER['PHP_SELF']); | ||
exit; | ||
} | ||
} | ||
|
||
include "../../vendor/autoload.php"; | ||
include "../class.php"; | ||
|
||
use DiDom\Document; | ||
use DiDom\Query; | ||
use DiDom\Element; | ||
|
||
$axios = new axios; | ||
|
||
$axios->postREFamilyData = $_SESSION["getPostREFamily"]; | ||
$axios->QuadrimestreFT = $_COOKIE["QuadrimestreFT"]; | ||
$axios->QuadrimestreFTAll = $_SESSION["QuadrimestreFTAll"]; | ||
$axios->student = $_SESSION["getStudentId"][$_COOKIE['studentNumber']]; | ||
$axios->cookies = $_SESSION["cookies"]; | ||
|
||
$result = $axios->getHomeworkFull($_GET["date"]); | ||
|
||
echo json_encode($result); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<form method="get"> | ||
<div class="input-group"> | ||
<div class="input-group-prepend"> | ||
<div class="input-group-text">Data</div> | ||
</div> | ||
<input name="date" type="date" value="<?php echo $_GET["date"]; ?>" class="form-control" onchange="this.form.submit()"> | ||
</div> | ||
</form> | ||
<br> | ||
<div class="table-responsive"> | ||
<table class="table table-bordered"> | ||
<thead class="thead-dark"> | ||
<tr> | ||
<th scope="col">Data</th> | ||
<th scope="col">Argomenti</th> | ||
<th scope="col">Compiti</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php | ||
foreach ($result as $key => $value) { | ||
if ((!empty($value["homework"][0]["text"])) || (!empty($value["arguments"][0]["text"]))) { | ||
//Data | ||
echo '<tr><th>' . $value["info"]["date"] . '<br>' . $value["info"]["day"] . '</th>'; | ||
|
||
//Argomenti | ||
echo '<td>'; | ||
if (!empty($value["arguments"][0]["text"])) { | ||
foreach ($value["arguments"] as $key => $argument) { | ||
if ($key != 0) { | ||
echo '<br>'; | ||
} | ||
echo '<b>' . $argument["name"] . ':</b> ' . $argument["text"]; | ||
} | ||
} | ||
echo '</td>'; | ||
|
||
//Compiti | ||
echo '<td>'; | ||
if (!empty($value["homework"][0]["text"])) { | ||
foreach ($value["homework"] as $key => $homework) { | ||
if ($key != 0) { | ||
echo '<br>'; | ||
} | ||
echo '<b>' . $homework["name"] . ':</b> ' . $homework["text"]; | ||
} | ||
} | ||
echo '</td>'; | ||
} | ||
} | ||
?> | ||
</tbody> | ||
</table> | ||
</div> |
Oops, something went wrong.