This repository was archived by the owner on Feb 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbox.php
More file actions
48 lines (43 loc) · 1.26 KB
/
box.php
File metadata and controls
48 lines (43 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
include_once ('core/init.php');
include ('core/secure.php');
include ('forms/submit.php');
require_once 'core/functionalities.php';
include ('master/public-header.php');
$_GET['type'] = "FILE";
require_once ('forms/render.php');
require_once 'semi-orm/Posts.php';
require_once 'semi-orm/Users.php';
use orm\Users;
$user = new Users($conn);
use orm\Posts;
$post = new Posts($conn);
$rows=[];
use core\functionalities;
$functionalitiesInstance = new functionalities();
if ($functionalitiesInstance->ifexistsidx($_GET, 'id') == "" && $user->GetRoleById($functionalitiesInstance->ifexistsidx($_SESSION, 'PHP_AUTH_ID')) == 'ADMIN')
{
$rows = $post->
ToList(-1, -1, "Submit", "DESC",
"WHERE `Type`='FILE'");
}
else if ($functionalitiesInstance->ifexistsidx($_GET, 'id') != "")
{
$rows = $post->
ToList(-1, -1, "Submit", "DESC",
"WHERE `UserID` = '" . $functionalitiesInstance->ifexistsidx($_GET, 'id') . "' AND `Type`='FILE'");
}
/*
TODO:
require_once ($parent . '/core/authentication.php');
use core\authentication;
$authentication = new authentication();
$UserId = $authentication->login();
*/
$_GET["type"] = 'FILE';
foreach ($rows as $row) {
$_GET['masterid'] = $row['MasterID'];
include ('views/render.php');
}
include ('master/public-footer.php');
?>