}
}
for ($c = 0; $c < count($level_group_discussion); $c++) {
    if (group_privacy_levels($level_group_discussion[$c]) != "") {
        SE_Language::_preload(group_privacy_levels($level_group_discussion[$c]));
        $discussion_options[$level_group_discussion[$c]] = group_privacy_levels($level_group_discussion[$c]);
    }
}
for ($c = 0; $c < count($level_group_upload); $c++) {
    if (group_privacy_levels($level_group_upload[$c]) != "") {
        SE_Language::_preload(group_privacy_levels($level_group_upload[$c]));
        $upload_options[$level_group_upload[$c]] = group_privacy_levels($level_group_upload[$c]);
    }
}
for ($c = 0; $c < count($level_group_tag); $c++) {
    if (group_privacy_levels($level_group_tag[$c]) != "") {
        SE_Language::_preload(group_privacy_levels($level_group_tag[$c]));
        $tag_options[$level_group_tag[$c]] = group_privacy_levels($level_group_tag[$c]);
    }
}
// ASSIGN SMARTY VARIABLES AND DISPLAY EDIT STYLE PAGE
$smarty->assign('group', $group);
$smarty->assign('groupalbum_info', $groupalbum_info);
$smarty->assign('privacy_options', $privacy_options);
$smarty->assign('comment_options', $comment_options);
$smarty->assign('discussion_options', $discussion_options);
$smarty->assign('upload_options', $upload_options);
$smarty->assign('tag_options', $tag_options);
$smarty->assign('result', $result);
$smarty->assign('style_group', htmlspecialchars($style_info['groupstyle_css'], ENT_QUOTES, 'UTF-8'));
include "footer.php";
        SE_Language::_preload(group_privacy_levels($priv));
        $privacy_options[$priv] = group_privacy_levels($priv);
    }
}
for ($c = 8; $c >= 0; $c--) {
    $priv = pow(2, $c) - 1;
    if (group_privacy_levels($priv) != "") {
        SE_Language::_preload(group_privacy_levels($priv));
        $comment_options[$priv] = group_privacy_levels($priv);
    }
}
for ($c = 7; $c >= 0; $c--) {
    $priv = pow(2, $c) - 1;
    if (group_privacy_levels($priv) != "") {
        SE_Language::_preload(group_privacy_levels($priv));
        $upload_options[$priv] = group_privacy_levels($priv);
    }
}
// ASSIGN VARIABLES AND SHOW USER GROUPS PAGE
$smarty->assign('result', $result);
$smarty->assign('is_error', $is_error);
$smarty->assign('level_info', $level_info);
$smarty->assign('level_group_privacy', unserialize($level_info[level_group_privacy]));
$smarty->assign('level_group_comments', unserialize($level_info[level_group_comments]));
$smarty->assign('level_group_discussion', unserialize($level_info[level_group_discussion]));
$smarty->assign('level_group_upload', unserialize($level_info[level_group_upload]));
$smarty->assign('level_group_tag', unserialize($level_info[level_group_tag]));
$smarty->assign('group_privacy', $privacy_options);
$smarty->assign('group_comments', $comment_options);
$smarty->assign('group_discussion', $comment_options);
$smarty->assign('group_upload', $upload_options);
Exemplo n.º 3
0
 function get_privacy_options($object, $object_id)
 {
     global $user;
     if (!$object || !$object_id) {
         return array();
     }
     if ($object == 'group') {
         $group = new se_group($user->user_info['user_id'], $object_id);
         $level_group_privacy = unserialize($group->groupowner_level_info['level_group_privacy']);
         rsort($level_group_privacy);
         // GET PREVIOUS PRIVACY SETTINGS
         for ($c = 0; $c < count($level_group_privacy); $c++) {
             if (group_privacy_levels($level_group_privacy[$c]) != "") {
                 SE_Language::_preload(group_privacy_levels($level_group_privacy[$c]));
                 $privacy_options[$level_group_privacy[$c]] = group_privacy_levels($level_group_privacy[$c]);
             }
         }
     } elseif ($object == 'pages') {
         $level_action_privacy = array(7, 3, 1);
         //TODO
         // GET PREVIOUS PRIVACY SETTINGS
         for ($c = 0; $c < count($level_action_privacy); $c++) {
             if (pages_privacy_levels($level_action_privacy[$c]) != "") {
                 SE_Language::_preload(pages_privacy_levels($level_action_privacy[$c]));
                 $privacy_options[$level_action_privacy[$c]] = pages_privacy_levels($level_action_privacy[$c]);
             }
         }
     } else {
         $level_action_privacy = unserialize($user->level_info['level_wall_action_privacy']);
         rsort($level_action_privacy);
         // GET PREVIOUS PRIVACY SETTINGS
         for ($c = 0; $c < count($level_action_privacy); $c++) {
             if (user_privacy_levels($level_action_privacy[$c]) != "") {
                 SE_Language::_preload(user_privacy_levels($level_action_privacy[$c]));
                 $privacy_options[$level_action_privacy[$c]] = user_privacy_levels($level_action_privacy[$c]);
             }
         }
     }
     return $privacy_options;
 }