<?php
ob_start();
include "config.php";
if($site["maintainance"] == '1'){ header("Location: maintainance.php"); }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $site["title"]; ?> - Add Habbo to Spotlight</title>
<?php echo $site["head"]; ?>
<?php include "rand_bg.php"; ?>
</head>
<body>
<div id="wrapper">
<div id="top"><img src="<?php echo $site["logo"]; ?>" style="padding-top: 35px; padding-left: 55px;"></div>
<div id="sub_nav_bar">
<?php echo $site["nav"]; ?>
</div>
<div id="container">
<div id="left">
<div id="pink_header" onclick="Effect.toggle('headlines_box', 'slide', { duration: 0.5} );">latest headlines »</div>
<div class="box_background" id="headlines_box">
<strong></strong><?php include "latest.php"; ?>
</div>
<div class="box_bottom"></div>
<div id="blue_header" onclick="Effect.toggle('usersystem_box', 'slide', { duration: 0.5} );">usersystem »</div>
<div class="box_background" id="usersystem_box">
<?php include "usersystem.php"; ?>
</div>
<div class="box_bottom"></div>
<div id="grey_header" onclick="Effect.toggle('quick_req', 'slide', { duration: 0.5} );">quick request »</div>
<div class="box_background" id="quick_req">
<strong></strong><?php include "quick.php"; ?>
</div>
<div class="box_bottom"></div>
</div>
<div id="middle">
<div id="content_header" onclick="Effect.toggle('content_box', 'slide', { duration: 0.5} );">add habbo to spotlight »</div>
<div class="content_box" id="content_box">
<strong></strong>
<?php
if($in["username"]){
if($in["rank"] == 'Administrator'){
if(isset($_GET['user'])){
if($_POST[add]){
$habbo = strip_tags($_POST['habbo']);
$hotel = strip_tags($_POST['hotel']);
if(!$habbo || !$hotel){
echo 'You must enter all fields!<br><br>Click <a href="addspotlight.php">here</a> to try again.';
}else{
$check = mysql_query("SELECT * FROM spotlight WHERE `habboname` = '$habbo' && `habbohotel` = '$hotel'");
if(mysql_num_rows($check) == 1){
echo 'This Habbo has already been added to the spotlight. Hopefully <strong>'.$habbo.'</strong> will get picked soon!<br><br>Click <a href="index.php">here</a> to go home.';
}else{
$sql = "INSERT INTO `spotlight` (`habboname`, `habbohotel`) VALUES ('$habbo', '$hotel');";
mysql_query($sql) or die('<strong>MySQL Error:</strong> '.mysql_error());
echo '<strong>'.$habbo.'</strong> has been added to the spotlight, hopefully the Habbo will be shown soon!<br><br>Click <a href="addspotlight.php">here</a> to add another Habbo.';
}
}
}else{
echo 'Here you can add your Habbo character, or even someone elses to the spotlight.<br>A Habbo will be picked at random from the database and displayed in the Habbo Spotlight box on the right on side.<br>Fill in the form below and click the button and your Habbo will be added to the spotlight.
<form method="post">
<table>
<tbody>
<tr>
<td><label for="habbo">Habbo Username:</label></td> <td><input type="text" name="habbo" id="habbo" size="50" maxlength="40"></td>
</tr>
<tr>
<td><label for="hotel">Habbo Hotel:</label></td> <td><select name="hotel" id="hotel">';
$hotel_arr = array(".es" => "Argentina",
".com.au" => "Australia",
".at" => "Austria",
".be" => "Belgium",
".com.br" => "Brazil",
".ca" => "Canada",
".cl" => "Chile",
".com.co" => "Colombia",
".dk" => "Denmark",
".es" => "Ecuador",
".fi" => "Finland",
".fr" => "France",
".de" => "Germany",
".ie" => "Ireland",
".it" => "Italy",
".com.my" => "Malaysia",
".com.mx" => "Mexico",
".nl" => "Netherlands",
".co.nz" => "New Zealand",
".no" => "Norway",
".com.pe" => "Peru",
".pt" => "Portugal",
".com.sg" => "Singapore",
".es" => "Spain",
".se" => "Sweden",
".ch" => "Switzerland",
".co.uk" => "United Kingdom",
".com" => "United States of America",
".com.ve" => "Venezuela",
".fr" => "Morocco",
".com.sg" => "Philippines");
foreach($hotel_arr as $key=>$value){
echo '<option value="'.$key.'"'; if($key=='.co.uk'){ echo ' selected'; } echo '>'.$value.'</option>';
}
echo '</select></td>
</tr>
<tr>
<td><input type="submit" name="add" value="Add Habbo"></td> <td></td>
</tr>
</tbody>
</table>
</form>';
}
?>
</div>
<div class="content_bottom"></div>
</div>
<div id="right">
<div id="pink_header" onclick="Effect.toggle('spotlight', 'slide', { duration: 0.5} );">habbo spotlight »</div>
<div class="box_background" id="spotlight">
<strong></strong><?php include "spotlight.php"; ?>
</div>
<div class="box_bottom"></div>
<div id="lime_header" onclick="Effect.toggle('stats', 'slide', { duration: 0.5} );">site statistics »</div>
<div class="box_background" id="stats">
<strong></strong><?php include "stats.php"; ?>
</div>
<div class="box_bottom"></div>
</div>
</div>
<div id="bottom">
<?php echo $site["copyright"]; ?>
</div>
</div>
</body>
</html>