[PHP] Where are divs pulled from? If that makes sense...
I'm a beginner in PHP and I'm sure this is some how my fault but the quick menu of HoloCMS just decided to randomly say object not found after working perfectly before, I've checked the habblets and they're all in place, I've got no idea what to do.
I know that divs are pulled from somewhere else, I'm just not sure where.
This is the part I need help with and need to know whats missing:
PHP Code:
<div id="subnavi">
<div id="subnavi-user">
<?php if($logged_in){ ?>
<ul>
<li id="myfriends"><a href="#"><span>My Friends</span></a><span class="r"></span></li>
<li id="mygroups"><a href="#"><span>My Groups</span></a><span class="r"></span></li>
<li id="myrooms"><a href="#"><span>My Rooms</span></a><span class="r"></span></li>
</ul>
Re: [PHP] Where are divs pulled from? If that makes sense...
They're pulled from a Cascading Style Sheet.
Re: [PHP] Where are divs pulled from? If that makes sense...
Quote:
Originally Posted by
Tr0ll.™
They're pulled from a Cascading Style Sheet.
Alright I'll try searching around in the web-gallery and see if I have any luck.
Edit: Replaced all the CSS files with the original ones that I had before and they still all looked the same.. Ugh
Would anyone be willing to help me via team viewer? :)
If seeing the error on the site helps, here's the link www.primehotel.in
Re: [PHP] Where are divs pulled from? If that makes sense...
Try to find which CSS file that file is calling(usually at the top of the page)
Re: [PHP] Where are divs pulled from? If that makes sense...
Quote:
Originally Posted by
Tr0ll.™
Try to find which CSS file that file is calling(usually at the top of the page)
I've tried that as well, it only calls on the core and the core doesn't call on any. I'm pretty sure that it pulls the info from the habblet folder, this is the file:
PHP Code:
<?php
require_once('../core.php');
require_once('../includes/session.php');
$key = FilterText($_GET['key']);
switch($key){
case "friends_all": $mode = 1; break;
case "groups": $mode = 2; break;
case "rooms": $mode = 3; break;
}
if(!isset($mode) || !isset($key)){ $mode = 1; }
switch($mode){
case 1:
$str = "friends";
$get_em = mysql_query("SELECT * FROM messenger_friendships WHERE user_two_id = '".$my_id."' ") or die(mysql_error());
//$get_em2 = mysql_query("SELECT * FROM messenger_friendships WHERE user_two_id = '".$my_id."' OR user_two_id = '".$my_id."'") or die(mysql_error());
break;
case 2:
$str = "groups";
$get_em = mysql_query("SELECT * FROM groups_memberships WHERE userid = '".$my_id."' AND is_pending = '0' ORDER BY member_rank LIMIT 10") or die(mysql_error());
break;
case 3:
$str = "rooms";
$get_em = mysql_query("SELECT * FROM rooms WHERE owner = '".$name."' ORDER BY caption ASC LIMIT 50") or die(mysql_error());
break;
}
$results = mysql_num_rows($get_em);
$oddeven = 0;
if($results > 0){
if($mode == 1){
echo "<ul id=\"offline-friends\">\n";
while ($row = mysql_fetch_assoc($get_em)){
if($row['userid'] == $my_id){
$userdatasql = mysql_query("SELECT username FROM users WHERE id = '".$row['user_two_id']."' LIMIT 1") or die(mysql_error());
} else {
$userdatasql = mysql_query("SELECT username FROM users WHERE id = '".$row['user_one_id']."' LIMIT 1") or die(mysql_error());
}
$user_exists = mysql_num_rows($userdatasql);
if($user_exists > 0){
$userrow = mysql_fetch_assoc($userdatasql);
$oddeven++;
if(IsEven($oddeven)){ $even = "odd"; } else { $even = "even"; }
printf(" <li class=\"%s\"><a href=\"user_profile.php?name=%s\">%s</a></li>\n",$even,$userrow['username'],$userrow['username']);
}
}
echo "\n</ul>";
} elseif($mode == 2){
echo "<ul id=\"quickmenu-groups\">\n";
$num = 0;
while($row = mysql_fetch_assoc($get_em)){
$num++;
$group_id = $row['groupid'];
$check = mysql_query("SELECT name,ownerid FROM groups_details WHERE id = '".$group_id."' LIMIT 1") or die(mysql_error());
$groupdata = mysql_fetch_assoc($check);
echo "<li class=\"";
if(IsEven($num)){ echo "odd"; } else { echo "even"; }
echo "\">";
if($row['is_current'] == 1){ echo "<div class=\"favourite-group\" title=\"Favourite\"></div>\n"; }
if($row['member_rank'] > 1 && $groupdata['ownerid'] !== $my_id){ echo "<div class=\"admin-group\" title=\"Admin\"></div>\n"; }
if($groupdata['ownerid'] == $my_id && $row['member_rank'] > 1){ echo "<div class=\"owned-group\" title=\"Priority\"></div>\n"; }
echo "\n<a href=\"group_profile.php?id=".$group_id."\">".HoloText($groupdata['name'])."</a>\n</li>";
}
echo "\n</ul>";
} elseif($mode == 3){
echo "<ul id=\"quickmenu-rooms\">\n";
while ($row = mysql_fetch_assoc($get_em)){
$oddeven++;
if(IsEven($oddeven)){ $even = "odd"; } else { $even = "even"; }
printf(" <li class=\"%s\"><a href=\"client.php?forwardId=2&roomId=%s\" onclick=\"roomForward(this, '%s', 'private'); return false;\" target=\"client\" id=\"room-navigation-link_%s\">%s</a></li>\n",$even,$row['id'],$row['id'],$row['id'],$row['caption']);
}
echo "\n</ul>";
} else {
echo "Invalid";
}
} else {
echo "<ul id=\"quickmenu-" . $str . "\">\n <li class=\"odd\">No data found </li>\n</ul>";
}
if($mode == "3"){
echo "<p class=\"create-room\"><a href=\"client.php?shortcut=roomomatic\" onclick=\"HabboClient.openShortcut(this, 'roomomatic'); return false;\" target=\"client\">Create new room</a></p>";
} elseif($mode == "2"){
echo "<p class=\"create-group\"><a href=\"#\" onclick=\"GroupPurchase.open(); return false;\">Create a Group</a></p>";
}
?>
Re: [PHP] Where are divs pulled from? If that makes sense...
As far as I can see, those menus are created depending on a $mode.
And I'm fairly certain there should be a CSS file in there somewhere.
Where else does this go to:
Code:
<link rel="stylesheet" href="/styles/local/uk.css" type="text/css" />
<link rel="stylesheet" href="./web-gallery/v2/styles/frontpage.css" type="text/css" />
Re: [PHP] Where are divs pulled from? If that makes sense...
Quote:
Originally Posted by
EliteGM
As far as I can see, those menus are created depending on a $mode.
And I'm fairly certain there should be a CSS file in there somewhere.
Where else does this go to:
Code:
<link rel="stylesheet" href="/styles/local/uk.css" type="text/css" />
<link rel="stylesheet" href="./web-gallery/v2/styles/frontpage.css" type="text/css" />
Yes there are, and I've never touched them prior to them working before and have also replaced that whole folder with the default files provided just to be sure.
Oh well, it's not that crucial of a feature I'll just put some radio stats there if nobody can help me.
Re: [PHP] Where are divs pulled from? If that makes sense...
the thing is that i'm having trouble imagining what should be there, i have no knowledge of HoloCMS
Re: [PHP] Where are divs pulled from? If that makes sense...
Download a working version and compare it to your own.
Re: [PHP] Where are divs pulled from? If that makes sense...
Quote:
Originally Posted by
s-p-n
Download a working version and compare it to your own.
Already have, I always keep the original .rar archive there for reference.
Re: [PHP] Where are divs pulled from? If that makes sense...
Quote:
Originally Posted by
PR0
Already have, I always keep the original .rar archive there for reference.
So it should be easy to fix, then. Just replace your broken files with the working ones.