DVerse
Member
- Oct 8, 2016
- 53
- 6
Ive posted an image. when i click the article link it leads me to my /me page. idk how to fix it because of my low coder skills. can someone teach me please and not just say look google please?
its the provlem because my news are stored under /index.php?url=news&id=4 and not under /news&id=...... ?
here is my news.php
its the provlem because my news are stored under /index.php?url=news&id=4 and not under /news&id=...... ?
here is my news.php
<?php
if(!isset($_GET['id']))
header('Location: /news/1');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<date_default_timezone_set('Europe/Amsterdam');>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{hotelName} - News</title>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>
<script type="text/javascript">
document.habboLoggedIn = true;
var habboName = "{username}";
var habboId = {userid};
var habboReqPath = "";
var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
var habboImagerUrl = "app\tpl\skins\Habbo\images\bg.png";
var habboPartner = "";
var habboDefaultClientPopupUrl = "{url}/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
HabboClient.maximizeWindow = true;
}
</script>
<!--[if IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
<style type="text/css">
body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
</style>
<![endif]-->
</head>
<body id="news">
<div id="overlay"></div>
<div id="header-container">
<div id="header" class="clearfix">
<h1><a href="{url}/"></a></h1>
<div id="subnavi">
<div id="subnavi-user">
<div style="margin-top:7px"><b>Grand Opening:</b> Habbo Royal opened on 27.02.2019</div>
</div>
<div id="subnavi-search">
<div id="subnavi-search-upper">
<ul id="subnavi-search-links">
<li><a href="{url}/logout" style="color:#000">Sign Out</a></li>
</ul>
</div>
</div>
<div id="to-hotel">
<a href="{url}/client" class="new-button green-button" target="eac955c8dbc88172421193892a3e98fc7402021a" onclick="HabboClient.openOrFocus(this); return false;"><b>Enter Habbo Royal</b><i></i></a>
</div>
</div>
<ul id="navi">
<li class="metab"><a href="{url}/me">{username}</a><span></span></li>
<li class="selected"><strong>Community</strong><span></span></li>
<li class="metab"><a href="{url}/shop">Shop</a><span></span></li>
<li class="metab"><a href="{url}/readme">Read Me</a><span></span></li>
<li class="metab"><a href="{url}/discord">Discord</a><span></span></li>
<li class="metab"><a href="{url}/vote">Voting</a><span></span></li>
<li class="metab"><a href="{url}/hk">Housekeeping</a><span></span></li>
</ul>
<div id="habbos-online"><div class="rounded"><span>{online} members online</span></div></div>
</div>
</div>
<div id="content-container">
<div id="navi2-container" class="pngbg">
<div id="navi2" class="pngbg clearfix">
<ul>
<li class=""><a href="{url}/community">Community</a></li>
<li class="selected">News</li>
<li class=" last"><a href="{url}/staff">Staff</a></li>
<li class=" last"><a href="{url}/vault">Vault</a></li>
<li class=" last"><a href="{url}/topstats">Top Stats</a></li>
<li class=" last"><a href="{url}/rotw">Room Of The Week</a></li>
<li class=" last"><a href="{url}/online">Online Users</a></li>
</ul>
</div>
</div>
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix default ">
<h2 class="title">News</h2>
<div id="article-archive">
<ul>
<?php
{
for ($i = 0; $i < 6; $i++)
{
$sectionName = "";
$sectionCutoffMax = 0;
$sectionCutoffMin = 0;
switch ($i)
{
case 0:
$sectionName = 'Today';
$sectionCutoffMax = time();
$sectionCutoffMin = time() - 86400;
break;
case 1:
$sectionName = 'Yesterday';
$sectionCutoffMax = time() - 86400;
$sectionCutoffMin = time() - 172800;
break;
case 2:
$sectionName = 'This Week';
$sectionCutoffMax = time() - 172800;
$sectionCutoffMin = time() - 604800;
break;
case 3:
$sectionName = 'Last week';
$sectionCutoffMax = time() - 604800;
$sectionCutoffMin = time() - 1209600;
break;
case 4:
$sectionName = 'This month';
$sectionCutoffMax = time() - 1209600;
$sectionCutoffMin = time() - 2592000;
break;
case 5:
$sectionName = 'Last month';
$sectionCutoffMax = time() - 2592000;
$sectionCutoffMin = time() - 5184000;
break;
}
$q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC";
$getArticles = mysql_query($q);
if (mysql_num_rows($getArticles) > 0)
{
echo '<h2>' . $sectionName . '</h2>
<ul>';
while ($a = mysql_fetch_assoc($getArticles))
{
echo '<li>
<a href="
</li>';
}
echo '</ul>';
}
}
}
?>
</ul>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper">
<h2>{newsTitle}</h2>
<div class="article-meta">Posted {newsDate}</div>
<p class="summary">{newsTitle}</p>
<div class="article-body">
{newsContent}
<br><br>
<p><font face="Verdana" size="1"><b>{newsAuthor}</b></p>
<script type="text/javascript" language="Javascript">
document.observe("dom:loaded", function() {
$$('.article-images a').each(function(a) {
Event.observe(a, 'click', function(e) {
Event.stop(e);
Overlay.lightbox(a.href, "Image is loading");
});
});
$$('a.article-2729').each(function(a) {
a.replace(a.innerHTML);
});
});
</script>
</div>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<script type="text/javascript">
HabboView.run();
</script>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<div id="footer" >
<script type="text/javascript">
var _adynamo_client = "11456ec8-221d-40a4-b01a-cf21b452ced3";
var _adynamo_width = 728;
var _adynamo_height = 90;
</script>
</div>
</body>
</html>
if(!isset($_GET['id']))
header('Location: /news/1');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<date_default_timezone_set('Europe/Amsterdam');>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{hotelName} - News</title>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>
<script type="text/javascript">
document.habboLoggedIn = true;
var habboName = "{username}";
var habboId = {userid};
var habboReqPath = "";
var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
var habboImagerUrl = "app\tpl\skins\Habbo\images\bg.png";
var habboPartner = "";
var habboDefaultClientPopupUrl = "{url}/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
HabboClient.maximizeWindow = true;
}
</script>
<!--[if IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
<style type="text/css">
body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
</style>
<![endif]-->
</head>
<body id="news">
<div id="overlay"></div>
<div id="header-container">
<div id="header" class="clearfix">
<h1><a href="{url}/"></a></h1>
<div id="subnavi">
<div id="subnavi-user">
<div style="margin-top:7px"><b>Grand Opening:</b> Habbo Royal opened on 27.02.2019</div>
</div>
<div id="subnavi-search">
<div id="subnavi-search-upper">
<ul id="subnavi-search-links">
<li><a href="{url}/logout" style="color:#000">Sign Out</a></li>
</ul>
</div>
</div>
<div id="to-hotel">
<a href="{url}/client" class="new-button green-button" target="eac955c8dbc88172421193892a3e98fc7402021a" onclick="HabboClient.openOrFocus(this); return false;"><b>Enter Habbo Royal</b><i></i></a>
</div>
</div>
<ul id="navi">
<li class="metab"><a href="{url}/me">{username}</a><span></span></li>
<li class="selected"><strong>Community</strong><span></span></li>
<li class="metab"><a href="{url}/shop">Shop</a><span></span></li>
<li class="metab"><a href="{url}/readme">Read Me</a><span></span></li>
<li class="metab"><a href="{url}/discord">Discord</a><span></span></li>
<li class="metab"><a href="{url}/vote">Voting</a><span></span></li>
<li class="metab"><a href="{url}/hk">Housekeeping</a><span></span></li>
</ul>
<div id="habbos-online"><div class="rounded"><span>{online} members online</span></div></div>
</div>
</div>
<div id="content-container">
<div id="navi2-container" class="pngbg">
<div id="navi2" class="pngbg clearfix">
<ul>
<li class=""><a href="{url}/community">Community</a></li>
<li class="selected">News</li>
<li class=" last"><a href="{url}/staff">Staff</a></li>
<li class=" last"><a href="{url}/vault">Vault</a></li>
<li class=" last"><a href="{url}/topstats">Top Stats</a></li>
<li class=" last"><a href="{url}/rotw">Room Of The Week</a></li>
<li class=" last"><a href="{url}/online">Online Users</a></li>
</ul>
</div>
</div>
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix default ">
<h2 class="title">News</h2>
<div id="article-archive">
<ul>
<?php
{
for ($i = 0; $i < 6; $i++)
{
$sectionName = "";
$sectionCutoffMax = 0;
$sectionCutoffMin = 0;
switch ($i)
{
case 0:
$sectionName = 'Today';
$sectionCutoffMax = time();
$sectionCutoffMin = time() - 86400;
break;
case 1:
$sectionName = 'Yesterday';
$sectionCutoffMax = time() - 86400;
$sectionCutoffMin = time() - 172800;
break;
case 2:
$sectionName = 'This Week';
$sectionCutoffMax = time() - 172800;
$sectionCutoffMin = time() - 604800;
break;
case 3:
$sectionName = 'Last week';
$sectionCutoffMax = time() - 604800;
$sectionCutoffMin = time() - 1209600;
break;
case 4:
$sectionName = 'This month';
$sectionCutoffMax = time() - 1209600;
$sectionCutoffMin = time() - 2592000;
break;
case 5:
$sectionName = 'Last month';
$sectionCutoffMax = time() - 2592000;
$sectionCutoffMin = time() - 5184000;
break;
}
$q = "SELECT * FROM cms_news WHERE published >= " . $sectionCutoffMin . " AND published <= " . $sectionCutoffMax . " ORDER BY published DESC";
$getArticles = mysql_query($q);
if (mysql_num_rows($getArticles) > 0)
{
echo '<h2>' . $sectionName . '</h2>
<ul>';
while ($a = mysql_fetch_assoc($getArticles))
{
echo '<li>
<a href="
You must be registered for see links
' . $a['id'] . '">' . $a['title'] . ' »</a></li>';
}
echo '</ul>';
}
}
}
?>
</ul>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper">
<h2>{newsTitle}</h2>
<div class="article-meta">Posted {newsDate}</div>
<p class="summary">{newsTitle}</p>
<div class="article-body">
{newsContent}
<br><br>
<p><font face="Verdana" size="1"><b>{newsAuthor}</b></p>
<script type="text/javascript" language="Javascript">
document.observe("dom:loaded", function() {
$$('.article-images a').each(function(a) {
Event.observe(a, 'click', function(e) {
Event.stop(e);
Overlay.lightbox(a.href, "Image is loading");
});
});
$$('a.article-2729').each(function(a) {
a.replace(a.innerHTML);
});
});
</script>
</div>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<script type="text/javascript">
HabboView.run();
</script>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
<div id="footer" >
<script type="text/javascript">
var _adynamo_client = "11456ec8-221d-40a4-b01a-cf21b452ced3";
var _adynamo_width = 728;
var _adynamo_height = 90;
</script>
</div>
</body>
</html>