Hallo
Gibt es eine Möglichkeit in der memberliste/ Online praktisch überall wo Member namen stehen davor ein Clan tag hinzu zufügen ?
MfG PLeS
verwendete ilch Version: 1.1 P
betroffene Homepage: ples.bplaced.net/
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
function get_tagname($id){ // config $recht = '-3'; // ab Trialmember $clantag = '[PLE]'; // vorgesetzter Clantag // $erg = @db_query('SELECT `name`, `recht` FROM `prefix_user` WHERE `id` = "' . $id . '"'); if (db_num_rows($erg) == 0) { $name = 'Gast'; } else { $row = db_fetch_assoc($erg); if ($row['recht'] <= $recht) { $name = $clantag . $row['name']; } else { $name = $row['name']; } } return($name); }
$tpl->set('NAME', get_tagname($row->id));
$tpl->set_ar(array('NAME' => get_tagname($UID)));
$dif = date('Y-m-d H:i:s', time() - 60); $abf = "SELECT a.uid, b.avatar, b.recht FROM `prefix_online` a LEFT JOIN prefix_user b ON a.uid = b.id WHERE uptime > '". $dif."'"; $resultID = db_query($abf); $brk=''; $uid = array(); $guests = 0; $guestn = $lang['guests']; $content=''; while ($row = db_fetch_object($resultID)) { if ( file_exists($row->avatar)) { $avatar = '<a href="index.php?user-details-'.$row->uid.'"><img width="40" height="53" src="'.$row->avatar.'" border="0">'; } else { $avatar = '<a href="index.php?user-details-'.$row->uid.'"><img width="40" height="53" src="include/images/avatars/noavatar.jpg" border="0">'; } if ($row->uid != 0 AND $brk!=$row->uid) { $name=@db_result(db_query('SELECT name FROM prefix_user WHERE id='.$row->uid),0); if ($row->recht == -9) {$farbe = $farbeAdmin; $rangIcon = $iconAdmin;} elseif ($row->recht == -8) {$farbe = $farbeCoAdmin; $rangIcon = $iconCoAdmin;} elseif ($row->recht == -7) {$farbe = $farbeSiteAdmin; $rangIcon = $iconSiteAdmin;} elseif ($row->recht == -6) {$farbe = $farbeLeader; $rangIcon = $iconLeader;} elseif ($row->recht == -5) {$farbe = $farbeCoLeader; $rangIcon = $iconCoLeader;} elseif ($row->recht == -4) {$farbe = $farbeMember; $rangIcon = $iconMember;} elseif ($row->recht == -3) {$farbe = $farbeTrialmember; $rangIcon = $iconTrialmember;} elseif ($row->recht == -2) {$farbe = $farbeSuperuser; $rangIcon = $iconSuperuser;} elseif ($row->recht == -1) {$farbe = $farbeUser; $rangIcon = $iconUser;} else {$row->recht = $farbeGast; $rangIcon = $iconGast;} $content.='<table width="100%" align="center" cellpadding="2" cellspacing="0" border="0"> <tr> <td width="5%" align="center"><img src="include/images/icons/online.gif" border="0" alt="online"></td> <td width="80%" align="left" ><a class="box" onmouseover="javascript:einblenden('.$row->uid.')" onmouseout="javascript:einblenden('.$row->uid.')" href="index.php?user-details-'.$row->uid.'"><font style="color:'.$farbe.'">'.$name.'</font></a></td> <td width="5%" align="center">'.$rangIcon.'</td> </tr></table> <div id="'.$row->uid.'" style="display : none;"> <table align="center" border="0" width="90%" cellspacing="2" cellpadding="0" style="border: 1px solid #00ff00"> <tr> <td>'.$avatar.'</td> <td><font color="#00ff00">Jetzt gerade hier!</font></td> </tr> </table></div>'."\n"; $uid[] = $row->uid; } if ($row->uid == 0) { $guests++; } $brk=$row->uid; } if ($guests == 1) { $guestn = $lang['guest']; } if (empty($content)) { $content.='<table width="90%" align="center" cellpadding="2" cellspacing="0" border="0"><tr><td><img src="include/images/icons/offline.gif" border="0" alt="offline"><font color="#003366">0 User </font></td></tr></table>'."\n"; } $content.='<table width="90%" align="center" cellpadding="2" cellspacing="0" border="0"><tr><td colspan="2"><hr style="height: 0px; border: dashed #9AB1C8 0px; border-top-width: 1px;"></td></tr></table>'."\n"; $where = (count($uid)>0) ? 'WHERE id NOT IN ('.implode(', ', $uid).')' : ''; $abf2 = 'SELECT * FROM prefix_user '.$where.' ORDER BY llogin DESC LIMIT 0,7'; $erg2 = db_query($abf2); while ($row2 = db_fetch_object($erg2)) { if ($row2->recht == -9) {$farbe = $farbeAdmin; $rangIcon = $iconAdmin;} elseif ($row2->recht == -8) {$farbe = $farbeCoAdmin; $rangIcon = $iconCoAdmin;} elseif ($row2->recht == -7) {$farbe = $farbeSiteAdmin; $rangIcon = $iconSiteAdmin;} elseif ($row2->recht == -6) {$farbe = $farbeLeader; $rangIcon = $iconLeader;} elseif ($row2->recht == -5) {$farbe = $farbeCoLeader; $rangIcon = $iconCoLeader;} elseif ($row2->recht == -4) {$farbe = $farbeMember; $rangIcon = $iconMember;} elseif ($row2->recht == -3) {$farbe = $farbeTrialmember; $rangIcon = $iconTrialmember;} elseif ($row2->recht == -2) {$farbe = $farbeSuperuser; $rangIcon = $iconSuperuser;} elseif ($row2->recht == -1) {$farbe = $farbeUser; $rangIcon = $iconUser;} else {$row2->recht = $farbeGast; $rangIcon = $iconGast;} if ( file_exists($row2->avatar)) { $avatar = '<a href="index.php?user-details-'.$row2->id.'"><img width="40" height="53" src="'.$row2->avatar.'" border="0">'; } else { $avatar = '<a href="index.php?user-details-'.$row2->id.'"><img witdh="40" height="53" src="include/images/avatars/noavatar.jpg" border="0">'; } $datum = date('H:i \U\h\r - d.m.y',$row2->llogin); $content.='<table width="100%" align="center" cellpadding="2" cellspacing="0" border="0"> <tr> <td align="center" width="5%"><img src="include/images/icons/offline.gif" border="0" alt="offline"></td> <td align="left" width="80%"><a class="box" onmouseover="javascript:einblenden('.$row2->id.')" onmouseout="javascript:einblenden('.$row2->id.')" href="index.php?user-details-'.$row2->id.'"><font style="color:'.$farbe.'">'.$row2->name.'</font></a></td> <td align="center" width="5%">'.$rangIcon.'</td> </tr> </table> <div id="'.$row2->id.'" style="display : none;"> <table align="center" border="0" width="90%" cellspacing="2" cellpadding="0" style="border: 1px solid #FF0000"> <tr> <td>'.$avatar.'</td><td> Letztes mal Online:<br /> '.$datum.'</td> </tr> </table></div>'."\n"; } if ($guests == 0) { $content.= '<table width="100%" align="center" cellpadding="2" cellspacing="0" border="0"></tr>'."\n".' <tr><td width="5%" align="left" valign="middle"><img src="include/images/icons/rot.gif" align="absmiddle" border="0" alt="offline"></td> <td align="left" valign="middle"><font size="-1"<span style="font-size:10px;color:#555555;">Kein <span style="font-size:10px;color:#FF000;">Gast<span style="font-size:10px;color:#555555;"> ist<span style="font-size:10px;color:#FF0000;"> Online</td> </tr></table>'."\n"; } else { $content.= '<table width="100%" align="center" cellpadding="2" cellspacing="0" border="0"></tr>'."\n".' <tr><td width="5%" align="left" valign="middle"><img src="include/images/icons/online.gif" align="absmiddle" border="0" alt="online"></td> <td align="left" valign="middle"><font size=-1><span style="font-size:10px;color:#555555;">Es sind <span style="font-size:10px;color:#009900;">'.$guests.' <span style="font-size:10px;color:#555555;">'.$guestn.'<span style="font-size:10px;color:#009900;"> Online</font></td> </tr></table>'."\n"; } ?>
$name = get_tagname($row->uid);
<td align="left" width="80%"><a class="box" onmouseover="javascript:einblenden('.$row2->id.')" onmouseout="javascript:einblenden('.$row2->id.')" href="index.php?user-details-'.$row2->id.'"><font style="color:'.$farbe.'">'.get_tagname($row2->id).'</font></a></td>
function get_tagname($id){ // config $recht = '-3'; // ab Trialmember // $erg = @db_query('SELECT `name`, `recht`, `ctag` FROM `prefix_user` WHERE `id` = "' . $id . '"'); if (db_num_rows($erg) == 0) { $name = 'Gast'; } else { $row = db_fetch_assoc($erg); if ($row['recht'] <= $recht) { $name = $row['ctag'] . $row['name']; } else { $name = $row['name']; } } return($name); }
$name = $clantag . ' ' . $row['name'];
<div class="form-group"> <label for="eingabefeldugame" class="col-sm-2 control-label">{_lang_game}</label> <div class="col-sm-10"> <input type="text" name="game" value="{game}" class="form-control" id="eingabefeldugame"> </div> </div> <div class="form-group"> <label for="eingabefelduclan" class="col-sm-2 control-label">{_lang_GildenTAG}</label> <div class="col-sm-10"> <input type="text" name="clan" value="{clan}" class="form-control" id="eingabefelduclan"> </div> </div>
game = '" . escape($_POST['game'], 'string') . "', spielerfahrungen = '" . escape($_POST['spielerfahrungen'], 'string') . "', clan = '" . escape($_POST['clan'], 'string') . "',
'GAME' => $game, 'SPIELERFAHRUNG' => $spielerfahrungen, 'CLAN' => $clan,
<div class="panel-group col-md-6"> <div class="panel panel-default"> <div class="panel-heading">Gruppe/Spiel</div> <div class="panel-body"> <span class="col-md-6 glyphicon glyphicon-cd"> Spiel</span> <strong class="col-md-6">{GAME}</strong> <span class="col-md-6 glyphicon glyphicon-tag"> Clan TAG</span> <strong class="col-md-6">{CLAN}</strong> </div> </div> </div>
<?php # Copyright by: Manuel # Support: www.ilch.de defined('main') or die('no direct access'); $title = $allgAr['title'] . ' :: Users :: Profil'; $hmenu = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a><b> » </b> Profil' . $extented_forum_menu_sufix; $design = new design($title, $hmenu, 1); if ($_SESSION['authright'] <= -1) { $csrfCheck = chk_antispam('user_profile_edit', true); if (empty($_POST['submit']) || !$csrfCheck) { $design->header(); $abf = 'SELECT email,wohnort,homepage,aim,msn,icq,yahoo,avatar,status,staat,gebdatum,sig,opt_pm_popup,opt_pm,opt_mail,geschlecht,spezrank,game,spielerfahrungen,clan,map,waffe,essen,trinken,film,musik,sport,cpu,mainboard,ram,monitor,grafikkarte,soundkarte,festplatte,i_net_verbindung,tastatur,maus,jappy,facebook,wkw,studivz,myspace,youtube FROM `prefix_user` WHERE id = "' . $_SESSION['authid'] . '"'; $erg = db_query($abf); if (db_num_rows($erg) > 0) { $row = db_fetch_assoc($erg); $tpl = new tpl('user/profil_edit'); $row['staat'] = '<option></option>' . arliste($row['staat'], get_nationality_array(), $tpl, 'staat'); $row['geschlecht0'] = ($row['geschlecht'] < 1 ? 'checked' : ''); $row['geschlecht1'] = ($row['geschlecht'] == 1 ? 'checked' : ''); $row['geschlecht2'] = ($row['geschlecht'] == 2 ? 'checked' : ''); if ($row['status'] == 1) { $row['status1'] = 'checked'; $row['status0'] = ''; } else { $row['status1'] = ''; $row['status0'] = 'checked'; } if ($row['opt_mail'] == 1) { $row['opt_mail1'] = 'checked'; $row['opt_mail0'] = ''; } else { $row['opt_mail1'] = ''; $row['opt_mail0'] = 'checked'; } if ($row['opt_pm'] == 1) { $row['opt_pm1'] = 'checked'; $row['opt_pm0'] = ''; } else { $row['opt_pm1'] = ''; $row['opt_pm0'] = 'checked'; } if ($row['opt_pm_popup'] == 1) { $row['opt_pm_popup1'] = 'checked'; $row['opt_pm_popup0'] = ''; } else { $row['opt_pm_popup1'] = ''; $row['opt_pm_popup0'] = 'checked'; } $row['avatarbild'] = (file_exists($row['avatar']) ? '<img src="' . $row['avatar'] . '" alt=""><br />' : ''); $row['Fabreite'] = $allgAr['Fabreite']; $row['Fahohe'] = $allgAr['Fahohe']; $row['Fasize'] = $allgAr['Fasize']; $row['forum_max_sig'] = $allgAr['forum_max_sig']; $row['uid'] = $_SESSION['authid']; $row['forum_usergallery'] = $allgAr['forum_usergallery']; $row['antispam'] = get_antispam('user_profile_edit', 0, true); $tpl->set_ar_out($row, 0); if ($allgAr['forum_avatar_upload']) $tpl->out(1); $tpl->set_ar_out($row, 2); profilefields_change($_SESSION['authid']); $tpl->out(3); } else { $tpl = new tpl('user/login.htm'); $tpl->set_out('WDLINK', 'index.php', 0); } } elseif ($csrfCheck) # submit { # change poassword if (!empty($_POST['np1']) AND !empty($_POST['np2']) AND !empty($_POST['op'])) { if ($_POST['np1'] == $_POST['np2']) { $akpw = db_result(db_query("SELECT pass FROM prefix_user WHERE id = " . $_SESSION['authid']), 0); if (user_pw_check($_POST['op'], $akpw)) { $newpw = user_pw_crypt($_POST['np1']); db_query("UPDATE prefix_user SET pass = '" . $newpw . "' WHERE id = " . $_SESSION['authid']); user_set_cookie($_SESSION['authid'], $newpw); $fmsg = $lang['passwortchanged']; } else { $fmsg = $lang['passwortwrong']; } } else { $fmsg = $lang['passwortnotequal']; } } # avatar speichern START $avatar_sql_update = ''; if (!empty($_FILES['avatarfile']['name']) AND $allgAr['forum_avatar_upload']) { $file_tmpe = $_FILES['avatarfile']['tmp_name']; $rile_type = ic_mime_type($_FILES['avatarfile']['tmp_name']); $file_type = $_FILES['avatarfile']['type']; $file_size = $_FILES['avatarfile']['size']; $fmsg = $lang['avatarisnopicture']; $size = @getimagesize($file_tmpe); $endar = array( 1 => 'gif', 2 => 'jpg', 3 => 'png' ); if (($size[2] == 1 OR $size[2] == 2 OR $size[2] == 3) AND $size[0] > 10 AND $size[1] > 10 AND substr($file_type, 0, 6) == 'image/' AND substr($rile_type, 0, 6) == 'image/') { $endung = $endar[$size[2]]; $breite = $size[0]; $hoehe = $size[1]; $fmsg = $lang['avatarcannotupload']; if ($file_size <= $allgAr['Fasize'] AND $breite <= $allgAr['Fabreite'] AND $hoehe <= $allgAr['Fahohe']) { $neuer_name = 'include/images/avatars/' . $_SESSION['authid'] . '.' . $endung; @unlink(db_result(db_query("SELECT avatar FROM prefix_user WHERE id = " . $_SESSION['authid']), 0)); move_uploaded_file($file_tmpe, $neuer_name); @chmod($neuer_name, 0777); $avatar_sql_update = "avatar = '" . $neuer_name . "',"; $fmsg = $lang['pictureuploaded']; } } } elseif (isset($_POST['avatarloeschen'])) { $fmsg = $lang['picturedelete']; @unlink(db_result(db_query("SELECT avatar FROM prefix_user WHERE id = " . $_SESSION['authid']), 0)); $avatar_sql_update = "avatar = '',"; } # avatar speichern ENDE # email aendern if ($_POST['email'] != $_POST['aemail']) { $id = $_SESSION['authid'] . '||' . md5(uniqid(rand())); db_query("INSERT INTO prefix_usercheck (`check`,email,datime,ak) VALUES ('" . $id . "','" . escape($_POST['email'], 'string') . "',NOW(),3)"); $page = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"]; $text = $lang['changedthemail'] . sprintf($lang['registconfirmlink'], $page, $id); icmail($_POST['email'], $lang['mail'] . ' ' . $lang['changed'], $text); $fmsg = $lang['pleaseconfirmmail']; } # email aendern #remove account if (isset($_POST['removeaccount'])) { $id = $_SESSION['authid'] . '-remove-' . md5(uniqid(rand())); db_query("INSERT INTO prefix_usercheck (`check`,email,datime,ak) VALUES ('" . $id . "','" . escape($_POST['email'], 'string') . "',NOW(),5)"); $page = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"]; $text = $lang['removeconfirm'] . sprintf($lang['registconfirmlink'], $page, $id); icmail($_POST['email'], html_entity_decode($lang['removeaccount'], ILCH_ENTITIES_FLAGS, ILCH_CHARSET), $text); $fmsg = $lang['pleaseconfirmremove']; } #remove account # statische felder speichern db_query("UPDATE prefix_user SET homepage = '" . get_homepage(escape($_POST['homepage'], 'string')) . "', wohnort = '" . escape($_POST['wohnort'], 'string') . "', icq = '" . escape($_POST['icq'], 'string') . "', msn = '" . escape($_POST['msn'], 'string') . "', yahoo = '" . escape($_POST['yahoo'], 'string') . "', " . $avatar_sql_update . " aim = '" . escape($_POST['aim'], 'string') . "', staat = '" . escape($_POST['staat'], 'string') . "', geschlecht = '" . escape($_POST['geschlecht'], 'string') . "', status = '" . escape($_POST['status'], 'string') . "', opt_mail = '" . escape($_POST['opt_mail'], 'string') . "', opt_pm = '" . escape($_POST['opt_pm'], 'string') . "', opt_pm_popup = '" . escape($_POST['opt_pm_popup'], 'string') . "', gebdatum = '" . get_datum(escape($_POST['gebdatum'], 'string')) . "', game = '" . escape($_POST['game'], 'string') . "', spielerfahrungen = '" . escape($_POST['spielerfahrungen'], 'string') . "', clan = '" . escape($_POST['clan'], 'string') . "', map = '" . escape($_POST['map'], 'string') . "', waffe = '" . escape($_POST['waffe'], 'string') . "', essen = '" . escape($_POST['essen'], 'string') . "', trinken = '" . escape($_POST['trinken'], 'string') . "', film = '" . escape($_POST['film'], 'string') . "', musik = '" . escape($_POST['musik'], 'string') . "', sport = '" . escape($_POST['sport'], 'string') . "', cpu = '" . escape($_POST['cpu'], 'string') . "', mainboard = '" . escape($_POST['mainboard'], 'string') . "', ram = '" . escape($_POST['ram'], 'string') . "', monitor = '" . escape($_POST['monitor'], 'string') . "', grafikkarte = '" . escape($_POST['grafikkarte'], 'string') . "', soundkarte = '" . escape($_POST['soundkarte'], 'string') . "', festplatte = '" . escape($_POST['festplatte'], 'string') . "', i_net_verbindung = '" . escape($_POST['i_net_verbindung'], 'string') . "', tastatur = '" . escape($_POST['tastatur'], 'string') . "', maus = '" . escape($_POST['maus'], 'string') . "', jappy = '" . get_homepage(escape($_POST['jappy'], 'string')) . "', facebook = '" . get_homepage(escape($_POST['facebook'], 'string')) . "', wkw = '" . get_homepage(escape($_POST['wkw'], 'string')) . "', studivz = '" . get_homepage(escape($_POST['studivz'], 'string')) . "', myspace = '" . get_homepage(escape($_POST['myspace'], 'string')) . "', youtube = '" . get_homepage(escape($_POST['youtube'], 'string')) . "', sig = '" . substr(escape($_POST['sig'], 'string'), 0, $allgAr['forum_max_sig']) . "' WHERE id = " . $_SESSION['authid']); # change other profil fields profilefields_change_save($_SESSION['authid']); $design->header(); # definie and print msg $fmsg = (isset($fmsg) ? $fmsg : $lang['changesuccessful']); wd('?user-8', $fmsg, 3); } } else { $tpl = new tpl('user/login'); $tpl->set_out('WDLINK', '?user-8', 0); } $design->footer(); ?>
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de defined('main') or die('no direct access'); $uid = intval($menu->get(2)); $abf = 'SELECT * FROM prefix_user WHERE id = "' . $uid . '"'; $erg = db_query($abf); if (db_num_rows($erg)) { #Award Ausgabe $awards = ''; $ax = 0; $sqlA = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_awards` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = " . $uid . " ORDER BY `time` ASC"); while ($rowA = db_fetch_assoc($sqlA)) { $ax++; if ($ax == 8) { $awards .= '<br />'; $ax = 0; } $awards .= (!empty($rowA['bild']) ? '<img style="padding:1px;border:0px;" src="' . $rowA['bild'] . '" alt="' . $rowA['wofur'] . '" title="' . $rowA['wofur'] . '"/>' : $rowA['wofur']); } $awards = '<br /><div style="text-align:center;">' . $awards . '</div>'; $lastbes_anz = 5; //Bei höhere Anzahl muss ggf. in der Datenbank die Größe der Felder bzw der Typ geändert werden if ($_SESSION['authid'] != $uid AND $_SESSION['authid'] != 0) { $lb = db_fetch_object(db_query('SELECT last_bes, last_user_time FROM prefix_user WHERE id = ' . $uid)); $lba = explode('#', $lb->last_bes); $lbt = explode('#', $lb->last_user_time); $i = array_search($_SESSION['authid'], $lba); if ($i !== false) { unset($lba[$i]); unset($lbt[$i]); } elseif (count($lba) >= $lastbes_anz) { $lba = array_slice($lba, 0, $lastbes_anz - 1); $lbt = array_slice($lbt, 0, $lastbes_anz - 1); } array_unshift($lba, $_SESSION['authid']); array_unshift($lbt, time()); $i_lb = implode('#', $lba); $i_lbt = implode('#', $lbt); db_query("UPDATE prefix_user SET last_bes = '$i_lb', last_user_time = '$i_lbt' WHERE id = $uid"); } include('user_infos.php'); $ar = array( 'UID' => $uid, 'NAME' => $row['name'], '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, 'LASTUSER' => last_user($uid), 'STATUS2' => $online, 'USERTITEL' => $usertitel, 'EMAIL' => $email, 'HOMEPAGE' => $homepage, 'GESCHLECHT' => $geschlecht, 'GEBDATUM' => $gebdatum, 'ALTER' => $alter, 'WOHNORT' => $wohnort, 'FORUMTOPICS' => $row4['forumtopics'], 'NEWSTOPICS' => $row5['newstopics'], 'NEWSPOSTS' => $row6['newsposts'], 'FORUMPOSTS' => $row7['forumposts'], 'SIGNATUR' => bbcode($row['sig']), 'STAAT' => $staat, 'UID' => $uid, 'STERNZEICHEN' => $sternzeichen, 'GB_EINTRAEGE' => $gb_eintraege, 'GALLERIE_EINTRAEGE' => $gallery_eintraege, 'ICQ' => $icq, 'GAME' => $game, 'SPIELERFAHRUNG' => $spielerfahrungen, 'CLAN' => $clan, 'MAP' => $map, 'WAFFE' => $waffe, 'ESSEN' => $essen, 'TRINKEN' => $trinken, 'FILM' => $film, 'MUSIK' => $musik, 'SPORT' => $sport, 'CPU' => $cpu, 'MAINBOARD' => $mainboard, 'RAM' => $ram, 'MONITOR' => $monitor, 'GRAFIKKARTE' => $grafikkarte, 'SOUNDKARTE' => $soundkarte, 'FESTPLATTE' => $festplatte, 'I_NET_VERBINDUNG' => $i_net_verbindung, 'TASTATUR' => $tastatur, 'MAUS' => $maus, 'JAPPY' => $jappy, 'FACEBOOK' => $facebook, 'WKW' => $wkw, 'STUDIVZ' => $studivz, 'MYSPACE' => $myspace, 'YOUTUBE' => $youtube, 'AWARDS' => $awards ); $title = $allgAr['title'] . ' :: Users :: Details von ' . $row['name']; $hmenu = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a><b> » </b> <a href=index.php?user-details-' . $uid . '>Details von ' . $row['name'] . "</a>" . $extented_forum_menu_sufix; $design = new design($title, $hmenu, 1); $design->header(); $tpl = new tpl('user/userdetails'); $l = profilefields_show($uid); $ar['rowspan'] = 4 + substr_count($l, '<tr><td class="'); $ar['profilefields'] = $l; $tpl->set_ar_out($ar, 0); } else { $title = $allgAr['title'] . ' :: Users :: User nicht gefunden'; $hmenu = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a> ' . $extented_forum_menu_sufix; $design = new design($title, $hmenu, 1); $design->header(); echo 'Der Benutzer wurde nicht gefunden bzw. die Seite wurde nicht richtig aufgerufen.<br />'; } $design->footer(); ?>
## Name mit Clantag verbinden function getClanName($uid){ // config $recht = '-3'; // ab Trialmember // $erg = @db_query('SELECT `name`, `recht`, `clan` FROM `prefix_user` WHERE `id` = "' . $uid . '"'); if (db_num_rows($erg) == 0) { $ClanName = 'Gast'; } else { $row = db_fetch_assoc($erg); if ($row['recht'] <= $recht AND !empty($row['clan'])) { $ClanName = $row['clan'] . $row['name']; } else { $ClanName = $row['name']; } } return($ClanName); }
'NAME' => getClanName($UserID)
'UID' => $uid, 'NAME' => $row['name'], 'JOINED' => date('d.m.Y', $row['regist']),
'UID' => $uid, 'NAME' => getClanName($uid), 'JOINED' => date('d.m.Y', $row['regist']),
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); defined ('admin') or die ( 'only admin access' ); function groups_update_modulerights_for ($ar) { $re = array ( 0 => array ('wars', 'groups', 'awards', 'awaycal'), 1 => array ('wars', 'groups', 'awards', 'awaycal'), 2 => array ('wars', 'awaycal'), 3 => array ('wars', 'awaycal'), 4 => array ('groups', 'awaycal'), 5 => array ('groups', 'awaycal'), 6 => array ('groups', 'awaycal'), ); foreach ($ar as $k => $uid) { if (0 == $uid) { continue; } foreach ($re[$k] as $r) { $s = "SELECT id FROM prefix_modules WHERE url = '".$r."'"; $mid = db_result(db_query($s),0,0); $s = "SELECT COUNT(*) FROM prefix_modulerights WHERE uid = ".$uid." AND mid = ".$mid; if (0 == db_result(db_query($s),0,0)) { db_query("INSERT INTO prefix_modulerights (mid,uid) VALUES (".$mid.",".$uid.")"); } } } } function may_changegroup ($gi,$m = 0) { global $allgAr; if ($_SESSION['authright'] <= -8 OR !$allgAr['groups_forall']) { return true; } elseif ($gi == 0) { return false; } else { $q = db_query("SELECT mod1, mod2".($m == 1?', mod4':'')." FROM `prefix_groups` WHERE id = $gi"); if (db_num_rows($q) < 1) { return false; } else { $r = db_fetch_assoc($q); if (in_array($_SESSION['authid'],$r)) { return true; } else { return false; } } } } $show = true; $msg = ''; $um = $menu->get(1); if ( $um == 'ins' ) { $pos = db_result(db_query("SELECT COUNT(*) FROM prefix_groups"),0); $name = escape($_POST['group_name'], 'string'); $clan_tag = escape($_POST['clan_tag'], 'string'); $img = escape($_POST['img'], 'string'); $mod1 = escape($_POST['mod1'], 'integer'); $mod2 = escape($_POST['mod2'], 'integer'); $mod3 = escape($_POST['mod3'], 'integer'); $mod4 = escape($_POST['mod4'], 'integer'); $zeigen = escape($_POST['zeigen'], 'integer'); $fightus = escape($_POST['fightus'], 'integer'); $joinus = escape($_POST['joinus'], 'integer'); if (may_changegroup(0)) { db_query("INSERT INTO prefix_groups (name,clan_tag,img,`mod1`,`mod2`,`mod3`,`mod4`,show_fightus,show_joinus,zeigen,pos) VALUES ('".$name."','".$clan_tag."','".$img."',".$mod1.",".$mod2.",".$mod3.",".$mod4.",".$fightus.",".$joinus.",".$zeigen.",".$pos.")"); } if (is_coadmin()) { groups_update_modulerights_for (array($mod1,$mod2,$mod3,$mod4)); } } if ( isset ( $_POST['ins_user'] ) ) { $gid = escape($menu->get(2), 'integer'); if (may_changegroup($gid,1)) { if ( empty($_POST['fid']) ) { $_POST['fid'] = 0; } $fid = 0; if (!empty($_POST['fid'])) { $fid = escape($_POST['fid'], 'integer'); } $name = escape($_POST['name'], 'string'); $uid = @db_result(@db_query("SELECT id FROM prefix_user where name = BINARY '".$name."'"),0,0); if (!empty($uid) AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_groupusers WHERE gid = ".$gid." AND uid = ".$uid),0)) { db_query("INSERT INTO prefix_groupusers (gid,uid,fid) VALUES (".$gid.",".$uid.",".$fid.")"); } } $um = 'addusers'; } if ( $um == 'ch' ) { $gid = escape($_POST['gid'], 'integer'); $oldopts = db_fetch_object(db_query("SELECT * FROM `prefix_groups` WHERE id = $gid")); $name = escape($_POST['group_name'], 'string'); $clan_tag = escape($_POST['clan_tag'], 'string'); $img = escape($_POST['img'], 'string'); $mod1 = escape($_POST['mod1'], 'integer'); $mod2 = escape($_POST['mod2'], 'integer'); $mod3 = escape($_POST['mod3'], 'integer'); $mod4 = escape($_POST['mod4'], 'integer'); $zeigen = escape($_POST['zeigen'], 'integer'); $fightus = escape($_POST['fightus'], 'integer'); $joinus = escape($_POST['joinus'], 'integer'); if (!is_admin() and $oldopts->mod1 != $_SESSION['authid'] and $oldopts->mod2 == $_SESSION['authid']) { $mod1 = $oldopts->mod1; } elseif (!is_admin() and $oldopts->mod1 != $_SESSION['authid'] and $oldopts->mod2 != $_SESSION['authid'] and $oldopts->mod4 == $_SESSION['authid']) { $name = $oldopts->name; $img = $oldopts->img; $mod1 = $oldopts->mod1; $mod2 = $oldopts->mod2; $mod3 = $oldopts->mod3; $zeigen = $oldopts->zeigen; $fightus = $oldopts->show_fightus; } if (may_changegroup($gid,1)) { db_query("UPDATE prefix_groups SET name = '".$name."', clan_tag= '".$clan_tag."', show_fightus = ".$fightus.", show_joinus = ".$joinus.", img = '".$img."', `mod1` = ".$mod1.", `mod2` = ".$mod2.", `mod3` = ".$mod3.", `mod4` = ".$mod4.", zeigen = ".$zeigen." WHERE id = ".$gid); $msg = "Die Gruppe wurde verändert"; } if (is_coadmin()) { # mods wieder die richtigen modulrechte geben. dazu erst loeschen, dann eintragen. groups_update_modulerights_for (array($mod1,$mod2,$mod3,$mod4)); $msg .= ", die Modulrechte wurden erneuert. Wenn allerdings Leader, Co-Leader, Warorga oder Memberorga geändert wurden haben diese User immer noch die Modulrechte ... das sollte daher überprüft werden."; } } if (isset ($_GET['group_delete']) AND ($gid = escape($_GET['group_delete'],'integer') AND may_changegroup(0))) { $pos = db_result(db_query("SELECT pos FROM prefix_groups WHERE id = ".$gid),0); db_query("DELETE FROM prefix_groups WHERE id = ".$gid); db_query("DELETE FROM prefix_groupusers WHERE gid = ".$gid); db_query("UPDATE prefix_groups SET pos = pos -1 WHERE pos > ".$pos); } if ( $menu->get(3) == 'user_delete' AND ($gid = escape($menu->get(2),'integer') AND may_changegroup($gid,1))) { $uid = escape($menu->get(4),'integer'); db_query("DELETE FROM prefix_groupusers WHERE gid = ".$gid." AND uid = ".$uid); } if ( $menu->get(3) == 'userchange' AND ($gid = escape($menu->get(2),'integer') AND may_changegroup($gid,1))) { $uid = escape($menu->get(4), 'integer'); $fid = escape($menu->get(5), 'integer'); db_query("UPDATE `prefix_groupusers` SET fid = $fid WHERE gid = $gid AND uid = $uid"); } if ( $um == 'addusers' ) { $design = new design ( 'Admins Area', 'Admins Area', 0 ); $design->header(); $gid = $menu->get(2); $tpl = new tpl ( 'groups/users', 1); $groupfuncs = array(); $erg = db_query("SELECT id,name FROM prefix_groupfuncs ORDER BY pos"); while ($row = db_fetch_object($erg)) { $groupfuncs[$row->id] = $row->name; } function group_func ($gid, $uid, $fid, $gf) { $out = '<select class="form-control" id="user'.$uid.'" onchange="change_user('.$gid.', '.$uid.', this.value, '.$fid.', \'user'.$uid.'\');">'; foreach ($gf as $key => $val) { $out .= '<option value="'.$key.'" '.($fid == $key ? 'selected="selected"' : '').'>'.$val.'</option>'; } $out .= '</select>'; return $out; } $row1 = db_fetch_object(db_query("SELECT name FROM prefix_groups WHERE id = ".$gid)); $tpl->set('gruppe', $row1->name); $tpl->set('fehler', ( empty($fehler) ? '' : $fehler ) ); $tpl->set('gid', $gid); $tpl->set('funcs', dbliste ( '', $tpl, 'funcs', "SELECT id,name FROM prefix_groupfuncs ORDER BY pos") ); $tpl->out(0); $class = 'Cnorm'; $q = "SELECT a.fid, a.gid, a.uid, b.name as username, c.name as funcname FROM prefix_groupusers a LEFT JOIN prefix_user b ON a.uid = b.id LEFT JOIN prefix_groupfuncs c ON a.fid = c.id WHERE a.gid = ".$gid." ORDER BY c.pos"; $erg = db_query($q); while($row = db_fetch_assoc($erg) ) { $class = ($class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $row['funcname'] = group_func($gid, $row['uid'], $row['fid'], $groupfuncs); $row['class'] = $class; $tpl->set_ar_out($row,1); } $tpl->out(2); $show = false; } if ($menu->get(1) == 'move' AND may_changegroup(0)) { $id = escape($menu->getE(2), 'integer'); $pos = db_result(db_query("SELECT pos FROM prefix_groups WHERE id = ".$id),0); $anz = db_result(db_query("SELECT COUNT(*) FROM prefix_groups"),0); if ($menu->getA(2) == 'u') { $npos = $pos + 1; } elseif ($menu->getA(2) == 'o') { $npos = $pos - 1; } if ($npos < 0) { db_query("UPDATE prefix_groups SET pos = ".$anz." WHERE id = ".$id); db_query("UPDATE prefix_groups SET pos = pos -1"); } if ($npos >= $anz) { db_query("UPDATE prefix_groups SET pos = -1 WHERE id = ".$id); db_query("UPDATE prefix_groups SET pos = pos +1"); } if ($npos>=0 AND $npos < $anz) { db_query("UPDATE prefix_groups SET pos = ".$pos." WHERE pos = ".$npos); db_query("UPDATE prefix_groups SET pos = ".$npos." WHERE id = ".$id); } } if ($um == 'funcs') { $design = new design ( 'Admins Area', 'Admins Area', 0 ); $design->header(); if (isset($_POST['s']) AND $_POST['s'] == 'Add') { $pos = escape($_POST['apos'], 'integer'); $name = escape($_POST['aname'], 'string'); db_query("INSERT INTO prefix_groupfuncs (pos,name) VALUES (".$pos.", '".$name."')"); } elseif (isset($_POST['s']) AND $_POST['s'] == 'Send') { $erg = db_query('SELECT * FROM `prefix_groupfuncs` ORDER BY pos'); while ($row = db_fetch_assoc($erg) ) { if ((!empty($_POST['pos'][$row['id']]) AND !empty($_POST['name'][$row['id']])) AND $_POST['pos'][$row['id']] != $row['pos'] OR $_POST['name'][$row['id']] != $row['name']) { $pos = escape($_POST['pos'][$row['id']], 'integer'); $name = escape($_POST['name'][$row['id']], 'string'); db_query("UPDATE prefix_groupfuncs SET pos = ".$pos.", name = '".$name."' WHERE id = ".$row['id']); } } } if ($menu->getA(2) == 'd' AND is_numeric($menu->getE(2))) { $id = escape($menu->getE(2), 'integer'); db_query("DELETE FROM prefix_groupfuncs WHERE id = ".$id); } $tpl = new tpl ( 'groups/funcs', 1); $tpl->out(0); $class = ''; $erg = db_query('SELECT * FROM `prefix_groupfuncs` ORDER BY pos'); while ($row = db_fetch_assoc($erg) ) { $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite' ); $row['class'] = $class; $tpl->set_ar_out($row,1); } $tpl->out(2); $show = false; } if ($um == 'joinus') { $design = new design ( 'Admins Area', 'Admins Area', 2 ); $design->header(); # als trial aufnehmen if ($menu->getA(2) == 'a' AND is_numeric($menu->getE(2)) AND $menu->getE(2) <> 0) { $check = escape($menu->get(3), 'string'); $id = escape($menu->getE(2), 'integer'); if ($menu->get(4) == 'addtoteam') { $gid = db_count_query("SELECT groupid FROM `prefix_usercheck` WHERE `check` = '$check'"); db_query("INSERT INTO `prefix_groupusers` (gid,uid,fid) VALUES ($gid,$id,4)"); $msg = 'Er wurde als Trial in das Team eingetragen.'; } else { $msg = 'Jetzt muss er noch in ein Team aufgenommen werden.'; } db_query("DELETE FROM prefix_usercheck WHERE ak = 4 AND `check` = '".$check."'"); db_query("UPDATE prefix_user SET recht = -3 WHERE id = ".$id." AND recht > -3"); sendpm ($_SESSION['authid'], $id, 'Deine Joinus Anfrage', 'Du wurdest als Trial-Member aufgenommen.'); $msg = 'erfolgreich als Trial markiert, der User wurde darueber informiert. '.$msg; } # aus check tabelle loeschen (nicht aufnehmen) if ($menu->getA(2) == 'd' AND is_numeric($menu->getE(2))) { $check = escape($menu->get(3), 'string'); $id = escape($menu->getE(2), 'integer'); db_query("DELETE FROM prefix_usercheck WHERE ak = 4 AND `check` = '".$check."'"); if ($id <> 0) { sendpm ($_SESSION['authid'], $id, 'Deine Joinus Anfrage', 'Deine Joinus Anfrage wurde leider abgelehnt'); } $msg = 'erfolgreich gelöscht ..., wenn er schon registriert war wurde ihm eine Nachricht geschickt.'; } $tpl = new tpl ( 'groups/joinus', 1); $tpl->set('msg',(empty($msg)?'':'<div class="alert alert-warning">'.$msg.'</div')); $tpl->out(0); if ($_SESSION['authright'] <= -8 OR $allgAr['groups_forall'] == 0) { $where = ''; } else { $where = " AND prefix_usercheck.groupid IN (SELECT id FROM `prefix_groups` WHERE mod1 = {$_SESSION['authid']} OR mod2 = {$_SESSION['authid']} OR mod4 = {$_SESSION['authid']})"; } $class = 'Cnorm'; $erg = db_query("SELECT `check`, prefix_usercheck.name, prefix_user.id, prefix_user.email, prefix_groups.name as groupname FROM prefix_usercheck LEFT JOIN prefix_user ON prefix_user.name = BINARY prefix_usercheck.name LEFT JOIN prefix_groups ON prefix_groups.id = prefix_usercheck.groupid WHERE ak = 4".$where); while ($r = db_fetch_assoc($erg)) { if ($r['id'] < 1) { $r['email'] = db_count_query("SELECT email FROM `prefix_usercheck` WHERE name = '{$r['name']}' AND ak"); } $class = ($class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $r['class'] = $class; $r['status'] = (empty($r['id'])?'Registrierung offen' : 'bereits Registriert'); if (empty($r['id'])) { $r['id'] = 0; } $tpl->set_ar_out($r,1); } $tpl->out(2); $show = false; } if ( $show ) { $design = new design ( 'Admins Area', 'Admins Area', 2 ); $design->header(); $tpl = new tpl ( 'groups/groups', 1); if ( $um == 'edit' ) { $ar = db_fetch_assoc(db_query("SELECT id as gid, name, img, `mod1`, `mod2`, `mod3`, `mod4`, zeigen, show_joinus, show_fightus FROM prefix_groups WHERE id = ".$menu->get(2) )); $ar['ak'] = 'ch'; $ar['zeigenja'] = ( $ar['zeigen'] == 1 ? 'checked' : '' ); $ar['zeigenno'] = ( $ar['zeigen'] == 1 ? '' : 'checked' ); $ar['joinusja'] = ( $ar['show_joinus'] == 1 ? 'checked' : '' ); $ar['joinusno'] = ( $ar['show_joinus'] == 1 ? '' : 'checked' ); $ar['fightusja'] = ( $ar['show_fightus'] == 1 ? 'checked' : '' ); $ar['fightusno'] = ( $ar['show_fightus'] == 1 ? '' : 'checked' ); } else { $ar = array ( 'name'=>'','clan_tag'=>'','img'=>'','mod1'=>'','mod2'=>'','mod3'=>'', 'mod4'=>'', 'zeigenja'=>'','zeigenno'=>'checked','ak'=>'ins','gid'=>'', 'fightusja'=>'','fightusno'=>'checked','joinusja'=>'','joinusno'=>'checked', ); } $ar['mods1'] = dbliste ( $ar['mod1'] , $tpl, 'mods1', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods2'] = dbliste ( $ar['mod2'] , $tpl, 'mods2', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods3'] = dbliste ( $ar['mod3'] , $tpl, 'mods3', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods4'] = dbliste ( $ar['mod4'] , $tpl, 'mods4', "SELECT id,name FROM prefix_user WHERE recht <= -4 ORDER BY name"); $ar['mods2'] = '<option value="0">keiner</option>'.$ar['mods2']; $ar['mods3'] = '<option value="0">keiner</option>'.$ar['mods3']; $ar['mods4'] = '<option value="0">keiner</option>'.$ar['mods4']; $ar['pic'] = arlistee( $ar['img'], get_teampic_ar() ); $ar['pic'] = '<option value="0">kein Bild<option>'.$ar['pic']; $ar['msg'] = (empty($msg)?'':'<div class="alert alert-warning">'.$msg.'</div>'); $ar['joinu'] = ''; if (0 < db_result(db_query("SELECT COUNT(*) FROM prefix_usercheck WHERE ak = 4"),0)) { $ar['joinu'] = '<div class="text-right"><a class="btn btn-primary btn-sm" href="admin.php?groups-joinus">Joinus Anfragen bearbeiten</a></div><br>'; } $tpl->set_ar_out($ar,0); $class = 'Cnorm'; $erg = db_query("SELECT name,id FROM prefix_groups ORDER BY pos ASC"); while($row = db_fetch_assoc($erg) ) { $row['useranz'] = db_count_query("SELECT COUNT(uid) FROM prefix_groupusers WHERE gid = ".$row['id']); $class = ($class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $row['class'] = $class; $tpl->set_ar_out($row,1); } $tpl->out(2); if ($allgAr['groups_forall'] AND $_SESSION['authright'] > -8) { $tpl->out(3); } $tpl->out(4); } $design->footer(); ?>
<div class="form-group"> <label class="col-sm-2 control-label">TAG</label> <div class="col-sm-6"> <input type="text" name="group_tag" value="{clan_tag}" class="form-control" placeholder="TAG der Gruppe"> </div></div>
SELECT a.name FROM `prefix_groups` a INNER JOIN `prefix_groupusers` b ON a.id = b.gid WHERE b.uid = XXX
Geschlossen | ||
Zurück zu Module und Modifikationen |