document.write('<style type="text/css">option {padding:1px 3px; }</style>');
<?php

require('./includes/config.php');
require('./includes/functions.php');
require('./includes/database.php');

$db = new Database();
if (!$db->connect($db_host, $db_user, $db_pass, $db_name))
	pretty_death($db->error);

$sql = "SELECT id, proxy, hits, time
		FROM {$db_tp}proxy
		ORDER BY time DESC
		LIMIT 0, 50";
$res = $db->query($sql);
?>
document.write('<form method="get" name="form" action="http://www.<?php echo $cfg['domain'] ?>/com_proxies/redirect.php" target="_blank" style="border:1px solid #ccc;padding:3px 0;font-size:10px;width:210px;text-align:center;">');
document.write('<b>50 Newest Proxies</b><br />');
document.write('<select name="id" size="12" style="width:200px;border:1px solid #ccc;margin:3px 0;" onclick="document.form.submit();">');
<?php
while ($row = $db->fetch_assoc($res)){ ?>
document.write('<option value="<?php echo $row['id'] ?>"><?php echo $row['proxy'] ?></option>');
<?php } ?>
document.write('</select><br /><a href="http://www.<?php echo $cfg['domain'] ?>/" target="_blank" style="color: black; text-decoration: none">Powered by The Tech-FAQ</a></form>');

