function motm() { global $db, $allowHover; $userpics = get_files(basePath . '/inc/images/uploads/userpics/'); $qry = db("SELECT * FROM " . $db['users'] . " WHERE level >= 2"); while ($rs = _fetch($qry)) { foreach ($userpics as $userpic) { $tmpId = intval($userpic); if ($tmpId == $rs['id']) { $temparr[] = $rs['id']; $a++; break; } } } $arrayID = rand(0, count($temparr) - 1); $uid = $temparr[$arrayID]; $get = _fetch(db("SELECT * FROM " . $db['users'] . " WHERE id = '" . $uid . "'")); if (!empty($get) && !empty($temparr)) { $status = $get['status'] == 1 || $get['level'] == 1 ? _aktiv : _inaktiv; if ($allowHover == 1) { $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . rawautor($get['id']) . '</td></tr><tr><td width=80px><b>' . _posi . ':</b></td><td>' . getrank($get['id']) . '</td></tr><tr><td><b>' . _status . ':</b></td><td>' . $status . '</td></tr><tr><td><b>' . _age . ':</b></td><td>' . getAge($get['bday']) . '</td></tr><tr><td colspan=2 align=center>' . jsconvert(userpic($get['id'])) . '</td></tr>\')" onmouseout="DZCP.hideInfo()"'; } $member = show("menu/motm", array("uid" => $get['id'], "upic" => userpic($get['id'], 130, 161), "info" => $info)); } else { $member = ''; } return empty($member) ? '' : '<table class="navContent" cellspacing="0">' . $member . '</table>'; }
function createnav($selected = "none", $user) { global $base, $api_key; $content = '<!-- Fixed navbar --> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="https://ldkf.de">LDKF.de</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li '; $content .= ($selected = "Home") ? ' ng-class="{\'active\': stat==false}"><a href="#" ng-click="showstats(false)"' : '><a href="index.php"'; $content .= '>Home</a></li>'; $content .= '<li><a href="https://lastfm.ldkf.de/lastfm.php?method=4">Group</a></li>'; $content .= $user["login"] ? '<li ng-class="{\'active\': stat}"><a href="#" ng-click="showstats(true)">Statistics</a></li>' : ""; $content .= !$user["login"] ? '<li><a href="http://www.last.fm/api/auth/?api_key=' . $api_key . '&cb=' . $base . '/index.php">Connect</a></li>' : ""; $content .= $user["login"] ? '<li><a href="http://explr.fm/?username='******'">Explr.fm</a></li>' : ''; $content .= '<li><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Lookup other users<span class="caret"></span></a> <ul class="dropdown-menu"><form method="post" class="form-inline" action="https://lastfm.ldkf.de/lastfm.php"> <li><input type="hidden" name="method" value="2" /><input type="text" autocapitalize="none" class="form-control" placeholder="Username" name="username"></li><li><input class="btn btn-primary btn-sm" type="submit" value="Submit"></li></form></ul></li>'; $content .= $selected == "Logout" ? '<li class="active"><a href="logout.php">Logout</a></li>' : ''; $content .= $user["login"] && $selected != "Logout" ? '<li><a href="logout.php">Logout</a></li>' : ''; $content .= $user["login"] ? '</ul><ul class="nav navbar-nav navbar-right"><li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img src="' . userpic($user) . '" class="userpic"> ' . $user["name"] . '<span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="https://lastfm.ldkf.de/lastfm.php?method=2&username='******'">Show scrobbled tracks</a></li> <li><a href="https://lastfm.ldkf.de/lastfm.php?method=5&username='******'">Show favourite tracks</a></li> <li><a href="https://lastfm.ldkf.de/lastfm.php?method=6&username='******'">Show top artists</a></li> <li><a href="https://lastfm.ldkf.de/lastfm.php?method=7&username='******'">Show top tracks</a></li> <li role="separator" class="divider"></li> <li class="dropdown-header">LDKF-group</li> <li><a href="https://lastfm.ldkf.de/lastfm.php?method=4">Weekly Charts</a></li> <li><a href="https://lastfm.ldkf.de/lastfm.php?method=8">Top Artists</a></li> <li><a href="#">Become member of the LDKF-last.fm-group</a></li> </ul> </li>' : ''; $content .= ' </ul> </div><!--/.nav-collapse --> </div> </nav>'; return $content; }
function team($tID = '') { global $db, $teamRow, $l_team; //SQL if (!empty($tID)) { $where = "WHERE id = '" . intval($tID) . "' AND navi = 1"; } else { $where = "WHERE navi = '1' ORDER BY RAND()"; } $get = _fetch(db("SELECT * FROM " . $db['squads'] . " " . $where . "")); //Members $qrym = db("SELECT s1.squad,s2.id,s2.level,s2.nick,s2.status,s2.rlname,s2.bday,s4.position\n FROM " . $db['squaduser'] . " AS s1\n LEFT JOIN " . $db['users'] . " AS s2\n ON s2.id=s1.user\n LEFT JOIN " . $db['userpos'] . " AS s3\n ON s3.squad=s1.squad AND s3.user=s1.user\n LEFT JOIN " . $db['pos'] . " AS s4\n ON s4.id=s3.posi\n WHERE s1.squad='" . $get['id'] . "'\n AND s2.level != 0\n ORDER BY s4.pid"); $i = 1; $cnt = 0; while ($getm = _fetch($qrym)) { unset($tr1, $tr2); if ($i == 0 || $i == 1) { $tr1 = "<tr>"; } if ($i == $teamRow) { $tr2 = "</tr>"; $i = 0; } $status = $getm['status'] == 1 || $getm['level'] == 1 ? _aktiv : _inaktiv; $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . rawautor($getm['id']) . '</td></tr><tr><td width=80px><b>' . _posi . ':</b></td><td>' . getrank($getm['id'], $get['id']) . '</td></tr><tr><td><b>' . _status . ':</b></td><td>' . $status . '</td></tr><tr><td><b>' . _age . ':</b></td><td>' . getAge($getm['bday']) . '</td></tr><tr><td colspan=2 align=center>' . jsconvert(userpic($getm['id'])) . '</td></tr>\')" onmouseout="DZCP.hideInfo()"'; $member .= show("menu/team_show", array("pic" => userpic($getm['id'], 40, 50), "tr1" => $tr1, "tr2" => $tr2, "squad" => $get['id'], "info" => $info, "id" => $getm['id'], "width" => round(100 / $teamRow, 0))); $i++; $cnt++; } if (is_float($cnt / $teamRow)) { for ($e = $i; $e <= $teamRow; $e++) { $end .= '<td></td>'; } $end = $end . "</tr>"; } // Next / last ID $all = cnt($db['squads'], "WHERE `navi` = '1'"); $next = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' AND `id` > '" . $get['id'] . "' ORDER BY `id` ASC LIMIT 1")); if (empty($next)) { $next = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' ORDER BY `id` ASC LIMIT 1")); } $last = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' AND `id` < '" . $get['id'] . "' ORDER BY `id` DESC LIMIT 1")); if (empty($last)) { $last = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' ORDER BY `id` DESC LIMIT 1")); } //Output $team = show("menu/team", array("row" => $teamRow, "team" => re($get['name']), "id" => $get['id'], "next" => $next['id'], "last" => $last['id'], "br1" => $all <= 1 ? '<!--' : '', "br2" => $all <= 1 ? '-->' : '', "member" => $member, "end" => $end)); return '<div id="navTeam">' . $team . '</div>'; }
function uotm() { global $db, $allowHover; $imgFiles = array(); $folder = get_files('../inc/images/uploads/userpics'); foreach ($folder as $file) { array_push($imgFiles, $file); } if (count($imgFiles) != 0) { $userid = intval($imgFiles[rand(0, count($imgFiles) - 1)]); $get = _fetch(db("SELECT id,nick,country,bday FROM " . $db['users'] . " WHERE id = '" . $userid . "'")); if (!empty($get)) { if ($allowHover == 1) { $info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . rawautor($get['id']) . '</td></tr><tr><td width=50%><b>' . _age . ':</b></td><td>' . getAge($get['bday']) . '</td></tr><tr><td colspan=2 align=center>' . jsconvert(userpic($get['id'])) . '</td></tr>\')" onmouseout="DZCP.hideInfo()"'; } $uotm = show("menu/uotm", array("uid" => $userid, "upic" => userpic($get['id'], 130, 161), "info" => $info)); } } return empty($uotm) ? '' : '<table class="navContent" cellspacing="0">' . $uotm . '</table>'; }
$markerCount = 0; while ($mm_get = _fetch($mm_qry)) { if ($mm_lastCoord != $mm_get['gmaps_koord']) { if ($i > 0) { $mm_coords .= ','; $mm_infos .= "</tr>','<tr>"; } $mm_infos .= '<td><b style="font-size:13px"> ' . re($mm_get['city']) . '</td></tr><tr>'; $mm_coords .= 'new google.maps.LatLng' . $mm_get['gmaps_koord']; $realCount++; } else { if ($markerCount > 0) { $mm_markerIcon .= ','; } $mm_markerIcon .= $realCount - 1 . ':true'; $markerCount++; } $userInfos = '<b>' . rawautor($mm_get['id']) . '</b><br /><b>' . _position . ':</b> ' . getrank($mm_get['id']) . '<br />' . userpic($mm_get['id']); $mm_infos .= '<td><div id="memberMapInner">' . $userInfos . '</div></td>'; $mm_lastCoord = $mm_get['gmaps_koord']; $i++; } $mm_infos .= "</tr>'"; $index = show($dir . "/membermap", array('head' => _membermap, 'mm_coords' => $mm_coords, 'mm_infos' => $mm_infos, 'mm_markerIcon' => $mm_markerIcon)); ## SETTINGS ## $title = $pagetitle . " - " . $where . ""; $time_end = generatetime(); $time = round($time_end - $time_start, 4); page($index, $title, $where, $time); ## OUTPUT BUFFER END ## gz_output();
$qrycustom = db("SELECT * FROM " . $db['profile'] . "\n\t \t\t\t\t WHERE kid = '5' AND shown = '1'\n ORDER BY id ASC"); while ($getcustom = _fetch($qrycustom)) { $qrycontent = db("SELECT " . $getcustom['feldname'] . " FROM " . $db['users'] . "\n\t \t\t \t\t WHERE id = '" . $userid . "'\n\t\t\t\t\t\t LIMIT 1"); $getcontent = _fetch($qrycontent); $custom_hardware .= show(_profil_edit_custom, array("name" => re(pfields_name($getcustom['name'])) . ":", "feldname" => $getcustom['feldname'], "value" => re($getcontent[$getcustom['feldname']]))); } if (!empty($get['icq']) && $get['icq'] != 0) { $icq = $get['icq']; } if ($get['nletter'] == 1) { $pnl = "checked=\"checked\""; } if ($get['pnmail'] == 1) { $pnm = "checked=\"checked\""; } $pic = userpic($get['id']); $avatar = useravatar($get['id']); if (!preg_match("#nopic#", $pic)) { $deletepic = "| " . _profil_delete_pic; } if (!preg_match("#noavatar#", $avatar)) { $deleteava = "| " . _profil_delete_ava; } $gmaps = show('membermap/geocoder', array()); if ($userid == $rootAdmin) { $delete = _profil_del_admin; } else { $delete = show("page/button_delete_account", array("id" => $get['id'], "action" => "action=editprofile&do=delete", "value" => _button_title_del_account, "del" => convSpace(_confirm_del_account))); } $show = show($dir . "/edit_profil", array("hardware" => _profil_hardware, "hphead" => _profil_hp, "country" => show_countrys($get['country']), "pcountry" => _profil_country, "about" => _profil_about, "picturehead" => _profil_pic, "contact" => _profil_contact, "preal" => _profil_real, "pnick" => _nick, "pemail1" => _email, "php" => _hp, "pava" => _profil_avatar, "pbday" => _profil_bday, "psex" => _profil_sex, "pname" => _loginname, "ppwd" => _new_pwd, "picq" => _icq, "psig" => _profil_sig, "ppic" => _profil_ppic, "phlswid" => _hlswid, "pcity" => _profil_city, "city" => re($get['city']), "psteamid" => _steamid, "nletter" => _profil_nletter, "pnmail" => _profil_pnmail, "pnl" => $pnl, "pnm" => $pnm, "pwd" => "", "dropdown_age" => $dropdown_age, "ava" => $avatar, "hp" => re($get['hp']), "gmaps" => $gmaps, "nick" => re($get['nick']), "name" => re($get['user']), "gmaps_koord" => re($get['gmaps_koord']), "rlname" => re($get['rlname']), "bdayday" => $bdayday, "bdaymonth" => $bdaymonth, "bdayyear" => $bdayyear, "sex" => $sex, "email" => re($get['email']), "icqnr" => $icq, "sig" => re_bbcode($get['signatur']), "hlswid" => $get['hlswid'], "steamid1" => $steamid1, "steamid2" => $steamid2, "steamid3" => $steamid3, "clan" => $clan, "pic" => $pic, "editpic" => _profil_edit_pic, "editava" => _profil_edit_ava, "deleteava" => $deleteava, "deletepic" => $deletepic, "favos" => _profil_favos, "pich" => _profil_ich, "pposition" => _profil_position, "pstatus" => _profil_status, "position" => getrank($get['id']), "value" => _button_value_edit, "status" => $status, "lang" => $language, "sonst" => _profil_sonst, "custom_about" => $custom_about, "custom_contact" => $custom_contact, "custom_favos" => $custom_favos, "custom_hardware" => $custom_hardware, "ich" => re_bbcode($get['beschreibung']), "del" => _profil_del_account, "delete" => $delete)); }
} if (empty($getm['steamid'])) { $steamid = ""; $steam = "-"; } else { $steamid = $getm['steamid']; $steam = _steamicon_blank; } $class = $color % 2 ? "contentMainFirst" : "contentMainSecond"; $color++; $nick = autor($getm['user'], '', '', '', '', '&sq=' . $getm['squad']); if (!empty($getm['rlname'])) { $real = explode(" ", re($getm['rlname'])); $nick = '<b>' . $real[0] . ' “</b> ' . $nick . ' <b>” ' . $real[1] . '</b>'; } $member .= show($dir . "/squads_member", array("icqs" => $icq, "icq" => $icqnr, "email" => $email, "hlsw" => $hlsw, "emails" => eMailAddr($getm['email']), "id" => $getm['user'], "steamid" => $steamid, "steam" => $steam, "class" => $class, "nick" => $nick, "onoff" => onlinecheck($getm['id']), "posi" => getrank($getm['id'], $getm['squad']), "pic" => userpic($getm['id'], 60, 80))); } $squad = re($get['name']); foreach ($picformat as $end) { if (file_exists(basePath . '/inc/images/squads/' . intval($get['id']) . '.' . $end)) { $style = 'padding:0;'; $squad = '<img src="../inc/images/squads/' . intval($get['id']) . '.' . $end . '" alt="' . re($get['name']) . '" />'; break; } } $index = show($dir . "/squads_full", array("member" => empty($member) ? _member_squad_no_entrys : $member, "desc" => empty($get['beschreibung']) ? '' : '<tr><td class="contentMainSecond">' . bbcode($get['beschreibung']) . '</td></tr>', "squad" => $squad, "style" => $style, "back" => _error_back, "id" => intval($_GET['id']))); break; default: $qry = db("SELECT * FROM " . $db['squads'] . " WHERE team_show = 1 ORDER BY pos"); while ($get = _fetch($qry)) { $class = $color % 2 ? "contentMainSecond" : "contentMainFirst";