"; include("../pages/meta.php"); echo "
"; ////include("../pages/color.php"); if(isset($errors)) { echo $errors; } include("../pages/header.php"); echo "



"; $perpg = 10; $result = mysqli_query($db, "SELECT COUNT(*) FROM `users`"); $totalitems = mysqli_fetch_row($result)[0]; if(isset($_GET['page'])) { $page = $_GET['page']; if($page < 1) $page = 1; }else{ $page = 1; } $limitT = (($page * $perpg) - $perpg); $pagination = $perpg; $result = mysqli_query($db, "SELECT * FROM `users` ORDER BY `user_id` DESC LIMIT $limitT, $pagination"); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { $username = "" . $row['username'] . ""; //// $thisusername = $row['username']; $email = $row['email']; $name = $row['name']; $type = $row['type']; $ip = $row['ip']; $date = $row['date']; $country = $row['country']; $status = $row['active']; if($status=='0') { $mstatus = 'Deactivated'; }else{ $mstatus = 'Activated'; } if($country=='') { $ipdat = @json_decode(file_get_contents( "http://www.geoplugin.net/json.gp?ip=" . $ip)); $country = $ipdat->geoplugin_countryName; $updatecountry = mysqli_query($db, "UPDATE users SET country='$country' WHERE ip='$ip' AND country=''"); } /////$newthisusername = strtolower($thisusername); //////$updatenewusername = mysqli_query($db, "UPDATE users SET username='$newthisusername' WHERE username='$thisusername'"); echo " "; } echo "
Username Name Reg.Date Country Status
$username $name $date $country $mstatus
    "; echo pagination($perpg,$page,'/all-users-list/page/',$totalitems); echo "
"; include("../pages/footer.php"); echo " "; ?>