Esempio n. 1
0
function output_domain_block($project_id)
{
    foreach (ProjectInfo::$mDomainList as $domain_handle) {
        if ($domain_handle == 'home' || $domain_handle == 'misc') {
            continue;
        }
        $domain_link = ProjectInfo::assemblePath($project_id, $domain_handle);
        $domain_name = ProjectInfo::getDomainName($project_id, $domain_handle);
        $domain_desc = ProjectInfo::getDomainDesc($project_id, $domain_handle);
        switch ($domain_handle) {
            case 'download':
                $icon_name = 'download';
                break;
            case 'document':
                $icon_name = 'book';
                break;
            case 'community':
                $icon_name = 'group';
                break;
            case 'contribute':
                $icon_name = 'heart';
                break;
        }
        ?>
<div class="col-sm-3 col-md-3 col-lg-3 note-block">
	<div class="well text-center">
		<div class="note-icon">
			<a href="<?php 
        echo $domain_link;
        ?>
">
				<span class="glyphicon glyphicon-<?php 
        echo $icon_name;
        ?>
"></span>
			</a>
		</div>
		<div class="note-desc">
			<h2>
				<a href="<?php 
        echo $domain_link;
        ?>
">
					<?php 
        echo h5($domain_name);
        ?>
				</a>
			</h2>
			<p>
				<?php 
        echo h5($domain_desc);
        ?>
			</p>
		</div>
		</p>
	</div>
</div>
<?php 
    }
}
Esempio n. 2
0
if ($project_shortname != SYSTEM_PROJECT_SHORTNAME) {
    ?>
	<nav>
		<ol class="breadcrumb">
			<li><a href="<?php 
    echo ProjectInfo::assemblePath($project_id, 'home');
    ?>
"><?php 
    echo ProjectInfo::getDomainName($project_id, 'home');
    ?>
</a></li>
			<li><a href="<?php 
    echo ProjectInfo::assemblePath($project_id, $domain_handle);
    ?>
"><?php 
    echo ProjectInfo::getDomainName($project_id, $domain_handle);
    ?>
</a></li>
			<li class="active"><?php 
    echo ProjectInfo::getVolumeName($project_id, $domain_handle, $volume_handle);
    ?>
</li>
		</ol>
	</nav>
<?php 
} else {
    ?>
	<div class="v-seperator">
	</div>
<?php 
}
Esempio n. 3
0
$a->display($c);
?>

	<nav class='footer-block'>
		<ul>
			<li>
				<a href="<?php 
echo ProjectInfo::assemblePath($sys_project_id, 'misc');
?>
"
						title="<?php 
echo ProjectInfo::getDomainDesc($sys_project_id, 'misc');
?>
"
						class="inline-list small"><?php 
echo ProjectInfo::getDomainName($sys_project_id, 'misc');
?>
</a>
			</li>
<?php 
foreach ($volumes as $v) {
    ?>
		<li>
			<a href="<?php 
    echo ProjectInfo::assemblePath($sys_project_id, 'misc', $v['volume_handle']);
    ?>
"
					title="<?php 
    echo h5($v['volume_desc']);
    ?>
"
Esempio n. 4
0
			<li class="active"><?php 
    echo ProjectInfo::getPartName($project_id, $domain_handle, $volume_handle, $part_handle);
    ?>
</li>
		</ol>
	</nav>
<?php 
} else {
    ?>
	<nav>
		<ol class="breadcrumb">
			<li><a href="<?php 
    echo ProjectInfo::assemblePath($project_id, 'home');
    ?>
"><?php 
    echo ProjectInfo::getDomainName($project_id, 'home');
    ?>
</a></li>
			<li><a href="<?php 
    echo ProjectInfo::assemblePath($project_id, $domain_handle, $volume_handle);
    ?>
"><?php 
    echo ProjectInfo::getVolumeName($project_id, $domain_handle, $volume_handle);
    ?>
</a></li>
			<li class="active"><?php 
    echo ProjectInfo::getPartName($project_id, $domain_handle, $volume_handle, $part_handle);
    ?>
</li>
		</ol>
	</nav>
Esempio n. 5
0
 public function get_user_roles_and_rights($project_id = false, $user_name = false)
 {
     $ret_info = new ReturnInfo();
     $ret_info->status = 'bad';
     $js = Loader::helper('json');
     if ($project_id == false || ProjectInfo::getDomainName($project_id, 'home') == false) {
         echo $js->encode($ret_info);
         exit(0);
     }
     if ($user_name == false) {
         if (fse_try_to_login()) {
             $fse_id = $_SESSION['FSEInfo']['fse_id'];
             $user_name = $_SESSION['FSEInfo']['user_name'];
         } else {
             echo $js->encode($ret_info);
             exit(0);
         }
     } else {
         $fse_info = FSEInfo::getBasicProfile($user_name);
         if ($fse_info == false) {
             echo $js->encode($ret_info);
             exit(0);
         }
         $fse_id = $fse_info['fse_id'];
     }
     $ret_info->status = 'ok';
     $ret_info->project_id = $project_id;
     $ret_info->user_name = $user_name;
     $roles = ProjectInfo::getUserRoles($project_id, $fse_id);
     $ret_info->roles = $roles['member_roles'];
     $ret_info->rights = $roles['member_rights'];
     echo $js->encode($ret_info);
     exit(0);
 }
Esempio n. 6
0
    public function login($is_mobile_theme = false, $project_id = false)
    {
        $ret_info = new ReturnInfo();
        $ret_info->status = 'bad';
        $ret_info->detail = '';
        $ret_info->user_name = 'na';
        $ret_info->nick_name = 'na';
        $ret_info->project_rights = '0123456789abcdef';
        if (fse_try_to_login()) {
            $ret_info->status = 'ok';
            $ret_info->user_name = $_SESSION['FSEInfo']['user_name'];
            $ret_info->nick_name = $_SESSION['FSEInfo']['nick_name'];
            if ($project_id && ProjectInfo::getDomainName($project_id, 'home')) {
                $res = ProjectInfo::getUserRights($project_id, $_SESSION['FSEInfo']['fse_id']);
                if ($res) {
                    $ret_info->project_rights = $res;
                }
            }
            $link = FSEInfo::getPersonalHomeLink();
            if ($is_mobile_theme == 'true') {
                $ret_info->detail = '
<li>
	<a class="menu-item with-icon" href="' . $link . '" title="Personal homepage">
		<span class="glyphicon glyphicon-user"></span> ' . $ret_info->nick_name . '</a>
</li>
<li>
	<a class="menu-item with-icon" href="/fse_settings">
		<span class="glyphicon glyphicon-cogwheel"></span>
		' . t('Settings') . '
	</a>
</li>
<li>
	<a class="menu-item with-icon" href="/fse_logout/logout">
		<span class="glyphicon glyphicon-log-out"></span>
		' . t('Sign out') . '
	</a>
</li>';
            } else {
                $ret_info->detail = '
<li>
	<a class="inline-list" href="' . $link . '" title="Personal homepage">
		<span class="glyphicon glyphicon-user"></span> ' . $ret_info->nick_name . '</a>
</li>
<li>
	<a class="inline-list only-icon" href="/fse_settings" title="Settings">
		<span class="glyphicon glyphicon-cogwheel"></span></a>
</li>
<li>
		<a class="inline-list only-icon" href="/fse_logout/logout" title="Sign out">
			<span class="glyphicon glyphicon-log-out"></span></a>
</li>';
            }
        } else {
            if ($is_mobile_theme == 'true') {
                $ret_info->detail = '
<li>
	<a class="menu-item" href="/fse_login">' . t('Sign in') . '</a>
</li>
<li>
	<a class="menu-item" href="/fse_register">' . t('Sign up') . '</a>
</li>';
            } else {
                $ret_info->detail = '
<li>
	<a class="button" href="/fse_login">' . t('Sign in') . '</a>
</li>
<li>
	<a class="button button-blue" href="/fse_register">' . t('Sign up') . '</a>
</li>';
            }
        }
        $js = Loader::helper('json');
        echo $js->encode($ret_info);
        exit(0);
    }
Esempio n. 7
0
" />
		</div>
	</div>
</div>

<h1>
	<?php 
        echo t('Project Page Structure');
        ?>
</h1>
<div class="clearfix">
<?php 
        $project_id = $project['project_id'];
        foreach (ProjectInfo::$mDomainList as $domain_handle) {
            if (ProjectInfo::getDomainName($project_id, $domain_handle) != false) {
                output_domain_struct($project_id, $domain_handle, ProjectInfo::getDomainName($project_id, $domain_handle), ProjectInfo::getDomainDesc($project_id, $domain_handle), ProjectInfo::getDomainLongDesc($project_id, $domain_handle));
            }
        }
        ?>
</div>

<?php 
    }
    ?>
			</ul>
		</section>
<?php 
} else {
    ?>
		<section class="note">
			<p>