- Joined
- Jun 27, 2009
- Messages
- 1,571
- Reaction score
- 170
<div id="promo-box">
<div id="promo-bullets"></div>
<div class="promo-container" id="'.$news["id"].'" style="background-image: url(http://www.habbotimes.net/assets/media/fancenter/topstorys/promo_roombuilding.png)">
<div class="promo-content-container">
<div class="promo-content">
<div class="title">'.stripslashes($news["title"]).'</div>
<div class="body">Welcome To New HobbaCMS :)</div>
</div>
</div>
<div class="promo-link-container">
<b></b>
</div>
</div>
</div>
</div>
</div>
<b></b>
Only use phoenixphp if you want your hotel get hacked. Really, I'm talking with experience.
I've always used PhoenixPHP and I never got hacked
I've always used PhoenixPHP and I never got hacked
<?php
$news = mysql_query("SELECT * FROM news_promo ORDER BY `order_id` DESC");
if(mysql_num_rows($news) == 0)
{
echo '';
}
else
{
echo '<div id="promo-box">';
echo '<div id="promo-bullets"></div>';
}
while($row = mysql_fetch_array($news))
{
$id = $row['id'];
$title = $row['title'];
$text = $row['text'];
$image_url = $row['image_url'];
$url = $row['url'];
$url_text = $row['url_text'];
echo '<div class="promo-container" style="background-image: url(' .$image_url. ')">
<div class="promo-content-container">
<div class="promo-content">
<div class="title">' .$title. '</div>
<div class="body">' .$text. '</div>
</div>
</div>
<div class="promo-link-container">
<div class="enter-hotel-btn">
<div class="open enter-btn">
<a href="' .$url. '" target="a02ce3581bfb74fd6b4865171ed64cf3aaccc80e" onclick="HabboClient.openOrFocus(this); return false;">' .$url_text. '<i></i></a>
<b></b>
</div>
</div>
</div>
</div>
';
}
?>
---- Database: `superdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `news_promo`
--
CREATE TABLE IF NOT EXISTS `news_promo` (
`id` int(11) NOT NULL,
`title` text NOT NULL,
`text` text NOT NULL,
`image_url` text NOT NULL,
`url` text NOT NULL,
`url_text` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `news_promo`
--
INSERT INTO `news_promo` (`id`, `order_id`, `title`, `text`, `image_url`, `url`, `url_text`) VALUES
(1, 1, 'Promo #1!', 'text here', '%url%/web-gallery/v2/images/web_promo/diamond_vip.png', 'urlhere', 'Check it out!'),
(2, 2, 'Promo #2', 'txt here', '%url%/web-gallery/v2/images/web_promo/promo_frontPage_pockethabbo_1.png', 'urlhere', 'OMG!'),
(3, 3, 'Promo #3', 'text here', '%url%/web-gallery/v2/images/web_promo/web_promo_02.png', 'urlhere', 'Find out more');
Let me help you a bit.
I've no idea what you exactly want, this will get the last inserted news article.
You will have to change some fields.
// Now you have the results from the last inserted news article
$query = mysql_query("select * from news order by id desc limit 1");
$results = mysql_fetch_assoc($query);
You can use the results by doing this:
<php echo $results['newsarticlename']; ?>
// Now you have the results from the last inserted news article
$query = mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 1");
$results = mysql_fetch_assoc($query);
Like I said, you may need to edit some parts for it to work for PhoenixPHP, as it works perfectly on my CMS. I would help you but I'm not familiar with PhoenixPHP.It works but it glitches
You must be registered to see links