Woooh, plein de nouveaux fichiers. Ajout des discussions avec des jolies classes.

This commit is contained in:
Mysaa
2021-06-05 20:09:07 +02:00
parent 20a9f135e7
commit 2ea296cd61
52 changed files with 7560 additions and 658 deletions
+47
View File
@@ -0,0 +1,47 @@
<?php
session_start();
echo ('extensions:"'.ini_get('extension_dir').'"');
include_once "../includes/bdd.php";
include_once "../includes/inter.php";
include_once "megaapi.php";
$permissions = array (
FALSE,
FALSE,
FALSE,
FALSE
);
$connected = isConnected ();
$owner = FALSE;
$adminLevel = - 1;
$data = NULL;
if (isset ( $_GET ['id'] ) && isset ( $_GET ['v'] )) {
$data = getProjectVersionData( $_GET ['id'], $_GET ['v'] );
if ($data != NULL) {
$permissions = getPermissions( $data );
} else {
header('Location:../40A.php');
goto end;
}
} else {
header('Location:../40A.php');
goto end;
}
if (! $connected) {
header( 'Location:../401.php' );
goto end;
}
$owner = preg_match ( '#[^0-9]?' . $_SESSION ['session_id'] . '[^0-9]?#', $data ['owners'] );
$adminLevel = getAdminLevel ();
if (! $owner && $adminLevel < 12) {
header( 'Location:../403.php' );
goto end;
}
$megaapi = new MegaApiPHP("mA9D1IQQ", "PHP bernard.com");
$megaapi->login("bernard.lafayette63@gmail.com", "*******************");
$node = $megaapi->getNodeByPath('imageFinal.jpg', $megaapi->getRootNode());
$megaapi->startDownload($node, './');
end: