Ich habe auf mein localhost ein anderes rCMS draufgemacht, die alte Version, da ging es mit der gleichen DB&config.php
Hier ist mein /tpl/staffs/new.tpl.php:
PHP
<?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="staffWorking"></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 src="http://www.hucco.net/avatarimager.php?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_login = '<?php echo date('d.m.Y - H:i:s', $nStaff->last_loggedin); ?>';
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 working = '<?php echo $this->filter($nStaff->working); ?>';
buildInfo(new Array(last_login,username,look,motto,online,working));
break;
<?php } } ?>
}
}
function buildInfo(array) {
var array = array;
var last_login = array[0];
var username = array[1];
var look = array[2];
var motto = array[3];
var online = array[4];
var working = array[5];
$('.staffHead').html(username);
$('.staffMotto').html(motto);
$('.staffWorking').html('<br /><b>Aufgabe:</b><br />'+working);
$('.staffLastLogin').html('<br /><b>Letzter Login:</b><br />'+last_login);
$('.staffOnlineStatus').html('<img src="<?php echo CMS_PATH; ?>public/images/icons/'+online+'.gif">');
$('.staffAvatar').html('<img src="http://www.hucco.net/avatarimager.php?figure='+look+'&direction=4&head_direction=4" align="right">');
}
</script>
<?php $this->display('Footer'); ?>
Alles anzeigen
Danke im Vorraus