Coding Staff Page

Results 1 to 7 of 7
  1. #1
    Account Upgraded | Title Enabled! J4y2 is offline
    MemberRank
    Feb 2012 Join Date
    South KoreaLocation
    317Posts

    Coding Staff Page

    Hi, I need help fixing my staff page. The Problem is it doesn't show any rank at all and the rank I wanted. Can anyone help me?

    PHP Code:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>{hotelname} - Hotel Staff</title>
    <script type="text/javascript">
    //<![CDATA[
    window.__CF=window.__CF||{};window.__CF.AJS={"ga_key":{"ua":"UA-38146308-1","ga_bs":"2"}};
    //]]>
    </script>
    <script type="text/javascript">
    //<![CDATA[
    try{if (!window.CloudFlare) { var CloudFlare=[{verbose:0,p:1360836370,byc:0,owlid:"cf",mirage:{responsive:0,lazy:0},oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/abv=1870252173/"},atok:"453f4942d7568a3ae99eea718e942855",zone:"{hotelname}hotel.com",rocket:"0",apps:{"ga_key":{"ua":"UA-38146308-1","ga_bs":"2"}}}];var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.async=!0;a.src="//ajax.cloudflare.com/cdn-cgi/nexp/abv=4114775854/cloudflare.min.js";b.parentNode.insertBefore(a,b);}}catch(e){};
    //]]>
    </script>

    <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/tooltip.css" type="text/css">
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/content.css" type="text/css">
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/navigation.css" type="text/css">
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/common1.css" type="text/css">
    <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/commontest.css" type="text/css">
    <script type="text/javascript" src="{url}/app/tpl/skins/Habfly/js/libs2.js"></script>
    <script type="text/javascript" src="{url}/app/tpl/skins/Habfly/js/visual.js"></script>
    <script type="text/javascript" src="{url}/app/tpl/skins/Habfly/js/libs.js"></script>
    <script type="text/javascript" src="{url}/app/tpl/skins/Habfly/js/common.js"></script>
    <script type="text/javascript" src="{url}/app/tpl/skins/Habfly/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/Habfly";
                var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
                var habboPartner = "";
                var habboDefaultClientPopupUrl = "{url}/client";
                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/Habfly/styles/ie8.css" type="text/css">
            <![endif]-->
    <!--[if lt IE 8]>
                <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/ie.css" type="text/css" />
            <![endif]-->
    <!--[if lt IE 7]>
                <link rel="stylesheet" href="{url}/app/tpl/skins/Habfly/styles/ie6.css" type="text/css" />
                <script type="text/javascript" src="{url}/app/tpl/skins/Habfly/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/Habfly/js/csshover.htc); }
                </style>
            <![endif]-->
    <meta name="build" content="63-BUILD1228 - 27.03.2012 12:15 - com"/>
    <script type="text/javascript">
    /* <![CDATA[ */
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-38146308-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    (function(b){(function(a){"__CF"in b&&"DJS"in b.__CF?b.__CF.DJS.push(a):"addEventListener"in b?b.addEventListener("load",a,!1):b.attachEvent("onload",a)})(function(){"FB"in b&&"Event"in FB&&"subscribe"in FB.Event&&(FB.Event.subscribe("edge.create",function(a){_gaq.push(["_trackSocial","facebook","like",a])}),FB.Event.subscribe("edge.remove",function(a){_gaq.push(["_trackSocial","facebook","unlike",a])}),FB.Event.subscribe("message.send",function(a){_gaq.push(["_trackSocial","facebook","send",a])}));"twttr"in b&&"events"in twttr&&"bind"in twttr.events&&twttr.events.bind("tweet",function(a){if(a){var b;if(a.target&&a.target.nodeName=="IFRAME")a:{if(a=a.target.src){a=a.split("#")[0].match(/[^?=&]+=([^&]*)?/g);b=0;for(var c;c=a[b];++b)if(c.indexOf("url")===0){b=unescape(c.split("=")[1]);break a}}b=void 0}_gaq.push(["_trackSocial","twitter","tweet",b])}})})})(window);
    /* ]]> */
    </script>
    </head>
    <body id="community"><script type="text/javascript">
    //<![CDATA[
    try{(function(a){var b="http://",c="{hotelname}.com",d="/cdn-cgi/cl/",e="c6c315c9126bb1126839538895730b74556c6dbc.gif",f=new a;f.src=[b,c,d,e].join("")})(Image)}catch(e){}
    //]]>
    </script>
    <center>
    <div id="topHeader">
    <div id="topHeader" class="container">
    <a href="#"><div class="logo"></div>
    <div id="onlinebox"><span><br>{online} Online</span></div>
    <a href="/client" target="75665b0c7de5743d460edc0f98e495c05ee2a9be" onclick="HabboClient.openOrFocus(this); return false;">
    <div class="enter_big" style="height: 32px; width: 125px; float:right; margin: 22px 5px 0 0; line-height: 33px;">
    <span style="text-shadow: 1px 1px #29590d; font-family:Calibri; font-size:16px;"><b>Enter {hotelname}</b></span>
    </div>
    </div>
    </div>
    </div>
    <div id="tabHeader">
    <div id="navi">
    <ul>
    <a href="{url}/me"><li id="home">Home</li>
    <a href="{url}/community"><li id="community">Community</li>
    <a href="{url}/Shop/index"><li id="pvip">VIP</li>
    <a href="{url}/logout" style="float:right;margin-right: 33px;"><li>Sign Out</li></a>
    </ul>
    </div>
    </div>
    <div id="content-container">
    <div id="navi2-container" class="pngbg">
    <div id="navi2" class="pngbg clearfix">
    <ul>
    <li><a href="{url}/community">Community</li>
    <li><a href="{url}/news">News</a></li>
    <li class="selected">Staff</a></li>
    </ul>
    </div>
    </div>
    <div id="container">
    <div id="page-content-mid-left">
    <div id="page-content-text">
    <center>
    <div id="contentHeader" class="green">
    <p>What is an eXpert?</p>
    </div>
    </center>
    <div id="page-content-padding">
    <div id="box-content">

    <p style="padding:3px 0px 5px 1px;"><img src="{url}/swf/c_images/album1584/XXX.gif" style="float:right;padding-left:8px;margin-right:5px;"> {hotelname} eXpert's is some users that will help you with stuff, they are grown up well trained users that are eXpert in some things.</p>
    </div>
    </div>
    </div>
    </div>
    <div id="page-content-mid-left">
    <div id="page-content-text">
    <center>
    <div id="contentHeader" class="blue">
    <p>Hotel Owner</p>
    </div>
    </center>
    <div id="page-content-padding">
    <div id="box-content">
    <div id="box-content"><table style="margin-top: -12px;" width="107%" style="padding: 5px; margin-left: -15px; background-color: #fff;">
    <tbody>
    <tr>
    <td valign="middle" width="25">
    <br>
                    <?php
                                    
                        $GetRanks 
    mysql_query("SELECT id,name FROM ranks WHERE id > 4 AND id < 7 ORDER BY id DESC");
                                while(
    $Ranks mysql_fetch_assoc($GetRanks))
                                { 
                        
                        echo 
                        
    '                    
                        <tr>
                            <td>
    <td a="" href="#" title="'
    .$staffArray['username'].' is Online = '.$staffArray['online'].' (1 = ja. 0 = nei)" class="tooltip">
    <div style="width: 72px; height: 80px; margin-top:-22px; margin-left:-10px; float: left; background: url(http://habbo.com.tr/habbo-imaging/avatarimage?action=wlk&?&gesture=sml&figure='
    .$staffArray['look'].'&action=null&direction=2&head_direction=3&size=b&img_format=gif );">
                            
                            </td>
    </td>
                            <td>
                            <strong><font size=""><a href="index.php?url=community&user='
    .$staffArray['username'].'">'.$staffArray['username'].'</a></font></strong>
                            <br/>
                            <p style="font-size: 90%;"><font color="grey">Motto: </strong> '
    .$staffArray['motto'].'</p>
                            <br/>
                            <img src="{url}/app/tpl/skins/Habfly/images/spacernigger.png"/>
                            </td>                        
                        </tr>
                        
                        '
    ;
                        
                        }                    
                        
                    
    ?>
    </td>
    </tr>
    </tbody>
    </table></div>
    </div>
    <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script> </div>
    </div>


  2. #2
    Hakuna Matata Matata is offline
    MemberRank
    Sep 2012 Join Date
    DenmarkLocation
    807Posts

    Re: Coding Staff Page

    SELECT id,name FROM ranks WHERE id > 4 AND id < 7 ORDER BY id DESC

    Might be wrong, but shouldn't it be:
    SELECT id,name FROM users WHERE rank > 4 AND id < 7 ORDER BY id DESC

    That would get the id and name from the users table where the rank is over 4 but below 7.

  3. #3
    Valued Member Muhd Nazmi is offline
    MemberRank
    Dec 2012 Join Date
    Kepler22Location
    107Posts

    Re: Coding Staff Page

    1. Not id > 4 and id < 7 , but rank > 4 and rank < 7
    2. There is no variable such as $staffarray[''] , It is $Ranks['']
    Last edited by Muhd Nazmi; 08-06-13 at 06:13 AM. Reason: Delete code

  4. #4
    Account Upgraded | Title Enabled! J4y2 is offline
    MemberRank
    Feb 2012 Join Date
    South KoreaLocation
    317Posts

    Re: Coding Staff Page

    Not sure about this but cms show no error about the staff array because I copy the code from habbo theme

    Sent from my ST21i using Tapatalk 2

  5. #5
    Account Upgraded | Title Enabled! flx5 is offline
    MemberRank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: Coding Staff Page

    Looks like very very bad code....
    Just have a look at this line:

    Code:
    <td a="" href="#" title="'.$staffArray['username'].' is Online = '.$staffArray['online'].' (1 = ja. 0 = nei)" class="tooltip">
    Additionally the SQL query doesn't match the data used later...
    If you look even closer the code doesn't use one single line of default HTML as declared by W3C...

    Which CMS do you use?

    The error doesn't show because it's very common to setup the server so it suppresses the errors...
    Last edited by flx5; 08-06-13 at 08:03 PM. Reason: forgot something

  6. #6
    Account Upgraded | Title Enabled! J4y2 is offline
    MemberRank
    Feb 2012 Join Date
    South KoreaLocation
    317Posts

    Re: Coding Staff Page

    Revcms

    Sent from my ST21i using Tapatalk 2

  7. #7
    Account Upgraded | Title Enabled! flx5 is offline
    MemberRank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: Coding Staff Page

    hm, never had a look at that one...
    What do you basically want to do?
    Show the users with a specific rank or just show all ranks?



Advertisement