Ejemplo n.º 1
0
 */
defined('C5_EXECUTE') or die('Access Denied.');
Loader::model('fsen_localization');
FSENLocalization::setupInterfaceLocalization4AjaxRequest();
require_once 'helpers/check_login.php';
require_once 'helpers/fsen/DocSectionManager.php';
require_once 'helpers/fsen/ProjectInfo.php';
$domain_handle = $_REQUEST['domainHandle'];
$section_id = $_REQUEST['sectionID'];
$current_ver_code = $_REQUEST['currentVerCode'];
if (!fse_try_to_login()) {
    $error_info = t('You are not signed in.');
} else {
    if (preg_match("/^[a-f0-9]{32}\$/", $section_id) && in_array($domain_handle, ProjectInfo::$mDomainList)) {
        $db = Loader::db();
        $section_info = DocSectionManager::getSectionInfo($domain_handle, $section_id);
        if (count($section_info) == 0) {
            $error_info = t('No such section ID!');
        } else {
            if ($current_ver_code == 0 || $current_ver_code > $section_info['max_ver_code']) {
                $error_info = t('Bad request!');
            } else {
                $project_id = $section_info['project_id'];
                $doc_lang = substr($project_id, -2);
                $project_info = ProjectInfo::getBasicInfo($project_id);
                if ($project_info == false) {
                    $error_info = t('Bad project');
                } else {
                    $curr_fse_id = $_SESSION['FSEInfo']['fse_id'];
                    $user_rights = ProjectInfo::getUserRights($project_id, $curr_fse_id);
                    if (($section_info['status'] == DocSectionManager::SS_ADMIN_DELETED || $section_info['status'] == DocSectionManager::SS_ADMIN_SHIELDED) && $user_rights[2] != 't') {
Ejemplo n.º 2
0
<?php 
    }
    ?>
						</div>

						<!-- Favorites -->
						<div role="tabpanel" class="tab-pane fade" id="divFavorites">
							<div class="v-seperator">
							</div>
<?php 
    if ($nr_favorites > 0) {
        ?>
							<ul class="list-group">
<?php 
        foreach ($my_favorites as $fvr) {
            $info = DocSectionManager::getSectionInfo(false, $fvr['section_id']);
            $plain_content = DocSectionManager::getPlainContent($fvr['section_id'], $info['curr_ver_code']);
            $link = ProjectInfo::assemblePath($info['project_id'], $info['domain_handle'], $info['volume_handle'], $info['part_handle'], $info['chapter_handle']);
            $link .= '#section-' . $fvr['section_id'];
            if (strlen($plain_content['title']) == 0) {
                $page = Page::getByID($info['page_id']);
                $plain_content['title'] = $page->getCollectionName();
            }
            ?>
<li class="list-group-item">
	<span class="badge"><?php 
            echo $info['heat_level'];
            ?>
</span>
	<h4 class="list-group-item-heading"><a href="<?php 
            echo $link;