Nieuw lid |
|
<?php
include('include/header.php');
?>
<html>
<head>
<script language='javascript'>
function addtext(veld,text) {
text = ' '+text+' ';
if (document.form.elements[veld].createTextRange) {
document.form.elements[veld].focus();
document.selection.createRange().duplicate().text = text;
} else {
document.form.elements[veld].focus();
document.form.elements[veld].value += text;
}
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>
</head>
<html>
<?
if($inlog == 'true'){
if($_GET['action'] == ''){
echo 'Je moet wel een goede actie opgeven!';
} else if($_GET['action'] == 'editpw'){
if($_POST['submit'] AND $_POST['ww1'] != "" AND $_POST['ww2'] != "" AND $_POST['ww1'] == $_POST['ww2']){
mysql_query('UPDATE inlog SET wachtwoord="'.md5($_POST['ww2']).'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'" LIMIT 1');
echo 'Wachtwoord veranderen gelukt. Je word uitgelogd om veiligheids redenen!';
setcookie('hash', '', time()-3600);
setcookie('ID', '', time()-3600);
doorstuur('inlog.php');
} else {
echo '<b>Wachtwoord Veranderen</b>';
echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">';
echo '<table border="0">';
if($_POST['submit'] AND $_POST['ww1'] != $_POST['ww2']){
echo '<tr>';
echo '<td colspan="2">';
echo '<b>De 2 ingevulde wachtwoorden komen niet overeen met alkaar';
echo '</td>';
echo '</tr>';
}
echo '<tr>';
echo '<td>';
echo 'Nieuw wachtwoord:';
echo '</td>';
echo '<td>';
echo '<input type="password" name="ww1" value="'.$_POST['ww1'].'" class="forminput">';
echo '</td>';
echo '</tr>';
if($_POST['submit'] AND $_POST['ww1'] == ""){
echo '<tr>';
echo '<td colspan="2">';
echo '<b>Je moet dit veld invullen!';
echo '</td>';
echo '</tr>';
}
echo '<tr>';
echo '<td>';
echo 'Nieuw wachtwoord registreren:';
echo '</td>';
echo '<td>';
echo '<input type="password" name="ww2" value="'.$_POST['ww2'].'" class="forminput">';
echo '</td>';
echo '</tr>';
if($_POST['submit'] AND $_POST['ww2'] == ""){
echo '<tr>';
echo '<td colspan="2">';
echo '<b>Je moet dit veld invullen!';
echo '</td>';
echo '</tr>';
}
echo '</table>';
echo '<input type="submit" name="submit" value="Verander wachtwoord" class="forminput">';
echo '</form>';
}
} else if($_GET['action'] == 'edithand'){
if($_POST['sub']){
$us = 'UPDATE inlog SET handtekening="'.$_POST['message'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
mysql_query($us) OR die (mysql_error());
echo 'Het verwerken is voltooid! je word doorgestuurd naar dezelfde pagina!';
doorstuur('edit_profiel.php?action=edithand');
} else {
$fd = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$fs = mysql_query($fd) OR die (mysql_error());
if($rang == 'VIP'){
$ant = 360;
} else if($rang == 'admin'){
$ant = 350;
} else {
$ant = 300;
}
$ld = 'SELECT * FROM handtekening_extra WHERE geb_ID="'.$_COOKIE['ID'].'"';
$hj = mysql_query($ld) OR die (mysql_error());
$ik = mysql_fetch_assoc($hj);
$max = $ant + $ik['aantal'];
while($d = mysql_fetch_array($fs)){
echo '<table border="1" width="100%" cellpadding="1" cellspacing="1">';
echo '<tr>';
echo '<td>';
echo handtek($d['handtekening']);
echo '</td>';
echo '</tr>';
echo '</table>';
}
echo '<b>Handtekening Veranderen ('.$max.' tekens)</b>';
echo '<form name="form" action="'.$SERVER['PHP_SELF'].'" method="POST">';
echo '<table>';
echo '<tr>';
echo '<td>';
?>
<html>
<input class="forminpit" type='button' onClick="javascript:addtext('message','[b][/b]')" name='B' value='B'>
<input class="forminpit" type='button' onClick="javascript:addtext('message','[u][/u]')" name='U' value='U'>
<input class="forminpit" type='button' onClick="javascript:addtext('message','[i][/i]')" name='I' value='I'>
<input class="forminpit" type='button' onClick="javascript:addtext('message','[img]http://[/img]')" value='Img'>
<input class="forminpit" type='button' onClick="javascript:addtext('message','[url=http://][/url]')" value='Url'>
</html>
<?
echo '</td>';
echo '</tr>';
echo '<td valign="top">';
$ad = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$as = mysql_query($ad) OR die (mysql_error());
?>
<textarea name=message wrap=physical cols=55 rows=10 onKeyDown="textCounter(this.form.message,this.form.remLen,<?php echo $max; ?>);" onKeyUp="textCounter(this.form.message,this.form.remLen,<?php echo $max; ?>);">
<?php
while($d = mysql_fetch_array($as)){
echo $d['handtekening'];
}
?>
</textarea><br>
<input readonly type=text name=remLen size=3 maxlength=3 value="<?php echo $max; ?>"> tekens over
<?php
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2">';
echo '<input class="forminpit" type="submit" name="sub" value="Handtekening bewerken!">';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</form>';
}
} else if($_GET['action'] == 'editava'){
if($_POST['send'] AND $_POST['ava'] != ""){
$image = getimagesize($_POST['ava']) OR die ('Plaatje is bestaat niet! daarom deze foutmelding ;)');
$breedte = $image['0'];
$hoogte = $image['1'];
if(!$image OR ($breedte > 100 OR $hoogte > 100)){
echo 'Het plaatje bestaat niet of is te groot!';
echo doorstuur('edit_profiel.php?action=editava');
} else {
$up = 'UPDATE inlog SET ava="'.$_POST['ava'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
mysql_query($up) OR die (mysql_error());
echo 'De avater is veranderd! Je word doorgestuurd.';
doorstuur('profiel.php');
}
} else {
echo '<b>Avater veranderen!</b>';
echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">';
echo '<table border="0">';
echo '<tr>';
echo '<td>';
echo 'Nieuwe avater URL:';
echo '</td>';
echo '<td>';
echo '<input type="text" name="ava" value="'.$_POST['ava'].'" class="forminput">';
echo '</td>';
echo '</tr>';
if($_POST['submit'] AND $_POST['ava'] == ""){
echo '<tr>';
echo '<td colspan="2">';
echo '<b>Je moet dit veld invullen!';
echo '</td>';
echo '</tr>';
}
echo '</table>';
echo '<input type="submit" name="send" value="Verander avater" class="forminput">';
echo '</form>';
}
} else if($_GET['action'] == 'showprofiel'){
if($_POST['submit']){
$up = 'UPDATE inlog SET profiel="'.$_POST['profiel'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
mysql_query($up) OR die (mysql_error());
echo 'Veranderen van het geslacht is voltooid! Je word doorgesuurd.';
doorstuur('profiel.php');
} else {
$fd = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$fs = mysql_query($fd) OR die (mysql_error());
echo '<b>Geslacht veranderen!</b>';
while($rij = mysql_fetch_array($fs)){
if($rij['profiel'] == 'Ja'){
$Ja = "selected";
} else {
$Nee = "selected";
}
echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">';
echo '<table border="0">';
echo '<tr>';
echo '<td>';
echo 'Geslacht:';
echo '</td>';
echo '<td>';
if($rij['profiel'] == 'Ja'){
echo '<input type="radio" name="profiel" value="Ja" class="forminput" CHECKED> Ja ';
echo '<input type="radio" name="profiel" value="Nee" class="forminput"> Nee ';
} else {
echo '<input type="radio" name="profiel" value="Ja" class="forminput"> Ja ';
echo '<input type="radio" name="profiel" value="Nee" class="forminput" CHECKED> Nee ';
}
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<input type="submit" name="submit" value="Verander geslacht" class="forminput">';
echo '</form>';
}
} else if($_GET['action'] == 'editender'){
if($_POST['submit']){
$up = 'UPDATE inlog SET geslacht="'.$_POST['geslacht'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
mysql_query($up) OR die (mysql_error());
echo 'Veranderen van het geslacht is voltooid! Je word doorgesuurd.';
doorstuur('profiel.php');
} else {
$fd = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"';
$fs = mysql_query($fd) OR die (mysql_error());
echo '<b>Geslacht veranderen!</b>';
while($rij = mysql_fetch_array($fs)){
if($rij['geslacht'] == 'man'){
$man = "selected";
} else {
$vrouw = "selected";
}
echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">';
echo '<table border="0">';
echo '<tr>';
echo '<td>';
echo 'Geslacht:';
echo '</td>';
echo '<td>';
if($rij['geslacht'] == 'man'){
echo '<input type="radio" name="geslacht" value="man" class="forminput" CHECKED> Man ';
echo '<input type="radio" name="geslacht" value="vrouw" class="forminput"> Vrouw ';
} else {
echo '<input type="radio" name="geslacht" value="man" class="forminput"> Man ';
echo '<input type="radio" name="geslacht" value="vrouw" class="forminput" CHECKED> Vrouw ';
}
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<input type="submit" name="submit" value="Verander geslacht" class="forminput">';
echo '</form>';
}
}
} else {
echo 'Er is een fout opgetreden, of je hebt een foutieve URL!';
}
} else {
echo 'Je moet ingelogd zijn om op deze pagina te komen!';
}
include('include/footer.php');
?>
<?php include('include/header.php'); ?> <html> <head> <script language='javascript'> function addtext(veld,text) { text = ' '+text+' '; if (document.form.elements[veld].createTextRange) { document.form.elements[veld].focus(); document.selection.createRange().duplicate().text = text; } else { document.form.elements[veld].focus(); document.form.elements[veld].value += text; } } </script> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else countfield.value = maxlimit - field.value.length; } // End --> </script> </head> <html> <? if($inlog == 'true'){ if($_GET['action'] == ''){ echo 'Je moet wel een goede actie opgeven!'; } else if($_GET['action'] == 'editpw'){ if($_POST['submit'] AND $_POST['ww1'] != "" AND $_POST['ww2'] != "" AND $_POST['ww1'] == $_POST['ww2']){ mysql_query('UPDATE inlog SET wachtwoord="'.md5($_POST['ww2']).'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'" LIMIT 1'); echo 'Wachtwoord veranderen gelukt. Je word uitgelogd om veiligheids redenen!'; doorstuur('inlog.php'); } else { echo '<b>Wachtwoord Veranderen</b>'; echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">'; echo '<table border="0">'; if($_POST['submit'] AND $_POST['ww1'] != $_POST['ww2']){ echo '<b>De 2 ingevulde wachtwoorden komen niet overeen met alkaar'; } echo 'Nieuw wachtwoord:'; echo '<input type="password" name="ww1" value="'.$_POST['ww1'].'" class="forminput">'; if($_POST['submit'] AND $_POST['ww1'] == ""){ echo '<b>Je moet dit veld invullen!'; } echo 'Nieuw wachtwoord registreren:'; echo '<input type="password" name="ww2" value="'.$_POST['ww2'].'" class="forminput">'; if($_POST['submit'] AND $_POST['ww2'] == ""){ echo '<b>Je moet dit veld invullen!'; } echo '<input type="submit" name="submit" value="Verander wachtwoord" class="forminput">'; } } else if($_GET['action'] == 'edithand'){ if($_POST['sub']){ $us = 'UPDATE inlog SET handtekening="'.$_POST['message'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; echo 'Het verwerken is voltooid! je word doorgestuurd naar dezelfde pagina!'; doorstuur('edit_profiel.php?action=edithand'); } else { $fd = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; if($rang == 'VIP'){ $ant = 360; } else if($rang == 'admin'){ $ant = 350; } else { $ant = 300; } $ld = 'SELECT * FROM handtekening_extra WHERE geb_ID="'.$_COOKIE['ID'].'"'; $max = $ant + $ik['aantal']; echo '<table border="1" width="100%" cellpadding="1" cellspacing="1">'; echo handtek ($d['handtekening']); } echo '<b>Handtekening Veranderen ('.$max.' tekens)</b>'; echo '<form name="form" action="'.$SERVER['PHP_SELF'].'" method="POST">'; ?> <html> <input class="forminpit" type='button' onClick="javascript:addtext('message','[b][/b]')" name='B' value='B'> <input class="forminpit" type='button' onClick="javascript:addtext('message','[u][/u]')" name='U' value='U'> <input class="forminpit" type='button' onClick="javascript:addtext('message','[i][/i]')" name='I' value='I'> <input class="forminpit" type='button' onClick="javascript:addtext('message','[img]http://[/img]')" value='Img'> <input class="forminpit" type='button' onClick="javascript:addtext('message','[url=http://][/url]')" value='Url'> </html> <? echo '<td valign="top">'; $ad = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; ?> <textarea name=message wrap=physical cols=55 rows=10 onKeyDown="textCounter(this.form.message,this.form.remLen, <?php echo $max; ?>);" onKeyUp="textCounter(this.form.message,this.form.remLen, <?php echo $max; ?>);"> <?php } ?> </textarea><br> <input readonly type=text name=remLen size=3 maxlength=3 value=" <?php echo $max; ?>"> tekens over <?php echo '<input class="forminpit" type="submit" name="sub" value="Handtekening bewerken!">'; } } else if($_GET['action'] == 'editava'){ if($_POST['send'] AND $_POST['ava'] != ""){ $image = getimagesize($_POST['ava']) OR die ('Plaatje is bestaat niet! daarom deze foutmelding ;)'); $breedte = $image['0']; $hoogte = $image['1']; if(!$image OR ($breedte > 100 OR $hoogte > 100)){ echo 'Het plaatje bestaat niet of is te groot!'; echo doorstuur ('edit_profiel.php?action=editava'); } else { $up = 'UPDATE inlog SET ava="'.$_POST['ava'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; echo 'De avater is veranderd! Je word doorgestuurd.'; doorstuur('profiel.php'); } } else { echo '<b>Avater veranderen!</b>'; echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">'; echo '<table border="0">'; echo 'Nieuwe avater URL:'; echo '<input type="text" name="ava" value="'.$_POST['ava'].'" class="forminput">'; if($_POST['submit'] AND $_POST['ava'] == ""){ echo '<b>Je moet dit veld invullen!'; } echo '<input type="submit" name="send" value="Verander avater" class="forminput">'; } } else if($_GET['action'] == 'showprofiel'){ if($_POST['submit']){ $up = 'UPDATE inlog SET profiel="'.$_POST['profiel'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; echo 'Veranderen van het geslacht is voltooid! Je word doorgesuurd.'; doorstuur('profiel.php'); } else { $fd = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; echo '<b>Geslacht veranderen!</b>'; if($rij['profiel'] == 'Ja'){ $Ja = "selected"; } else { $Nee = "selected"; } echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">'; echo '<table border="0">'; if($rij['profiel'] == 'Ja'){ echo '<input type="radio" name="profiel" value="Ja" class="forminput" CHECKED> Ja '; echo '<input type="radio" name="profiel" value="Nee" class="forminput"> Nee '; } else { echo '<input type="radio" name="profiel" value="Ja" class="forminput"> Ja '; echo '<input type="radio" name="profiel" value="Nee" class="forminput" CHECKED> Nee '; } echo '<input type="submit" name="submit" value="Verander geslacht" class="forminput">'; } } else if($_GET['action'] == 'editender'){ if($_POST['submit']){ $up = 'UPDATE inlog SET geslacht="'.$_POST['geslacht'].'" WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; echo 'Veranderen van het geslacht is voltooid! Je word doorgesuurd.'; doorstuur('profiel.php'); } else { $fd = 'SELECT * FROM inlog WHERE ID="'.$_COOKIE['ID'].'" AND hash="'.$_COOKIE['hash'].'"'; echo '<b>Geslacht veranderen!</b>'; if($rij['geslacht'] == 'man'){ $man = "selected"; } else { $vrouw = "selected"; } echo '<form action="'.$SERVER['PHP_SELF'].'" method="post">'; echo '<table border="0">'; if($rij['geslacht'] == 'man'){ echo '<input type="radio" name="geslacht" value="man" class="forminput" CHECKED> Man '; echo '<input type="radio" name="geslacht" value="vrouw" class="forminput"> Vrouw '; } else { echo '<input type="radio" name="geslacht" value="man" class="forminput"> Man '; echo '<input type="radio" name="geslacht" value="vrouw" class="forminput" CHECKED> Vrouw '; } echo '<input type="submit" name="submit" value="Verander geslacht" class="forminput">'; } } } else { echo 'Er is een fout opgetreden, of je hebt een foutieve URL!'; } } else { echo 'Je moet ingelogd zijn om op deze pagina te komen!'; } include('include/footer.php'); ?>
Dat is dehele code!! |