<?php
 $edit=$_POST[edit]; $del=$_GET[del]; if($edit!="") { $a_vorname=htmlspecialchars(stripslashes(ucfirst($_POST[a_vorname]))); $a_nachname=htmlspecialchars(stripslashes(ucfirst($_POST[a_nachname]))); $a_plz=htmlspecialchars(stripslashes($_POST[a_plz])); $a_land=$_POST[a_land]; $a_ort=htmlspecialchars(stripslashes(ucfirst($_POST[a_ort]))); $a_email=htmlspecialchars(stripslashes(ucfirst($_POST[a_email]))); if($a_land=="de") { $getrr=mysql_query("SELECT bundesland FROM ".$dbx."_geodata_de WHERE plz LIKE '%".$a_plz."%'"); $getr=mysql_fetch_array($getrr); $a_region=strtolower($getr[bundesland]); } elseif($a_land=="ch") { $getrr=mysql_query("SELECT kanton FROM ".$dbx."_geodata_ch WHERE plz LIKE '%".$a_plz."%'"); $getr=mysql_fetch_array($getrr); $a_region=strtolower($getr[kanton]); } elseif($a_land=="at") { $getrr=mysql_query("SELECT bundesland FROM ".$dbx."_geodata_at WHERE plz LIKE '%".$a_plz."%'"); $getr=mysql_fetch_array($getrr); $a_region=strtolower($getr[bundesland]); } mysql_query("UPDATE ".$dbx."_user SET vorname='".addslashes($a_vorname)."', nachname='".addslashes($a_nachname)."', plz='".addslashes($a_plz)."', ort='".addslashes($a_ort)."', region='".$a_region."', land='".addslashes($a_land)."', email='".addslashes($a_email)."', geolat='', geolang='' WHERE id='".$edit."'"); echo genMsg('03/16/02','Изменения были успешно сохранены.'); } elseif($del!="") { if($o=="k") { @mysql_query("DELETE FROM ".$dbx."_forum_data WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_blogs WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_blogs_data WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_blogs_kommentare WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_events WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_events_kommentare WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_gaestebuch WHERE gast='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_gruppen_data WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_gruppen_mitglieder WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_immo_data WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_jobs_data WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_inserate_data WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_blogs_kommentare WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_notizen WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_postfach WHERE abs='".$del."' OR empf='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_user WHERE id='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_user_fotos WHERE user='".$del."'"); @mysql_query("DELETE FROM ".$dbx."_user_freunde WHERE u1='".$del."' OR u2='".$del."'"); echo genMsg('03/16/02','	Изменения были успешно сохранены.'); } else echo "Mцchten Sie den Benutzer wirklich unwiederruflich und inkl. Freundschaften, Beitrдge in Forum/Blogs/Gдstebьchern, Gruppen-Mitgliedschaften, Inseraten usw. lцschen?<br><br><form action=index.php><input type=hidden name=d value=benutzer><input type=hidden name=del value=".$del."><input type=hidden name=o value=k><input type=submit value=\"Ja, lцschen\"></form>"; } elseif($o=="k") { $getuu=mysql_query("SELECT * FROM ".$dbx."_user WHERE user='".addslashes($_POST[b_user])."' OR vorname='".addslashes($_POST[b_vorname])."' OR nachname='".addslashes($_POST[b_nachname])."'"); $udd=mysql_fetch_array($getuu); if($udd[id]=="") echo genMsg('03/16/01','Ничего не найдено.'); else { echo "<img src=../icon/03/16/01.png width=16 height=16 align=absmiddle><a href=index.php?d=benutzer&del=".$udd[id].">Удатить пользователя</a><br><br><form action=index.php method=post><input type=hidden name=d value=benutzer><input type=hidden name=edit value=".$udd[id]."><table border=0 cellspacing=0 cellpadding=5>
<tr><td>Имя:</td><td><input type=text name=a_vorname style=width:200px maxlength=20 value=\"".$udd[vorname]."\"></td></tr>
<tr><td>Фамилия:</td><td><input type=text name=a_nachname style=width:200px maxlength=20 value=\"".$udd[nachname]."\"></td></tr>
<tr><td>Город:</td><td><input type=text name=a_plz style=width:75px maxlength=5 class=plz value=\"".$udd[plz]."\"><img src=../images/space.gif width=5 height=1><input type=text name=a_ort style=width:210px maxlength=30 value=\"".$udd[ort]."\"></td></tr>
<tr><td>Страна:</td><td><img src=../icon/flaggen/".$udd[land].".gif width=18 height=12 align=absmiddle name=flag><img src=../images/space.gif width=5 height=1><select style=width:277px onchange=\"document.images['flag'].src = '../icon/flaggen/'+document.getElementById('land').value+'.gif';\" id=land name=a_land>"; $laender=array("de"=>"Deutschland","at"=>"Цsterreich","ch"=>"Schweiz","li"=>"Liechtenstein","au"=>"Australien","be"=>"Belgien","dk"=>"Dдnemark","fi"=>"Finnland","fr"=>"Frankreich","gr"=>"Griechenland","gb"=>"Grossbritannien","it"=>"Italien","ca"=>"Kanada","lu"=>"Luxemburg","nz"=>"Neuseeland","nl"=>"Niederlande","no"=>"Norwegen","pl"=>"Polen","pt"=>"Portugal","se"=>"Schweden","sk"=>"Slowakei","es"=>"Spanien","tr"=>"Tьrkei","us"=>"USA"); echo "
<option value=\"".$udd[land]."\">".$laender[$udd[land]]."
<option value=de>Deutschland
<option value=at>Цsterreich
<option value=ch>Schweiz
<option value=li>Liechtenstein
<option value=\"\">---
<option value=au>Australien
<option value=be>Belgien
<option value=dk>Dдnemark
<option value=fi>Finnland
<option value=fr>Frankreich
<option value=gr>Griechenland
<option value=gb>Grossbritannien
<option value=it>Italien
<option value=ca>Kanada
<option value=lu>Luxemburg
<option value=nz>Neuseeland
<option value=nl>Niederlande
<option value=no>Norwegen
<option value=pl>Polen
<option value=pt>Portugal
<option value=se>Schweden
<option value=sk>Slowakei
<option value=es>Spanien
<option value=tr>Tьrkei
<option value=us>USA
<option value=\"\">---
<option value=\"\">Sonstiges Land
</select></td></tr>
<tr><td>E-Mail:</td><td><input type=test name=a_email style=width:200px value=\"".$udd[email]."\"></td></tr>
<tr><td colspan=2 align=right><input type=submit value=Обновить информацию class=formbutton></td></tr></table>"; }} else echo "<form action=index.php method=post><input type=hidden name=d value=benutzer><input type=hidden name=o value=k>Поиск:<br><br><table border=0 cellspacing=0 cellpadding=5>
<tr><td>Имя пользователя:</td><td><input type=text name=b_user style=width:300px></td></tr>
<tr><td><i>или</i></td></tr>
<tr><td>Имя:</td><td><input type=text name=b_vorname style=width:300px></td></tr>
<tr><td>Фамилия:</td><td><input type=text name=b_nachname style=width:300px></td></tr>
<tr><td colspan=2 align=right><input type=submit value=Найти class=formbutton></td></tr></table></form>"; ?>