index.php
changeset 23 7696ae981a3c
parent 22 52aaf1a838bd
child 25 5c3c1b82fea2
equal deleted inserted replaced
22:52aaf1a838bd 23:7696ae981a3c
    69                		{
    69                		{
    70                       $sid1 = '06D5VlLQTbM57LL7IBMW38yHkFpb1XVa';
    70                       $sid1 = '06D5VlLQTbM57LL7IBMW38yHkFpb1XVa';
    71                 	}
    71                 	}
    72         	if (!isset($_COOKIE['sid2']))
    72         	if (!isset($_COOKIE['sid2']))
    73                		{
    73                		{
       
    74 //			$sid2 = '06D5VlLQTbM57LL7IBMW38yHkFpb1XVa';
    74                         $sid2 = $tsid2;
    75                         $sid2 = $tsid2;
    75                 	}
    76                 	}
    76                }
    77                }
    77 
    78 
    78         //
    79         //
   181         	$uid = $currID;
   182         	$uid = $currID;
   182       		}
   183       		}
   183 #	$real_password = password;
   184 #	$real_password = password;
   184 
   185 
   185 $mysql = new mysqli("localhost", "www-data", "www-data", "members");
   186 $mysql = new mysqli("localhost", "www-data", "www-data", "members");
   186 $result = $mysql->query("SELECT uid,password_md5 FROM creds WHERE username='$username'");
   187         if (!isset($_COOKIE['uid']))
   187 $row = $result->fetch_assoc();
   188                 {
   188 $real_password = $row["password_md5"];
   189 		$result = $mysql->query("SELECT uid,password_md5 FROM creds WHERE username='$username'");
       
   190 		$row = $result->fetch_assoc();
       
   191 		$real_password = $row["password_md5"];
       
   192 		}
   189 create_session($mysql, $uid, $real_password);
   193 create_session($mysql, $uid, $real_password);
   190 $result->close();
   194 $result->close();
   191 
   195 
   192 ?>
   196 ?>
   193 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   197 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">