<commit_before><?php
require('globals.php');
echo "<h3>{$lang['BOTTENT_TITLE']}</h3><hr />{$lang['BOTTENT_DESC']}<hr />";
$query=$db->query("SELECT * FROM `botlist`");
echo "<table class='table table-bordered'>
<tr>
	<th>
		{$lang['BOTTENT_TH']}
	</th>
	<th>
		{$lang['BOTTENT_TH1']}
	</th>
	<th>
		{$lang['BOTTENT_TH2']}
	</th>
	<th>
		{$lang['BOTTENT_TH3']}
	</th>
	<th>
		{$lang['BOTTENT_TH4']}
	</th>
</tr>";
while ($result = $db->fetch_row($query))
{
	$timequery=$db->query("SELECT `lasthit` FROM `botlist_hits` WHERE `userid` = {$userid} && `botid` = {$result['botuser']}");
	$r2=$db->fetch_single($timequery);
	if (($r2 <= time() + $result['botcooldown']) && $r2 > 0)
	{
		$cooldown=$r2 + $result['botcooldown'] - time();
		$attack="{$lang['BOTTENT_WAIT']} " . ParseTimestamp($cooldown);
	}
	else
	{
		$attack="<form action='attack.php'>
					<input type='hidden' name='user' value='{$result['botuser']}'>
					<input type='submit' class='btn btn-danger' value='Attack " . $api->SystemUserIDtoName($result['botuser']) . "'>
					</form>";
	}
	echo "
	<tr>
		<td>
			" . $api->SystemUserIDtoName($result['botuser']) . " [{$result['botuser']}]
		</td>
		<td>
			" . $api->UserInfoGet($result['botuser'],'level') . "
		</td>
		<td>
			" . ParseTimestamp($result['botcooldown']) . "
		</td>
		<td>
			" . $api->SystemItemIDtoName($result['botitem']) . "
		</td>
		<td>
			{$attack}
		</td>
	</tr>";
}
echo"</table>";
$h->endpage();<commit_msg>Listing fixes.<commit_after><?php
require('globals.php');
echo "<h3>{$lang['BOTTENT_TITLE']}</h3><hr />{$lang['BOTTENT_DESC']}<hr />";
$query=$db->query("SELECT * FROM `botlist`");
echo "<table class='table table-bordered'>
<tr>
	<th>
		{$lang['BOTTENT_TH']}
	</th>
	<th>
		{$lang['BOTTENT_TH1']}
	</th>
	<th>
		{$lang['BOTTENT_TH2']}
	</th>
	<th>
		{$lang['BOTTENT_TH3']}
	</th>
	<th>
		{$lang['BOTTENT_TH4']}
	</th>
</tr>";
	echo time();
while ($result = $db->fetch_row($query))
{
	$timequery=$db->query("SELECT `lasthit` FROM `botlist_hits` WHERE `userid` = {$userid} && `botid` = {$result['botuser']}");
	$r2=$db->fetch_single($timequery);
	if ((time() <= ($r2 + $result['botcooldown'])) && ($r2 > 0))
	{
		$cooldown=($r2 + $result['botcooldown']) - time();
		$attack="{$lang['BOTTENT_WAIT']} " . ParseTimestamp($cooldown);
	}
	else
	{
		$attack="<form action='attack.php'>
					<input type='hidden' name='user' value='{$result['botuser']}'>
					<input type='submit' class='btn btn-danger' value='Attack " . $api->SystemUserIDtoName($result['botuser']) . "'>
					</form>";
	}
	echo "
	<tr>
		<td>
			" . $api->SystemUserIDtoName($result['botuser']) . " [{$result['botuser']}]
		</td>
		<td>
			" . $api->UserInfoGet($result['botuser'],'level') . "
		</td>
		<td>
			" . ParseTimestamp($result['botcooldown']) . "
		</td>
		<td>
			" . $api->SystemItemIDtoName($result['botitem']) . "
		</td>
		<td>
			{$attack}
		</td>
	</tr>";
}
echo"</table>";
$h->endpage();
{'fraction_non_alphanumeric': 0.26864686468646864, 'fraction_numerical': 0.007260726072607261, 'mean_word_length': 3.758241758241758, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5768001', 'n_tokens_mistral': 1376, 'n_tokens_neox': 1258, 'n_words': 178}