<?php
	include("vars.php");
	include("db.php");
?>

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<link href="../js_css/iframe.css" rel="stylesheet">
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#1AB9F1">
<script language="javascript" src="../js_css/javascript.js"></script>
<table border="0" width="297" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td height="19" colspan="2" width="297">
		<img border="0" src="../img/title/twenty_users.jpg" width="196" height="19"></td>
	</tr>
	<?
		echo('<tr>'."\n");
		echo('<td width="10" height="5"><img src="../img/design/5px.gif" width="1" height="5" border="0"></td>'."\n");
		echo('<td width="287" class="geo" height="5"><img src="../img/design/5px.gif" width="1" height="5" border="0"></td>'."\n");
		echo('</tr>'."\n");
	?>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo"><a href='sms_statics.php' class='link_geo4' target='_self'>ukan dabruneba</a>&nbsp;</b></td>
	</tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo"><b>yvelaze meti <font face='Tahoma,Arial,Verdana' size='1'>SMS</font> gagzavna</b></td>
	</tr>
	<?
		echo('<tr>'."\n");
		echo('<td width="10" height="5"><img src="../img/design/5px.gif" width="1" height="5" border="0"></td>'."\n");
		echo('<td width="287" class="geo" height="5"><img src="../img/design/5px.gif" width="1" height="5" border="0"></td>'."\n");
		echo('</tr>'."\n");
	?>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo">
<?php
	$msg = "";
	$result = mysql_query("SELECT * FROM register WHERE account_status = '1' ORDER BY sms_count DESC",$db);
	if($myrow = mysql_fetch_array($result))
	{
		$iscount = 1;
		do
		{
			if($iscount <= 50)
			{
				$msg .= $iscount.".&nbsp;<!--<img src='../img/icons/".$myrow['sex'].".gif' widht='16' height='16' border='0'>&nbsp;-->".$myrow['name']." ".$myrow['surname']." (".$myrow['sms_count'].")<br>";
			}
			$iscount = $iscount + 1;
		}
		while($myrow = mysql_fetch_array($result));
	}
	else
	{
		$msg .= "sia carielia.";
	}
	//
	echo($msg);
	echo('<br>');
?>
		</td>
	</tr>
</table>
</body>

</html>
