$Upload2 = round($_GET['uploaded2']); if ($_GET['uploaded'] != 'buffer') { $Where[] = implode(' AND ', num_compare('ROUND(Uploaded / 1024 / 1024 / 1024)', $_GET['uploaded'], $Upload1, $Upload2)); } else { $Where[] = implode(' AND ', num_compare('ROUND((Uploaded / 1024 / 1024 / 1024) - (Downloaded / 1024 / 1024 / 1023))', 'between', $Upload1 * 0.9, $Upload1 * 1.1)); } } if (strlen($_GET['downloaded1'])) { $Download1 = round($_GET['downloaded1']); $Download2 = round($_GET['downloaded2']); $Where[] = implode(' AND ', num_compare('ROUND(Downloaded / 1024 / 1024 / 1024)', $_GET['downloaded'], $Download1, $Download2)); } if (strlen($_GET['snatched1'])) { $Snatched1 = round($_GET['snatched1']); $Snatched2 = round($_GET['snatched2']); $Having[] = implode(' AND ', num_compare('Snatches', $_GET['snatched'], $Snatched1, $Snatched2)); } if ($_GET['enabled'] != '') { $Where[] = 'um1.Enabled = ' . wrap($_GET['enabled'], '='); } if ($_GET['class'] != '') { $Where[] = 'um1.PermissionID = ' . wrap($_GET['class'], '='); } if ($_GET['secclass'] != '') { $Join['ul'] = ' JOIN users_levels AS ul ON um1.ID = ul.UserID '; $Where[] = 'ul.PermissionID = ' . wrap($_GET['secclass'], '='); } if ($_GET['donor'] == 'yes') { $Where[] = 'ui1.Donor = \'1\''; } elseif ($_GET['donor'] == 'no') { $Where[] = 'ui1.Donor = \'0\'';
static function is($comparison) { $current_level = (int) self::$current->level; $r = num_compare($current_level, $comparison); return $r; }