Hallo Leute!
Probiere grad was an der Smartcms aus und stelle fest das Staffempfehlungen nicht geht (ging vorher schon nich)
Ich weiss nich was ich machen soll die Architektur ist fast gleich der Recms, na ja ich poste mal code:
PHP
$sql = mysql_query("SELECT * FROM cms_staffpick WHERE type = 'room' ORDER BY id"); ?><div id="staffpicks-rooms-habblet-list-container" class="habblet-list-container groups-list"> <ul class="habblet-list"><?phpif(mysql_num_rows($sql) > 0){ while($row = mysql_fetch_assoc($sql)) { $id = $row['rec_id']; $getem = mysql_fetch_assoc(mysql_query("SELECT * FROM rooms WHERE id = ".$id.""));
if(!empty($getem['id'])) { $i++;
if($getem['visitors_now'] == 0) $getem['visitors_now'] = 0; }
$data[$i] = ($getem['visitors_now'] / $getem['visitors_max']) * 100;
if($data[$i] == 99 || $data[$i] > 99) $room_fill = 5; else if($data[$i] > 65) $room_fill = 4; else if($data[$i] > 32) $room_fill = 3; else if($data[$i] > 0) $room_fill = 2; else if($data[$i] < 1) $room_fill = 1; if(IsEven($i) == "even") $even = "even room-occupancy-$room_fill"; else $even = "odd room-occupancy-$room_fill";?> <li class="<?php echo $even; ?>"> <div> <span class="room-name"> <a href="<?php echo PATH; ?>/client?forwardId=2&roomId=<?php echo $id; ?>" onclick="HabboClient.roomForward(this, '<?php echo $id; ?>', 'private'); return false;" target="<?php echo $myrow['client_token']; ?>"><?php echo textInJS($getem['name']);?></a> </span> <span class="room-owner"><a href="<?php echo PATH; ?>/home/<?php echo $getem['owner']; ?>"><?php echo $getem['owner']; ?></a></span> <p><?php echo textInJS($getem['description']); ?></p> </div> </li><?php } ?> </ul></div><?php}else echo '<p align="center">Lo sentimos, pero no hay salas selectas.</p>'; ?><?php } else if($hid == "h119") {function GenerateRoomOccupancy($usersNow, $usersMax){ $num = 1; $percentage = intval(($usersNow / $usersMax) * 100);
if ($percentage <= 0) { $num = 1; } else if ($percentage < 35) { $num = 2; } else if ($percentage < 75) { $num = 3; } else if ($percentage < 100) { $num = 4; } else if ($percentage >= 100) { $num = 5; } return 'room-occupancy-' . $num;}
?><head><link rel="stylesheet" href="<?php echo webgallery; ?>/web-gallery/v2/styles/rooms.css" type="text/css" /><script src="<?php echo webgallery; ?>/web-gallery/static/js/rooms.js" type="text/javascript"></script><script src="<?php echo webgallery; ?>/web-gallery/static/js/rooms.js" type="text/javascript"></script></head>
<div id="rooms-habblet-list-container-h120" class="recommendedrooms-lite-habblet-list-container"> <ul class="habblet-list"><?php
$get = mysql_query("SELECT * FROM rooms WHERE roomtype = 'private' ORDER BY score DESC LIMIT 5");
while ($room = mysql_fetch_assoc($get)){ if ($eo == 'even') { $eo = 'odd'; } else { $eo = 'even'; }
echo '<li class="' . $eo . '"> <span class="clearfix enter-room-link ' . GenerateRoomOccupancy($room['users_now'], $room['users_max']) . '" title="Ir a la sala" roomid="' . $room['id'] . '"> <span class="room-enter">Entrada</span> <span class="room-name">' . $room['caption'] . '</span> <span class="room-description">' . $room['description'] . '</span> <span class="room-owner">Dueño: <a href="./home/' . $room['owner'] . '">' . $room['owner'] . '</a></span> </span> </li>';}
?> </ul> <div id="room-more-data-h120" style="display: none"> <ul class="habblet-list room-more-data"><?php$i = 0;$getem = mysql_query("SELECT *,COUNT(vote) AS votes FROM rooms, room_votes WHERE room_votes.roomid = rooms.id GROUP BY id ORDER BY votes DESC LIMIT 15 OFFSET 5") or die(mysql_error());
while ($row = mysql_fetch_assoc($getem)) { if($row['owner'] !== ""){ $i++;
if($row['visitors_now'] == 0){ $row['visitors_now'] = 1; } $data[$i] = ($row['visitors_now'] / $row['visitors_max']) * 100;
if($data[$i] == 99 || $data[$i] > 99){ $room_fill = "5"; } elseif($data[$i] > 65){ $room_fill = "4"; } elseif($data[$i] > 32){ $room_fill = "3"; } elseif($data[$i] > 0){ $room_fill = "2"; } elseif($data[$i] < 1){ $room_fill = "1"; } if($row['showname'] == "1"){ $roomname = $row['name']; }else{ $roomname = ""; } ?> <li class="<?php echo IsEven($i); ?>"> <span class="clearfix enter-room-link room-occupancy-<?php echo $room_fill; ?>" title="Ir a la sala" roomid="<?php echo $row['id']; ?>"> <span class="room-enter">Entrada</span> <span class="room-name"><?php echo HoloText($roomname); ?></span> <span class="room-description"><?php echo FilterText($row['description']); ?></span> <span class="room-owner">Dueñ@: <a href="<?php echo PATH; ?>/home/<?php echo $row['owner']; ?>"><?php echo HoloText($row['owner']); ?></a></span> </span> </li> <?php } } ?> </ul> </div> <div class="clearfix"> <a href="#" class="room-toggle-more-data" id="room-toggle-more-data-h120">Mostrar más Salas</a> </div></div><script type="text/javascript">L10N.put("show.more", "Mostrar más Salas");L10N.put("show.less", "Mostrar menos Salas");var roomListHabblet_h120 = new RoomListHabblet("rooms-habblet-list-container-h120", "room-toggle-more-data-h120", "room-more-data-h120");</script>
<?php}else if($hid == "h121"){
Alles anzeigen
Hoffe ihr könnt mir helfen!