ето предопрежденията които ми дава
ето и кода на enter.php
ред 1-20
редове 89-100
Код:
Warning: mt_rand() [function.mt-rand]: max(0) is smaller than min(1392929985) in /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php:14) in /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php on line 92
Warning: Cannot modify header information - headers already sent by (output started at /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php:14) in /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php on line 93
Warning: Cannot modify header information - headers already sent by (output started at /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php:14) in /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php on line 94
Warning: Cannot modify header information - headers already sent by (output started at /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php:14) in /srv/disk8/1624006/www/dragonsphere.mygamesonline.org/enter.php on line 96
ето и кода на enter.php
ред 1-20
Код:
<?php
/* Ïîäêëþ÷àåì ìîäóëè */
define('GAME',true);
include('config.php');
include('db_connect.php');
function gen_hash(){
$chars=array('0'=>'s','1'=>'q','2'=>'w','3'=>'e','4'=>'r','5'=>'t','6'=>'y','7'=>'u','8'=>'i','9'=>'o','10'=>'p','11'=>'-');
$hash=null;
$i=0;
while($i<10000){
$hash.=$chars[mt_rand(0,11)];
$i++;
}
$r_hash="".$hash."(-)".time()."->".mt_rand(time(),5000000000000000000000000000000000)."";
return md5($r_hash);
}
function error($t)
{
echo '
<html><head>
редове 89-100
Код:
if($u['pass2']==0)
{
$hash=gen_hash();
setcookie('login',$_POST['login']);
setcookie('pass',md5($_POST['pass']));
setcookie('hash',$hash);
mysql_query("UPDATE `users` SET `hash`='".$hash."' WHERE `login` = '".mysql_real_escape_string($_POST['login'])."' AND `pass` = '".md5($_POST['pass'])."' LIMIT 1");
header('Location: http://dragonsphere.mygamesonline.org/buttons.php?battle=0.0'.rand(1,99).''.time().''.rand(100,999).'');
}else{
//setcookie('testLogin',$_POST['login'],time()+60*60*24*30,'',$c['host_url']);
//setcookie('testPass',md5($_POST['pass']),time()+60*60*24*30,'',$c['host_url']);
?>