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
Can anyone help me with the last bit what do i do here?
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="TropicalSkittles" data-source="post: 71120" data-attributes="member: 10011"><p>Hello i have nearly done my shop but cant get the page working...</p><p> </p><p>photoshot: <a href="http://prntscr.com/5vwim" target="_blank">http://prntscr.com/5vwim</a> (shop_furni.php)</p><p>photoshot: <a href="http://prntscr.com/5vwjl" target="_blank">http://prntscr.com/5vwjl </a>(shop_badge.php)</p><p> </p><p><span style="color: #ff0000">Here is the code for the shop_furni</span></p><p> </p><p>[PHP]<?php</p><p>/*===================================================+</p><p>|| # HoloCMS - Website and Content Management System</p><p>|+===================================================+</p><p>|| # Copyright © 2008 Meth0d. All rights reserved.</p><p>|| # http://www.meth0d.org</p><p>|+===================================================+</p><p>|| # HoloCMS is provided "as is" and comes without</p><p>|| # warrenty of any kind. HoloCMS is free software!</p><p>|+===================================================+</p><p>|| # HoloShop 1.0 Coded By Yifan Lu</p><p>|+===================================================*/</p><p> </p><p>$allow_guests = true;</p><p> </p><p>include('core.php');</p><p>include('includes/session.php');</p><p> </p><p>$pagename = "Furni Shop";</p><p>$pageid = "fshop";</p><p> </p><p>include('templates/community/subheader.php');</p><p>include('templates/community/header.php');</p><p> </p><p>$search = FilterText($_POST['search']);</p><p>$category = FilterText($_GET['category']);</p><p>if($category == ""){ $category = 1; }</p><p>$page = FilterText($_GET['page']);</p><p>if($page == "" || $page < 1){ $page = 1; }</p><p>$page = $page - 1;</p><p> </p><p>$userrow = mysql_fetch_assoc(mysql_query("SELECT rank FROM users WHERE id = '".$my_id."' LIMIT 1"));</p><p>$rank = $userrow['rank'];</p><p> </p><p>if(isset($_POST['quantity']) == true){</p><p>$quantity = FilterText($_POST['quantity']);</p><p>if(is_numeric($quantity) == false){ $quantity = 1; }</p><p>$boughtid = FilterText($_POST['furniID']);</p><p>if(function_exists(SendMUSData) !== true){ include('./includes/mus.php'); }</p><p>$furnirow = mysql_fetch_assoc(mysql_query("SELECT * FROM catalogue_items WHERE tid = '".$boughtid."' LIMIT 1"));</p><p>$price = $furnirow['catalogue_cost'] * $quantity;</p><p>$furnicat = mysql_fetch_assoc(mysql_query("SELECT minrank FROM catalogue_pages WHERE indexid = '".$furnirow['catalogue_id_page']."' LIMIT 1"));</p><p>if($furnicat['minrank'] <= $user_rank){</p><p>if($price <= $myrow['credits']){</p><p>mysql_query("UPDATE users SET credits = credits - ".$price." WHERE id='".$my_id."' LIMIT 1") or die(mysql_error());</p><p>$i = 0;</p><p>while($i < $quantity){</p><p>$i++;</p><p>mysql_query("INSERT INTO furniture (ownerid,roomid,tid) VALUES ('".$my_id."','0','".$boughtid."')") or die(mysql_error());</p><p>}</p><p>mysql_query("INSERT INTO cms_transactions (userid,amount,date,descr) VALUES ('".$my_id."','".$price."','".$date_full."','Bought ".$quantity." ".$furnirow['catalogue_name']."')") or die(mysql_error());</p><p>// katsjing sound</p><p>@SendMUSData('UPRC' . $my_id);</p><p>// reload hand</p><p>@SendMUSData('UPRH' . $my_id);</p><p>// Now we say in a message he has the furniture!</p><p>$text = "Successfuly purchased ".$quantity." ".$furnirow['catalogue_name'].".";</p><p>$color = "green";</p><p>}else{</p><p>$text = "You do not have enough credits to purchase this item.";</p><p>$color = "red";</p><p>}</p><p>}else{</p><p>$text = "You do not have the privilege to purchase this item.";</p><p>$color = "red";</p><p>}</p><p>}</p><p> </p><p>?><script src="web-gallery/static/js/shop_furni.js" type="text/javascript"></script><?php</p><p>$pagessql = mysql_query("SELECT * FROM catalogue_pages WHERE minrank <= '".$rank."' ORDER BY indexid ASC");</p><p>?></p><p> </p><p><div id="container"></p><p> <div id="content" style="position: relative; left: 0px; top: 0px;" class="clearfix"></p><p> </p><p><div class="column" style="width: 212px"></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix blue "></p><p> <h2 class="title">Search</h2></p><p> <div id="credits-safety" class="box-content credits-info"></p><p> <div style="text-align: center"></p><p> <form action="./shop_furni.php" method="post"></p><p> <input type="text" name="search" value="" /></p><p> <input type="submit" value="Search" class="submit" id="submit-button" /></p><p> </form></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p> <div class="habblet-container "></p><p> </p><p> <div class="cbb clearfix blue "></p><p> </p><p> <h2 class="title">Categories</h2></p><p> <div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p> <?php</p><p> while($row = mysql_fetch_assoc($pagessql)) {</p><p> if($category == $row['indexid']){</p><p> echo "<strong>".$row['displayname']."</strong><br />\n";</p><p> }else{</p><p> echo "<a href=\"./shop_furni.php?category=".$row['indexid']."\">".$row['displayname']."</a><br />\n";</p><p> }</p><p> }</p><p> ?></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p></div></p><p><div class="column" style="width: 527px"></p><p><?php if(isset($text)){ ?></p><p><div class="rounded rounded-<?php echo $color; ?>"></p><p> <?php echo $text; ?></p><p></div></p><p><?php } ?></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix notitle "></p><p> </p><p><?php if($search == ""){ ?></p><p><?php if($category == 1){ ?></p><p><div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p> <center></p><p> <br /><img src="./web-gallery/images/catalogue/headers/Frontpage.gif" /></p><p> <br />Select a category from the left to begin browsing the shop</p><p> </center></p><p> </div></p><p></div></p><p><?php }else{ ?></p><p><div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p> <center></p><p><?php</p><p>$currentcat = mysql_fetch_assoc(mysql_query("SELECT displayname FROM catalogue_pages WHERE indexid = '".$category."' LIMIT 1"));</p><p>$catname = $currentcat['displayname'];</p><p>?></p><p> <img src="./web-gallery/images/catalogue/headers/<?php echo $catname; ?>.gif" /></p><p> </center></p><p><?php</p><p>$sql = mysql_query("SELECT * FROM catalogue_items WHERE catalogue_id_page = '".$category."' ORDER BY catalogue_name ASC LIMIT 20 OFFSET ".$page*20);</p><p>$i = 0;</p><p> while($row = mysql_fetch_assoc($sql)) {</p><p> $i++;</p><p> if(IsEven($i)){</p><p> $even = "even";</p><p> } else {</p><p> $even = "odd";</p><p> } ?></p><p> <li class="<?php echo $even; ?>"></p><p> <table style="width: 100%"></p><p> <tr align="center"></p><p> <td style="width: 25%"><img src="./web-gallery/images/catalogue/<?php echo $row['picture']; ?>" /></td></p><p> <td style="width: 35%"><b><?php echo $row['catalogue_name']; ?></b><br /><?php echo $row['catalogue_description']; ?></td></p><p> <td style="width: 15%"><?php echo $row['catalogue_cost']; ?></td></p><p> <td style="width: 25%"></p><p> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['tid']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a></p><p> </td></p><p> </tr></p><p> </table></p><p> </li></p><p> <?php }</p><p>$sql = mysql_query("SELECT * FROM catalogue_items WHERE catalogue_id_page = '".$category."'");</p><p>$numofitems = mysql_num_rows($sql);</p><p>$pages = ceil($numofitems / 20);</p><p>$i = 1;</p><p>?><center><?php</p><p>while($i <= $pages){</p><p>if($i == $pages){</p><p> if($page + 1 == $i){</p><p> echo "<strong>".$i."</strong>";</p><p> }else{</p><p> echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a>";</p><p> }</p><p>}else{</p><p> if($page + 1 == $i){</p><p> echo "<strong>".$i."</strong> | ";</p><p> }else{</p><p> echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a> | ";</p><p> }</p><p>}</p><p>$i++;</p><p>} ?></center></div></p><p><?php } ?></p><p><?php }else{ #Search ?></p><p><div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p><?php</p><p>$sql = mysql_query("SELECT * FROM catalogue_items,catalogue_pages WHERE catalogue_items.catalogue_id_page = catalogue_pages.indexid AND (catalogue_name LIKE '%".$search."%' OR catalogue_description LIKE '%".$search."%' OR name_cct LIKE '%".$search."%') AND minrank <= '".$rank."' LIMIT 20");</p><p>$i = 0;</p><p> while($row = mysql_fetch_assoc($sql)) {</p><p> $i++;</p><p> if(IsEven($i)){</p><p> $even = "even";</p><p> } else {</p><p> $even = "odd";</p><p> } ?></p><p> <li class="<?php echo $even; ?>"></p><p> <table style="width: 100%"></p><p> <tr align="center"></p><p> <td style="width: 25%"><img src="./web-gallery/images/catalogue/<?php echo $row['picture']; ?>" /></td></p><p> <td style="width: 35%"><b><?php echo $row['catalogue_name']; ?></b><br /><?php echo $row['catalogue_description']; ?></td></p><p> <td style="width: 15%"><?php echo $row['catalogue_cost']; ?></td></p><p> <td style="width: 25%"></p><p> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['tid']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a></p><p> </td></p><p> </tr></p><p> </table></p><p> </li></p><p><?php } ?></p><p><center>Only the top 20 results are shown.</center></p><p></div></p><p><?php</p><p>}</p><p>?></p><p> </p><p> </div></p><p> </div></p><p> </div></p><p> </p><p> <script type="text/javascript"></p><p> HabboView.run();</p><p> </script></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p> </p><p> </p><p></div></p><p><?php</p><p> </p><p>include('templates/community/footer.php');</p><p> </p><p>?>[/PHP]</p><p> </p><p><span style="color: #ff0000">Here is the code for my shop_badge</span></p><p> </p><p>[PHP]<?php</p><p>/*===================================================+</p><p>|| # HoloCMS - Website and Content Management System</p><p>|+===================================================+</p><p>|| # Copyright © 2008 Meth0d. All rights reserved.</p><p>|| # http://www.meth0d.org</p><p>|+===================================================+</p><p>|| # HoloCMS is provided "as is" and comes without</p><p>|| # warrenty of any kind. HoloCMS is free software!</p><p>|+===================================================+</p><p>|| # HoloShop 1.0 Coded By Yifan Lu</p><p>|+===================================================*/</p><p> </p><p>$allow_guests = true;</p><p> </p><p>include('core.php');</p><p>include('includes/session.php');</p><p> </p><p>$pagename = "Badge Shop";</p><p>$pageid = "bshop";</p><p> </p><p>include('templates/community/subheader.php');</p><p>include('templates/community/header.php');</p><p> </p><p>$search = FilterText($_POST['search']);</p><p>$category = FilterText($_GET['category']);</p><p>if($category == ""){ $category = 1; }</p><p>$page = FilterText($_GET['page']);</p><p>if($page == "" || $page < 1){ $page = 1; }</p><p>$page = $page - 1;</p><p> </p><p>$userrow = mysql_fetch_assoc(mysql_query("SELECT rank FROM users WHERE id = '".$my_id."' LIMIT 1"));</p><p>$rank = $userrow['rank'];</p><p> </p><p>?><script src="web-gallery/static/js/shop_badge.js" type="text/javascript"></script><?php</p><p>$pagessql = mysql_query("SELECT * FROM cms_badge_shop GROUP BY category ORDER BY category ASC");</p><p>?></p><p> </p><p><div id="container"></p><p> <div id="content" style="position: relative; left: 0px; top: 0px;" class="clearfix"></p><p> </p><p><div class="column" style="width: 212px"></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix blue "></p><p> <h2 class="title">Search</h2></p><p> <div id="credits-safety" class="box-content credits-info"></p><p> <div style="text-align: center"></p><p> <form action="./shop_badge.php" method="post"></p><p> <input type="text" name="search" value="" /></p><p> <input type="submit" value="Search" class="submit" id="submit-button" /></p><p> </form></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p> <div class="habblet-container "></p><p> </p><p> <div class="cbb clearfix blue "></p><p> </p><p> <h2 class="title">Categories</h2></p><p> <div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p> <?php</p><p> while($row = mysql_fetch_assoc($pagessql)) {</p><p> if($category == $row['category']){</p><p> echo "<strong>".$row['category']."</strong><br />\n";</p><p> }else{</p><p> echo "<a href=\"./shop_badge.php?category=".$row['category']."\">".$row['category']."</a><br />\n";</p><p> }</p><p> }</p><p> ?></p><p> </div></p><p> </div></p><p> </div></p><p> </div></p><p></div></p><p><div class="column" style="width: 527px"></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix notitle "></p><p> </p><p><?php if($search == ""){ ?></p><p><?php if($category == 1){ ?></p><p> <center></p><p> <br /><img src="./web-gallery/images/catalogue/headers/Frontpage.gif" /></p><p> <br />Select a category from the left to begin browsing the shop</p><p> </center></p><p><?php }else{ ?></p><p><div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p> <center></p><p><?php</p><p>$catname = $category;</p><p>$sql = mysql_query("SELECT * FROM cms_badge_shop WHERE category = '".$category."' AND enabled = '1' AND minrank <= '".$rank."' ORDER BY id ASC LIMIT 20 OFFSET ".$page*20);</p><p>$i = 0;</p><p> while($row = mysql_fetch_assoc($sql)) {</p><p> $i++;</p><p> if(IsEven($i)){</p><p> $even = "even";</p><p> } else {</p><p> $even = "odd";</p><p> } ?></p><p> <li class="<?php echo $even; ?>"></p><p> <table style="width: 100%"></p><p> <tr align="center"></p><p> <td style="width: 25%"><img src="<?php echo $cimagesurl.$badgesurl.$row['image'].".gif"; ?>" /></td></p><p> <td style="width: 35%"><b><?php echo $row['name']; ?></b><br /><?php echo $row['description']; ?></td></p><p> <td style="width: 15%"><?php echo $row['cost']; ?></td></p><p> <td style="width: 25%"></p><p> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['id']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a></p><p> </td></p><p> </tr></p><p> </table></p><p> </li></p><p> <?php }</p><p>$sql = mysql_query("SELECT * FROM cms_badge_shop WHERE category = '".$category."' AND enabled = '1' AND minrank <= '".$rank."'");</p><p>$numofitems = mysql_num_rows($sql);</p><p>$pages = ceil($numofitems / 20);</p><p>$i = 1;</p><p>?><center><?php</p><p>while($i <= $pages){</p><p>if($i == $pages){</p><p> if($page + 1 == $i){</p><p> echo "<strong>".$i."</strong>";</p><p> }else{</p><p> echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a>";</p><p> }</p><p>}else{</p><p> if($page + 1 == $i){</p><p> echo "<strong>".$i."</strong> | ";</p><p> }else{</p><p> echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a> | ";</p><p> }</p><p>}</p><p>$i++;</p><p>} ?></center></div></p><p><?php } ?></p><p><?php }else{ #Search ?></p><p><div id="credits-safety" class="box-content credits-info"></p><p> <div class="credit-info-text clearfix"></p><p><?php</p><p>$sql = mysql_query("SELECT * FROM cms_badge_shop WHERE (name LIKE '".$search."%' OR description LIKE '%".$search."%') AND enabled = '1' AND minrank <= '".$rank."' ORDER BY id ASC LIMIT 20");</p><p>$i = 0;</p><p> while($row = mysql_fetch_assoc($sql)) {</p><p> $i++;</p><p> if(IsEven($i)){</p><p> $even = "even";</p><p> } else {</p><p> $even = "odd";</p><p> } ?></p><p> <li class="<?php echo $even; ?>"></p><p> <table style="width: 100%"></p><p> <tr align="center"></p><p> <tr align="center"></p><p> <td style="width: 25%"><img src="<?php echo $cimagesurl.$badgesurl.$row['image'].".gif"; ?>" /></td></p><p> <td style="width: 35%"><b><?php echo $row['name']; ?></b><br /><?php echo $row['description']; ?></td></p><p> <td style="width: 15%"><?php echo $row['cost']; ?></td></p><p> <td style="width: 25%"></p><p> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['id']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a></p><p> </td></p><p> </tr></p><p> </table></p><p> </li></p><p><?php } ?></p><p><center>Only the top 20 results are shown.</center></p><p></div></p><p><?php</p><p>}</p><p>?></p><p> </p><p> </div></p><p> </div></p><p> </div></p><p> </p><p> <script type="text/javascript"></p><p> HabboView.run();</p><p> </script></p><p> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script></p><p> </p><p> </p><p></div></p><p><?php</p><p> </p><p>include('templates/community/footer.php');</p><p> </p><p>?>[/PHP]</p><p> </p><p></p><p> </p><p> </p><p> </p><p> </p></blockquote><p></p>
[QUOTE="TropicalSkittles, post: 71120, member: 10011"] Hello i have nearly done my shop but cant get the page working... photoshot: [URL]http://prntscr.com/5vwim[/URL] (shop_furni.php) photoshot: [URL='http://prntscr.com/5vwjl']http://prntscr.com/5vwjl [/URL](shop_badge.php) [COLOR=#ff0000]Here is the code for the shop_furni[/COLOR] [PHP]<?php /*===================================================+ || # HoloCMS - Website and Content Management System |+===================================================+ || # Copyright © 2008 Meth0d. All rights reserved. || # http://www.meth0d.org |+===================================================+ || # HoloCMS is provided "as is" and comes without || # warrenty of any kind. HoloCMS is free software! |+===================================================+ || # HoloShop 1.0 Coded By Yifan Lu |+===================================================*/ $allow_guests = true; include('core.php'); include('includes/session.php'); $pagename = "Furni Shop"; $pageid = "fshop"; include('templates/community/subheader.php'); include('templates/community/header.php'); $search = FilterText($_POST['search']); $category = FilterText($_GET['category']); if($category == ""){ $category = 1; } $page = FilterText($_GET['page']); if($page == "" || $page < 1){ $page = 1; } $page = $page - 1; $userrow = mysql_fetch_assoc(mysql_query("SELECT rank FROM users WHERE id = '".$my_id."' LIMIT 1")); $rank = $userrow['rank']; if(isset($_POST['quantity']) == true){ $quantity = FilterText($_POST['quantity']); if(is_numeric($quantity) == false){ $quantity = 1; } $boughtid = FilterText($_POST['furniID']); if(function_exists(SendMUSData) !== true){ include('./includes/mus.php'); } $furnirow = mysql_fetch_assoc(mysql_query("SELECT * FROM catalogue_items WHERE tid = '".$boughtid."' LIMIT 1")); $price = $furnirow['catalogue_cost'] * $quantity; $furnicat = mysql_fetch_assoc(mysql_query("SELECT minrank FROM catalogue_pages WHERE indexid = '".$furnirow['catalogue_id_page']."' LIMIT 1")); if($furnicat['minrank'] <= $user_rank){ if($price <= $myrow['credits']){ mysql_query("UPDATE users SET credits = credits - ".$price." WHERE id='".$my_id."' LIMIT 1") or die(mysql_error()); $i = 0; while($i < $quantity){ $i++; mysql_query("INSERT INTO furniture (ownerid,roomid,tid) VALUES ('".$my_id."','0','".$boughtid."')") or die(mysql_error()); } mysql_query("INSERT INTO cms_transactions (userid,amount,date,descr) VALUES ('".$my_id."','".$price."','".$date_full."','Bought ".$quantity." ".$furnirow['catalogue_name']."')") or die(mysql_error()); // katsjing sound @SendMUSData('UPRC' . $my_id); // reload hand @SendMUSData('UPRH' . $my_id); // Now we say in a message he has the furniture! $text = "Successfuly purchased ".$quantity." ".$furnirow['catalogue_name']."."; $color = "green"; }else{ $text = "You do not have enough credits to purchase this item."; $color = "red"; } }else{ $text = "You do not have the privilege to purchase this item."; $color = "red"; } } ?><script src="web-gallery/static/js/shop_furni.js" type="text/javascript"></script><?php $pagessql = mysql_query("SELECT * FROM catalogue_pages WHERE minrank <= '".$rank."' ORDER BY indexid ASC"); ?> <div id="container"> <div id="content" style="position: relative; left: 0px; top: 0px;" class="clearfix"> <div class="column" style="width: 212px"> <div class="habblet-container "> <div class="cbb clearfix blue "> <h2 class="title">Search</h2> <div id="credits-safety" class="box-content credits-info"> <div style="text-align: center"> <form action="./shop_furni.php" method="post"> <input type="text" name="search" value="" /> <input type="submit" value="Search" class="submit" id="submit-button" /> </form> </div> </div> </div> </div> <div class="habblet-container "> <div class="cbb clearfix blue "> <h2 class="title">Categories</h2> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <?php while($row = mysql_fetch_assoc($pagessql)) { if($category == $row['indexid']){ echo "<strong>".$row['displayname']."</strong><br />\n"; }else{ echo "<a href=\"./shop_furni.php?category=".$row['indexid']."\">".$row['displayname']."</a><br />\n"; } } ?> </div> </div> </div> </div> </div> <div class="column" style="width: 527px"> <?php if(isset($text)){ ?> <div class="rounded rounded-<?php echo $color; ?>"> <?php echo $text; ?> </div> <?php } ?> <div class="habblet-container "> <div class="cbb clearfix notitle "> <?php if($search == ""){ ?> <?php if($category == 1){ ?> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <center> <br /><img src="./web-gallery/images/catalogue/headers/Frontpage.gif" /> <br />Select a category from the left to begin browsing the shop </center> </div> </div> <?php }else{ ?> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <center> <?php $currentcat = mysql_fetch_assoc(mysql_query("SELECT displayname FROM catalogue_pages WHERE indexid = '".$category."' LIMIT 1")); $catname = $currentcat['displayname']; ?> <img src="./web-gallery/images/catalogue/headers/<?php echo $catname; ?>.gif" /> </center> <?php $sql = mysql_query("SELECT * FROM catalogue_items WHERE catalogue_id_page = '".$category."' ORDER BY catalogue_name ASC LIMIT 20 OFFSET ".$page*20); $i = 0; while($row = mysql_fetch_assoc($sql)) { $i++; if(IsEven($i)){ $even = "even"; } else { $even = "odd"; } ?> <li class="<?php echo $even; ?>"> <table style="width: 100%"> <tr align="center"> <td style="width: 25%"><img src="./web-gallery/images/catalogue/<?php echo $row['picture']; ?>" /></td> <td style="width: 35%"><b><?php echo $row['catalogue_name']; ?></b><br /><?php echo $row['catalogue_description']; ?></td> <td style="width: 15%"><?php echo $row['catalogue_cost']; ?></td> <td style="width: 25%"> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['tid']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a> </td> </tr> </table> </li> <?php } $sql = mysql_query("SELECT * FROM catalogue_items WHERE catalogue_id_page = '".$category."'"); $numofitems = mysql_num_rows($sql); $pages = ceil($numofitems / 20); $i = 1; ?><center><?php while($i <= $pages){ if($i == $pages){ if($page + 1 == $i){ echo "<strong>".$i."</strong>"; }else{ echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a>"; } }else{ if($page + 1 == $i){ echo "<strong>".$i."</strong> | "; }else{ echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a> | "; } } $i++; } ?></center></div> <?php } ?> <?php }else{ #Search ?> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <?php $sql = mysql_query("SELECT * FROM catalogue_items,catalogue_pages WHERE catalogue_items.catalogue_id_page = catalogue_pages.indexid AND (catalogue_name LIKE '%".$search."%' OR catalogue_description LIKE '%".$search."%' OR name_cct LIKE '%".$search."%') AND minrank <= '".$rank."' LIMIT 20"); $i = 0; while($row = mysql_fetch_assoc($sql)) { $i++; if(IsEven($i)){ $even = "even"; } else { $even = "odd"; } ?> <li class="<?php echo $even; ?>"> <table style="width: 100%"> <tr align="center"> <td style="width: 25%"><img src="./web-gallery/images/catalogue/<?php echo $row['picture']; ?>" /></td> <td style="width: 35%"><b><?php echo $row['catalogue_name']; ?></b><br /><?php echo $row['catalogue_description']; ?></td> <td style="width: 15%"><?php echo $row['catalogue_cost']; ?></td> <td style="width: 25%"> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['tid']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a> </td> </tr> </table> </li> <?php } ?> <center>Only the top 20 results are shown.</center> </div> <?php } ?> </div> </div> </div> <script type="text/javascript"> HabboView.run(); </script> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script> </div> <?php include('templates/community/footer.php'); ?>[/PHP] [COLOR=#ff0000]Here is the code for my shop_badge[/COLOR] [PHP]<?php /*===================================================+ || # HoloCMS - Website and Content Management System |+===================================================+ || # Copyright © 2008 Meth0d. All rights reserved. || # http://www.meth0d.org |+===================================================+ || # HoloCMS is provided "as is" and comes without || # warrenty of any kind. HoloCMS is free software! |+===================================================+ || # HoloShop 1.0 Coded By Yifan Lu |+===================================================*/ $allow_guests = true; include('core.php'); include('includes/session.php'); $pagename = "Badge Shop"; $pageid = "bshop"; include('templates/community/subheader.php'); include('templates/community/header.php'); $search = FilterText($_POST['search']); $category = FilterText($_GET['category']); if($category == ""){ $category = 1; } $page = FilterText($_GET['page']); if($page == "" || $page < 1){ $page = 1; } $page = $page - 1; $userrow = mysql_fetch_assoc(mysql_query("SELECT rank FROM users WHERE id = '".$my_id."' LIMIT 1")); $rank = $userrow['rank']; ?><script src="web-gallery/static/js/shop_badge.js" type="text/javascript"></script><?php $pagessql = mysql_query("SELECT * FROM cms_badge_shop GROUP BY category ORDER BY category ASC"); ?> <div id="container"> <div id="content" style="position: relative; left: 0px; top: 0px;" class="clearfix"> <div class="column" style="width: 212px"> <div class="habblet-container "> <div class="cbb clearfix blue "> <h2 class="title">Search</h2> <div id="credits-safety" class="box-content credits-info"> <div style="text-align: center"> <form action="./shop_badge.php" method="post"> <input type="text" name="search" value="" /> <input type="submit" value="Search" class="submit" id="submit-button" /> </form> </div> </div> </div> </div> <div class="habblet-container "> <div class="cbb clearfix blue "> <h2 class="title">Categories</h2> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <?php while($row = mysql_fetch_assoc($pagessql)) { if($category == $row['category']){ echo "<strong>".$row['category']."</strong><br />\n"; }else{ echo "<a href=\"./shop_badge.php?category=".$row['category']."\">".$row['category']."</a><br />\n"; } } ?> </div> </div> </div> </div> </div> <div class="column" style="width: 527px"> <div class="habblet-container "> <div class="cbb clearfix notitle "> <?php if($search == ""){ ?> <?php if($category == 1){ ?> <center> <br /><img src="./web-gallery/images/catalogue/headers/Frontpage.gif" /> <br />Select a category from the left to begin browsing the shop </center> <?php }else{ ?> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <center> <?php $catname = $category; $sql = mysql_query("SELECT * FROM cms_badge_shop WHERE category = '".$category."' AND enabled = '1' AND minrank <= '".$rank."' ORDER BY id ASC LIMIT 20 OFFSET ".$page*20); $i = 0; while($row = mysql_fetch_assoc($sql)) { $i++; if(IsEven($i)){ $even = "even"; } else { $even = "odd"; } ?> <li class="<?php echo $even; ?>"> <table style="width: 100%"> <tr align="center"> <td style="width: 25%"><img src="<?php echo $cimagesurl.$badgesurl.$row['image'].".gif"; ?>" /></td> <td style="width: 35%"><b><?php echo $row['name']; ?></b><br /><?php echo $row['description']; ?></td> <td style="width: 15%"><?php echo $row['cost']; ?></td> <td style="width: 25%"> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['id']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a> </td> </tr> </table> </li> <?php } $sql = mysql_query("SELECT * FROM cms_badge_shop WHERE category = '".$category."' AND enabled = '1' AND minrank <= '".$rank."'"); $numofitems = mysql_num_rows($sql); $pages = ceil($numofitems / 20); $i = 1; ?><center><?php while($i <= $pages){ if($i == $pages){ if($page + 1 == $i){ echo "<strong>".$i."</strong>"; }else{ echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a>"; } }else{ if($page + 1 == $i){ echo "<strong>".$i."</strong> | "; }else{ echo "<a href=\"./shop_furni.php?category=".$category."&page=".$i."\">".$i."</a> | "; } } $i++; } ?></center></div> <?php } ?> <?php }else{ #Search ?> <div id="credits-safety" class="box-content credits-info"> <div class="credit-info-text clearfix"> <?php $sql = mysql_query("SELECT * FROM cms_badge_shop WHERE (name LIKE '".$search."%' OR description LIKE '%".$search."%') AND enabled = '1' AND minrank <= '".$rank."' ORDER BY id ASC LIMIT 20"); $i = 0; while($row = mysql_fetch_assoc($sql)) { $i++; if(IsEven($i)){ $even = "even"; } else { $even = "odd"; } ?> <li class="<?php echo $even; ?>"> <table style="width: 100%"> <tr align="center"> <tr align="center"> <td style="width: 25%"><img src="<?php echo $cimagesurl.$badgesurl.$row['image'].".gif"; ?>" /></td> <td style="width: 35%"><b><?php echo $row['name']; ?></b><br /><?php echo $row['description']; ?></td> <td style="width: 15%"><?php echo $row['cost']; ?></td> <td style="width: 25%"> <a class="new-button fill" onclick="habboclub.buttonClick(<?php echo $row['id']; ?>,'Confirm Purchase'); return false;" href="#"><b>Buy Now</b><i></i></a> </td> </tr> </table> </li> <?php } ?> <center>Only the top 20 results are shown.</center> </div> <?php } ?> </div> </div> </div> <script type="text/javascript"> HabboView.run(); </script> <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script> </div> <?php include('templates/community/footer.php'); ?>[/PHP] [U][U][COLOR=#ff0000][/COLOR][/U][/U] [U][COLOR=#ff0000][/COLOR][/U] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Can anyone help me with the last bit what do i do here?
Top