Hallo Zusammen,
hat jemand das Profiledit vom Nero für Version I?? Wäre klasse wenn mir das jemand geben könnte. Auf meine PM hat Nero leider nicht geantwortet.
DANKE
verwendete ilchClan Version: 1.1
betroffene Homepage: externer Link
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php # Copyright by: Manuel, edit by Nero # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); if( $allgAr['ProfilRight'] == 1 OR loggedin()){ $uid = escape($menu->get(2),'integer'); ### ## # auslesen der Menüs by Nero ##define some vars $choosemenu = escape($menu->get(3),'integer'); $l= ''; $l1= ''; $usermenu = ''; $checkchoose = true; $checkchoose1 = true; $usermenu[0] = 0; $tmenupos = 0; $imenu = 0; $imenu1 = 1; $menushow = ''; ##hier wird die letzte position von den eingabefelder ausgelesen $takelastpos = db_count_query("SELECT pos FROM prefix_profilefields WHERE func <> 2 ORDER BY pos DESC LIMIT 1"); /* auslesen und kontrolieren des inhlates von den Kategorien, die Kategorien werden hier natürlich auch ausgelesen */ $ergmenu = db_query("SELECT * FROM prefix_profilefields WHERE func = 2 ORDER BY pos ASC"); while($row1 = db_fetch_assoc($ergmenu)){ $usermenuname[$imenu1] = $row1['show']; $usermenu[$imenu1] = $row1['pos']; $menushow[$imenu1] ='<a class="profil10" href="index.php?user-details-'.$uid.'-'.$row1['pos'].'"> '.$row1['show'].' </a>|'; if($choosemenu){ if($choosemenu == $usermenu[$imenu] AND isset($usermenu[$imenu]) AND $takelastpos > $usermenu[$imenu]){ $menushow[$imenu] = str_replace('profil10','profil11',$menushow[$imenu]); if($usermenu[$imenu]+1 <> $usermenu[$imenu1]){ if($imenu ==2){ $l = profilefields_show( $uid, $usermenu[$imenu], $usermenu[$imenu1], 40); }else{ $l = profilefields_show( $uid, $usermenu[$imenu], $usermenu[$imenu1]); } $tmenupos = $imenu; }else{ $tmenupos = $imenu; } $checkchoose1 = false; }elseif($choosemenu == $usermenu[$imenu1] AND $takelastpos < $usermenu[$imenu1]){ $menushow[$imenu1] = str_replace('profil10','profil11',$menushow[$imenu1]); $tmenupos = $imenu1+3; $checkchoose1 = false; } $checkchoose = false; } $imenu1++; $imenu++; } if($checkchoose){ $checkchoose1 = false; $menushow[1] = str_replace('profil10','profil11',$menushow[1]); $l = profilefields_show( $uid, $usermenu[1], $usermenu[2], 40); $tmenupos = 1; }elseif($choosemenu == $usermenu[$imenu] AND $takelastpos > $usermenu[$imenu] AND $checkchoose1){ $checkchoose1 = false; $takelastpos++; $menushow[$imenu] = str_replace('profil10','profil11',$menushow[$imenu]); if($imenu <=2){ $l = profilefields_show( $uid, $usermenu[$imenu], $takelastpos, 40); }else{ $l = profilefields_show( $uid, $usermenu[$imenu], $takelastpos); } $tmenupos = $imenu; }elseif($checkchoose1){ $l = '<td class="Cmite" width="100%">Sie haben eine ungültige Kategorie gewält</td>'; $tmenupos = $imenu+3; } $l1 = implode($menushow); ### ## # der rest kommt hier $abf = 'SELECT * FROM prefix_user WHERE id = "'.$uid.'"'; $erg = db_query($abf); $row = db_fetch_assoc($erg); $avatar = ''; if ( file_exists($row['avatar'])) { $avatar = '<img src="'.$row['avatar'].'" border="0">'; } $userpict = ''; if ( file_exists($row['userpict'])) { $userpict = '<img src="'.$row['userpict'].'" border="0">'; } $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') ) - $row['regist']; $regday = round($regsek / 86400); $postpday = ( $regday == 0 ? 0 : round($row['posts'] / $regday, 2 ) ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $tpl->out(0); #-> infos über User und Userbild wird hier ausgegeben. if($tmenupos == 1){ $ar1 = array ( 'NAME' => $row['name'], 'USERBILD' => $userpict, ); $ar1['profilefieldtitle'] = '<th class="ProfTitel" colspan="3"><b>'.$l1.'</b></th>'; $ar1['rowspan'] = 1 + substr_count($l, '</td><td'); $tpl->set_ar_out($ar1,1); } #-> alles was mit dem forum zu tun hat wird hier ausgegeben. elseif($tmenupos == 2){ $ar2 = array ( 'JOINED' => date('d M Y',$row['regist']), 'LASTAK' => date('d M Y - H:i',$row['llogin']), 'POSTS' => $row['posts'], 'postpday' => $postpday, 'RANG' => userrang ($row['posts'],$uid), 'AVATA' => $avatar, 'NAME' => $row['name'], 'UID' => $uid, ); $ar2['profilefieldtitle'] = '<th class="ProfTitel" colspan="3"><b>'.$l1.'</b></th>'; $ar2['rowspan'] = 3 + substr_count($l, '</td><td'); $tpl->set_ar_out($ar2,2); }elseif($tmenupos != 0){#-> nach dem Menu 2 kommt hier alles raus. $ar3['profilefieldtitle'] = '<th class="ProfTitel" colspan="2"><b>'.$l1.'</b></th>'; $ar3['NAME'] = $row['name']; $tpl->set_ar_out($ar3,3); } #-> hier werden noch die dynamisch erstellten Felder ausgegeben $tpl->set_out('profilefields',$l,4); $design->footer(); }else{ #einlogen $uid = $menu->get(2); $title = $allgAr['title'].' :: Login'; $hmenu = $extented_forum_menu.'Login'.$extented_forum_menu_sufix; $tpl = new tpl ( 'user/login.htm' ); if ( loggedin() ) { $design = new design ( $title , $hmenu, 1); $design->header(); if (isset($_POST['wdlink'])) { $wd = $_POST['wdlink']; } else { $wd = 'index.php?user-details-'.$uid; } wd ($wd, $lang['yourareloged']); $design->footer(); } else { $design = new design ( $title , $hmenu, 1); $design->header(); echo " - Profilansicht nur für registrierte Benutzer"; $tpl = new tpl ( 'user/login.htm' ); $tpl->set_out('WDLINK','index.php?user-details-'.$uid,0); $design->footer(); } } ?>
<a href="javascript:history.back(1)"><b>«</b> {_lang_back}</a> <style type="text/css"> <!-- .profil10{ display:inline; padding:0px; margin:0px 1px 0px 1px; } .profil11{ display:inline; background:#CCCCCC; padding:0px; margin:0px; border-color: #CCCCCC; border-width: 1px; border-style: solid; } .ProfTitel{ background-color: #292929; color:#232323; font-size:11px; padding:1px 0px 1px 0px; margin:1px 0px 3px 0px; border:0px; } --> </style> <br /> <br /> <table width="100%" cellpadding="3" cellspacing="1" class="border"> {EXPLODE} <tr class="Chead"> <th colspan="3"><b>{_lang_detailsfrom} {NAME}</b></th> </tr> <tr> {profilefieldtitle} </tr> <tr class="Chead" height="4px"> <th colspan="3"></th> </tr> <tr> <td class="Cmite" width="30%">{_lang_nickname}</td> <td class="Cnorm" width="40%">{NAME}</td> <td class="Cnorm" width="30%" rowspan="{rowspan}" valign="top" align="center"> {USERBILD} </td> </tr> {EXPLODE} <tr class="Chead"> <th colspan="3"><b>{_lang_detailsfrom} {NAME}</b></th> </tr> <tr> {profilefieldtitle} </tr> <tr class="Chead" height="4px"> <th colspan="3"></th> </tr> <tr> <td class="Cmite">{_lang_regsince}</td> <td class="Cnorm">{JOINED}</td> <td class="Cnorm" width="30%" rowspan="{rowspan}" valign="top" align="center"> {AVATA} <br /><br /> <font class="smalfont">{RANG}</font> </td> </tr> <tr> <td class="Cmite">{_lang_lastactivity}</td> <td class="Cnorm">{LASTAK}</td> </tr> <tr> <td class="Cmite">{_lang_posts2}</td> <td class="Cnorm">{POSTS}, {_lang_perday}: {postpday}</td> </tr> <tr> <td class="Cmite">Gästebuch</td> <td class="Cnorm"><a href="index.php?user-usergb-view-{UID}">User Gästebuch</a></td> </tr> {EXPLODE} <tr class="Chead"> <th colspan="2"><b>{_lang_detailsfrom} {NAME}</b></th> </tr> <tr> {profilefieldtitle} </tr> <tr class="Chead" height="4px"> <th colspan="2"></th> </tr> {EXPLODE} {profilefields} </table> <br /> <a href="javascript:history.back(1)"><b>«</b> {_lang_back}</a>
<tr> <td class="Cmite">Gästebuch</td> <td class="Cnorm"><a href="index.php?user-usergb-view-{UID}">User Gästebuch</a></td> </tr>auch umsetzen muss ? ? ? ?
<?php define ( 'main' , TRUE ); require_once('include/includes/config.php'); require_once('include/includes/func/db/mysql.php'); db_connect(); if (db_query("INSERT INTO `prefix_profilefields` (`id`,`show`,`pos`,`func`) VALUES (17, 'usergb', 16, 3);")) echo 'Erfolgreich installiert.<br />install.php löschen.'; else echo 'Fehler aufgetreten:<br />'.mysql_error(); db_close(); ?>
function profilefields_show_spez_usergb ($value,$uid) { global $allgAr, $lang; return ( profilefields_show_echo_standart ( 'Gästebuch', '<a href="index.php?user-usergb-view-'.$uid.'">User Gästebuch</a>' ) ); }
} function profilefields_show_spez_opt_pm ($value,$uid,$colspan) { function profilefields_show_spez_usergb ($value,$uid) { global $allgAr, $lang; if ($allgAr['forum_usergallery'] == 1) { return ( profilefields_show_echo_standart ( 'Gästebuch', '<a href="index.php?user-usergb-view-'.$uid.'">User Gästebuch</a>' ) ); } }
Warning: Missing argument 3 for profilefields_show_echo_standart() in /homepages/46/d103042282/htdocs/fgamer/include/includes/func/profilefields.php on line 164
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); function profilefields_functions2 () { $ar = array ( 1 => 'Feld', 2 => 'Kategorie' ); return ($ar); } function profilefields_functions () { $ar = array ( 1 => 'Feld', 2 => 'Kategorie', 3 => 'Angezeigt', 4 => 'Versteckt' ); return ($ar); } # Felder zum aendern anzeigen. function profilefields_change ($uid) { $i = 0; $i1 = 1; $test = false; $q = db_query("SELECT id, `show`, val, func FROM prefix_profilefields LEFT JOIN prefix_userfields ON prefix_userfields.fid = prefix_profilefields.id AND prefix_userfields.uid = ".$uid." WHERE func != 3 ORDER BY pos ASC"); while ( $r = db_fetch_assoc($q)) { $check[$i1] = $r; if($i){ if($check[$i]['func'] == 1){echo '<label style="float:left; width:40%;">'.$check[$i]['show'].'</label><input type="text" name="profilefields['.$check[$i]['id'].']" value="'.$check[$i]['val'].'"><br />';} if($check[$i]['func'] == 2){ if($check[$i1]['func'] == 1){ if($test){ echo '</fieldset>'; }else{$test = true;} echo '<fieldset><legend>'.$check[$i]['show'].'</legend> <br />'; } } } $i++; $i1++; } if($check[$i]['func'] == 1){echo '<label style="float:left; width:40%;">'.$check[$i]['show'].'</label><input type="text" name="profilefields['.$check[$i]['id'].']" value="'.$check[$i]['val'].'"><br />';} } # Felder die uebermittelt wurden speichern. function profilefields_change_save ($uid) { $q = db_query("SELECT id, `show`, val FROM prefix_profilefields LEFT JOIN prefix_userfields ON prefix_userfields.fid = prefix_profilefields.id AND prefix_userfields.uid = ".$uid." WHERE func = 1 ORDER BY pos"); while ( $r = db_fetch_assoc($q)) { if ( isset($_REQUEST['profilefields'][$r['id']]) ) { $v = $_REQUEST['profilefields'][$r['id']]; } else { $v = ''; } if ( $r['val'] == '' AND $v != '' ) { db_query("INSERT INTO prefix_userfields (fid,uid,val) VALUES (".$r['id'].",".$uid.",'".$v."')"); } elseif ( $r['val'] != '' AND $v == '' ) { db_query("DELETE FROM prefix_userfields WHERE fid = ".$r['id']." AND uid = ".$uid); } elseif ( $r['val'] != '' AND $v != '' AND $r['val'] != $v ) { db_query("UPDATE prefix_userfields SET val = '".$v."' WHERE fid = ".$r['id']." AND uid = ".$uid); } } } # Diese Funktion Zeigt ALLE Felder die der Benutzer im Adminbereich unter # Profilefields sortieren kann an ... is eigentlich total easy ;-)... function profilefields_show ($uid, $posmind, $posmax, $breite = 70) { if($posmax < $posmind){ return 'Error: falsche werte in den vars $postmind und $postmax!'; } global $allgAr; $zelle = '<td width="'.$breite.'%"'; $l = ''; $a = array (); $q = db_query("SHOW COLUMNS FROM prefix_user"); while ($r = db_fetch_assoc($q)) { $a[$r['Field']] = $r['Field']; } $q = db_query("SELECT id, `show`, func, pos FROM prefix_profilefields WHERE func < 4 AND pos >".$posmind." AND pos <".$posmax." ORDER BY pos ASC") OR die('verdammter mist1'); while ( $r = db_fetch_assoc($q)) { if ( $r['func'] == 1 ) { $str = @db_result ( db_query ("SELECT val FROM prefix_userfields WHERE uid = ".$uid." AND fid = ".$r['id']) , 0 ); $l .= '<tr><td width="30%" class="Cmite">'.$r['show'].'</td>'.$zelle.' class="Cnorm">'.$str.'</td></tr>'."\n"; } elseif ( $r['func'] == 2 ) { return 'Achtung: in der funktion profilefields_show in der datei Profilfields.php ist ein fehler aufgetreten. <br> Fehler = Es wurde ein Menutitel angefordert, was aber nicht passieren sollte.'; } elseif ( $r['func'] == 3 ) { $str = ''; if (isset($a[$r['show']])) { $str = @db_result ( db_query ("SELECT `".$r['show']."` FROM prefix_user WHERE id = ".$uid) , 0 ); } if ( function_exists ( 'profilefields_show_spez_'.$r['show'] ) ) { $l .= call_user_func ( 'profilefields_show_spez_'.$r['show'], $str, $uid, $zelle); } elseif ($r['show'] != 'opt_pm_popup') { $l .= '<tr><td width="30%" class="Cmite">'.ucfirst($r['show']).'</td>'.$zelle.' class="Cnorm">'.$str.'</td></tr>'."\n"; } } } return ( $l ); } # hier kommen die speziellen funktionen hin... ## ### function profilefields_show_spez_geschlecht ($value,$uid,$colspan) { global $lang; $ar = array ( 0 => $lang['itdoesntmatter'], 1 => $lang['male'], 2 => $lang['female'] ); return ( profilefields_show_echo_standart ( $lang['sex'], $ar[$value] , $colspan) ); } function profilefields_show_spez_status ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['status'], ($value?'aktiv':'inaktiv'), $colspan) ); } function profilefields_show_spez_usergallery ($value,$uid,$colspan) { global $allgAr, $lang; if ($allgAr['forum_usergallery'] == 1) { return ( profilefields_show_echo_standart ( 'Usergallery', '<a href="index.php?user-usergallery-'.$uid.'">ansehen</a>', $colspan) ); } } function profilefields_show_spez_homepage ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['homepage'], (empty($value)?'':'<a href="'.$value.'" target="_blank">'.$value.'</a>'), $colspan) ); } function profilefields_show_spez_opt_mail ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['mail'], ($value?'<a href="index.php?user-mail-'.$uid.'">'.$lang['send'].'</a>':''), $colspan) ); } function profilefields_show_spez_opt_pm ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['privatemessages'], ($value?'<a href="index.php?forum-privmsg-new=0&empfid='.$uid.'">'.$lang['send'].'</a>':''), $colspan) ); } function profilefields_show_spez_sig ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['signature'], bbcode($value),$colspan) ); } function profilefields_show_spez_staat ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['state'], ((!empty($value) AND file_exists('include/images/flags/'.$value))?'<img src="include/images/flags/'.$value.'" alt="'.$value.'" title="'.$value.'" />':''), $colspan) ); } ### ## # help funcs function get_nationality_array () { $ar = array(); $o = opendir ( 'include/images/flags' ); while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } } return ( $ar ); } function profilefields_show_echo_standart ( $k, $v, $colspan ) { return ( '<tr><td width="30%" class="Cmite">'.$k.'</td>'.$colspan.' class="Cnorm">'.$v.'</td></tr>'."\n" ); } ?>
function profilefields_show_spez_usergb ($value,$uid) { global $allgAr, $lang; return ( profilefields_show_echo_standart ( 'Gästebuch', '<a href="index.php?user-usergb-view-'.$uid.'">User Gästebuch</a>' ) ); }
function profilefields_show_spez_usergb ($value,$uid) { global $allgAr, $lang; return ( profilefields_show_echo_standart ( 'Gästebuch', '<a href="index.php?user-usergb-view-'.$uid.'">User Gästebuch</a>' ) ); }
<div align="center"><a href="index.php?user"><b>«</b> Zur Userliste »</a></div> <br> <div align="center"><a href="index.php?teams-show-1"><b> </b>« Team Fungamer »</a> <a href="index.php?teams-show-2"><b>«</b> Team Stammkneipe »</a> <a href="index.php?teams-show-4"><b>«</b> Team WoW »</a></div> <style type="text/css"> <!-- .profil10{ display:inline; padding:0px; margin:0px 1px 0px 1px; } .profil11{ display:inline; background:#322212; padding:0px; margin:0px; border-color: #322212; border-width: 1px; border-style: solid; } .ProfTitel{ background-color: #292929; color:#232323; font-size:14px; padding:1px 0px 1px 0px; margin:1px 0px 3px 0px; border:0px; } --> </style> <br /> <br /><div align="center"> <table width="100%" cellpadding="3" cellspacing="1" class="border"> {EXPLODE} <tr class="Cmite"> <th colspan="3"><div align="center"><font size=2><font color="#000000"><b>{_lang_detailsfrom} {NAME}</b></font></th> </tr> <tr> {profilefieldtitle} </tr> <tr class="Cmite" height="4px"> <th colspan="3"></th> </tr> <tr> <td class="Cmite" width="30%">{_lang_nickname}</td> <td class="Cnorm" width="40%">{NAME}</td> <td class="Cnorm" width="30%" rowspan="{rowspan}" valign="top" align="center"> {USERBILD} </td> </tr> {EXPLODE} <tr class="Cmite"> <th colspan="3"><b>{_lang_detailsfrom} {NAME}</b></th> </tr> <tr> {profilefieldtitle} </tr> <tr class="Cmite" height="4px"> <th colspan="3"></th> </tr> <tr> <td class="Cmite">{_lang_regsince}</td> <td class="Cnorm">{JOINED}</td> <td class="Cnorm" width="30%" rowspan="{rowspan}" valign="top" align="center"> {AVATA} <br /><br /> <font class="smalfont">{RANG}</font> </td> </tr> <tr> <td class="Cmite">{_lang_lastactivity}</td> <td class="Cnorm">{LASTAK}</td> </tr> <tr> <td class="Cmite">{_lang_posts2}</td> <td class="Cnorm">{POSTS}, {_lang_perday}: {postpday}</td> </tr> {EXPLODE} <tr class="Cmite"> <th colspan="2"><b>{_lang_detailsfrom} {NAME}</b></th> </tr> <tr> {profilefieldtitle} </tr> <tr class="Cmite" height="4px"> <th colspan="2"></th> </tr> {EXPLODE} {profilefields} </table> <br> <br />
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); if( $allgAr['ProfilRight'] == 1 OR loggedin()){ error_reporting(E_ALL); $uid = $menu->get(2); ### ## # auslesen der Menüs by Nero ##define some vars $choosemenu = $menu->get(3); $l= ''; $l1= ''; $usermenu = ''; $checkchoose = true; $checkchoose1 = true; $usermenu[0] = 0; $tmenupos = 0; $imenu = 0; $imenu1 = 1; $menushow = ''; ##hier wird die letzte position von den eingabefelder ausgelesen $takelastpos = db_result ( db_query ("SELECT pos FROM prefix_profilefields WHERE func <> 2 ORDER BY pos DESC LIMIT 1") , 0 ); /* auslesen und kontrolieren des inhlates von den Kategorien, die Kategorien werden hier natürlich auch ausgelesen */ $ergmenu = db_query("SELECT * FROM prefix_profilefields WHERE func = 2 ORDER BY pos ASC"); while($row1 = db_fetch_assoc($ergmenu)){ $usermenuname[$imenu1] = $row1['show']; $usermenu[$imenu1] = $row1['pos']; $menushow[$imenu1] ='<a class="profil10" href="index.php?user-details-'.$uid.'-'.$row1['pos'].'"> '.$row1['show'].' </a>|'; if($choosemenu){ if($choosemenu == $usermenu[$imenu] AND $usermenu[$imenu] AND $takelastpos > $usermenu[$imenu]){ $menushow[$imenu] = str_replace('profil10','profil11',$menushow[$imenu]); if($usermenu[$imenu]+1 <> $usermenu[$imenu1]){ if($imenu ==2){ $l = profilefields_show( $uid, $usermenu[$imenu], $usermenu[$imenu1], 40); }else{ $l = profilefields_show( $uid, $usermenu[$imenu], $usermenu[$imenu1]); } $tmenupos = $imenu; }else{$tmenupos = $imenu;} $checkchoose1 = false; }elseif($choosemenu == $usermenu[$imenu1] AND $takelastpos < $usermenu[$imenu1]){ $menushow[$imenu1] = str_replace('profil10','profil11',$menushow[$imenu1]); $tmenupos = $imenu1+3; $checkchoose1 = false; } $checkchoose = false; } $imenu1++; $imenu++; } if($checkchoose){ $checkchoose1 = false; $menushow[1] = str_replace('profil10','profil11',$menushow[1]); $l = profilefields_show( $uid, $usermenu[1], $usermenu[2], 40); $tmenupos = 1; }elseif($choosemenu == $usermenu[$imenu] AND $takelastpos > $usermenu[$imenu] AND $checkchoose1){ $checkchoose1 = false; $takelastpos++; $menushow[$imenu] = str_replace('profil10','profil11',$menushow[$imenu]); if($imenu <=2){ $l = profilefields_show( $uid, $usermenu[$imenu], $takelastpos, 40); }else{ $l = profilefields_show( $uid, $usermenu[$imenu], $takelastpos); } $tmenupos = $imenu; }elseif($checkchoose1){ $l = '<td class="Cmite" width="100%">Sie haben eine ungültige Kategorie gewält</td>'; $tmenupos = $imenu+3; } foreach($menushow as $show2){ $l1 .= $show2; } ### ## # der rest kommt hier $abf = 'SELECT * FROM prefix_user WHERE id = "'.$uid.'"'; $erg = db_query($abf); $row = db_fetch_assoc($erg); $avatar = ''; include('user_infos.php'); if ( file_exists($row['avatar'])) { $avatar = '<img src="'.$row['avatar'].'" border="0">'; } $userpict = ''; if ( file_exists($row['userpict'])) { $userpict = '<img src="'.$row['userpict'].'" border="0">'; } $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') ) - $row['regist']; $regday = round($regsek / 86400); $postpday = ( $regday == 0 ? 0 : round($row['posts'] / $regday, 2 ) ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $tpl->out(0); ##Hier wird die 1. Kategorie ausgelesen. Hier wird noch der name sowie das usebild mit ausgegeben. if($tmenupos == 1){ $ar1 = array ( 'NAME' => $row['name'], 'USERBILD' => $userpict, 'NAME' => $row['name'] ); $ar1['profilefieldtitle'] = '<th class="ProfTitel" colspan="3"><b>'.$l1.'</b></th>'; $ar1['rowspan'] = 1 + substr_count($l, '</td><td'); $tpl->set_ar_out($ar1,1); } ##Hier wird die 2. Kategorie ausgegeben, am besten man nennt die Forum, ##da hier die Sachen für das Forum mit ausgegeben werden elseif($tmenupos == 2){ $ar2 = array ( 'JOINED' => date('d M Y',$row['regist']), 'LASTAK' => date('d M Y - H:i',$row['llogin']), 'POSTS' => $row['posts'], 'postpday' => $postpday, 'RANG' => userrang ($row['posts'],$uid), 'AVATA' => $avatar, 'NAME' => $row['name'] ); $ar2['profilefieldtitle'] = '<th class="ProfTitel" colspan="3"><b>'.$l1.'</b></th>'; $ar2['rowspan'] = 3 + substr_count($l, '</td><td'); $tpl->set_ar_out($ar2,2); } ##Hier wird der Rest der Kategorien ausgegeben. elseif($tmenupos != 0){ $ar3['profilefieldtitle'] = '<th class="ProfTitel" colspan="2"><b>'.$l1.'</b></th>'; $ar3['NAME'] = $row['name']; $tpl->set_ar_out($ar3,3); } ##Hier werden die Felder zu den Kategorien ausgegeben. $tpl->set_out('profilefields',$l,4); $design->footer(); }else{ #einlogen $uid = $menu->get(2); $title = $allgAr['title'].' :: Login'; $hmenu = $extented_forum_menu.'Login'.$extented_forum_menu_sufix; $tpl = new tpl ( 'user/login.htm' ); if ( loggedin() ) { $design = new design ( $title , $hmenu, 1); $design->header(); if (isset($_POST['wdlink'])) { $wd = $_POST['wdlink']; } else { $wd = 'index.php?user-details-'.$uid; } wd ($wd, $lang['yourareloged']); $design->footer(); } else { $design = new design ( $title , $hmenu); $design->header(); $tpl = new tpl ( 'user/login.htm' ); $tpl->set_out('WDLINK','index.php?user-details-'.$uid,0); $design->footer(); } } ?>
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); function profilefields_functions2 () { $ar = array ( 1 => 'Feld', 2 => 'Kategorie' ); return ($ar); } function profilefields_functions () { $ar = array ( 1 => 'Feld', 2 => 'Kategorie', 3 => 'Angezeigt', 4 => 'Versteckt' ); return ($ar); } # Felder zum aendern anzeigen. function profilefields_change ($uid) { $i = 0; $i1 = 1; $test = false; $q = db_query("SELECT id, `show`, val, func FROM prefix_profilefields LEFT JOIN prefix_userfields ON prefix_userfields.fid = prefix_profilefields.id AND prefix_userfields.uid = ".$uid." WHERE func != 3 ORDER BY pos ASC"); while ( $r = db_fetch_assoc($q)) { $check[$i1] = $r; if($i){ if($check[$i]['func'] == 1){echo '<label style="float:left; width:40%;">'.$check[$i]['show'].'</label><input type="text" name="profilefields['.$check[$i]['id'].']" value="'.$check[$i]['val'].'"><br />';} if($check[$i]['func'] == 2){ if($check[$i1]['func'] == 1){ if($test){ echo '</fieldset>'; }else{$test = true;} echo '<fieldset><legend>'.$check[$i]['show'].'</legend> <br />'; } } } $i++; $i1++; } if($check[$i]['func'] == 1){echo '<label style="float:left; width:40%;">'.$check[$i]['show'].'</label><input type="text" name="profilefields['.$check[$i]['id'].']" value="'.$check[$i]['val'].'"><br />';} } # Felder die uebermittelt wurden speichern. function profilefields_change_save ($uid) { $q = db_query("SELECT id, `show`, val FROM prefix_profilefields LEFT JOIN prefix_userfields ON prefix_userfields.fid = prefix_profilefields.id AND prefix_userfields.uid = ".$uid." WHERE func = 1 ORDER BY pos"); while ( $r = db_fetch_assoc($q)) { if ( isset($_REQUEST['profilefields'][$r['id']]) ) { $v = $_REQUEST['profilefields'][$r['id']]; } else { $v = ''; } if ( $r['val'] == '' AND $v != '' ) { db_query("INSERT INTO prefix_userfields (fid,uid,val) VALUES (".$r['id'].",".$uid.",'".$v."')"); } elseif ( $r['val'] != '' AND $v == '' ) { db_query("DELETE FROM prefix_userfields WHERE fid = ".$r['id']." AND uid = ".$uid); } elseif ( $r['val'] != '' AND $v != '' AND $r['val'] != $v ) { db_query("UPDATE prefix_userfields SET val = '".$v."' WHERE fid = ".$r['id']." AND uid = ".$uid); } } } # Diese Funktion Zeigt ALLE Felder die der Benutzer im Adminbereich unter # Profilefields sortieren kann an ... is eigentlich total easy ;-)... function profilefields_show ($uid, $posmind, $posmax, $breite = 70) { if($posmax < $posmind){ return 'Error: falsche werte in den vars $postmind und $postmax!'; } global $allgAr; $zelle = '<td width="'.$breite.'%"'; $l = ''; $a = array (); $q = db_query("SHOW COLUMNS FROM prefix_user"); while ($r = db_fetch_assoc($q)) { $a[$r['Field']] = $r['Field']; } $q = db_query("SELECT id, `show`, func, pos FROM prefix_profilefields WHERE func < 4 AND pos >".$posmind." AND pos <".$posmax." ORDER BY pos ASC") OR die('verdammter mist1'); while ( $r = db_fetch_assoc($q)) { if ( $r['func'] == 1 ) { $str = @db_result ( db_query ("SELECT val FROM prefix_userfields WHERE uid = ".$uid." AND fid = ".$r['id']) , 0 ); $l .= '<tr><td width="30%" class="Cmite">'.$r['show'].'</td>'.$zelle.' class="Cnorm">'.$str.'</td></tr>'."\n"; } elseif ( $r['func'] == 2 ) { return 'Achtung: in der funktion profilefields_show in der datei Profilfields.php ist ein fehler aufgetreten. <br> Fehler = Es wurde ein Menutitel angefordert, was aber nicht passieren sollte.'; } elseif ( $r['func'] == 3 ) { $str = ''; if (isset($a[$r['show']])) { $str = @db_result ( db_query ("SELECT `".$r['show']."` FROM prefix_user WHERE id = ".$uid) , 0 ); } if ( function_exists ( 'profilefields_show_spez_'.$r['show'] ) ) { $l .= call_user_func ( 'profilefields_show_spez_'.$r['show'], $str, $uid, $zelle); } elseif ($r['show'] != 'opt_pm_popup') { $l .= '<tr><td width="30%" class="Cmite">'.ucfirst($r['show']).'</td>'.$zelle.' class="Cnorm">'.$str.'</td></tr>'."\n"; } } } return ( $l ); } # hier kommen die speziellen funktionen hin... ## ### function profilefields_show_spez_geschlecht ($value,$uid,$colspan) { global $lang; $ar = array ( 0 => $lang['itdoesntmatter'], 1 => $lang['male'], 2 => $lang['female'] ); return ( profilefields_show_echo_standart ( $lang['sex'], $ar[$value] , $colspan) ); } function profilefields_show_spez_status ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['status'], ($value?'aktiv':'inaktiv'), $colspan) ); } function profilefields_show_spez_usergallery ($value,$uid,$colspan) { global $allgAr, $lang; if ($allgAr['forum_usergallery'] == 1) { return ( profilefields_show_echo_standart ( 'Usergallery', '<a href="index.php?user-usergallery-'.$uid.'">ansehen</a>', $colspan) ); } } function profilefields_show_spez_homepage ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['homepage'], (empty($value)?'':'<a href="'.$value.'" target="_blank">'.$value.'</a>'), $colspan) ); } function profilefields_show_spez_opt_mail ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['mail'], ($value?'<a href="index.php?user-mail-'.$uid.'">'.$lang['send'].'</a>':''), $colspan) ); } function profilefields_show_spez_opt_pm ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['privatemessages'], ($value?'<a href="index.php?forum-privmsg-new=0&empfid='.$uid.'">'.$lang['send'].'</a>':''), $colspan) ); } function profilefields_show_spez_sig ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['signature'], bbcode($value),$colspan) ); } function profilefields_show_spez_staat ($value,$uid,$colspan) { global $lang; return ( profilefields_show_echo_standart ( $lang['state'], ((!empty($value) AND file_exists('include/images/flags/'.$value))?'<img src="include/images/flags/'.$value.'" alt="'.$value.'" title="'.$value.'" />':''), $colspan) ); } ### ## # help funcs function get_nationality_array () { $ar = array(); $o = opendir ( 'include/images/flags' ); while ( $f = readdir ( $o ) ) { if ( $f != '.' AND $f != '..' ) { $ar[$f] = $f; } } return ( $ar ); } function profilefields_show_echo_standart ( $k, $v, $colspan ) { return ( '<tr><td width="30%" class="Cmite">'.$k.'</td>'.$colspan.' class="Cnorm">'.$v.'</td></tr>'."\n" ); } ?>
function profilefields_show_spez_usergb ($value,$uid) { global $allgAr, $lang; return ( profilefields_show_echo_standart ( 'Gästebuch', '<a href="index.php?user-usergb-view-'.$uid.'">User Gästebuch</a>' ) ); }
Geschlossen | ||
Zurück zu Module und Modifikationen |