<?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');

require_once 'static/templates/header.php';

if(session_is_registered(username)){
header("LOCATION: ". $path ."/index.php");
}
$r = mysql_real_escape_string($_GET['r']);
?>
    
<!--[if lt IE 9]>
    <style type="text/css">
    .fb-reg-bottom {
       border-bottom: 1px solid black;
       bottom: 0;
    }
    input.text{
        margin-top: 4px;
        margin-bottom: 2px;
    }
    </style>
<![endif]-->
<script type="text/javascript" src="static/js/jquery.countdown.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    

    // Terms Dialog

	$('#terms-dialog').dialog({

		autoOpen: false,

		width: 420,
		modal: true,
		dialogClass: 'terms-dialog',
		open: function(event, ui) {
            _gaq.push(['_trackEvent', 'Dialog', 'Terms']);
		}

	});

	// terms Link

	$('.terms_link').click(function(){

		$('#terms-dialog').dialog('open');

		return false;

	});

	// Privacy Dialog

	$('#privacy-dialog').dialog({

		autoOpen: false,

		width: 420,
		modal: true,
		dialogClass: 'terms-dialog',
		open: function(event, ui) {
            _gaq.push(['_trackEvent', 'Dialog', 'Privacy policy']);
		}

	});

	// privacy Link

	$('.privacy_link').click(function(){

		$('#privacy-dialog').dialog('open');

		return false;

	});

	// Underage Dialog

	$('#underage-dialog').dialog({

		autoOpen: false,

		width: 329,
		modal: true,
		dialogClass: 'terms-dialog underage-dialog'

	});

	$('#close-underage-dialog').click(function(event){
	    event.preventDefault();

		$('#underage-dialog').dialog('close');

	});


	/* default register */
    $('#submit_signup').click(function(event) {
        event.preventDefault();

        regManager.register('default');
    });

    /* hande agree checkbox */
    var checkboxes = $('.checkbox');

    for(var i=0;i<checkboxes.length;i++){
        if ($(checkboxes[i]).children("input").is(':checked')){
            $(checkboxes[i]).addClass("checked");
        }
    }

    $(".checkbox").click(function(){
		if($(this).children("input").is(':checked')){
			// uncheck
			$(this).children("input").removeAttr('checked');
			$(this).removeClass("checked");
		}else{
			// check
			$(this).children("input").attr('checked','checked');
			$(this).addClass("checked");
		}
	});

	/* initial input texts */
	emailInitialTxt = 'Scrivi qui la tua E-mail';
	usernameInitialTxt = 'Scrivi qui il tuo Username';
	referenteInitialTxt = 'Scrivi qui il tuo Referente';
	birthdayInitialDay = 'Giorno';
	birthdayInitialMonth = 'Mese';
	birthdayInitialYear = 'Anno';

	/* input texts */
	$("#bday_day").click(function() {
        if($(this).val() == birthdayInitialDay) {
            $(this).val('');
        }
        $(this).removeClass('input-error');
    });
    $('#bday_day').blur(function() {
        if($(this).val() == ''){
            $(this).val(birthdayInitialDay);
        }
    });

    $("#bday_month").click(function() {
        if($(this).val() == birthdayInitialMonth) {
            $(this).val('');
        }
        $(this).removeClass('input-error');
    });
    $('#bday_month').blur(function() {
        if($(this).val() == ''){
            $(this).val(birthdayInitialMonth);
        }
    });

    $("#bday_year").click(function() {
        if($(this).val() == birthdayInitialYear) {
            $(this).val('');
        }
        $(this).removeClass('input-error');
    });
    $('#bday_year').blur(function() {
        if($(this).val() == ''){
            $(this).val(birthdayInitialYear);
        }
    });
});
</script>

    
    <script type="text/javascript" >
        ASSET_URL = 'static/assets';
        staticUrl = 'static/';
        
        defaultError = 'Something went wrong, try again.';
        
        $(document).ready(function() {
        	/* input info texts */
        
        	$("#id_email, .email_invitation").click(function() {
                if($(this).val() == emailInitialTxt) {
                    $(this).val('');
                }
                $(this).removeClass('input-error');
            });
            $('#id_email, .email_invitation').blur(function() {
                if($(this).val() == ''){
                    $(this).val(emailInitialTxt);
                }
            });
			
			$("#id_username, .email_invitation").click(function() {
                if($(this).val() == usernameInitialTxt) {
                    $(this).val('');
                }
                $(this).removeClass('input-error');
            });
            $('#id_username, .email_invitation').blur(function() {
                if($(this).val() == ''){
                    $(this).val(usernameInitialTxt);
                }
            });
			
			$("#id_referente, .email_invitation").click(function() {
                if($(this).val() == referenteInitialTxt) {
                    $(this).val('');
                }
                $(this).removeClass('input-error');
            });
            $('#id_referente, .email_invitation').blur(function() {
                if($(this).val() == ''){
                    $(this).val(referenteInitialTxt);
                }
            });
        
            /* fade errors */
            $('.error-container').live("hover", function(){
                $(this).fadeOut();
            });
        
        });
    </script>
    
    
    <!-- GOOGLE ANALYTCS -->
    <script type="text/javascript">  var _gaq = _gaq || []; _gaq.push(['_setAccount', '']);    
    </script>
	

    

<body>
    <div id="black-bg"></div>
    
    <div id="page">
        <div id="main">
            <div id="main-wrap">
                <div id="top">
                    <div class="main-top">
                        <header>
                            <h1><?php echo $shortname ?>: Registrati</h1>
                            <div id="main-logo">
                                <a href="/" ><img src="static/images/logo.png" alt="Retro logo" /></a>
                            </div>
                        </header>
                        <div id="social">
                            <div>
                            </div>
                        </div>
                    </div>
                    
<div class="secondary-top landing">
    <div id="content-top">
        
    </div>
</div>

                </div>

                
                <div id="primary">
                    
    <div class="container float landing">
        <section class="clear">
            <div id="content" class="float">
                 <header>  
                  <h1>Benvenuto in <?php echo $shortname ?> Hotel Italia!</h1>
                  
                </header>
                
                <p>
                <?php echo $shortname ?> è un ambiente virtuale di gioco on-line per teenager. I giovani visitatori possono entrare in un hotel virtuale e creare gratuitamente un proprio personaggio con cui incontrare, parlare e giocare con i coetanei in un ambiente sicuro e non violento.
                </p>
                
                <p>
                Scopri come registrarti grazie a 3 semplici Passaggi:
                </p><br />
                
                <h3 class="lightGray">1. Registrazione</h3>
                
                <p class="smaller">
                Prima di poter iniziare a giocare in <?php echo $shortname ?> è necessario registrarsi, cliccando a destra "Registrati". A quel punto basterà semplicemente compilare i campi richiesti.
                </p>
                
                <h3 class="lightGray">2. Creazione Avatar</h3>
                
                <p class="smaller">
                Non vorrai mica andare in giro per <?php echo $shortname ?> con dei vestiti da quattro soldi! Scegli il tuo look ed avviati al passo successivo!
                </p>
                
                <h3 class="lightGray">3. Benvenuto in Hotel!</h3>
                
                <p class="smaller">
                Sei ufficialmente un <?php echo $shortname ?>, ora inserendo il tuo nome utente e la password scelta in precedenza potrai accedere direttamente dalla Pagina Principale!
                </p>
            </div>
			
			
			
            <aside id="register" class="float round content-aside landing">
                
                <div class="round-content">
				
                    <div id="register-top"></div>
					
                    <div class="register-content">
                        <div class="first">
						
						
						            <h3>Username:</h3>
                            
                            <form id="register_form">
                                <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='<?php echo createSecurityHash(32, true, true); ?>' /></div>
                                <div class="input-area">
                                    <div id="error_usernamex" class="errors error-top"></div>
                                    <input id="id_username" type="text" class="text" value="Scrivi qui il tuo Username" name="usernamex" />
                                </div>
						
                            <h3>E-mail:</h3>
                            
                            <form id="register_form">
                                <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='<?php echo createSecurityHash(32, true, true); ?>' /></div>
                                <div class="input-area">
                                    <div id="error_email" class="errors error-top"></div>
                                    <input id="id_email" type="text" class="text" value="Scrivi qui la tua E-mail" name="email" />
                                </div>
								
								       <h3>Password:</h3>
                            
                            <form id="register_form">
                                <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='' /></div>
                                <div class="input-area">
                                    <div id="error_passwordx" class="errors error-top"></div>
                                    <input id="id_password" type="password" class="text" value="" name="passwordx" />
                                </div>
								
										<h3>Secret Code:</h3>
                            
                            <form id="register_form">
                                <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='<?php echo createSecurityHash(32, true, true); ?>' /></div>
                                <div class="input-area">
                                    <div id="error_secret" class="errors error-top"></div>
                                    <input id="id_secret" type="password" class="text" value="" name="secret" />
                                </div>
								
								            <h3>Referente:</h3>
                            
                            <form id="register_form">
                                <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='<?php echo createSecurityHash(32, true, true); ?>' /></div>
                                <div class="input-area">
                                    <div id="error_referente" class="errors error-top"></div>
									 <input id="id_referent2e" type="text" class="text" disabled="true" value=""placeholder="<?php echo $r; ?>" name="referasdente" />
                                    <input id="id_referente" type="text" class="text" hidden="true" value="<?php echo $r ?>" name="referente" />
                                </div>
								
								
                               <input type="hidden" name="birthday" id="id_birthday" />
                                <div id="agree-container" class="round">
                                    <div class="round-content light input-area">
                                        <div class="clear">
                                            <div class="float">
                                                <span class="checkbox">
                                                    <input id="accept_terms" type="checkbox" name="agree" />
                                                </span>
                                            </div>
                                            <div class="float last">
                                                <p>Accetto i <a class="terms_link" href="">Termini & Condizioni D'utilizzo</a>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp;</p>
                                            </div>
                                        </div>
                                        <div id="error_agree" class="errors error-bottom"></div>
                                    </div>
                                </div>
                                
                                <a id="submit_signup" class="submit-button button-link" href="">
                                    <div class="button-container">
                                        <div class="button-left"></div>
                                        <div class="button-content">Registrati!</div>
                                        <div class="button-right"></div>
                                    </div>
										
										
															
									
                                        <div class="button-right"></div>
                                    </div>
                                </a>
                                <div id="errors" class="errors"></div>
                            </form>
                        </div>
                        <div class="line"></div>
                       
						
	


                       
                    </div>
                  
                </div>
                
            </aside>
        </section>
    </div>



	
	
                        
                    
                    <aside id="vip" class="landing float round">
                    <div id="vip-top"></div>
                        <div class="round-content">
                            <img src="static/images/vip.png" alt="vip" />
                            <p class="bold">Registrati in <?php echo $shortname ?> ed avrai: </p>
                            <div>
                             <ul class="smaller">
                                <li>- Catalogo con molti Rari.</li>
                                <li>- 15 Bolts.</li>
                                <li>- Nuovi comandi.</li>
                            </ul>
                            </div>
                        </div>
                    <div id="vip-bottom"></div>
                    </aside>
                    
                    
                    <div class="clear-float"></div>
                </div>
            </div>
            
            <div id="bg">
                <div class="container">
                    <div class="bg-item left"></div>
                    <div class="bg-item right"></div>
                </div>
            </div>
        </div>
        <footer>
            <div id="footer_container" class="clear">
                
                <div class="float-r">
                    <div class="small-logo">
                        <img src="web-gallery/v2/images/habbo.png" alt="Retro logo small" />
                    </div>
                </div>
				
                <div class="float-r text">
                    <?php require_once 'static/templates/footer.php'; ?>
                </div>
                
            </div>
        </footer>
    </div>
   
       
    
</body>
</html>


