		<div id="melodia_div">
		<?php
		
			$query = "SELECT log FROM mobile_visits_logs WHERE log like '%google%'";
			$data = $dba->GetArray($query);
			$dt = array();
			$length = array();
			foreach ($data as $row)
			{
				list($url, $junk) = explode('#', $row['log']);
				$qs = explode('&', $url);
				foreach ($qs as $param)
				{
					if(substr($param, 0, 2) == 'q=')
					{
						list($junk, $searched) = explode('=', $param);
						$searched = str_replace('+', ' ', $searched);
						if(isset($dt[$searched]))
						{
							$dt[$searched]++;
						}
						else 
						{
							$dt[$searched] = 1;
						}
					}
				}
			}
			arsort($dt);
			$cnt = 0;
			foreach ($dt as $string => $count)
			{
				if($count == 9)
				{
					break;
				}
				$cnt ++;
			}
			$i = 0;
			echo "<table width='100%' border='0'><tr><td width='50%' valign='top'>";
			foreach ($dt as $string => $count)
			{
				if($i == ceil($cnt/2))
				{
					echo "</td><td  valign='top'>";
				}
				if($count == 9)
				{
					break;
				}
				echo $string.": ".$count."<br/>\n";
				$i++;
			}
			echo "</td></tr></table>";

		?>
		</div>