geen pagina na inloggen
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
###################################
## PHPMYLOGON: A LOGIN SYSTEM ##
## (c) 2006 Jorik Berkepas ##
## Under the GNU GPL license ##
## [email protected] ##
###################################
// Page for log-in
include_once("config.php");
include_once("lang/lang_".$lang.".php");
$pml_title = $site_name;
include("htmltop.php");
include_once("connect.php");
if(isset($_SESSION['user_id'])) {
header("Location: ".$afterlogin);
}else{
if(isset($_COOKIE['user_id'])) {
// Read cookie, make session
$sql = "SELECT id,state,password,active FROM `".$db_tbl."` WHERE id='".$_COOKIE['user_id']."'";
$query = mysql_query($sql);
$row = mysql_fetch_object($query);
$id = htmlspecialchars($row->id);
$status = htmlspecialchars($row->state);
$dbpass = htmlspecialchars($row->password);
$actief = htmlspecialchars($row->active);
if($dbpass == $_COOKIE['user_password'] AND $actief == 1) {
$_SESSION['user_id'] = $id;
$_SESSION['user_status'] = $status;
?>
###################################
## PHPMYLOGON: A LOGIN SYSTEM ##
## (c) 2006 Jorik Berkepas ##
## Under the GNU GPL license ##
## [email protected] ##
###################################
// Page for log-in
include_once("config.php");
include_once("lang/lang_".$lang.".php");
$pml_title = $site_name;
include("htmltop.php");
include_once("connect.php");
if(isset($_SESSION['user_id'])) {
header("Location: ".$afterlogin);
}else{
if(isset($_COOKIE['user_id'])) {
// Read cookie, make session
$sql = "SELECT id,state,password,active FROM `".$db_tbl."` WHERE id='".$_COOKIE['user_id']."'";
$query = mysql_query($sql);
$row = mysql_fetch_object($query);
$id = htmlspecialchars($row->id);
$status = htmlspecialchars($row->state);
$dbpass = htmlspecialchars($row->password);
$actief = htmlspecialchars($row->active);
if($dbpass == $_COOKIE['user_password'] AND $actief == 1) {
$_SESSION['user_id'] = $id;
$_SESSION['user_status'] = $status;
?>
<script language="Javascript" type="text/javascript">
location.href='';
</script>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?
}else{
echo $login_cookiefalse;
setcookie("user_id", "", time() - 3600);
setcookie("user_password", "", time() - 3600);
}
}else{
if(isset($_POST['submit'])) {
// Login
$sql = "SELECT id,name,password,state,active,cookie_pass FROM `".$db_tbl."` WHERE name='".$_POST['user']."'";
$query = mysql_query($sql);
$count = mysql_num_rows($query);
if($count == 1) {
$row = mysql_fetch_object($query);
$dbpass = htmlspecialchars($row->password);
$userpass = md5($_POST['pass']);
$cookiepass = htmlspecialchars($row->cookie_pass);
$userid = htmlspecialchars($row->id);
$userstatus = htmlspecialchars($row->state);
$useractief = htmlspecialchars($row->active);
if($dbpass == $userpass) {
if($useractief == 1) {
$_SESSION['user_id'] = $userid;
$_SESSION['user_status'] = $userstatus;
if($_POST['cookie'] == "do") {
if($cookiepass == "") {
$cookiecode = mt_srand((double)microtime()*100000);
while(strlen($cookiecode) <= 10) {
$i = chr(mt_rand (0,255));
if(eregi("^[a-z0-9]$", $i)) {
$cookiecode = $cookiecode.$i;
}
}
$sql = "UPDATE `".$db_tbl."` SET cookie_pass = '".$cookiecode."' WHERE name = '".$_POST['user']."' LIMIT 1";
mysql_query($sql);
$cookiepass = $cookiecode;
}
setcookie("cookie_id", $userid, time() + 365 * 86400);
setcookie("cookie_pass", $cookiepass, time() + 365 * 86400);
}
echo $loginsucces;
?>
}else{
echo $login_cookiefalse;
setcookie("user_id", "", time() - 3600);
setcookie("user_password", "", time() - 3600);
}
}else{
if(isset($_POST['submit'])) {
// Login
$sql = "SELECT id,name,password,state,active,cookie_pass FROM `".$db_tbl."` WHERE name='".$_POST['user']."'";
$query = mysql_query($sql);
$count = mysql_num_rows($query);
if($count == 1) {
$row = mysql_fetch_object($query);
$dbpass = htmlspecialchars($row->password);
$userpass = md5($_POST['pass']);
$cookiepass = htmlspecialchars($row->cookie_pass);
$userid = htmlspecialchars($row->id);
$userstatus = htmlspecialchars($row->state);
$useractief = htmlspecialchars($row->active);
if($dbpass == $userpass) {
if($useractief == 1) {
$_SESSION['user_id'] = $userid;
$_SESSION['user_status'] = $userstatus;
if($_POST['cookie'] == "do") {
if($cookiepass == "") {
$cookiecode = mt_srand((double)microtime()*100000);
while(strlen($cookiecode) <= 10) {
$i = chr(mt_rand (0,255));
if(eregi("^[a-z0-9]$", $i)) {
$cookiecode = $cookiecode.$i;
}
}
$sql = "UPDATE `".$db_tbl."` SET cookie_pass = '".$cookiecode."' WHERE name = '".$_POST['user']."' LIMIT 1";
mysql_query($sql);
$cookiepass = $cookiecode;
}
setcookie("cookie_id", $userid, time() + 365 * 86400);
setcookie("cookie_pass", $cookiepass, time() + 365 * 86400);
}
echo $loginsucces;
?>
<script language="Javascript" type="text/javascript">
location.href='';
</script>
Code (php)
<body background="../_images/waybkgnd.gif">
<p align="center"><font color="#FFFF00" size="+5">Hier kunt u inloggen:</font></p>
<p> </p>
<p> </p>
<p> </p>
<form method="post" action="login.php">
<div align="center">
<table>
<tr>
<td><label for="user">
<font color="#FFFF00" size="+1">
:</label></td>
<td><input id="user" type="text" name="user" /></td>
</tr>
<tr>
<td><label for="pass">
<font color="#FFFF00" size="+1">
:</label></td>
<td><input id="pass" type="password" name="pass" /></td>
</tr>
<tr>
<td align="right"><input id="cookie" type="checkbox" name="cookie" value="do" style="border: 0px;" /></td>
<td><label for="cookie"><small>
<font color="#FFFF00" size="+1">
</small></label></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" value="" /></td>
</tr>
</table>
<small><a href="forgotpass.php" title="">
<font color="#FF0000" size="+1">
</a></small> </div>
</form>
<font color="#FFFF00" size="+2">
<p> </p>
<p align="center"><font color="#FFFF00" size="+2">Hier kunt u zich registreren
voor onze site.</font></p>
<p align="center"> </p>
<p align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24">
<param name="movie" value="reg.swf">
<param name="quality" value="high">
<param name="base" value=".">
<param name="bgcolor" value="#333333">
<embed src="reg.swf" base="." quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="103" height="24" bgcolor="#333333"></embed>
</object>
</p>
<p align="center"> </p>
<p align="center"> </p>
Gewijzigd op 01/01/1970 01:00:00 door Erik
wie ken mij vertellen waar de fout zit aub de pagina die gelad moet worden staat in een map en dan is het een php file
wie kan mij helpen ik krijg geen inlog pagina te zien zie boven staand script