Здравствуйте, гость ( Вход | Регистрация )

> Веб регистрация
dontkilla
сообщение 22.1.2013, 11:13
Сообщение #1


**

Neophyte
Сообщений: 25
Регистрация: 5.7.2012
Группа: Пользователи
Наличность: 0
Пользователь №: 15.078
Возраст: 24



Всем привет. Не могу разобраться с системой регистрации.
acctadd.html

<html>
<head>
<title>Middle-Earth Account Adder</title>
</head>
<body bgcolor=#000000 text=#FFFFFF>

<FONT SIZE=4><B>POL HTTP Account Adder</B></FONT>
<HR>

<form method="GET" action="http://212.16.1.114:4040/webacct.ecl">

Account Name: <P><INPUT name=acctname style="HEIGHT: 35px; WIDTH: 451px"><P>
Account Password: <P><INPUT name=acctpass style="HEIGHT: 35px; WIDTH: 451px"><br>
Repeat Password: <P><INPUT name=acctpass1 style="HEIGHT: 35px; WIDTH: 451px">
<P>
<INPUT id=submit1 name=submit1 type=submit value=Submit>
<INPUT id=reset1 name=reset1 type=reset value=Reset>
</P>

</form>

</body>
</html>
------------------
Второй файл
webacct.ecl

/////////////////
// Web POL Account adder for use with the POL web server
//
// * place webacct.ecl and acctadd.html in the pol/scripts/www directory
// * enable the POL webserver in pol.cfg and set the port for http connections
// * set WebServerLocalOnly=1 to only allow connections from the server
// set it =0 to allow everyone to access the server and the account adder page
// * accounts will be available immediately if successfully added
//
// Notes: I don't know if someone's done something that serves this function
// but I thought I'd do it just for kicks.
//
// Author: Racalac, 2/6/00
/////////////////

use http;
use uo;
use basic;

program account_add()

var acctname := QueryParam( "acctname" );
var acctpass := QueryParam( "acctpass" );
var acctpass1 := QueryParam( "acctpass1" );
writehtml("<html><head><title>Middle-Earth Account Adder</title></head><body bgcolor=#000000 text=#FFFFFF>");
writehtml("<FONT SIZE=4><B>Middle-Earth Account Adder</B></FONT><HR>");

var symbols := { "q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","1","2","3","4","5","6","7","8","9","0" };
var i;
if( !acctname or !acctpass )+
writehtml("Name or Pass was empty.");
return;
elseif( acctpass1 != acctpass )
writehtml("Password repeat failed.");
return;
endif
for (i := 1; i < Cint(len(acctname)+1); i:= i+1)
if (!(acctname[i] in symbols) )
writehtml("Some symbols are not accepted, use letters and digits only.");
return;
break;
endif
endfor
for (i := 1; i < Cint(len(acctpass)+1); i:= i+1)
if (!(acctpass[i] in symbols) )
writehtml("Some symbols are not accepted, use letters and digits only.");
return;
break;
endif
endfor

while (acctname["+"])
acctname["+"] := " ";
endwhile
while (acctpass["+"])
acctpass["+"] := " ";
endwhile

var ret := CreateAccount( acctname, acctpass, 1 );
var acc := FindAccount( acctname );
acc.SetProp("password", acctpass);

if( ret == error )
writehtml("Sorry, account creation failed.<P>");
writehtml("Error: " + ret.errortext );
else
writehtml("Account added successfully.");
endif

endprogram
Пользователь в офлайнеDelete PostОтправить личное сообщение
Вернуться в начало страницы
+Ответить с цитированием данного сообщения



Ответить в эту темуОткрыть новую тему
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 

- Текстовая версия | Версия для КПК Сейчас: 16.7.2025, 14:33
Designed by Nickostyle