Hey, Leute!
Wie man im Titel schon sieht, habe ich ein Problem mit meiner Staffpage.
Ich habe meinem Account Rank 7 gegeben, jedoch zeigt er mir den Account nicht auf der Staffpage an, dann habe ich einen 2. Account erstellt mit dem Rank 6. Der wird angezeigt. Rank 5, 4 und 3 werden auch angezeigt.
Bitte um Hilfe!
Hier der Code:
Spoiler anzeigen
<?php $this->display('Header'); ?>
<style>
b {
font-weight: bold;
}
</style>
<div style='width: inherit; position: relative;'>
<div class='box' style='width: 300px; position: absolute; right: 0;z-index: 9999999;margin-right: 10px;'>
<div class='content'>
<div class='staffAvatar'></div>
<div class='staffHead' style='font-weight: lighter; font-size: 16px;font-family: Open Sans;'><?php echo CMS_HOTELNAME; ?> Staffpage</div>
<div class='staffOnlineStatus'></div>
<div class='staffMotto sdesc' style='font-style: italic'></div>
<div class='staffLastLogin'>
Hallo <?php echo ($this->MyUser != null) ? $this->filter($this->MyUser->username) : 'Gast'; ?>,
das ist unsere <span style='font-weight: bold'>neue Staffpage</span>.
</div>
<div class="staffreal_name"></div>
</div>
</div>
</div>
<div style="position: relative;width: 1042px; height: 781px;margin-top:-15px; background-image: url(<?php echo CMS_PATH; ?>public/images/staffs/infobus.png);">
<?php
foreach($this->staffs as $staff) {
$nStaff = $this->userFactory->getUserById($staff->user_id);
if($nStaff->rank > 2) {
?>
<div class="staff" onMouseOver="showInfo('<?php echo $nStaff->id; ?>')" opacity="<?php if($nStaff->online == 0) { echo '0.5'; } else { echo '1'; } ?>" style="opacity: 0;position: absolute; top: <?php echo $staff->pos_y - 50; ?>px;left: <?php echo $staff->pos_x; ?>px;"><img style="-webkit-filter: drop-shadow(0 1px 0 #D8D8D8) drop-shadow(0 -1px 0 #D8D8D8) drop-shadow(1px 0 0 #D8D8D8) drop-shadow(-1px 0 0 #D8D8D8);" src="http://www.habbo.de/habbo-imaging/avatarimage?figure=<?php echo $nStaff->look.$staff->look; ?>" /></div>
<?php } } ?>
</div>
<script>
$(document).ready(function(e) {
$('.staff').each(function(index,obj) {
var obj = $(obj);
obj.animate({
top: parseInt(parseInt(obj.css('top').replace('px', ''))+50)+'px',
opacity: obj.attr('opacity')
}, 500);
});
});
function showInfo(id) {
getStory(id);
}
function getStory(id) {
switch(id) {
<?php
foreach($this->staffs as $staff) {
$nStaff = $this->userFactory->getUserById($staff->user_id);
if($nStaff->rank > 3) {
?>
case '<?php echo $nStaff->id; ?>' :
var last_online = '<?php echo date('d.m.Y - H:i:s', $nStaff->last_online); ?>';
var username = '<?php echo $this->filter($nStaff->username); ?>';
var look = '<?php echo $nStaff->look; ?>';
var motto = "„<?php echo $this->filter($nStaff->motto); ?>”";
var online = '<?php echo ($nStaff->online == 1) ? 'online' : 'offline'; ?>';
var real_name = '<?php echo $this->filter($nStaff->real_name); ?>';
buildInfo(new Array(last_online,username,look,motto,online,real_name));
break;
<?php } } ?>
}
}
function buildInfo(array) {
var array = array;
var last_online = array[0];
var username = array[1];
var look = array[2];
var motto = array[3];
var online = array[4];
var real_name = array[5];
$('.staffHead').html(username);
$('.staffMotto').html(motto);
$('.staffreal_name').html('<br /><b>Aufgaben:</b><br />'+real_name);
$('.staffLastLogin').html('<br /><b>Letzter Login:</b><br />'+last_online);
$('.staffOnlineStatus').html('<img src="<?php echo CMS_PATH; ?>public/images/icons/'+online+'.gif">');
$('.staffAvatar').html('<img src="http://www.habbo.de/habbo-imaging/…ead_direction=4" align="right">');
}
</script>
<?php $this->display('Footer'); ?>