Jump to content
php.lv forumi

vēlos sataisīt chatu uz php ,bet nestrādā


archixz

Recommended Posts

es nokachaju chatu ,tagad lieku to uz servera bet kaut kas nestrādā.man met ārā ka logins.php ,kaut kas nestrada.ja varat tad palīdzat izlabot sho skriptu lai strādātu ,paldies!

 

 

registracija

<?

$fff = "preferences.php";

if (is_file($fff) && is_readable($fff)) {

require($fff);

if ($reg == "no") {

echo "<center>Čēāčķčņå, šåćčńņšąöč˙ āšåģåķķī ļšåźšąłåķą</center>";

exit();

}

}

?>

<html>

<head>

<title>COSMO-CHAT Šåćčńņšąöč˙</title>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

</head>

<link rel="stylesheet" type="text/css" href="sources/styles.css">

<body onLoad="document.f.login.focus()">

<?

global $filename, $login, $er, $fl, $top;

$er = array("Ņąźīé ėīćčķ óęå åńņü!", "Ķå āāåäåķ ļąšīėü!", "Īųčįźą ļšč ļīāņīšķīģ āāīäå ļąšīė˙!", "Ķå ļšąāčėüķūé ōīšģąņ email!", "Ķå ļšąāčėüķūé ōīšģąņ ėīćčķą!", "Āū óńļåųķī ēąšåćčńņščšīāąėčńü!", "Ķå óäą÷ķūé ļąšīėü!", "Ķåėüē˙, ÷ņīįū ėīćčķ č ļąšīėü ńīāļąäąėč!", "Ķåėüē˙ čńļīėüēīāąņü ņąźīé ėīćčķ!", "Äąęå č ķå äóģąé, óģķčź!", "Ķåėüē˙ čńļīėüēīāąņü ļšīįåė ā ėīćčķå!");

$log = array("Admin", "admin", "ADMIN", "Ądmin", "Adm³n", "Ąäģčķ", "ąäģčķ", "user", "moder", "smoder", "Moder", "Ģīäåš", "ģīäåš");

$filename = "logins.php";

 

function reglog() {

global $filename, $login, $pass1, $pass2, $email, $pol, $REMOTE_ADDR, $HTTP_USER_AGENT, $log, $top, $fl;

if(isset($HTTP_X_FORWARDED_FOR)){

$hostname = gethostbyaddr($HTTP_X_FORWARDED_FOR);

} else {$hostname=gethostbyaddr($REMOTE_ADDR);}

$hostip=gethostbyname("$hostname");

$sys = $HTTP_USER_AGENT;

if (strstr($login, " ")) err(10);

if ((strlen($login) > 15) || (strlen($pass1) > 15) || (strlen($email) > 25)) err(9);

if ((!preg_match("/[0-9a-z_^]/i", $login)) || strstr($login, "|")) err(4);

for ($i = 0; $i < count($log); $i++) {

if (strstr($login, $log[$i])) err(8);

}

$mass = file($filename);

for ($i = 0; $i < count($mass); $i++) {

$newmass = explode("|", $mass[$i]);

if ($login == $newmass[0]) err(0);

}

if (($pass1 == "") || ($pass2 == "")) {

err(1);

} else {

if ($pass2 != $pass1) {

err(2);

}

}

if (!preg_match("/[0-9a-z_]+@[0-9a-z_^\.]+\.[a-z]{2,3}/i", $email)) err(3);

if (strstr($pass1, "|") || ($pass1 == "admin") || ($pass1 == "smoder") || ($pass1 == "moder") || ($pass1 == "user")) err(6);

if ($login == $pass1) err(7);

if ($top == "on") $fl = "*^*";

else $fl = "^*^";

$d = date("d.m.Y - H:i:s");

$str = "$login|$pass1|$email|$pol|user|*off*|#000000|Ā ÷ąņ āõīäčņ|ļīźčäąåņ ÷ąņ|/a|$hostip|-|$sys|$fl|$d";

$f = fopen($filename, "a");

fwrite($f, "$str\n");

fclose($f);

err(5);

}

function err($num) {

global $er;

echo "<font color='#FF0000'><center> $er[$num] </center></font>";

show();

exit();

}

if ($login) reglog();

show();

function show() {

?>

<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#DDDDDD">

<form action="" method="post" name="f">

<tr>

<td width="25%">Ėīćčķ</td>

<td width="75%"><input type="text" maxlength="15" name="login" style="width: 250"></td>

</tr>

<tr>

<td>Ļąšīėü</td>

<td><input type="password" maxlength="15" name="pass1" style="width: 250"></td>

<tr>

<td>Ļąšīėü åłå šąē</td>

<td><input type="password" maxlength="15" name="pass2" style="width: 250"></td>

</tr>

<tr>

<td>E-mail</td>

<td><input type="text" name="email" style="width: 250" maxlength="25"></td>

</tr>

<tr>

<td>Ļīė</td>

<td><input type="radio" name="pol" checked value="*m*">

Ģóę.

<input type="radio" name="pol" value="*g*">

Ęåķ.</td>

</tr>

<tr>

<td height="20">Ķīāūå ńīīįłåķč˙ ńāåšõó</td>

<td><input type="checkbox" name="top"></td>

</tr>

<tr>

<td height="20" colspan="2"> </td>

</tr>

<tr>

<td colspan="2"><center>

<input type="submit" value="Ēąšåćčńņščšīāąņüń˙" id="button1">

</center></td>

</tr>

</form>

</table>

<? } ?>

</body>

</html>

Link to comment
Share on other sites

oft, bet archixz tu esi no D33m grupas ?

 

http://paste.php.lv/2711  =>  te bus vina kods :D

te bus vnk: http://www.free2code.net/plugins/articles/read.php?id=99

25277[/snapback]

Jap esmu no D33M a kas ir Kalniņ??

Es īstenībā no php neko nerubiju , ja vari paskaties shito

 

uzspeižot pogu Регистрация man programma izmet jaunu logu kurā raxtīts

Файл 'logins.php' не найден или в него нельзя писать!

cik es nopratu tad kļuda varētu būt kaut kur

$filename = "logins.php";

if (!is_file($filename) || !is_writable($filename)) {

echo "<center>Файл '$filename' не найден или в него нельзя писать!</center>";

exit();

}

shitajā vietā ,bet varbūt kļūdos.

chatu var aplukot sheit http://chats-draugiem.eclub.lv/#

un pašus failus var nokachāt šeit http://script.woweb.ru/index.htm/id/1067176859

 

ja vari tad paskaties ,kas tur pa problemu.

Link to comment
Share on other sites

×
×
  • Create New...