Autor Zpráva
sPiRit
Profil *
neviete poradit ze v com je problem ? Dakujem :)

Takze mam register.php

<?

include("config.php");
include("../session.php");
include('../sanitize.php');

$accessLevel = $_SESSION['level'];

if($accessLevel == "1"){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html" />
<script type="text/javascript" src='../js/jquery.js'></script>
<script type="text/javascript" src="../js/uni-form.jquery.js"></script>
<script language="javascript">
$(document).ready(function()
{
$("#name").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("user_availability.php",{ user_name:$(this).val() } ,function(data)
{
if(data=='yesno') //if username not avaiable
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Already exists').addClass('messageboxerror').fadeTo(900,1);
});
}
else if(data=='yes')
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Username available').addClass('messageboxok').fadeTo(900,1);
});
} else if(data =='empty')
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Enter Something!').addClass('messageboxerror').fadeTo(900,1);
});
}

});

});
});
</script>
<script>
$(document).ready(function()
{
$("#pass").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgbox2").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("pass_strength.php",{ pass:$(this).val() } ,function(dataz)
{
if(dataz =='1') //if username not avaiable
{
$("#msgbox2").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Short').addClass('messageboxerror').fadeTo(900,1);
});
}
else if(dataz =='2')
{
$("#msgbox2").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Bad').addClass('messageboxerror2').fadeTo(900,1);
});
} else if(dataz =='3')
{
$("#msgbox2").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Good').addClass('messageboxerror3').fadeTo(900,1);
});
} else if(dataz =='4')
{
$("#msgbox2").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Strong').addClass('messageboxok').fadeTo(900,1);
});
}

});

});
});
</script>
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}
.top {
margin-bottom: 15px;
}
.messagebox{
position:absolute;
width:100px;
margin-left:30px;
border:1px solid #c93;
background:#ffc;
padding:3px;
}
.messageboxok{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #349534;
background:#C9FFCA;
padding:3px;
font-weight:bold;
color:#008000;

}
.messageboxerror{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #CC0000;
background:#F7CBCA;
padding:3px;
font-weight:bold;
color:#CC0000;
}

.messageboxerror2{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #FF8000;
background:#FFCEAA;
padding:3px;
font-weight:bold;
color:#FF8000;
}

.messageboxerror3{
position:absolute;
width:auto;
margin-left:30px;
border:1px solid #0000FF;
background:#93C4FF;
padding:3px;
font-weight:bold;
color:#0000FF;
}
</style>

<style type="text/css" media="screen">

/* Uni-Form style sheet */
@import "../css/starter.css";
@import "../css/uni-form.css";

/* You don't need these, they are here to tune up the page */
body{ margin:30px auto; width:95%; font: normal normal 12px/1.8em "Lucida Sans Unicode", "Lucida Grande", "Trebuchet MS", sans-serif; }
a img{ border:none; }

.uniForm{ padding: 20px; background: #F2FAFF; -webkit-border-radius: 7px; }
.uniForm fieldset{ margin: 0 0 1.5em 0; }
.uniForm .inlineLabel em{ left: 10px !important; }
</style>
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF'] ?>" method="post" class="uniForm">
<?
if(isset($_POST['submit'])) {
if($_POST['name'] == "" OR $_POST['pass'] == "" OR $_POST['aL'] == "" OR $_POST['email'] == "" OR $_POST['team'] == "" OR $_POST['profession'] == "")
{
?>
<div id="errorMsg">
<h3>Ooops!</h3>
<ol>
<?
if($_POST['name'] == ""){ $error=" error"; }
if($_POST['pass'] == ""){ $error2=" error"; }
if($_POST['aL'] == ""){ $error3=" error"; }
if($_POST['email'] == ""){ $error4=" error"; }
if($_POST['team'] == ""){ $error5=" error"; }
if($_POST['profession'] == ""){ $error6=" error"; } ?>

</ol>
</div>
<? }}
if($_POST['name'] && $_POST['pass'] && $_POST['aL'] && $_POST['email'] && $_POST['team'] && $_POST['profession'] != "")
{
$pas9 = sha1($_POST['pass']);
$p_salt = substr($pas9, 0, 5); //the salt :)
?>
<div id="OKMsg"><img src="../img/admincp/7.png"> added: <font color=red><B><? echo $_POST['name']; ?></B></font> Salt <font color=red><B><?=$p_salt?></B></font></div>
<? } ?>
<fieldset class="inlineLabels">
<legend>Adding User</legend>
<div>

<div class="ctrlHolder<? echo $error; ?>">
<label for="name"><em>*</em> Name<span id="msgbox" style="display:none"></span></label>
<input name="name" id="name" value="<?=$_POST['name']?>" size="35" maxlength="50" type="text" class="textInput" autocomplete="off" />
</div>

<div class="ctrlHolder<? echo $error2; ?>">
<label for="pass"><em>*</em> Password<span id="msgbox2" style="display:none"></span></label>
<input name="pass" id="pass" value="" size="35" maxlength="25" type="text" class="textInput" autocomplete="off" />
</div>

<div class="ctrlHolder<? echo $error3; ?>">
<label for="aL"><em>*</em> Access Level</label>
<select name="aL" id="aL" class="selectInput">
<option value="">Please select</option>
<option value="1">Admin</option>
<option value="2">Mod</option>
<option value="3">User</option></select>
</div>

<div class="ctrlHolder<? echo $error4; ?>">
<label for="email"><em>*</em> Email</label>
<input name="email" id="email
shaggy
Profil
neviete poradit ze v com je problem ?
Vieme. Nevieš správne položiť otázku
sPiRit
Profil *
tuto to lepsie zobrazuje ... http://www.pcforum.sk/registracia-vt71797.html

no ide o to ze to nevlozi uzivatela do DB
shaggy
Profil
Ja nehovorím o zobrazení, ale o tom že sa nevieš vyjadrovať. Nevloží to užívateľa do db? A čo to urobí?
Ty si sem prekopíroval iba časť skriptu a nedal si nám ďalšie informácie.

[ot]Na tom druhom fóre si veľmi rýchlo doplň riadny popis, lebo tvoja téma bude zmazaná[/ot]
Mastodont
Profil
sPiRit
Děláš si srandu? Jak máme poznat v čem je chyba, když nejsi schopný napsat ani to, jak tuto stránku spouštíš? Jestli není includovaná, tak máš problém hned na začátku - $_SESSION bez session_start().
sPiRit
Profil *
http://www.mediafire.com/?o3lgutctnzi ;) skript

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: