Code
<table border="0" cellspacing="1" cellpadding="2" width="100%" class="manTable" id="siM633">
<?if($ERROR$)?>
<tr id="siM1"><td colspan="2" align="center" class="manTdError" id="siM2">$ERROR$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<!--------Проверка логина при регистрации------------>
<?if($LOGIN_FL$)?>
<tr id="siM42"><td class="manTd1" width="35%" id="siM43">$LOGIN_SIGN$</td><td class="manTd2" id="siM44">$LOGIN_FL$<br><div id="LoginInfo"></div>
<script>
/* © Айдар aka Pain () */
$(document).ready(function () {
$('#siF20').attr('disabled', true);
});
$('#siF13').change(function () {
Er = false;
if ($('#siF13').attr('value').length < 2){
$('#LoginInfo').html('<img align="absmiddle" src="http://ut-utorrent.at.ua/img/icon/er.png"> <b style="color: red;">Минимальная длина логина - 2 символа</b></b>');
Er = true;
}
if ($('#siF13').attr('value').length > 25){
$('#LoginInfo').html('<img align="absmiddle" src="http://ut-utorrent.at.ua/img/icon/er.png"> <b style="color: red;">Максимальная длина логина - 25 символов</b>');
Er = true;
}
if ($('#siF13').attr('value').match(/[^a-zA-Z0-9\-\_\@\%\{\}\[\]\(\)\u0080-\uFFFF]/)){
$('#LoginInfo').html('<img align="absmiddle" src="http://ut-utorrent.at.ua/img/icon/er.png"> <b style="color: red;">Недопустимые символы</b>');
Er = true
}
if (!Er){
$('#LoginInfo').html('<img align="absmiddle" src="http://ut-utorrent.at.ua/img/icon/ajaxs.gif"> <b>Подождите идет проверка...</b>');
$.get('/index/8-0-' + $('#siF13').attr('value'), function (Data) {
if (Data == 'Пользователь не найден') {
$('#LoginInfo').html('<img align="absmiddle" src="http://ut-utorrent.at.ua/img/icon/ok.png"> <b style="color: green;">Логин <FONT color="#0000cd">' + $('#siF13').attr('value') + '</FONT> свободен</b>');
$('#siF20').attr('disabled', false);
}
else {
$('#LoginInfo').html('<img align="absmiddle" src="http://ut-utorrent.at.ua/img/icon/er.png"> <b style="color: red;">Логин <FONT color="#0000cd">' + $('#siF13').attr('value') + '</FONT> занят</b>');
$('#siF20').attr('disabled', true);
}
})
}
else {
$('#siF20').attr('disabled', true);
}
});
</script></td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<!------------------------->
<?endif?>
<!---------Генератор паролей----------->
<?if($PASSWORD_FL$)?>
<tr id="siM45"><td class="manTd1" id="siM46">$PASSWORD_SIGN$</td><td class="manTd2" id="siM47">$PASSWORD_FL$
<script>
Chars = new Array ()
for (j = 65; j <=122; j++){
if ((j < 91) || (j > 96)) {
Chars[Chars.length] = String.fromCharCode(j);
}
}
function GenerateRandomPassword(){
PassLength = 10 + Math.round(5 * Math.random());
Pass = ''
for (i = 0; i < PassLength; i++){
ChIndex = Math.round(Chars.length * Math.random()) - 1;
if ((Chars[ChIndex]) && (Pass.length < 15)) {
Pass += Chars[ChIndex];
}
}
return Pass;
}
function NewPass(){
NewRandPass = GenerateRandomPassword();
$('#siF14, #siF15').attr('value', NewRandPass);
$('#RandPass').hide('fast').html('Ваш пароль <b>' + NewRandPass + '</b><br><a href="javascript://" style="font-size: 9px; " onclick="NewPass()">Сгенерировать новый пароль</a>').show('slow');
}
</script>
<div id="RandPass">
<a href="javascript://" style="font-size: 9px; " onclick="NewPass()">Сгенерировать случайный пароль</a>
</div>
</td></tr>
<?endif?>
<!-------------------->
<?if($PASSWORD1_FL$)?>
<tr id="siM48"><td class="manTd1" id="siM49">$PASSWORD1_SIGN$</td><td class="manTd2" id="siM50">$PASSWORD1_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?else?><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($GROUP_FL$)?>
<tr id="siM70"><td class="manTd1" id="siM71">$GROUP_SIGN$</td><td class="manTd2" id="siM72">$GROUP_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($NAME_FL$)?>
<tr id="siM51"><td class="manTd1" id="siM52">$NAME_SIGN$</td><td class="manTd2" id="siM53">$NAME_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($EMAIL_FL$)?>
<tr id="siM54"><td class="manTd1" id="siM55">$EMAIL_SIGN$</td><td class="manTd2" id="siM56">$EMAIL_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($BIRTHDAY_FL$)?>
<tr id="siM30"><td class="manTd1" id="siM31">$BIRTHDAY_SIGN$</td><td class="manTd2" id="siM32">$BIRTHDAY_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($GENDER_FL$)?>
<tr id="siM27"><td class="manTd1" id="siM28">$GENDER_SIGN$</td><td class="manTd2" id="siM29">$GENDER_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($SUBSCRIPTION_FL$)?>
<tr id="siM39"><td class="manTd1" id="siM40">$SUBSCRIPTION_SIGN$</td><td class="manTd2" id="siM41">$SUBSCRIPTION_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($OPTIONS_FL$)?>
<tr id="siM63"><td class="manTd1" id="siM64">$OPTIONS_SIGN$</td><td class="manTd2" id="siM65">$OPTIONS_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<?if($SECURITY_CODE_FL$)?>
<tr id="siM60"><td class="manTd1" id="siM61">$SECURITY_CODE_SIGN$</td><td class="manTd2" id="siM62">$SECURITY_CODE_FL$</td></tr><tr><td height="10" class="manTdSep" colspan="2"><hr class="manHr" /></td></tr>
<?endif?>
<tr id="siM64"><td class="manTdBut" colspan="2" align="center" id="siM65"><input class="manFlSbm" id="siF20" type="submit" name="sbm" value="$SUBMIT_SIGN$" /></td></tr>
</table>
Вроде так получаеться.