Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Azure emulator + RevCms Need help / Skype
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="vodarn" data-source="post: 340646" data-attributes="member: 60326"><p>I really need some help to get revcms runnable with Azure emulator.</p><p>The things i want help with:</p><p>First: News</p><p><img src="http://i.imgur.com/4a5IHnm.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>Second: Staff page.</p><p><img src="http://i.imgur.com/IK38Dwk.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>My Class.forms.php</p><p>[SPOILER="Class.forms.php"]</p><p>[PHP]<?php</p><p></p><p>namespace Revolution;</p><p>if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }</p><p>class forms implements iForms</p><p>{</p><p></p><p> public $error;</p><p></p><p> final public function setData()</p><p> {</p><p> global $engine;</p><p> foreach($_POST as $key => $value)</p><p> {</p><p> if($value != null)</p><p> {</p><p> $this->$key = $engine->secure($value);</p><p> }</p><p> else</p><p> {</p><p> $this->error = 'Please fill in all fields';</p><p> return;</p><p> }</p><p> }</p><p> </p><p> }</p><p> </p><p> final public function unsetData()</p><p> {</p><p> global $template;</p><p> foreach($this as $key => $value)</p><p> {</p><p> unset($this->$key); </p><p> } </p><p> }</p><p> </p><p> final public function writeData($key)</p><p> {</p><p> global $template;</p><p> echo $this->$key;</p><p> }</p><p> </p><p> final public function outputError()</p><p> {</p><p> global $template;</p><p> if(isset($this->error))</p><p> {</p><p> echo "<div id='message'> " . $this->error . " </div>";</p><p> }</p><p> }</p><p> </p><p> /* Manage different pages */</p><p> </p><p> final public function getPageNews()</p><p> {</p><p> global $template, $engine;</p><p> </p><p> if(!isset($_GET['id']) || !is_numeric($_GET['id']))</p><p> {</p><p> $_GET['id'] = 1;</p><p> }</p><p> $result = "SELECT title, id FROM cms_news WHERE id != '" . $engine->secure($_GET['id']) . "' ORDER BY id DESC";</p><p> </p><p> while($news1 = $engine->fetch_array($result))</p><p> {</p><p> $template->setParams('newsList', '&laquo; <a href="index.php?url=news&id='.$news1["id"].'">' . $news1['title'] . '</a><br/>');</p><p> }</p><p> </p><p> $news = $engine->fetch_assoc("SELECT title, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1");</p><p> $template->setParams('newsTitle', $news['title']);</p><p> $template->setParams('newsContent', $news['longstory']);</p><p> $template->setParams('newsAuthor', $news['author']);</p><p> $template->setParams('newsDate', date("d-m-y", $news['published']));</p><p> </p><p> unset($result);</p><p> unset($news1);</p><p> unset($news);</p><p> }</p><p> </p><p> final public function getPageHome()</p><p> {</p><p> /*</p><p> NEEDS TO BE FIXED</p><p> global $template, $engine;</p><p> $a = 1;</p><p> $data = "SELECT title, id, published, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5";</p><p> </p><p> </p><p> while($news = $engine->fetch_array($data))</p><p> {</p><p> </p><p> $template->setParams('newsTitle-' . $a, $news['title']);</p><p> $template->setParams('newsID-' . $a, $news['id']);</p><p> $template->setParams('newsDate-' . $a, date("d-m-y", $news['published']));</p><p> $template->setParams('newsCaption-' . $a, $news['shortstory']);</p><p> $template->setParams('newsIMG-' . $a, $news['image']);</p><p> $a++;</p><p> </p><p> }</p><p> </p><p> unset($news);</p><p> unset($data);*/</p><p> }</p><p> </p><p>}</p><p></p><p>?></p><p>[/PHP]</p><p>[/SPOILER]</p><p>[SPOILER="Me.php (only news)"]</p><p>[PHP]<div class="row"></p><p> <div class="span3"></p><p> <a href="index.php?url=news&id={newsID-1}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-1}');height:140px;position:relative;overflow:hidden;"></p><p> <p class="newscaption"></p><p> <strong>{newsTitle-1}</strong><br /></p><p> <em>{newsCaption-1}</em></p><p> </p></p><p> </div></a></p><p> </div></a></p><p> <div class="span3"></p><p> <a href="index.php?url=news&id={newsID-2}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-2}');height:140px;position:relative;overflow:hidden;"></p><p> <p class="newscaption"></p><p> <strong>{newsTitle-2}</strong><br /></p><p> <em>{newsCaption-2}</em></p><p> </p></p><p> </div></p><p> </div></a></p><p> <div class="span3"></p><p> <a href="index.php?url=news&id={newsID-3}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-3}');height:140px;position:relative;overflow:hidden;"></p><p> <p class="newscaption"></p><p> <strong>{newsTitle-3}</strong><br /></p><p> <em>{newsCaption-3}</em></p><p> </p></p><p> </div></p><p> </div></a></p><p> <div class="span3"></p><p> <a href="index.php?url=news&id={newsID-4}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-4}');height:140px;position:relative;overflow:hidden;"></p><p> <p class="newscaption"></p><p> <strong>{newsTitle-4}</strong><br /></p><p> <em>{newsCaption-4}</em></p><p> </p></p><p> </div></a></p><p> </div>[/PHP]</p><p>[/SPOILER]</p><p>[SPOILER="cms_news table"]<img src="http://i.imgur.com/8UadMrO.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> [/SPOILER]</p><p>[SPOILER="staff.php page"]</p><p>[PHP]<?php include('header.php'); ?></p><p></p><p> <div class="row"></p><p> <div class="span4"></p><p> <div class="well"></p><p> <p class="btn2 btn-block boxtitle btn-info2">Who are the staff?</p></p><p> <p>{hotelName} staff are the members of the community who are in charge of running the hotel and ensuring it is safe. They plan competitions, host events and assist users whenever possible. These are the users you should contact for assistance.</p></p><p> <p>If someone claims to be staff, check this list before answering any personal questions.</p></p><p> </div></p><p> <div class="well"></p><p> <p class="btn2 btn-block boxtitle btn-info2">Can I be staff?</p></p><p> <p>We hire frequently, and when we do it will be posted on the news. Please do not spam staff with requests to be hired as this will result in you being blacklisted from future application periods.</p></p><p> </div></p><p> </div></p><p> <div class="span8"></p><p><?php</p><p>$getRanks = mysql_query("SELECT id, username, rank FROM users WHERE rank = 7 ORDER BY id DESC");</p><p>while ($Ranks = mysql_fetch_assoc($getRanks))</p><p>{ </p><p> echo '<div class="well"><p class="btn2 btn-block boxtitle btn-info2">' . $Ranks['name'] . '</p>';</p><p> </p><p> $getMembers = mysql_query("SELECT id,username,motto,look,online,last_online FROM users WHERE rank = '" . $Ranks['id'] . "'");</p><p> </p><p> echo '<div class="box-content">';</p><p> </p><p> if (mysql_num_rows($getMembers) > 0)</p><p> {</p><p> $oe = 1;</p><p> </p><p> while ($member = mysql_fetch_assoc($getMembers))</p><p> {</p><p> if ($oe == 2)</p><p> {</p><p> $oe = 1;</p><p> }</p><p> else</p><p> {</p><p> $oe = 2;</p><p> }</p><p> </p><p> echo '<table width="100%" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';"></p><p> <tbody></p><p> <tr></p><p> <td valign="middle" width="75"></p><p> <img style="margin-top: -10px;" src="Cannot be shown on devbest :D' .$member['look'] . '&size=l"></p><p> </td></p><p> <td valign="top"></p><p> <p style="font-size: 90%;">Username: <strong>' .$member['username'] . '</strong><br>Motto: <strong>' . $member['motto'] . '</strong><br><i>Last Online: '. date("D, d F Y H:i (P)", $member['last_online']) .'</i></p></p><p> <br />';</p><p> </p><p> echo '</td></p><p> <td valign="top" style="float: right;"></p><p> ' . (($member['online'] == "1") ? '<b>Online</b>': '<b>Offline</b>') . '</p><p> </td></p><p> </tr></p><p> </tbody></p><p> </table>';</p><p> }</p><p> }</p><p> else</p><p> {</p><p> echo '<i>There are no users in this staff group yet.</i>';</p><p> }</p><p> </p><p> echo '</div></p><p> </div>';</p><p>}</p><p>?></p><p> </div></p><p> </div></p><p></p><p><?php include('footer.php'); ?>[/PHP]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="vodarn, post: 340646, member: 60326"] I really need some help to get revcms runnable with Azure emulator. The things i want help with: First: News [IMG]http://i.imgur.com/4a5IHnm.png[/IMG] Second: Staff page. [IMG]http://i.imgur.com/IK38Dwk.png[/IMG] My Class.forms.php [SPOILER="Class.forms.php"] [PHP]<?php namespace Revolution; if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); } class forms implements iForms { public $error; final public function setData() { global $engine; foreach($_POST as $key => $value) { if($value != null) { $this->$key = $engine->secure($value); } else { $this->error = 'Please fill in all fields'; return; } } } final public function unsetData() { global $template; foreach($this as $key => $value) { unset($this->$key); } } final public function writeData($key) { global $template; echo $this->$key; } final public function outputError() { global $template; if(isset($this->error)) { echo "<div id='message'> " . $this->error . " </div>"; } } /* Manage different pages */ final public function getPageNews() { global $template, $engine; if(!isset($_GET['id']) || !is_numeric($_GET['id'])) { $_GET['id'] = 1; } $result = "SELECT title, id FROM cms_news WHERE id != '" . $engine->secure($_GET['id']) . "' ORDER BY id DESC"; while($news1 = $engine->fetch_array($result)) { $template->setParams('newsList', '« <a href="index.php?url=news&id='.$news1["id"].'">' . $news1['title'] . '</a><br/>'); } $news = $engine->fetch_assoc("SELECT title, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1"); $template->setParams('newsTitle', $news['title']); $template->setParams('newsContent', $news['longstory']); $template->setParams('newsAuthor', $news['author']); $template->setParams('newsDate', date("d-m-y", $news['published'])); unset($result); unset($news1); unset($news); } final public function getPageHome() { /* NEEDS TO BE FIXED global $template, $engine; $a = 1; $data = "SELECT title, id, published, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5"; while($news = $engine->fetch_array($data)) { $template->setParams('newsTitle-' . $a, $news['title']); $template->setParams('newsID-' . $a, $news['id']); $template->setParams('newsDate-' . $a, date("d-m-y", $news['published'])); $template->setParams('newsCaption-' . $a, $news['shortstory']); $template->setParams('newsIMG-' . $a, $news['image']); $a++; } unset($news); unset($data);*/ } } ?> [/PHP] [/SPOILER] [SPOILER="Me.php (only news)"] [PHP]<div class="row"> <div class="span3"> <a href="index.php?url=news&id={newsID-1}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-1}');height:140px;position:relative;overflow:hidden;"> <p class="newscaption"> <strong>{newsTitle-1}</strong><br /> <em>{newsCaption-1}</em> </p> </div></a> </div></a> <div class="span3"> <a href="index.php?url=news&id={newsID-2}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-2}');height:140px;position:relative;overflow:hidden;"> <p class="newscaption"> <strong>{newsTitle-2}</strong><br /> <em>{newsCaption-2}</em> </p> </div> </div></a> <div class="span3"> <a href="index.php?url=news&id={newsID-3}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-3}');height:140px;position:relative;overflow:hidden;"> <p class="newscaption"> <strong>{newsTitle-3}</strong><br /> <em>{newsCaption-3}</em> </p> </div> </div></a> <div class="span3"> <a href="index.php?url=news&id={newsID-4}"><div class="well" style="background-image: url('{url}/app/tpl/skins/{skin}/news/{newsIMG-4}');height:140px;position:relative;overflow:hidden;"> <p class="newscaption"> <strong>{newsTitle-4}</strong><br /> <em>{newsCaption-4}</em> </p> </div></a> </div>[/PHP] [/SPOILER] [SPOILER="cms_news table"][IMG]http://i.imgur.com/8UadMrO.png[/IMG] [/SPOILER] [SPOILER="staff.php page"] [PHP]<?php include('header.php'); ?> <div class="row"> <div class="span4"> <div class="well"> <p class="btn2 btn-block boxtitle btn-info2">Who are the staff?</p> <p>{hotelName} staff are the members of the community who are in charge of running the hotel and ensuring it is safe. They plan competitions, host events and assist users whenever possible. These are the users you should contact for assistance.</p> <p>If someone claims to be staff, check this list before answering any personal questions.</p> </div> <div class="well"> <p class="btn2 btn-block boxtitle btn-info2">Can I be staff?</p> <p>We hire frequently, and when we do it will be posted on the news. Please do not spam staff with requests to be hired as this will result in you being blacklisted from future application periods.</p> </div> </div> <div class="span8"> <?php $getRanks = mysql_query("SELECT id, username, rank FROM users WHERE rank = 7 ORDER BY id DESC"); while ($Ranks = mysql_fetch_assoc($getRanks)) { echo '<div class="well"><p class="btn2 btn-block boxtitle btn-info2">' . $Ranks['name'] . '</p>'; $getMembers = mysql_query("SELECT id,username,motto,look,online,last_online FROM users WHERE rank = '" . $Ranks['id'] . "'"); echo '<div class="box-content">'; if (mysql_num_rows($getMembers) > 0) { $oe = 1; while ($member = mysql_fetch_assoc($getMembers)) { if ($oe == 2) { $oe = 1; } else { $oe = 2; } echo '<table width="100%" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';"> <tbody> <tr> <td valign="middle" width="75"> <img style="margin-top: -10px;" src="Cannot be shown on devbest :D' .$member['look'] . '&size=l"> </td> <td valign="top"> <p style="font-size: 90%;">Username: <strong>' .$member['username'] . '</strong><br>Motto: <strong>' . $member['motto'] . '</strong><br><i>Last Online: '. date("D, d F Y H:i (P)", $member['last_online']) .'</i></p> <br />'; echo '</td> <td valign="top" style="float: right;"> ' . (($member['online'] == "1") ? '<b>Online</b>': '<b>Offline</b>') . ' </td> </tr> </tbody> </table>'; } } else { echo '<i>There are no users in this staff group yet.</i>'; } echo '</div> </div>'; } ?> </div> </div> <?php include('footer.php'); ?>[/PHP] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Azure emulator + RevCms Need help / Skype
Top