')) { $operator = '>'; } elseif(isset($seenvalue[1]) && $seenvalue[1] == '!=') { $operator = '!='; } else { $operator = '='; } $filter .= " AND lastseen".$operator."'".$lastseen."'"; } if(isset($getstring)) { $dbdata_full = $mysqlcon->prepare("SELECT COUNT(*) FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter"); $dbdata_full->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR); $dbdata_full->execute(); $sumentries = $dbdata_full->fetch(PDO::FETCH_NUM); } else { $getstring = ''; $sumentries = $mysqlcon->query("SELECT COUNT(*) FROM $dbname.user")->fetch(PDO::FETCH_NUM); } if(!isset($_GET["seite"])) { $seite = 1; } else { $seite = preg_replace('/\D/', '', $_GET["seite"]); } $adminlogin = 0; $keysort = ''; $keyorder = ''; if (isset($_GET['sort'])) { $keysort = strip_tags(htmlspecialchars($_GET['sort'])); } if ($keysort != 'name' && $keysort != 'uuid' && $keysort != 'cldbid' && $keysort != 'rank' && $keysort != 'lastseen' && $keysort != 'count' && $keysort != 'idle' && $keysort != 'active' && $keysort != 'grpid' && $keysort != 'grpsince') { $keysort = 'nextup'; } if (isset($_GET['order'])) { $keyorder = strip_tags(htmlspecialchars($_GET['order'])); } $keyorder = ($keyorder == 'desc' ? 'desc' : 'asc'); if (isset($_GET['admin'])) { if($_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip()) { $adminlogin = 1; } } require_once('nav.php'); $countentries = 0; if(!isset($_GET["user"])) { $user_pro_seite = 25; } elseif($_GET['user'] == "all") { $user_pro_seite = $sumentries[0]; } else { $user_pro_seite = preg_replace('/\D/', '', $_GET["user"]); } $start = ($seite * $user_pro_seite) - $user_pro_seite; if ($keysort == 'active' && $keyorder == 'asc') { $dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter ORDER BY (count - idle) LIMIT :start, :userproseite"); $dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR); $dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT); $dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT); $dbdata->execute(); } elseif ($keysort == 'active' && $keyorder == 'desc') { $dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter ORDER BY (idle - count) LIMIT :start, :userproseite"); $dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR); $dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT); $dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT); $dbdata->execute(); } elseif ($searchstring == '') { $dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE 1=1$filter ORDER BY $keysort $keyorder LIMIT :start, :userproseite"); $dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT); $dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT); $dbdata->execute(); } else { $dbdata = $mysqlcon->prepare("SELECT uuid,cldbid,rank,count,name,idle,cldgroup,online,nextup,lastseen,ip,grpid,except,grpsince FROM $dbname.user WHERE (uuid LIKE :searchvalue OR cldbid LIKE :searchvalue OR name LIKE :searchvalue)$filter ORDER BY $keysort $keyorder LIMIT :start, :userproseite"); $dbdata->bindValue(':searchvalue', '%'.$searchstring.'%', PDO::PARAM_STR); $dbdata->bindValue(':start', (int) $start, PDO::PARAM_INT); $dbdata->bindValue(':userproseite', (int) $user_pro_seite, PDO::PARAM_INT); $dbdata->execute(); } $seiten_anzahl_gerundet = ceil($sumentries[0] / $user_pro_seite); function pagination($keysort,$keyorder,$user_pro_seite,$seiten_anzahl_gerundet,$seite,$getstring) { ?> fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE); $sqlhisgroup = $mysqlcon->query("SELECT sgid,sgidname FROM $dbname.groups")->fetchAll(PDO::FETCH_ASSOC|PDO::FETCH_UNIQUE); foreach($sqlhisgroup as $sgid => $servergroup) { if(file_exists('../tsicons/'.$sgid.'.png')) { $sqlhisgroup[$sgid]['iconfile'] = 1; } else { $sqlhisgroup[$sgid]['iconfile'] = 0; } } if($adminlogin == 1) { switch ($keyorder) { case "asc": $keyorder2 = "desc&admin=true"; break; case "desc": $keyorder2 = "asc&admin=true"; } } else { switch ($keyorder) { case "asc": $keyorder2 = "desc"; break; case "desc": $keyorder2 = "asc"; } } ?>
| ' . $lang['listnick'] . ' | ' : '' . $lang['listnick'] . ' | '; if ($showcoluuid == 1 || $adminlogin == 1) echo '' , $lang['listuid'] , ' | '; if ($showcoldbid == 1 || $adminlogin == 1) echo '' , $lang['listcldbid'] , ' | '; if ($adminlogin == 1) echo '' , $lang['listip'] , ' | '; if ($showcolls == 1 || $adminlogin == 1) echo '' , $lang['listseen'] , ' | '; if ($showcolot == 1 || $adminlogin == 1) echo '' , $lang['listsumo'] , ' | '; if ($showcolit == 1 || $adminlogin == 1) echo '' , $lang['listsumi'] , ' | '; if ($showcolat == 1 || $adminlogin == 1) echo '' , $lang['listsuma'] , ' | '; if ($showcolas == 1 || $adminlogin == 1) echo '' , $lang['listacsg'] , ' | '; if ($showgrpsince == 1 || $adminlogin == 1) echo '' , $lang['listgrps'] , ' | '; if ($showcolnx == 1 || $adminlogin == 1) echo ($keysort == 'nextup') ? '' . $lang['listnxup'] . ' | ' : '' . $lang['listnxup'] . ' | '; if (($showcolsg == 1 || $adminlogin == 1) && $substridle == 1) { echo '' , $lang['listnxsg'] , ' | '; } elseif (($showcolsg == 1 || $adminlogin == 1) && $substridle != 1) { echo '' , $lang['listnxsg'] , ' | '; } echo '|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| '; } else { echo ' | ' , $value['rank'] , ' | '; } } if ($adminlogin == 1) { echo '' , htmlspecialchars($value['name']) , ' | '; } elseif ($showcolcld == 1) { echo '' , htmlspecialchars($value['name']) , ' | '; } if ($adminlogin == 1) { echo '' , $uuid , ' | '; } elseif ($showcoluuid == 1) { echo '' , $uuid , ' | '; } if ($showcoldbid == 1 || $adminlogin == 1) echo '' , $value['cldbid'] , ' | '; if ($adminlogin == 1) echo '' , inet_ntop($value['ip']) , ' | '; if ($showcolls == 1 || $adminlogin == 1) { if ($value['online'] == 1) { echo 'online | '; } else { echo '' , date('Y-m-d H:i:s',$value['lastseen']), ' | '; } } if ($showcolot == 1 || $adminlogin == 1) { echo ''; $dtF = new DateTime("@0"); $dtT = new DateTime("@".$value['count']); echo $dtF->diff($dtT)->format($timeformat); } if ($showcolit == 1 || $adminlogin == 1) { echo ' | '; $dtF = new DateTime("@0"); $dtT = new DateTime("@".$value['idle']); echo $dtF->diff($dtT)->format($timeformat); } if ($showcolat == 1 || $adminlogin == 1) { echo ' | '; $dtF = new DateTime("@0"); $dtT = new DateTime("@".($value['count']-$value['idle'])); echo $dtF->diff($dtT)->format($timeformat); } if ($showcolas == 1 || $adminlogin == 1) { if ($value['grpid'] == 0) { echo ' | '; } elseif ($sqlhisgroup[$value['grpid']]['iconfile'] == 1) { echo ' | ' , $sqlhisgroup[$value['grpid']]['sgidname'] , ' | '; } } if ($showgrpsince == 1 || $adminlogin == 1) { if ($value['grpsince'] == 0) { echo ''; } else { echo ' | ' , date('Y-m-d H:i:s',$value['grpsince']), ' | '; } } if ($showcolnx == 1 || $adminlogin == 1) { echo ''; if (($value['except'] == 0 || $value['except'] == 1) && $value['nextup'] > 0) { $dtF = new DateTime("@0"); $dtT = new DateTime("@".$value['nextup']); echo $dtF->diff($dtT)->format($timeformat) , ' | '; } elseif ($value['except'] == 0 || $value['except'] == 1) { echo '0'; } elseif ($value['except'] == 2 || $value['except'] == 3) { echo '0'; } else { echo $lang['errukwn'], ''; } } if ($showcolsg == 1 || $adminlogin == 1) { if ($grpcount == count($grouptime) && $value['nextup'] == 0 && $showhighest == 1 || $grpcount == count($grouptime) && $value['nextup'] == 0 && $adminlogin == 1) { echo '',$lang['highest'],' | '; } elseif ($value['except'] == 2 || $value['except'] == 3) { echo '',$lang['listexcept'],' | '; } elseif (isset($sqlhisgroup[$groupid]) && $sqlhisgroup[$groupid]['iconfile'] == 1) { echo '' , $sqlhisgroup[$groupid]['sgidname'] , ' | '; } else { echo ''; } } echo ' | ||
| ' , $lang['noentry'] , ' | |||||||||||||||||||||||