-
Notifications
You must be signed in to change notification settings - Fork 0
/
share.php
50 lines (42 loc) · 1.28 KB
/
share.php
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
49
50
<?php
/**
* share
*
* @package Delus
* @author Dmitry
*/
// fetch bootloader
require('bootloader.php');
// check if developers (share plugin) enabled
if (!$system['developers_share_enabled']) {
_error(404);
}
// user access
user_access();
try {
// prepare publisher
/* get user pages */
$pages = $user->get_pages(['managed' => true, 'user_id' => $user->_data['user_id']]);
$smarty->assign('pages', $pages);
/* get user groups */
$groups = $user->get_groups(['get_all' => true, 'user_id' => $user->_data['user_id']]);
$smarty->assign('groups', $groups);
/* get user events */
$events = $user->get_events(['get_all' => true, 'user_id' => $user->_data['user_id']]);
$smarty->assign('events', $events);
$smarty->assign('feelings', get_feelings());
$smarty->assign('feelings_types', get_feelings_types());
if ($system['colored_posts_enabled']) {
$smarty->assign('colored_patterns', $user->get_posts_colored_patterns());
}
if ($user->_data['can_upload_videos']) {
$smarty->assign('videos_categories', $user->get_categories("posts_videos_categories"));
}
$smarty->assign('url', $_GET['url']);
} catch (Exception $e) {
_error(__("Error"), $e->getMessage());
}
// page header
page_header(__($system['system_title']));
// page footer
page_footer('share');