C'était pour tester le script.
Essaye de voir cela plutôt: http://www.webinventif.fr/progress-bar- ... avascript/
<?php
$body_id = "index";
$pagename = "Crée un Compte lido et vien t'amuser avec nous .....";
$shortname2 = "Lido";
function Initialize()
{
echo '<div id="wrapperLoader" style="background: #000000 url(http://habbo.hs.llnwd.net/c_images/hotel_view_images_hq/hotelview_xmas10_000.png) left center no-repeat; position: absolute; z-index: 9999999; top: 0; left: 0; width: 100%; height: 100%;">';
echo '<div style="width: 240px; height: 125px; padding: 5px; border-radius: 10px; background: rgba(0, 0, 0, 0.7) url(http://lido-hotel.fr/web-gallery/v2/images/habbo.gif) center 15px no-repeat; position: absolute; left: 50%; top: 50%; margin-top: -65px; margin-left: -125px;">';
echo '<div id="wrapperLoaderText" style="margin-top: 60px; margin-bottom: 10px; text-align: center; font-family: Arial; color: #FFFFFF; font-size: 10px;">Lido hotel charge! 0% </div>';
echo '<div style="border-radius: 1px; border: 1px solid #FFFFFF; background-color: rgba(0, 0, 0, 0.6); padding: 1px; margin-left: 20px; width: 200px; height: 17px">';
echo '<div id="wrapperLoaderProgress" style="background-color: #8CA1AD; height: 17px; width: 0;">';
echo '<div style="background-color: #BACAD3; height: 9px; width: 100%;"></div></div></div></div>';
}
function ProgressBar($indice)
{
if($indice >=0 && $indice <= 20){
$text = "Chargement du script PHP .....";
}
if($indice >=21 && $indice <= 30){
$text = "Chargement du script HTML .....";
}
if($indice >=31 && $indice <= 50){
$text = "Chargement du script CSS .....";
}
if($indice >=51 && $indice <= 70){
$text = "Indexation du fichier index.php .....";
}
if($indice >= 71 && $indice <= 100){
$text = "Ecriture de index.php .....";
}
echo "\n<script>";
echo "document.getElementById(\"wrapperLoaderText\").innerHTML='".$text." ".$indice."%';";
echo "document.getElementById('wrapperLoaderProgress').style.width=".($indice*2).";\n";
echo "</script>";
usleep(1);
flush();
}
?>
<html>
<body>
<?php
//Initialize(x,y,largeur,hauteur,'couleur bordure','couleur du pourcentage','couleur de la barre de progression');
Initialize(); // initialisation de la barre de progression
for ($i=0;$i<=100;$i++)
{
ProgressBar($i); } // réaffichage de la barre avec le nouvel indice
//***********************
// ici on mets notre code
if($i > 100){
require_once('./data_classes/server-data.php_data_classes-core.php.php');
if(!session_is_registered(username)){
if(isset($_POST['username']) && isset($_POST['password'])){
$username = FilterText($_POST['username']);
$password = FilterText(HoloHash($_POST['password'], $username));
$password2 = FilterText(HoloHashMD5($_POST['password'], $username));
if(empty($username) || empty($password)){
$login_error = "Tous les champs doivent être remplis.";
} else {
$sql = mysql_query("SELECT id FROM users WHERE username = '".$username."' AND password = '".$password."' OR username = '".$username."' AND password = '".$password2."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($sql) < 1){
$login_error = "Les identifiants soumit ne correspondent à aucun compte";
} else {
$userdata = mysql_fetch_assoc($sql);
$userid = $userdata['id'];
$ban = mysql_query("SELECT * FROM bans WHERE value = '".$username."' AND bantype = 'user' or value = '".$remote_ip."' AND bantype = 'ip' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($ban) < 1){
mysql_query("UPDATE users SET password = '".$password2."', ip_last = '".$remote_ip."' WHERE username = '".$username."'");
$_SESSION['username'] = $username;
$_SESSION['password'] = $password2;
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", $_SESSION['password'], time()+60*60*24*100, "/");
Redirectme("".$url."");
} else {
$bandata = mysql_fetch_assoc($ban);
$timestamp = time();
if($bandata['expire'] > $timestamp){
$login_error = "Ton compte à éé banni.Pour: \"".$bandata['reason']."\" .<br>Il expire: ".date('d.m.Y - H:i:s', $bandata['expire'])."";
} else {
mysql_query("DELETE FROM bans WHERE value = '".$username."' AND bantype = 'user' OR value = '".$remote_ip."' AND bantype = 'ip' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE users SET password = '".$password2."', ip_last = '".$remote_ip."' WHERE username = '".$username."'");
$_SESSION['username'] = $username;
$_SESSION['password'] = $password2;
setcookie("remember", "remember", time()+60*60*24*100, "/");
setcookie("rusername", $_SESSION['username'], time()+60*60*24*100, "/");
setcookie("rpassword", $_SESSION['password'], time()+60*60*24*100, "/");
Redirectme("".$url."");
}
}
}
}
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!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;">
<link rel="shortcut icon" href="images/favicon.ico" type="image/vnd.microsoft.icon" />
<title><?php echo $shortname2; ?> : <?php echo $pagename; ?></title>
<link rel="stylesheet" type="text/css" href="index-css/index.css" media="all">
<style type="text/css">
<!--
body {
background-color: black;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style></head>
<body>
<div id="wrapperLoader" style="background: #000000 url(http://habbo.hs.llnwd.net/c_images/hotel_view_images_hq/hotelview_xmas10_000.png) left center no-repeat; position: absolute; z-index: 9999999; top: 0; left: 0; width: 100%; height: 100%;">
<center>
<div class="notice">
<div style="padding: 5px; font-family: 'Lucida Grande', Arial, sans-serif; font-size: 11px; float: center;">
<center><strong><b>Bienvenue sur <?php echo $shortname2; ?>.
<script type="text/javascript" src="date_heure.js"></script>
<span id="date_heure"></span>
<script type="text/javascript">window.onload = date_heure('date_heure');</script><br>
Sur lido il y a : <font color="red"><?php
// Hecho por Sansossio
$consulte = mysql_query("SELECT * FROM users");
$compteur = mysql_num_rows($consulte);
echo $compteur;
?></font> Inscrits.
</strong></b></a><br/>
</center>
</div>
</div>
<div style="width: 500px; height: 500px; padding: 5px; border-radius: 10px; background: rgba(0, 0, 0, 0.7) url(http://lido-hotel.fr/web-gallery/v2/images/habbo.gif) center 15px no-repeat; position: absolute; left: 40%; top: 18%; margin-top: -65px; margin-left: -125px;">
<form name="loginform" id="loginform" action="?auth=verif" method="post">
<div id="hotelimagebutton">
<?php if(isset($login_error)){ ?>
<div id="loginerrorfieldwrapper">
<div id="loginerrorfield">
<div><?php echo $login_error; ?></div>
</div> </div> <br><?php } ?>
<div id="i29usuario"></div>
<div id="i28usuario">
<input tabindex="3" type="text" class="input" name="username" id="login-username"
value="" maxlength="13"/>
</div>
<div id="i17contrasea"></div>
<div id="i27contrasea">
<input tabindex="4" type="password" class="input" name="password"
id="login-password" maxlength="13"/>
</div>
</div>
<div id="entrarahorabutton"><div id="entrar"></div></div>
<div id="entrer-boutton">
<input type="image" name="submit" src="index-css/connect.png"></input>
</div></form>
<div id="regstrategratisbutton"><a onfocus="blur()" href="/quickregister/start" class="nm" title="Regístrate gratis">Nouveau ? Clique ici :)</a></div>
</div><!-- /page --><!--/footer-->
</div><!-- /top -->
<!-- (sg_chau) -->
</body>
</html>
<?php
} else { Redirectme("".$url."");
}
?>
<?php
}else{} ?>
</body>
</html>
Retourner vers Analyse de code
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités