Exemplo n.º 1
0
function xpress_config_from_xoops_view($is_report = false)
{
    global $xoopsUserIsAdmin, $xoopsUser;
    $user_groups = $xoopsUser->getGroups();
    $is_admin_group = in_array('1', $user_groups);
    require_once dirname(dirname(__FILE__)) . '/class/config_from_xoops.class.php';
    $xoops_config = new ConfigFromXoops();
    if ($is_report) {
        echo "******** " . _AM_XP2_XOOPS_CONFIG_INFO . "********" . "<br />\n";
        xpress_config_report_view();
        echo "<br />\n";
    } else {
        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_XOOPS_CONFIG_INFO . "</legend>";
        echo "<div style='padding: 8px;'>";
        if ($xoopsUserIsAdmin && $is_admin_group) {
            xpress_config_nomal_view();
        } else {
            xpress_config_report_view();
        }
        echo "</div>";
        echo '</legend>';
        echo "</fieldset><br />";
    }
}
Exemplo n.º 2
0
function xpress_config_from_xoops_view($is_report = false)
{
	global $xoopsUserIsAdmin,$xoopsUser;

	$user_groups = $xoopsUser->getGroups();
	$is_admin_group = in_array('1',$user_groups);
	
	require_once dirname(dirname( __FILE__ )).'/class/config_from_xoops.class.php' ;
	$xoops_config = new ConfigFromXoops;
	if ($is_report) {
		echo "******** "  . _AM_XP2_XOOPS_CONFIG_INFO . "********" . "<br />\n";
		xpress_config_report_view();
		echo "<br />\n";
	} else {
		echo "<div class='resultMsg'>";
		echo "<h4>" . _AM_XP2_XOOPS_CONFIG_INFO . "</h4>";
		echo "</div><div style='padding: 8px;'>";
		if ($xoopsUserIsAdmin && $is_admin_group){
			xpress_config_nomal_view();
		} else {
			xpress_config_report_view();
		}
		echo "</div><br />";
	}
}