Staff page convert plusemu to arcturus

JoshuaS

Learning
Jan 9, 2014
119
13
Hi Devbest!

Atm I'm trying to convert my RevCMS skin to Arcturus and i came across the problem on staff page, where PlusEmu is a bit different than Arcturus. At the moment the site fetches the "ranks" table in plus database, where i want it to grab the permissions table staff list names on arcturus. I've put my staff code in the spoiler if anyone can edit it, og give me some guidance. Thanks for your time!
PHP:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName}: Staff</title>

        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>

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

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

    <body id="home">

        <div id="overlay"></div>
             <?php include ("includes/header.php"); ?>
                <ul id="navi">
                    <li class="metab"><a href="{url}/me">{username}</a><span></span></li>
                    <li class="selected"><strong>Community</strong><span></span></li>
                    <li id="values"><a href= "{url}/values">Rare Values</a><span></span></li>
                    <li id="tab-register-now"><a href="{url}/shop">Shop</a><span></span></li>
                </ul>
                <div id="habbos-online" style="background-color:#FFF;border-radius:6px;"><div class="rounded"><span>{online}<br> members playing</div></div>
            </div>
        </div>
        <div id="content-container">
            <div id="navi2-container" class="pngbg">
                <div id="navi2" class="pngbg clearfix">
                    <ul>
                        <li class=""><a href="{url}/community">Community</a></li>
                        <li class=""><a href="{url}/news">Articles</a></li>
                        <li class=" selected">Staff Team</li>
                        <li class= ""><a href="{url}/topstats">Top Stats</a></li>
                    </ul>
                </div>
            </div>
        <div id="content-container">
            <div id="container">
                <div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
                                        <?php

function GetDescr($level)
{
        switch ($level)
        {
                case 9:
                        return 'Hotel Creators';
                case 8:

                        return 'Hotel Management';
                case 7:

                        return 'Staff Management';
                case 6:

                        return 'Administrative Staff';

                case 5:

                        return 'Senior Moderators';

                case 4:

                        return 'Moderators';

                case 3:

                        return 'Trial Moderators';

                case 2:

                        return 'Event Staff';

                default:

                        return '';
        }
}

$getRanks = mysql_query("SELECT id,name FROM ranks WHERE id >= 2 ORDER BY id DESC");

while ($Ranks = mysql_fetch_assoc($getRanks))
{
        echo '<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">' . $Ranks['name'] . '</span> <span style="float: right; font-weight: normal; font-size: 75%;">' . GetDescr($Ranks['id']) . '</span></h2>';

        $getMembers = mysql_query("SELECT id,username,motto,look,online,account_created,rank_name,age,country,last_online FROM users WHERE rank = '" . $Ranks['id'] . "'");

        echo '<div style="padding:0px 15px; clear:both;">';

        if (mysql_num_rows($getMembers) > 0)
        {
                $oe = 1;

                while ($member = mysql_fetch_assoc($getMembers))
                {
                        if ($oe == 2)
                        {
                                $oe = 1;
                        }
                        else
                        {
                                $oe = 2;
                        }
                        $Bans = mysql_query("SELECT * FROM `bans` WHERE `added_by` = '" . $member['username'] . "'");

                        //tid



                        $datemark = date('d/m');

                        $BanCount = mysql_num_rows($Bans);
                        echo '<table width="107%" height="65px;" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';">
                        <tbody>
                                <tr>
                                        <td valign="middle" width="25">
                                                <div style=" height:60px; width:65px; position:relative; bottom:10px; overflow: hidden;"><img draggable="false" style="margin-top: -10px;" src="http://www.habbo.com/habbo-imaging/avatarimage?figure=' .$member['look'] . '&direction=2&head_direction=2&size=m&gesture="></div>
                                        </td>
                    <td valign="top">
                        </br><p style="margin-top: -10px; padding-bottom:0;" style="font-size: 100%;"><strong><a><u>' .$member['username'] . '</a></u></strong></i><br><img title="Motto" style="margin-top: 5px;" src="{url}/app/tpl/skins/Habbo/images/motto.gif"> "<i>' . $member['motto'] .'</i>" <br><img title="Sidste login" src="{url}/app/tpl/skins/Habbo/images/login.gif">
                        ';
                        setlocale(LC_ALL, 'da_DA');
                        $lastlogin = date('d/m',$member['last_online']);
                        $yesterday = date('d/m', time()-86400);

                        if($member['online'] == "1"){
                          echo "Online nu!";
                        } else {
                            switch($lastlogin) {
                              case $datemark:
                              echo "I dag ";
                              break;
                              case $yesterday:
                              echo "I går ";
                              break;
                              default:
                              echo date('d/m ',$member['last_online']);
                              break;
                            }
                            echo " kl. ".date('H:i',$member['last_online']);
                        }
                        echo "<hr><b>Role: </b><i>".$member['rank_name']."</i>";


                        //echo '' . (($member['online'] == "1") ? 'Online nu!':  ((date('d/m',$member['last_online'])==$datemark) ? "I dag ":date('d/m ',$member['last_online'])).'kl. '.date('H:i',$member['last_online'])) .  '
                        //<hr>
                        //<b>Role:</b><i> ' . $member['rank_name'] . '</i>';



                    echo '</td>

                    </td>
                                        <td valign="top" style="float: right;">
                                                ' . (($member['online'] == "1") ? '<img src="{url}/app/tpl/skins/Habbo/images/online.gif" draggable="false">': '<img src="{url}/app/tpl/skins/Habbo/images/offline.gif" draggable="false">') . '
                                                <br><img style="position:relative; margin: 5px 10px;" src="{url}/swf/c_images/album1584/ADM.gif">
                                        </td>
                                </tr>
                        </tbody>
                        </table>';
                }
        }
        else
        {
                echo '<i>There are no users in this staff group yet.</i>';
        }

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

?>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
                    <div id="column2" class="column">
                                        <div class="habblet-container ">
<div class="cbb clearfix blue ">

<h2 class="title">{hotelName} Staff</h2>

                                                <div class="box-content">

        <img src="/swf/c_images/album1584/ADM.gif" align="right">

        <p>
                {hotelName} Staff develops, manages, and moderates the hotel. They make sure everything
                is working smoothly and the users are safe. All {hotelName} Staff is listed on this page,
                and you can always recognize them by their staff badge in the hotel.
        </p>

</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
                                        <div id="column2" class="column">
                                        <div class="habblet-container ">
<div class="cbb clearfix blue ">

<h2 class="title">Need Help?</h2>

                                                <div class="box-content">

<p>
<center><img src="{url}/swf/c_images/article_images_hq/questionmark_v2.gif"></center>
If you're in need of assistance, the staff are the people to talk to. You can normally find them in-game and they will deal with the issue that you have.
</p>

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


                                </div>
                            </div>
                        </div>
                    </div>
                                                </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>
        </div>

    </body>
</html>
 

n4te

zzz
Oct 27, 2014
669
293
Hi Devbest!

Atm I'm trying to convert my RevCMS skin to Arcturus and i came across the problem on staff page, where PlusEmu is a bit different than Arcturus. At the moment the site fetches the "ranks" table in plus database, where i want it to grab the permissions table staff list names on arcturus. I've put my staff code in the spoiler if anyone can edit it, og give me some guidance. Thanks for your time!
PHP:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName}: Staff</title>

        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>

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

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

    <body id="home">

        <div id="overlay"></div>
             <?php include ("includes/header.php"); ?>
                <ul id="navi">
                    <li class="metab"><a href="{url}/me">{username}</a><span></span></li>
                    <li class="selected"><strong>Community</strong><span></span></li>
                    <li id="values"><a href= "{url}/values">Rare Values</a><span></span></li>
                    <li id="tab-register-now"><a href="{url}/shop">Shop</a><span></span></li>
                </ul>
                <div id="habbos-online" style="background-color:#FFF;border-radius:6px;"><div class="rounded"><span>{online}<br> members playing</div></div>
            </div>
        </div>
        <div id="content-container">
            <div id="navi2-container" class="pngbg">
                <div id="navi2" class="pngbg clearfix">
                    <ul>
                        <li class=""><a href="{url}/community">Community</a></li>
                        <li class=""><a href="{url}/news">Articles</a></li>
                        <li class=" selected">Staff Team</li>
                        <li class= ""><a href="{url}/topstats">Top Stats</a></li>
                    </ul>
                </div>
            </div>
        <div id="content-container">
            <div id="container">
                <div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
                                        <?php

function GetDescr($level)
{
        switch ($level)
        {
                case 9:
                        return 'Hotel Creators';
                case 8:

                        return 'Hotel Management';
                case 7:

                        return 'Staff Management';
                case 6:

                        return 'Administrative Staff';

                case 5:

                        return 'Senior Moderators';

                case 4:

                        return 'Moderators';

                case 3:

                        return 'Trial Moderators';

                case 2:

                        return 'Event Staff';

                default:

                        return '';
        }
}

$getRanks = mysql_query("SELECT id,name FROM ranks WHERE id >= 2 ORDER BY id DESC");

while ($Ranks = mysql_fetch_assoc($getRanks))
{
        echo '<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">' . $Ranks['name'] . '</span> <span style="float: right; font-weight: normal; font-size: 75%;">' . GetDescr($Ranks['id']) . '</span></h2>';

        $getMembers = mysql_query("SELECT id,username,motto,look,online,account_created,rank_name,age,country,last_online FROM users WHERE rank = '" . $Ranks['id'] . "'");

        echo '<div style="padding:0px 15px; clear:both;">';

        if (mysql_num_rows($getMembers) > 0)
        {
                $oe = 1;

                while ($member = mysql_fetch_assoc($getMembers))
                {
                        if ($oe == 2)
                        {
                                $oe = 1;
                        }
                        else
                        {
                                $oe = 2;
                        }
                        $Bans = mysql_query("SELECT * FROM `bans` WHERE `added_by` = '" . $member['username'] . "'");

                        //tid



                        $datemark = date('d/m');

                        $BanCount = mysql_num_rows($Bans);
                        echo '<table width="107%" height="65px;" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';">
                        <tbody>
                                <tr>
                                        <td valign="middle" width="25">
                                                <div style=" height:60px; width:65px; position:relative; bottom:10px; overflow: hidden;"><img draggable="false" style="margin-top: -10px;" src="http://www.habbo.com/habbo-imaging/avatarimage?figure=' .$member['look'] . '&direction=2&head_direction=2&size=m&gesture="></div>
                                        </td>
                    <td valign="top">
                        </br><p style="margin-top: -10px; padding-bottom:0;" style="font-size: 100%;"><strong><a><u>' .$member['username'] . '</a></u></strong></i><br><img title="Motto" style="margin-top: 5px;" src="{url}/app/tpl/skins/Habbo/images/motto.gif"> "<i>' . $member['motto'] .'</i>" <br><img title="Sidste login" src="{url}/app/tpl/skins/Habbo/images/login.gif">
                        ';
                        setlocale(LC_ALL, 'da_DA');
                        $lastlogin = date('d/m',$member['last_online']);
                        $yesterday = date('d/m', time()-86400);

                        if($member['online'] == "1"){
                          echo "Online nu!";
                        } else {
                            switch($lastlogin) {
                              case $datemark:
                              echo "I dag ";
                              break;
                              case $yesterday:
                              echo "I går ";
                              break;
                              default:
                              echo date('d/m ',$member['last_online']);
                              break;
                            }
                            echo " kl. ".date('H:i',$member['last_online']);
                        }
                        echo "<hr><b>Role: </b><i>".$member['rank_name']."</i>";


                        //echo '' . (($member['online'] == "1") ? 'Online nu!':  ((date('d/m',$member['last_online'])==$datemark) ? "I dag ":date('d/m ',$member['last_online'])).'kl. '.date('H:i',$member['last_online'])) .  '
                        //<hr>
                        //<b>Role:</b><i> ' . $member['rank_name'] . '</i>';



                    echo '</td>

                    </td>
                                        <td valign="top" style="float: right;">
                                                ' . (($member['online'] == "1") ? '<img src="{url}/app/tpl/skins/Habbo/images/online.gif" draggable="false">': '<img src="{url}/app/tpl/skins/Habbo/images/offline.gif" draggable="false">') . '
                                                <br><img style="position:relative; margin: 5px 10px;" src="{url}/swf/c_images/album1584/ADM.gif">
                                        </td>
                                </tr>
                        </tbody>
                        </table>';
                }
        }
        else
        {
                echo '<i>There are no users in this staff group yet.</i>';
        }

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

?>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
                    <div id="column2" class="column">
                                        <div class="habblet-container ">
<div class="cbb clearfix blue ">

<h2 class="title">{hotelName} Staff</h2>

                                                <div class="box-content">

        <img src="/swf/c_images/album1584/ADM.gif" align="right">

        <p>
                {hotelName} Staff develops, manages, and moderates the hotel. They make sure everything
                is working smoothly and the users are safe. All {hotelName} Staff is listed on this page,
                and you can always recognize them by their staff badge in the hotel.
        </p>

</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
                                        <div id="column2" class="column">
                                        <div class="habblet-container ">
<div class="cbb clearfix blue ">

<h2 class="title">Need Help?</h2>

                                                <div class="box-content">

<p>
<center><img src="{url}/swf/c_images/article_images_hq/questionmark_v2.gif"></center>
If you're in need of assistance, the staff are the people to talk to. You can normally find them in-game and they will deal with the issue that you have.
</p>

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


                                </div>
                            </div>
                        </div>
                    </div>
                                                </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>
        </div>

    </body>
</html>
The permissions table? Don't you mean the ranks table? I'd help you further, but I'm not familiar with the emulators database.
 

Joe

Well-Known Member
Jun 10, 2012
4,090
1,918
Just change the code so it pulls information from the right tables?

OR make a new table and pull the information from there and you can edit and set it up exactly how you want it.
 

Users who are viewing this thread

Top