RevCMS Group Addons?

MadMonsterMan

Member
Mar 25, 2016
202
13
I've seen alot of hotels with the groups addon on the community page with groups that users created in a habbo container..
I know its easy to code but not for me i can't code PHP tbh lol.
All I know is that you have to grab the "groups" table..
Example:
yersg.png

Can anyone help?
@JayCustom
@Sledmore
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
Code:
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">Random Groups</span></h2>
<div style="padding: 5px;">
<?php
$get = mysql_query("SELECT * FROM groups  ORDER BY rand() DESC LIMIT 5");


while ($group = mysql_fetch_assoc($get))
{

    echo '<div style="padding: 5px;">
<img style="margin-top:5px; margin-left: 10px;position: absolute;" src="{url}/habbo-imaging/badge.php?badge=' . htmlspecialchars ($group['badge']) . '.gif" alt="" align="middle"/>
<table style="margin-left: 55px; padding-top: 6px;">
<tr style="padding: 0;">
<td>
<a href="{url}/index.php?url=group&i=' . htmlspecialchars ($group['id']) . '">
' . htmlspecialchars ($group['name']) . ' </a><br/>
<p style="padding-top: 6px;">' . htmlspecialchars ($group['desc']) . '<br/>
</p>
</td>
</tr>
</table>
<hr>
</div>
    ';
   
}

?>


</tr>
</table>
</div>
</div>
</div>
 

MadMonsterMan

Member
Mar 25, 2016
202
13
Code:
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">Random Groups</span></h2>
<div style="padding: 5px;">
<?php
$get = mysql_query("SELECT * FROM groups  ORDER BY rand() DESC LIMIT 5");


while ($group = mysql_fetch_assoc($get))
{

    echo '<div style="padding: 5px;">
<img style="margin-top:5px; margin-left: 10px;position: absolute;" src="{url}/habbo-imaging/badge.php?badge=' . htmlspecialchars ($group['badge']) . '.gif" alt="" align="middle"/>
<table style="margin-left: 55px; padding-top: 6px;">
<tr style="padding: 0;">
<td>
<a href="{url}/index.php?url=group&i=' . htmlspecialchars ($group['id']) . '">
' . htmlspecialchars ($group['name']) . ' </a><br/>
<p style="padding-top: 6px;">' . htmlspecialchars ($group['desc']) . '<br/>
</p>
</td>
</tr>
</table>
<hr>
</div>
    ';

}

?>


</tr>
</table>
</div>
</div>
</div>
Thanx alot bro. now what about this:
tru.png

when you click the group name it go's to this. How would I code the groups page itself?
 
Last edited:

Brad

Well-Known Member
Jun 5, 2012
2,320
993
yah I fixed that but Im trying to figure out when you click a group it gos to a error page because theres no groups page. So im trying to figure out How to create one
Example:
tru.png
That's the one I coded, I'll see If I have it still.
 
turns out I do.

Code:
<?php include('includes/checktheban.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>{hotelName}: Group Profile</title>

    <script type="text/javascript">
        var andSoItBegins = (new Date()).getTime();
    </script>

    <link rel="shortcut icon" href="{url}/app/tpl/skins/Habbo/web-gallery/v2/favicon.ico" type="image/vnd.microsoft.icon" />
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/common.css" type="text/css" />
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/libs2.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/visual.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/libs.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/common.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/fullcontent.js" type="text/javascript"></script>

    <script type="text/javascript">
    document.habboLoggedIn = true;
    var habboName = "{username}";
    var habboId = {userid};
    var facebookUser = false;
    var habboReqPath = "";
    var habboStaticFilePath = "{url}/app/tpl/skins/Habbo/web-gallery";
    var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
    var habboPartner = "";
    var habboDefaultClientPopupUrl = "{url}/client";
    window.name = "habboMain";
    if (typeof HabboClient != "undefined") {
        HabboClient.windowName = "26530fff566f9e67da99560b7fe8da6d71d46391";
        HabboClient.maximizeWindow = true;
    }
    </script>
  

      
        <!--script src="{url}/app/tpl/skins/Habbo//web-gallery/static/js/homeview.js" type="text/javascript"></script-->
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/homes/lightwindow.css" type="text/css" />
        <!--script src="{url}/app/tpl/skins/Habbo//web-gallery/static/js/homeauth.js" type="text/javascript"></script-->
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/homes/group.css" type="text/css" />
      
  

    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/lightweightmepage.css" type="text/css" />
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/lightweightmepage.js" type="text/javascript"></script>

    <meta name="description" content="{meta_description}" />
    <meta name="keywords" content="{meta_keywords}" />

    <!--[if IE 8]>
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/ie8.css" type="text/css" />
    <![endif]-->
    <!--[if lt IE 8]>
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/ie.css" type="text/css" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/ie6.css" type="text/css" />
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/pngfix.js" type="text/javascript"></script>
    <script type="text/javascript">
    try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
    </script>

    <style type="text/css">
    body { behavior: url(/js/csshover.htc); }
    </style>
    <![endif]-->
    <meta name="build" content="63-BUILD2470 - 30.09.2013 11:10 - com" />
</head>

<body id="home" class=" ">
<div id="overlay"></div>

<?php

$navigatorID = 1;
require_once ('app/tpl/skins/Habbo/template/header.php');

?>

      
      
<div id="content-container">

<div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">
        <ul>
        <?php

        $subNavigatorID = 2;
        require_once ('app/tpl/skins/Habbo/template/sub_header.php');

        ?>
        </ul>
                </div>
            </div>
        </div><div id="container">
<div id="content" style="position: relative" class="clearfix">
<span style='font-size:10px'>
<style type="text/css">
    .staffBox{border-bottom:1px dashed #cccccc;min-height:60px;}.staffBox:last-child{border-bottom:none;}

    input[type="submit"], input[type="button"] {
        background: url('https://images.fresh-hotel.org/reg_btn.png') top;
        font: bold 13px arial,sans-serif;
        line-height: 25px;
        color: black;
        height: 25px;
        width: 99px;
        border: 0;
    }
    input[type="submit"]:hover, input[type="button"]:hover {
        background-position: bottom;
        cursor: pointer;
    }
</style>
<?php
    if(!is_numeric($_GET['i'])) $_GET['i'] = 1;
    $q = mysql_query("SELECT * FROM groups WHERE id = '" . filter($_GET['i']) . "' LIMIT 1");
    if(mysql_num_rows($q) != 1) header("location: {$_CONFIG['hotel']['url']}/groups/'" . filter($_GET['i']) . "'");
    $groupData = mysql_fetch_assoc($q);
    unset($q);
    $userList = mysql_query("SELECT user_id FROM group_memberships WHERE group_id = '{$groupData["id"]}'");
  
?>

<script>
    $(document).on('click', '#btnEdit', function() {
        $("#overlay").show();
        $("#editGroup").fadeIn("slow");
    });
  
    $(document).on('click', '#exitBtn', function() {
        $("#overlay").hide();
        $("#editGroup").fadeOut("slow");
    });
  
    $(document).on('click', '#saveBtn', function() {
        $.ajax({
            type: "POST",
            url: "{url}/index.php?url=group&save",
            data: {
                id:"<?php echo $groupData['id']; ?>",
                name:$("#groupName").val(),
                desc:$("#groupDesc").val(),
                badge:GroupBadge
            },
            success: function (data) {
                if(data == "") alert("The group has been saved.");
                else alert(data);
              
                $('#rGName').html($("#groupName").val());
                $('.name-text').html($("#groupName").val());
                $('#rGImg').attr('src', '<?php echo $_CONFIG['hotel']['url']; ?>/habbo-imaging/badge.php?badge=' + GroupBadge + '.gif"');
            },
            error: function() {
                alert("Unable to save the group.");
            }
        });
    });
</script>
<?php
    if(!is_numeric($_GET['i'])) $_GET['i'] = 1;
    $q = mysql_query("SELECT * FROM groups WHERE id = '" . filter($_GET['i']) . "' LIMIT 1");
    if(mysql_num_rows($q) != 1) header("location: {$_CONFIG['hotel']['url']}/groups/'" . filter($_GET['i']) . "'");
    $groupData = mysql_fetch_assoc($q);
    unset($q);
    $userList = mysql_query("SELECT user_id,rank FROM group_memberships WHERE group_id = '{$groupData["id"]}'");
  
?>

<div id="column1" class="column" style="float:left;width:320px;">
    <div class="habblet-container">      
        <div class="cbb clearfix green">
            <h2 class='title' style='font-size:12px;text-align:left;font-family: "Tahoma",Verdana,Arial;'><span style="float: left;">Group Home Page</span></h2>
            <div class="movable widget ProfileWidget" id="widget-902026" style=" left: 25px; top: 26px; z-index: 4;">
<div class="w_skin_defaultskin">
    <div class="widget-corner" id="widget-902026-handle">
    </div>
    <div class="widget-body">
        <div class="widget-content">
    <div class="profile-info">
        <div class="name" style="float: left">
            <span class="name-text"><span id='rGName'>&nbsp;&nbsp;Group Name:<b>  <?php echo $groupData["name"]; ?></b></span></span>
        </div>
    </div>
    <br class="clear" />
        <span style="float:left;width:130px">
                &nbsp; Created: <?php echo date("d-m-y", $groupData['created']); ?><br/>
               &nbsp; Owner: <?php echo mysql_result(mysql_query("SELECT username,look,id FROM users WHERE id = '{$groupData['owner_id']}' LIMIT 1"), 0); ?><br/>
              &nbsp; Room: <?php echo mysql_result(mysql_query("SELECT caption FROM rooms WHERE id = '{$groupData['room_id']}' LIMIT 1"), 0); ?><br/>
        </span>
        <span style="float:right;width:40px;">
            <img id='rGImg' src="<?php echo $_CONFIG['hotel']['url']; ?>/habbo-imaging/badge/<?php echo $groupData["badge"]; ?>.gif">
        </span>
    </script>
        <div class="clear"></div>
        </div>
    </div>
</div>
</div></div></div>
  
    <?php $getLook = mysql_query("SELECT * FROM `users` WHERE `id` = '{$groupData['owner_id']}' ORDER BY rand()");
                        $look = mysql_fetch_assoc($getLook); ?>
  
  
    <div class="habblet-container">      
        <div class="cbb clearfix settings">
            <h2 class='title' style='font-size:12px;text-align:left;font-family: "Tahoma",Verdana,Arial;'>Group Owner<span style="float: right;"><img src="{url}/app/tpl/skins/Habbo/images/<?php echo  ''. $look['online'].'';  ?>.gif"/></span></h2>
            <div style='padding-left:5px;padding-right:5px;padding-top:5px;'>
            <?php
                        $getBadges = mysql_query("SELECT user_id FROM `group_memberships` WHERE `user_id` = '{$groupData['owner_id']}'");
                        $id = mysql_fetch_assoc($getBadges);
                        $getLook = mysql_query("SELECT * FROM `users` WHERE `id` = '{$groupData['owner_id']}' ORDER BY rand()");
                        $look = mysql_fetch_assoc($getLook);
                                echo ' Username: '.$look['username'].'<br /><span style="float: center;">
                                Motto: '.$look['motto'].'
                                </span> <br /><img src="http://www.habbo.fr/habbo-imaging/avatarimage?figure='.$look['look'].'.gif&direction=2&head_direction=3&gesture=sml&action=wav&" style="padding: 3px;" draggable="false">
                              
                              
                                ';  
                          
                                              
                        ?>
                      
                      
        </div>
    </div>
</div>

          
        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
    </div>

<div id="column2" class="column" style="float:left;width:450px;">

  
  
</div>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->

            
                                                                      
                                                <div id="column1" class="column">
                                                        <div class="habblet-container ">
                                                                <div class="cbb clearfix blue ">
                                                                        <h2 class="title"><span style="float: left;">Group Members</span></h2>
                                                <div class="movable widget GroupsWidget" id="widget-1938125" style=" left: 25px; top: 180px; z-index: 10;">
<div class="w_skin_defaultskin">
    <div class="widget-corner" id="widget-1938125-handle">
        <div class="widget-headline"><h3><span class="header-left">&nbsp;</span><span class="header-middle">Group Members (<span id="groups-list-size"><?php echo mysql_num_rows($userList); ?></span>)</span><span class="header-right">&nbsp;</span></h3>
        </div>  
    </div>
    <div class="widget-body">
        <div class="widget-content">
            <?php
                if(mysql_num_rows($userList) == 0) {
            ?>
            <div class="groups-list-none">
                There are no member at the moment!:(
            </div>
            <?php
                }else {
                    while($row = mysql_fetch_assoc($userList)) {
                        $userData = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE id = '{$row['user_id']}' LIMIT 1"));
                        echo '<a href="{url}/home/'.$userData['username'].'"><img  height="100" src="http://www.habbo.nl/habbo-imaging/avatarimage?figure='.$userData['look'].'" draggable="false"></img>'.$userData['username'].'</a>';
                    }
                }
            ?>
        <div class="clear"></div>
        </div>

</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
    var GroupBadge = "<?php echo $groupData['badge']; ?>";
  
    $(document).on('click', '.badgeSlot', function() {
        $(".badgeSlot").removeClass("selected");
        $(this).addClass("selected");
        GroupBadge = $(this).attr('id');
    });
  
    <?php if(isset($_GET['edit']) && $_SESSION['user']['id'] == $groupData['ownerid']) { ?>
    $(function() {
        $("#overlay").show();
        $("#editGroup").fadeIn("slow");
    });
    <?php } ?>
</script>
                                                      
                                                <script>
                                                $j(document).ready(function() {
                                                        new $j.Zebra_Tooltips($j('.zebra_tips1'));
                                                });
                                                </script>
                                                                      
                                                                </div>
                                                        </div>
                                                </div>                
                    </div>                                         <script>
                                                $j(document).ready(function() {
                                                        new $j.Zebra_Tooltips($j('.zebra_tips1'));
                                                });
                                                </script>
                                                                      
                                                                </div>
                                                        </div>
                                                </div>                
                    </div>
                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
              
            <script type="text/javascript">
                document.observe('dom:loaded', function() {
                    CurrentRoomEvents.init();
                });
            </script>
        </div>
        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
        <script type="text/javascript">
            HabboView.run();
        </script>    
        <!--[if lt IE 7]>
            <script type="text/javascript">
                Pngfix.doPngImageFix();
            </script>
        <![endif]-->
      
        <div id="footer" >
            <?php include('includes/footer.php'); ?>
            <?php include('includes/checktheban.php'); ?>
        </div>
  
    </body>
</html>
I believe there's an XSS exploit though.
 

MadMonsterMan

Member
Mar 25, 2016
202
13
That's the one I coded, I'll see If I have it still.
 
turns out I do.

Code:
<?php include('includes/checktheban.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>{hotelName}: Group Profile</title>

    <script type="text/javascript">
        var andSoItBegins = (new Date()).getTime();
    </script>

    <link rel="shortcut icon" href="{url}/app/tpl/skins/Habbo/web-gallery/v2/favicon.ico" type="image/vnd.microsoft.icon" />
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/common.css" type="text/css" />
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/libs2.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/visual.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/libs.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/common.js" type="text/javascript"></script>
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/fullcontent.js" type="text/javascript"></script>

    <script type="text/javascript">
    document.habboLoggedIn = true;
    var habboName = "{username}";
    var habboId = {userid};
    var facebookUser = false;
    var habboReqPath = "";
    var habboStaticFilePath = "{url}/app/tpl/skins/Habbo/web-gallery";
    var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
    var habboPartner = "";
    var habboDefaultClientPopupUrl = "{url}/client";
    window.name = "habboMain";
    if (typeof HabboClient != "undefined") {
        HabboClient.windowName = "26530fff566f9e67da99560b7fe8da6d71d46391";
        HabboClient.maximizeWindow = true;
    }
    </script>
  

      
        <!--script src="{url}/app/tpl/skins/Habbo//web-gallery/static/js/homeview.js" type="text/javascript"></script-->
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/homes/lightwindow.css" type="text/css" />
        <!--script src="{url}/app/tpl/skins/Habbo//web-gallery/static/js/homeauth.js" type="text/javascript"></script-->
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/homes/group.css" type="text/css" />
      
  

    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/lightweightmepage.css" type="text/css" />
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/lightweightmepage.js" type="text/javascript"></script>

    <meta name="description" content="{meta_description}" />
    <meta name="keywords" content="{meta_keywords}" />

    <!--[if IE 8]>
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/ie8.css" type="text/css" />
    <![endif]-->
    <!--[if lt IE 8]>
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/ie.css" type="text/css" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/web-gallery/static/styles/ie6.css" type="text/css" />
    <script src="{url}/app/tpl/skins/Habbo/web-gallery/static/js/pngfix.js" type="text/javascript"></script>
    <script type="text/javascript">
    try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
    </script>

    <style type="text/css">
    body { behavior: url(/js/csshover.htc); }
    </style>
    <![endif]-->
    <meta name="build" content="63-BUILD2470 - 30.09.2013 11:10 - com" />
</head>

<body id="home" class=" ">
<div id="overlay"></div>

<?php

$navigatorID = 1;
require_once ('app/tpl/skins/Habbo/template/header.php');

?>

      
      
<div id="content-container">

<div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">
        <ul>
        <?php

        $subNavigatorID = 2;
        require_once ('app/tpl/skins/Habbo/template/sub_header.php');

        ?>
        </ul>
                </div>
            </div>
        </div><div id="container">
<div id="content" style="position: relative" class="clearfix">
<span style='font-size:10px'>
<style type="text/css">
    .staffBox{border-bottom:1px dashed #cccccc;min-height:60px;}.staffBox:last-child{border-bottom:none;}

    input[type="submit"], input[type="button"] {
        background: url('https://images.fresh-hotel.org/reg_btn.png') top;
        font: bold 13px arial,sans-serif;
        line-height: 25px;
        color: black;
        height: 25px;
        width: 99px;
        border: 0;
    }
    input[type="submit"]:hover, input[type="button"]:hover {
        background-position: bottom;
        cursor: pointer;
    }
</style>
<?php
    if(!is_numeric($_GET['i'])) $_GET['i'] = 1;
    $q = mysql_query("SELECT * FROM groups WHERE id = '" . filter($_GET['i']) . "' LIMIT 1");
    if(mysql_num_rows($q) != 1) header("location: {$_CONFIG['hotel']['url']}/groups/'" . filter($_GET['i']) . "'");
    $groupData = mysql_fetch_assoc($q);
    unset($q);
    $userList = mysql_query("SELECT user_id FROM group_memberships WHERE group_id = '{$groupData["id"]}'");
  
?>

<script>
    $(document).on('click', '#btnEdit', function() {
        $("#overlay").show();
        $("#editGroup").fadeIn("slow");
    });
  
    $(document).on('click', '#exitBtn', function() {
        $("#overlay").hide();
        $("#editGroup").fadeOut("slow");
    });
  
    $(document).on('click', '#saveBtn', function() {
        $.ajax({
            type: "POST",
            url: "{url}/index.php?url=group&save",
            data: {
                id:"<?php echo $groupData['id']; ?>",
                name:$("#groupName").val(),
                desc:$("#groupDesc").val(),
                badge:GroupBadge
            },
            success: function (data) {
                if(data == "") alert("The group has been saved.");
                else alert(data);
              
                $('#rGName').html($("#groupName").val());
                $('.name-text').html($("#groupName").val());
                $('#rGImg').attr('src', '<?php echo $_CONFIG['hotel']['url']; ?>/habbo-imaging/badge.php?badge=' + GroupBadge + '.gif"');
            },
            error: function() {
                alert("Unable to save the group.");
            }
        });
    });
</script>
<?php
    if(!is_numeric($_GET['i'])) $_GET['i'] = 1;
    $q = mysql_query("SELECT * FROM groups WHERE id = '" . filter($_GET['i']) . "' LIMIT 1");
    if(mysql_num_rows($q) != 1) header("location: {$_CONFIG['hotel']['url']}/groups/'" . filter($_GET['i']) . "'");
    $groupData = mysql_fetch_assoc($q);
    unset($q);
    $userList = mysql_query("SELECT user_id,rank FROM group_memberships WHERE group_id = '{$groupData["id"]}'");
  
?>

<div id="column1" class="column" style="float:left;width:320px;">
    <div class="habblet-container">      
        <div class="cbb clearfix green">
            <h2 class='title' style='font-size:12px;text-align:left;font-family: "Tahoma",Verdana,Arial;'><span style="float: left;">Group Home Page</span></h2>
            <div class="movable widget ProfileWidget" id="widget-902026" style=" left: 25px; top: 26px; z-index: 4;">
<div class="w_skin_defaultskin">
    <div class="widget-corner" id="widget-902026-handle">
    </div>
    <div class="widget-body">
        <div class="widget-content">
    <div class="profile-info">
        <div class="name" style="float: left">
            <span class="name-text"><span id='rGName'>&nbsp;&nbsp;Group Name:<b>  <?php echo $groupData["name"]; ?></b></span></span>
        </div>
    </div>
    <br class="clear" />
        <span style="float:left;width:130px">
                &nbsp; Created: <?php echo date("d-m-y", $groupData['created']); ?><br/>
               &nbsp; Owner: <?php echo mysql_result(mysql_query("SELECT username,look,id FROM users WHERE id = '{$groupData['owner_id']}' LIMIT 1"), 0); ?><br/>
              &nbsp; Room: <?php echo mysql_result(mysql_query("SELECT caption FROM rooms WHERE id = '{$groupData['room_id']}' LIMIT 1"), 0); ?><br/>
        </span>
        <span style="float:right;width:40px;">
            <img id='rGImg' src="<?php echo $_CONFIG['hotel']['url']; ?>/habbo-imaging/badge/<?php echo $groupData["badge"]; ?>.gif">
        </span>
    </script>
        <div class="clear"></div>
        </div>
    </div>
</div>
</div></div></div>
  
    <?php $getLook = mysql_query("SELECT * FROM `users` WHERE `id` = '{$groupData['owner_id']}' ORDER BY rand()");
                        $look = mysql_fetch_assoc($getLook); ?>
  
  
    <div class="habblet-container">      
        <div class="cbb clearfix settings">
            <h2 class='title' style='font-size:12px;text-align:left;font-family: "Tahoma",Verdana,Arial;'>Group Owner<span style="float: right;"><img src="{url}/app/tpl/skins/Habbo/images/<?php echo  ''. $look['online'].'';  ?>.gif"/></span></h2>
            <div style='padding-left:5px;padding-right:5px;padding-top:5px;'>
            <?php
                        $getBadges = mysql_query("SELECT user_id FROM `group_memberships` WHERE `user_id` = '{$groupData['owner_id']}'");
                        $id = mysql_fetch_assoc($getBadges);
                        $getLook = mysql_query("SELECT * FROM `users` WHERE `id` = '{$groupData['owner_id']}' ORDER BY rand()");
                        $look = mysql_fetch_assoc($getLook);
                                echo ' Username: '.$look['username'].'<br /><span style="float: center;">
                                Motto: '.$look['motto'].'
                                </span> <br /><img src="http://www.habbo.fr/habbo-imaging/avatarimage?figure='.$look['look'].'.gif&direction=2&head_direction=3&gesture=sml&action=wav&" style="padding: 3px;" draggable="false">
                              
                              
                                ';  
                          
                                              
                        ?>
                      
                      
        </div>
    </div>
</div>

          
        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
    </div>

<div id="column2" class="column" style="float:left;width:450px;">

  
  
</div>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->

            
                                                                      
                                                <div id="column1" class="column">
                                                        <div class="habblet-container ">
                                                                <div class="cbb clearfix blue ">
                                                                        <h2 class="title"><span style="float: left;">Group Members</span></h2>
                                                <div class="movable widget GroupsWidget" id="widget-1938125" style=" left: 25px; top: 180px; z-index: 10;">
<div class="w_skin_defaultskin">
    <div class="widget-corner" id="widget-1938125-handle">
        <div class="widget-headline"><h3><span class="header-left">&nbsp;</span><span class="header-middle">Group Members (<span id="groups-list-size"><?php echo mysql_num_rows($userList); ?></span>)</span><span class="header-right">&nbsp;</span></h3>
        </div>  
    </div>
    <div class="widget-body">
        <div class="widget-content">
            <?php
                if(mysql_num_rows($userList) == 0) {
            ?>
            <div class="groups-list-none">
                There are no member at the moment!:(
            </div>
            <?php
                }else {
                    while($row = mysql_fetch_assoc($userList)) {
                        $userData = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE id = '{$row['user_id']}' LIMIT 1"));
                        echo '<a href="{url}/home/'.$userData['username'].'"><img  height="100" src="http://www.habbo.nl/habbo-imaging/avatarimage?figure='.$userData['look'].'" draggable="false"></img>'.$userData['username'].'</a>';
                    }
                }
            ?>
        <div class="clear"></div>
        </div>

</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
    var GroupBadge = "<?php echo $groupData['badge']; ?>";
  
    $(document).on('click', '.badgeSlot', function() {
        $(".badgeSlot").removeClass("selected");
        $(this).addClass("selected");
        GroupBadge = $(this).attr('id');
    });
  
    <?php if(isset($_GET['edit']) && $_SESSION['user']['id'] == $groupData['ownerid']) { ?>
    $(function() {
        $("#overlay").show();
        $("#editGroup").fadeIn("slow");
    });
    <?php } ?>
</script>
                                                      
                                                <script>
                                                $j(document).ready(function() {
                                                        new $j.Zebra_Tooltips($j('.zebra_tips1'));
                                                });
                                                </script>
                                                                      
                                                                </div>
                                                        </div>
                                                </div>                
                    </div>                                         <script>
                                                $j(document).ready(function() {
                                                        new $j.Zebra_Tooltips($j('.zebra_tips1'));
                                                });
                                                </script>
                                                                      
                                                                </div>
                                                        </div>
                                                </div>                
                    </div>
                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
              
            <script type="text/javascript">
                document.observe('dom:loaded', function() {
                    CurrentRoomEvents.init();
                });
            </script>
        </div>
        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
        <script type="text/javascript">
            HabboView.run();
        </script>    
        <!--[if lt IE 7]>
            <script type="text/javascript">
                Pngfix.doPngImageFix();
            </script>
        <![endif]-->
      
        <div id="footer" >
            <?php include('includes/footer.php'); ?>
            <?php include('includes/checktheban.php'); ?>
        </div>
  
    </body>
</html>
thanx, so what do i save the file as?
 

Users who are viewing this thread

Top