Jvdw schreef:Ja, daar sluit ik het mee af.Hebje mijn ding al geprobeerd sander?
[PHP] Unexpected end of file
geef is wat je nu hebt dan, inclusief dat van jvdw
En laat je config ook eens zien.
Foutcode:
Quote:
Fatal error: Cannot redeclare sqlsafe() (previously declared in /home/mrmitchel/domains/sander.s3.one2xs.com/public_html/functions.php:6) in /home/mrmitchel/domains/sander.s3.one2xs.com/public_html/functions.php on line 9
oboven.phpoonder.phpConfig.phpfunctions.php
Quote:
Fatal error: Cannot redeclare sqlsafe() (previously declared in /home/mrmitchel/domains/sander.s3.one2xs.com/public_html/functions.php:6) in /home/mrmitchel/domains/sander.s3.one2xs.com/public_html/functions.php on line 9
oboven.php
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]"functions.php"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$maintenance[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR]checklogin[COLOR= #007700]()) {[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Extraatjes - Alles in 1</title>
<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Op Extraatjes vindt je allemaal extraatjes, waarom altijd maar 1 extraatje per 1 site, als het ook gewoon zo kan? Extraatjes!" />
<meta name="keywords" content="mijn ip, woord, random, extra, extraatjes" />
<meta name="copyright" content="Extraatjes, Sander Corens" />
<meta name="author" content="Sander Corens, DevShare.nl" />
<meta name="robots" content="index,follow" />
<link href="http://www.sander.s3.one2xs.com/layout/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div class="header">
<div class="titel">Extraatjes</div>
<div id="menu">
<ul>
<li><a href="/index" title="Home">Home</a></li>
<li><a href="/aanmelden" title="Extra">Aanmelden</a></li>
<li><a href="/inloggen" title="Extra">Inloggen</a></li>
<li><a href="/extraatjes" title="Extra">Extraatjes</a></li>
<li><a href="/contact" title="Contact">Contact</a></li>
<li><a href="/linkpartners" title="Linkpartners">Linkpartners</a></li>
</ul>
</div>
</div><!--eind header-->
<div class="mid">
<div class="left">
<div class="box">
<div class="top">Inloggen</div>
<div class="mid">
<form method="POST" action="">
<table border="0" cellpadding="0" cellspacing="0" width="361">
<tr>
<td width="284"><img src="http://icons.iconarchive.com/icons/famfamfam/mini/16/icon-user-icon.png"><input type="text" name="username" size="20" placeholder="Gebruikersnaam"></td>
</tr>
<tr>
<td width="284"><img src="http://icons.iconarchive.com/icons/famfamfam/mini/16/icon-key-icon.png"><input type="password" name="password" size="20" placeholder="Wachtwoord"></td>
</tr>
<tr>
<td width="73"></td>
<input type="hidden" name="sessiontime" value="311040000" />
</tr>
</table>
<p><input type="submit" value="Inloggen" name="login">
</p>
</form>
<div style="color:red">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700];[/COLOR] ?></div>
</div>
</div>
<div class="box">
<div class="top">Statistieken</div>
<div class="mid">
<div style="width: 100%; text-align: center;">[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM leden"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
?> leden<br/>
[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM banners"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]);[/COLOR]
?> banners <br/>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$extraatjes[/COLOR]?><br/>
<a href="http://www.trafficgod.org/topsite/"><img src="http://www.trafficgod.org/topsite/button.php?u=Sanderc" alt="Traffic GOD Topsites List" border="0" /></a><br/>
</div>
</div>
</div>
</div>
<div class="center">
<div class="box">
<div class="top">Home</div>
<div class="mid">
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}
}[/COLOR]
?>Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$maintenance[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR]checklogin[COLOR= #007700]()) {[/COLOR]
?>
</div>
</div>
</div>
<div class="right">
<div class="box">
<div class="top">Extraatjes</div>
<div class="mid">
• Mijn IP<br/>
• Random getal<br/>
• Woord info<br/>
• Steen, papier,schaar<br/>
</div>
</div>
</div>
<div class="footer">
© Copyright Extraatjes 2012 - Alle rechten voorbehouden <div style="float:right"> AV </div>
</div>
</div>
</div>
</body>
</html>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent al ingelogd, je wordt doorgestuurd!"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<meta http-equiv="refresh" content="0;url=http://sander.s3.one2xs.com/menu">[/COLOR][COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je kan wegens onderhoud niet inloggen."[/COLOR][COLOR= #007700];
}[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}
}[/COLOR]
?>Spoiler tonen
Ik wil niet gehackt worden, hier ligt het ook niet aan :(Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700];
}
@[/COLOR][URL="http://www.php.net/mysql_connect"]mysql_connect[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$server[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$user[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"Cant connect to MySQL database server"[/COLOR][COLOR= #007700]);
@[/COLOR][URL="http://www.php.net/mysql_select_db"]mysql_select_db[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$database[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Cant find database."[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$selectleden[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM $ledentabel WHERE username = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" AND password = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$selectleden[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$hash[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/uniqid"]uniqid[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700](),[/COLOR] true[COLOR= #007700]));[/COLOR]
[COLOR= #0000BB]$get_id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$ledentabel[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE username = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" AND password = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$fetch_id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$get_id[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$insert_session[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO sessions (id, userid, hash, logintime) VALUES (,"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$fetch_id[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$hash[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]",NOW())"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]#$bericht = "Ingelogd met hash: ".$hash." En je hebt id-nummer:".$fetch_id[id];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$insert_session[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/setcookie"]setcookie[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$fetch_id[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]],[/COLOR][URL="http://www.php.net/time"]time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sessiontime[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/setcookie"]setcookie[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"hash"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$hash[/COLOR][COLOR= #007700],[/COLOR][URL="http://www.php.net/time"]time[/URL][COLOR= #007700]()+[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]sessiontime[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]location:menu.php[/COLOR][COLOR= #007700]);
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Fout in de query: "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
}
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<b>De combinatie van gebruikersnaam en wachtwoord klopt niet.</b>"[/COLOR][COLOR= #007700];
}
}
function[/COLOR] checklogin[COLOR= #007700]() {[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT userid, `hash` FROM `sessions` WHERE `userid` = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" AND `hash` = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]))) {[/COLOR]
[COLOR= #0000BB]$return[/COLOR] [COLOR= #007700]=[/COLOR] TRUE[COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$return[/COLOR] [COLOR= #007700]=[/COLOR] FALSE[COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$return[/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #FF8000]// Data uit leden-tabel oproepen ($get_userdata[username], $get_userdata[warnings][/COLOR]
[COLOR= #0000BB]$get_data_qry[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT userid, `hash` FROM `sessions` WHERE `userid` = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" AND `hash` = "[/COLOR][COLOR= #007700].[/COLOR]sqlsafe[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$get_data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$get_data_qry[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$get_userdata[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM $ledentabel WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$get_data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]userid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]));[/COLOR]
?>In config staan alleen variabelen dus dat is het niet 
toevoeging op 15 april 2012, 19:27:36:
Haal sws die
weg onderaan oonder.php

toevoeging op 15 april 2012, 19:27:36:
Haal sws die
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}
}[/COLOR]
?> weg onderaan oonder.php
Thommity schreef:toevoeging op 15 april 2012, 19:27:36:In config staan alleen variabelen dus dat is het niet
Haal sws die
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}
}[/COLOR]
?> weg onderaan oonder.php
Dan werkt het nog niet.
Ik heb geen idee wat die error inhoudt
Google t
Google tThommity schreef:http://www.pfz.nl/archief/1275442-login-wil-niet-lukken/Ik heb geen idee wat die error inhoudtGoogle t
Daar staat allemaal wat posts van mensen. Ik kon ze moeilijk allemaal kopieren.
"je hebt de functions.php waar die sqlsafe() functie in staat dubbel geincludeerd. En tja, dan krijg je dubbelle functie-namen wat niet kan." zegt genoeg? 
toevoeging op 15 april 2012, 19:34:01:
Het is toch dat systeem van Aarclay? Misschien weet hij het

toevoeging op 15 april 2012, 19:34:01:
Het is toch dat systeem van Aarclay? Misschien weet hij het
Thommity schreef:toevoeging op 15 april 2012, 19:34:01:"je hebt de functions.php waar die sqlsafe() functie in staat dubbel geincludeerd. En tja, dan krijg je dubbelle functie-namen wat niet kan." zegt genoeg?
Het is toch dat systeem van Aarclay? Misschien weet hij het
Ja, het is dat systeem, en daar hebben ze het er ook over.
Maar het is sinds die includes met de oonder en oboven, voorheen werkte het.
haal die include("functions").php oid is weg bij oboven.php en oonder.php