<?php
/********************************************************/
/* NSN Your Account                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright  2000-2004 by NukeScripts Network         */
/* ==================================================== */
/* Based from:                                          */
/* PHP-NUKE: Web Portal System                          */
/********************************************************/
defined('MAXIMUS') or Header("Location: index.php");

    // Group Memberships
    $result11 = $db->sql_query("SELECT `gid` FROM `".TABLE_NSNGR_USERS."` WHERE `uid`='$usrinfo[user_id]' ORDER BY `gid`");
    if (($db->sql_numrows($result11) > 0)) {
        br('1');
        Max_OpenTable();
        echo "<b>"._MEMBERGROUPS.": $usrinfo[username]</b><br />\n";
        while($row11 = $db->sql_fetchrow($result11)) {
	$gid = $db->XMFnum($row11['gid']);
            $row1 = $db->sql_fetchrow($db->sql_query("SELECT `gname` FROM `".TABLE_NSNGR_GROUPS."` WHERE `gid`='$gid'"));
	    $gname = stripslashes($row1['gname']);
            echo "<li>$gname";
            if (defined('ADMIN_ALLOW')) { echo " ($gid)"; }
            $row2 = $db->sql_fetchrow($db->sql_query("SELECT `edate` FROM `".TABLE_NSNGR_USERS."` WHERE `uid`='$usrinfo[user_id]' AND `gid`='$gid'"));
	    $edate = stripslashes($row2['edate']);
            if ($edate != "") {
                if ($edate != "0000-00-00" & $edate != 0) {
                    echo "&nbsp;&nbsp;- <i>"._EXPIRES." $edate</i>";
                } else {
                    echo "&nbsp;&nbsp;- <i>"._NOTSET."</i>";
                }
            }
            br('1');
        }
        Max_CloseTable();
    }