|
Revision 2, 0.8 kB
(checked in by sven, 3 years ago)
|
importing elgg-0.1.1a
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
ini_set("upload_max_filesize","5242880"); |
|---|
| 4 |
|
|---|
| 5 |
global $owner; |
|---|
| 6 |
|
|---|
| 7 |
if (isset($_GET['files_name'])) { |
|---|
| 8 |
$owner = (int) run("users:name_to_id", $_GET['files_name']); |
|---|
| 9 |
} else if (isset($_REQUEST['owner'])) { |
|---|
| 10 |
$owner = (int) $_REQUEST['owner']; |
|---|
| 11 |
} else if (isset($_SESSION['userid'])) { |
|---|
| 12 |
$owner = (int) $_SESSION['userid']; |
|---|
| 13 |
} |
|---|
| 14 |
|
|---|
| 15 |
global $owner_username; |
|---|
| 16 |
$owner_username = run("users:id_to_name",$owner); |
|---|
| 17 |
|
|---|
| 18 |
global $page_owner; |
|---|
| 19 |
$page_owner = $owner; |
|---|
| 20 |
|
|---|
| 21 |
global $profile_id; |
|---|
| 22 |
$profile_id = $owner; |
|---|
| 23 |
|
|---|
| 24 |
global $folder; |
|---|
| 25 |
|
|---|
| 26 |
if (isset($_REQUEST['folder'])) { |
|---|
| 27 |
$folder = (int) $_REQUEST['folder']; |
|---|
| 28 |
$result = db_query("select count(ident) as x from file_folders where ident = $folder and owner = $owner"); |
|---|
| 29 |
if ($result[0]->x < 1) { |
|---|
| 30 |
$folder = -1; |
|---|
| 31 |
} |
|---|
| 32 |
} else { |
|---|
| 33 |
$folder = -1; |
|---|
| 34 |
} |
|---|
| 35 |
|
|---|
| 36 |
?> |
|---|