<?php 
/*===================================================+ 
|| # HoloCMS - Website and Content Management System
|+===================================================+ 
|| # Copyright © 2012 DnT [Tutti i diritti riservati]
|| # http://dnt.webnet32.com/
|+===================================================+ 
|| # DnT HoloCMS v2 - Created By Donatello (DnT)
|| # http://code.google.com/p/dnt-project/downloads/list
|+===================================================*/ 

include('core.php');
include('includes/session.php');


$pageid = "respect";
$pagename = "Compra VIP";


include('templates/community/subheader.php');
include('templates/community/header.php');
?>


<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">


			
<div class="cbb clearfix blue ">
<h2 class="title">Cos'e' <?php echo $shortname ?> VIP?</h2>
<div class="box-content">
<i><center><img src="<?php echo $path; ?>/images/catalogue_header_vip.gif"></center></br>
E' un rank nuovo e dura per sempre.
 Hai molti nuovi comandi e rari! </br><br>
<b> - Il prezzo e' di 300 Bolts. </b></br></br>
Per problemi contatta un Amministratore.</i><br/></br>
</div></div>

			
<div class="cbb clearfix blue ">
<h2 class="title">Che comandi avro' se saro' <?php echo $shortname ?> VIP?</h2>
<div class="box-content">
<i>
1.- Avrai il comando :mimic x.</br>
2.- Avrai il comando :push x.</br>
3.- Avrai il comando :pull x.</br>
4.- Avrai il comando :mimic x nel cms.</br>
6.- Riceverei un regalo!</br>
7.- Potrai comprare nuovi rari nel catalogo.</br></br>
<b>Ricorda:</br> - Il prezzo e' di 300 Bolts, sono tanti.</b></br></br>
Per qualsiasi problema contatta un Amministratore.</i><br/>
<center><img src="<?php echo $path; ?>/images/ctlg_gift_vip_teaser.gif"></center>
</br>
</div></div>

<?php if(isset($_POST['faimimic'])){
    
$user = FilterText($_POST['mimic']);
$anduse = mysql_query("SELECT * FROM users WHERE username = '". $user ."'");
$anduser = mysql_fetch_assoc($anduse);
if(!$_POST){
exit;
}
if($myrow['vip'] == '0'){

$errore1 = '<center><font color="red">Questa funzione puo\' essere usata solo se si e\' membri dell Vip Club</font><br>';
}

elseif($user == ''){
$errore1 = '<center><font color="red">Per favore inserisci un Username.</font><br>';
} elseif($user == $myrow['username']){
$errore1 = '<center><font color="red">Non puoi copiare il tuo look.</font><br>';
}
elseif($user != $anduser['username']){
$errore1 = '<center><font color="red">L\'utente che hai cercato non esiste.</font><br>';
}
elseif($user == $anduser['username']){

$errore1 = '<center><font color="green">Hai copiato il look di : '.$_POST['mimic'].'</br></font></br><img src="http://www.habbo.es/habbo-imaging/avatarimage?figure='.$anduser['look'].'&direction=2&head_direction=2&gesture=eyb&action=wav&size=l">
';
mysql_query("UPDATE users SET look = '". $anduser['look'] ."' WHERE id = '". $my_id ."'");

SendMUS("updatelook", $my_id);
SendMUS("alert", $my_id ." Tadan!, hai copiato il look di : ". $_POST['mimic'] .".");
}else{

    }
    
}
?>
<div class="cbb clearfix blue ">
<h2 class="title">Mimic</h2>
<div class="box-content">
<i>Questa funzione ti permette di copiare un look.</i><br/><br/>
<span id="mimicx"></span>
<form method="post" action="#" name="mimic" style="text-align:center;">
<br />


<?php echo $errore1; ?>
<br>		
		<label for="nombre_caballo" style="font-weight: bold;">Nome dell'utente:</label>
		<input type="text" name="mimic" id="mimic" value=""/><br /><br />
		<br />
        

	<DIV align="right"><input type="submit" name="faimimic" value="Copia il look"></input></DIV>
	</form>
</div>

</div>




</div>


<?php 
if(isset($_POST['compravip'])){
   if($myrow['vip'] == '1'){
$errore = '<font color="red">Sei gi&agrave; membro Vip</font><br>';
}

elseif($myrow['vip'] == '0'){
if($myrow['vip_points'] <= '299'){
$errore = '<font color="red">Non hai abbastanza Bolts </font><br>';
}
elseif($myrow['vip_points'] >= '300'){
$errore = '<font color="green">Complimenti ora sei membro del Vip Club</font><br>';

mysql_query("UPDATE users SET vip = '1', vip_points = vip_points - '300' WHERE id = '". $my_id ."'");


SendMUS("updatevip", $my_id);
SendMUS("updatepoints", $my_id);
SendMUS("alert", $my_id ." Tadan! hai comprato il vip.");

}
}
}
?>
							
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix red">
<h2 class="title">Compra il VIP</h2>
<div class="box-content"></center>
<center><img src="<?php echo $path; ?>/images/catalogue_xd_vip.gif"></center>
<b>Ricorda puoi acquistare Bolts con le Promozioni.</b><br />
<center><span id="resultado"></span></center>
<form method="post" action="#" name="compravip" style="text-align:center;">
<br />

		<div style="float:right;!important">		</div>
		<?php echo $errore; ?>
		<br>
		<font color="#333">Prezzo:</font> <input type="text" disabled="true" value="300" name="pricexv" style="width:40px"/> <b>Bolts</b><br/><br/>
	<input type="submit" value="Compra il vip" name="compravip"></input>
					<br /><br />
</div>
</div>
											
	<div class="habblet-container ">		
<div class="cbb clearfix gray "> 

<h2 class="title">Utenti VIP</h2>
<div class="box-content"><center>

<h2>Hai <?php echo $myrow['vip_points']; ?> Bolts</h2><br /><hr /><br />
<h3>Utenti VIP:</h3>
<?php
$usercar = mysql_query("SELECT * FROM users WHERE vip = '1' LIMIT 5");
while($wx = mysql_fetch_assoc($usercar)){ ?>
<img src="http://www.habbo.it/habbo-imaging/avatarimage?figure=<?php echo $wx['look']; ?>" alt="<?php echo $wx['username']; ?>" /><br />
<b><?php echo $wx['username']; ?></b><br />
<i><?php echo $wx['motto']; ?></br></i>	<?php
	echo '<br /><hr /><br />';
	
			}
?>				
</div>	</div></div>
			
	</div>
	
	
	
							
	</div>

							




</div>


 
<?php require_once('./templates/community/footer.php'); ?>