<?php
	$dir = $_SERVER['DOCUMENT_ROOT']."/".substr(substr($_SERVER['REQUEST_URI'], 1), 0, strpos(substr($_SERVER['REQUEST_URI'], 1), '/'))."/phone_gap";
	require_once($dir."/classes/Rede.class.php");
	require_once($dir."/classes/Dados.class.php");
	
	class RedeDAO {
		
		public function lkpRede(){
			$dados = new Dados();
			
			$sql = "select CODREDE, DESCRICAO from REDES order by 2 ";
			$array = $dados->SelectSQL($sql);
			foreach ($array as $row){
				$novaRede = new Rede();
				$novaRede->setCodrede($row["CODREDE"]);
				$novaRede->setDescricao($row["DESCRICAO"]);
				$redes[] = $novaRede;
			}
			return $redes;
		}
		
	}
	
?>