Skip to content
Permalink
Browse files
Started on Rare Values
Will be doing jQuery popup boxs for viewing rare values items.
  • Loading branch information
Clawed committed May 21, 2013
1 parent 915b665 commit dc2bbb7
Show file tree
Hide file tree
Showing 8 changed files with 239 additions and 2 deletions.
@@ -11,6 +11,10 @@ body, a, input, select, textarea {
color: #666;
}

a:hover {
text-decoration: underline;
}

#margin-container {
width: 800px;
padding: 0 10px 0 10px;
@@ -22,6 +26,8 @@ body, a, input, select, textarea {
min-width: 820px;
height: 45px;
background-color: #666;
margin: 0 0 10px 0;
overflow-y: hidden;
}

#header-container ul#tabs {
@@ -50,6 +56,7 @@ body, a, input, select, textarea {
background-color: #fff;
padding: 10px 10px 8px 10px;
border-bottom: 2px solid #666;
text-decoration: none;
}

#header-container ul#tabs li.selected {
@@ -110,4 +117,66 @@ body, a, input, select, textarea {
#header-container #staff-container:hover #staff-drop-container a:hover {
background-color: #666;
color: #fff;
text-decoration: none;
}

#wrapper-container {
width: 100%;
min-width: 820px;
overflow-y: hidden;
}

#wrapper-container #column1-container {
float: left;
width: 800px;
}

#wrapper-container #column2-container {
float: left;
width: 200px;
}

#wrapper-container #column3-container {
float: right;
width: 590px;
}

#wrapper-container .box-container {
display: block;
border: 1px solid #666;
border-bottom-width: 2px;
border-radius: 4px;
background-color: #fff;
margin: 0 0 10px 0;
}

#wrapper-container .box-container .head-container {
display: block;
margin: 5px 5px 5px 5px;
padding: 7px 10px 7px 10px;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
background-color: #666;
color: #fff;
}

#wrapper-container .box-container .content-container {
display: block;
margin: 0 5px 5px 5px;
}

#wrapper-container .box-container .content-container .row {
display: block;
padding: 3px 5px 3px 5px;
}

#wrapper-container .box-container .content-container .row.selected {
font-weight: bold;
}

#footer-container {
width: 100%;
min-width: 820px;
overflow-y: hidden;
}
@@ -18,6 +18,17 @@

?>

<div id="footer-container">
<div id="margin-container">
<div style="float: left; margin: 0 0 10px 0;">
Powered by <a href="http://github.com/Clawed/Beauty" target="_blank">Beauty</a> &copy; 2013
</div>
<div style="float: right; margin: 0 0 10px 0;">
&copy; <a href="http://forum.ragezone.com/members/1333415157.html" target="_blank">Clawed</a> 2013
</div>
</div>
</div>

</body>

</html>
@@ -18,13 +18,13 @@

session_start();

function kill($string)
function kill($string, $noExit = false)
{
echo "<h1>Beauty Error</h1>";
echo "<hr>";
echo $string;
echo "<hr>";
exit;
if(!$noExit) exit;
}

require_once "inc/config.php";
@@ -22,6 +22,7 @@ public function GetIp()
{
return $this->FilterInput($_SERVER['HTTP_CF_CONNECTING_IP'] ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR']);
}

public function InsertLog($activity)
{
global $db;
@@ -36,6 +37,7 @@ public function InsertLog($activity)
kill($db->error);
}
}

public function FilterInput($string)
{
global $db;
@@ -54,6 +54,7 @@ public function Run()
kill("No session.");
}
}

public function ValidateUser($username)
{
global $db;
@@ -70,6 +71,7 @@ public function ValidateUser($username)
kill($db->error);
}
}

public function HasRank($rank)
{
global $db;
@@ -18,6 +18,80 @@

class BeautyValues
{
public function GetCategories($id)
{
global $db, $config;
if($query = $db->query("SELECT * FROM beauty_values_categories ORDER BY name ASC"))
{
$data = "";
while($array = $query->fetch_assoc())
{
if($id == $array['id'])
{
$data .= "<div class=\"row selected\" id=\"cat-" . $array['id'] . "\">" . $array['name'] . "</div>";
}
else
{
$data .= "<a href=\"" . $config->settings['path'] . "/values.php?cat=" . $array['id'] . "\" class=\"row\" id=\"cat-" . $array['id'] . "\">" . $array['name'] . "</a>";
}
}
return $data;
}
else
{
kill($db->error, true);
}
}

public function GetCategoryName($id)
{
global $db;
$stmt = $db->stmt_init();
if($stmt->prepare("SELECT name FROM beauty_values_categories WHERE id = ? LIMIT 1"))
{
$stmt->bind_param("i", $id);
$stmt->bind_result($name);
$stmt->execute();
$stmt->fetch();
$stmt->close();
return $name;
}
else
{
kill($db->error, true);
}
}

public function ListItemsFromCategory($id)
{
global $db;
$stmt = $db->stmt_init();
if($stmt->prepare("SELECT name FROM beauty_values_items WHERE category_id = ?"))
{
$stmt->bind_param("i", $id);
$stmt->bind_result($name);
$stmt->execute();
$stmt->store_result();
$data = "";
if($stmt->num_rows > 0)
{
while($stmt->fetch())
{
$data .= $name;
}
}
else
{
$data = "Nothing in this category yet!";
}
$stmt->close();
return $data;
}
else
{
kill($db->error, true);
}
}
}

?>
@@ -30,6 +30,25 @@

?>

<div id="wrapper-container">
<div id="margin-container">
<div id="column1-container">
<div class="box-container">
<div class="head-container">Home</div>
<div class="content-container">
Welcome to <strong>Beauty</strong>!
<br /><br />
Here with <strong>Beauty</strong> you can buy <strong>Badges</strong> & <strong>VIP</strong>!
<br />
You can also use Beauty to view your hotels <strong>Rare Values</strong>, with loads and loads of features involved!
<br />
You can view how many of these items are in the hotel, you can also view what items are where, eg: you just click the item & click rooms & it will tell youhow many of this item is in a certain room!
</div>
</div>
</div>
</div>
</div>

<?php

require_once "footer.php";
@@ -0,0 +1,60 @@
<?php

/*
_____ _____ _____ _ _ _____ _ _
| _ | ___| _ | | | |_ _| | | |
| |_| | |__ | |_| | | | | | | | |_| |
| _ | __|| _ | | | | | | \ /
| |_| | |___| | | | |_| | | | | |
|_____|_____|_| |_|_____| |_| |_|
Beauty V1.0.0
Rare Values, VIP Shop & Badge Shop
Copyright Clawed 2013
*/

$page = array(
"title" => "Rare Values",
"id" => "values"
);

require_once "global.php";

if($config->settings['values']['enabled'] != true and $config->settings['badgeshop']['enabled'] != true and $config->settings['vipshop']['enabled'] != true)
{
kill("You have to have at least one thing enabled. Other wise there's no point in having this script.");
}

require_once "header.php";

$cat = (($_GET['cat'] > 0) ? $core->FilterInput($_GET['cat']) : 0);

?>

<div id="wrapper-container">
<div id="margin-container">
<div id="column2-container">
<div class="box-container">
<div class="head-container">Categories</div>
<div class="content-container">
<?php echo $values->GetCategories($cat); ?>
</div>
</div>
</div>
<div id="column3-container">
<div class="box-container">
<div class="head-container"><?php echo $values->GetCategoryName($cat); ?></div>
<div class="content-container">
<?php echo $values->ListItemsFromCategory($cat); ?>
</div>
</div>
</div>
</div>
</div>

<?php

require_once "footer.php";

?>

0 comments on commit dc2bbb7

Please sign in to comment.