Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Staff Page last logged in
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Evilsmoothie" data-source="post: 370291" data-attributes="member: 28136"><p>In my view, it makes no sense to intentionally set a person in need of help on the wrong path. Don't be such an ass.</p><p>In regards to "how could you even run that", I hope Im not misinterpreting you .. but this is how</p><p>[PHP]public static function getStaff($rank)</p><p> {</p><p> if(DB::getInstance()->query("SELECT * FROM users WHERE rank = $rank")->count())</p><p> {</p><p> $oddEven = "odd";</p><p> $getStaff = DB::getInstance()->query("SELECT * FROM users WHERE rank = $rank ORDER BY id ASC");</p><p> foreach($getStaff->results() as $staff) {</p><p></p><p> if($oddEven == "#F5F5F5")</p><p> {</p><p> $oddEven = "#FFFFFF";</p><p> }</p><p> else</p><p> {</p><p> $oddEven = "#F5F5F5";</p><p> }</p><p></p><p> if($staff->online == 1)</p><p> {</p><p> $onlineStatus = "<img src='{site_url}/library/templates/tmp/images/staff/online.gif'>";</p><p> }</p><p> else</p><p> {</p><p> $onlineStatus = "<img src='{site_url}/library/templates/tmp/images/staff/offline.gif'>";</p><p> }</p><p></p><p> echo '<table width="100%" style="padding: 2px; background-color: ' . $oddEven . ';"><tbody><tr></p><p> <td valign="middle" width="25"></p><p> <div style="width: 54px; height: 54px; margin-top:-10px; float: left; background: url(https://www.habbo.com.tr/habbo-imaging/avatarimage?figure=' . $staff->look . '&amp;gesture=sml&amp;size=m&amp;headonly=1);"></div></p><p> </td></p><p> <td valign="top"></p><p> <b style="font-size: 110%;">' . $staff->username . '</b> <font size="1"></a>' . $staff->position . '</font></p><p> <br /></p><p> Motto: <i>' . $staff->motto . '</i><br></p><p> Last seen: ' . Light::time_elapsed_string($staff->last_online) . '<br> </p><p> </td></p><p> <td valign="top" style="float: right;"></p><p> ' . $onlineStatus . '</p><p> </td></p><p> </tr></tbody></table>';</p><p> }</p><p> }</p><p> else {</p><p> echo '<div class="habblet box-content" style="margin-top:-5px;"><i>There are no staff members in this category.</i></div>';</p><p> }</p><p> }[/PHP]</p><p>The code isn't very pretty - but whatever. It's mine and does the job I need it to. To clearify I do <?php Light::getStaff(9); ?> on the staff page when I need to. Simple and keeps my tpls pretty and organised. On top of that it yields a very neat result </p><p><img src="http://i.imgur.com/z32tBLo.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p>Now that we've settled that the code works - go away unless you're going to help TS.</p></blockquote><p></p>
[QUOTE="Evilsmoothie, post: 370291, member: 28136"] In my view, it makes no sense to intentionally set a person in need of help on the wrong path. Don't be such an ass. In regards to "how could you even run that", I hope Im not misinterpreting you .. but this is how [PHP]public static function getStaff($rank) { if(DB::getInstance()->query("SELECT * FROM users WHERE rank = $rank")->count()) { $oddEven = "odd"; $getStaff = DB::getInstance()->query("SELECT * FROM users WHERE rank = $rank ORDER BY id ASC"); foreach($getStaff->results() as $staff) { if($oddEven == "#F5F5F5") { $oddEven = "#FFFFFF"; } else { $oddEven = "#F5F5F5"; } if($staff->online == 1) { $onlineStatus = "<img src='{site_url}/library/templates/tmp/images/staff/online.gif'>"; } else { $onlineStatus = "<img src='{site_url}/library/templates/tmp/images/staff/offline.gif'>"; } echo '<table width="100%" style="padding: 2px; background-color: ' . $oddEven . ';"><tbody><tr> <td valign="middle" width="25"> <div style="width: 54px; height: 54px; margin-top:-10px; float: left; background: url(https://www.habbo.com.tr/habbo-imaging/avatarimage?figure=' . $staff->look . '&gesture=sml&size=m&headonly=1);"></div> </td> <td valign="top"> <b style="font-size: 110%;">' . $staff->username . '</b> <font size="1"></a>' . $staff->position . '</font> <br /> Motto: <i>' . $staff->motto . '</i><br> Last seen: ' . Light::time_elapsed_string($staff->last_online) . '<br> </td> <td valign="top" style="float: right;"> ' . $onlineStatus . ' </td> </tr></tbody></table>'; } } else { echo '<div class="habblet box-content" style="margin-top:-5px;"><i>There are no staff members in this category.</i></div>'; } }[/PHP] The code isn't very pretty - but whatever. It's mine and does the job I need it to. To clearify I do <?php Light::getStaff(9); ?> on the staff page when I need to. Simple and keeps my tpls pretty and organised. On top of that it yields a very neat result [IMG]http://i.imgur.com/z32tBLo.png[/IMG] Now that we've settled that the code works - go away unless you're going to help TS. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Staff Page last logged in
Top