HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/baretube.com.new/controllers/control.tags.php
<?php

$page = (isset($_GET['page']) && is_numeric($_GET['page'])) ? (int) $_GET['page'] : 1;
$max_results = 1000;
$from = ($page * $max_results) - $max_results;

if(strlen($_GET['letter']) == 1) { 
	$result = dbQuery("SELECT COUNT(word) AS counter FROM keywords WHERE amount > 0 AND `word` LIKE '$_GET[letter]%'", true);
	$total_results = $result[0]['counter'];
	$result = dbQuery("SELECT * FROM keywords WHERE amount > 0 AND `word` LIKE '$_GET[letter]%' ORDER BY `word` ASC LIMIT $from,$max_results", true);
	$total_pages = ceil($total_results / $max_results);
} else { 
	$result = dbQuery("SELECT COUNT(word) AS counter FROM keywords WHERE amount > 0", true);
	$total_results = $result[0]['counter'];
	$result = dbQuery("SELECT * FROM keywords WHERE amount > 0 ORDER BY `word` ASC LIMIT $from,$max_results", true);
	$total_pages = ceil($total_results / $max_results);
}
?>