function BannerMostraTopo($iddep) { $departamentoDAO = new DepartamentoDAO(); $departamento = $departamentoDAO->getDepartamentosPorId($iddep); ?> <table width="558" cellspacing="1" cellpadding="4" border="0" class="BordaTabela"> <tr class="TituloTabela"> <td colspan="3" class="label2">Página [<? if($iddep == "inicial") { echo "Página Inicial"; }else{ echo $departamento->getDepartamento(); } ?>]</td> </tr> <tr class="TituloTabela"> <td colspan="3" class="label2">Banners Grande Topo (468x80)</td> </tr> <? $banner = new Banner(); $bannerDAO = new BannerDAO(); $banner = $bannerDAO->ListaBannerPorDepartamentoPosicaoAdmin($iddep,"topo"); $totBanner = count($banner); $a = $totBanner + 1; for ($i=0;$i<$totBanner;$i++) { $width = $banner[$i]->getWidth(); $height = $banner[$i]->getHeight(); $largura = $width / 2; $altura = $height / 2; $source = "../images/banners/".$banner[$i]->getBanner(); list($width, $height) = getimagesize($source); ?> <tr class="Linha1Tabela"> <td width="25%" align="center">Banner <?=$i+1;?><br><input type="button" class="bttn4" value="Alterar" onclick="altBanner('<?=$banner[$i]->getIdbanner();?>','468','80');"><br><? $this->data($banner[$i]->getData()); ?></td> <td align="center"> <? if($this->pegaExt($banner[$i]->getBanner()) == "swf") { ?> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="<?=$largura;?>" height="<?=$altura;?>" id="promocao" align="middle"> <param name="movie" value="../images/banners/<?=$banner[$i]->getBanner();?>" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="../images/banners/<?=$banner[$i]->getBanner();?>" quality="high" wmode="transparent" bgcolor="#ffffff" width="<?=$largura;?>" height="<?=$altura;?>" name="promocao" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <? }else{ ?> <img src="../images/banners/<?=$banner[$i]->getBanner();?>" width="<?=$largura;?>" height="<?=$altura;?>" border="0"> <? } ?> </td> </tr> <? } ?> <? if($iddep == "inicial") { ?> <tr class="Linha1Tabela"> <td colspan="2" align="center">Tamanho Máximo<br>468x80<br><br><input type="button" class="bttn2" value="Adicionar Banner" onclick="addBanner('<?=$iddep;?>','topo','<?=$a;?>','468','80')"></td> </tr> <? }else{ ?> <tr class="Linha1Tabela"> <td colspan="2" align="center">Tamanho Máximo<br>468x80<br><br><input type="button" class="bttn2" value="Adicionar Banner" onclick="addBanner('<?=$iddep;?>','topo','<?=$a;?>','468','80')"></td> </tr> <? } ?> </table> <? }
function breadcrumbPesquisa($id, $idsubcategoria = "") { $departamento = new Departamento(); $subdepartamento = new Subdepartamento(); $departamentoDAO = new DepartamentoDAO(); $subdepartamentoDAO = new SubdepartamentoDAO(); $departamento = $departamentoDAO->getDepartamentosPorId($id); $subdepartamento = $subdepartamentoDAO->getSubdepartamentosPorId($idsubcategoria); if($id != "") { //if(count($subdepartamentoDAO->getSubdepartamentosPorIddepartamento($id)) > 0 && $idsubcategoria != "") { $link = "<a href=\"".UrlManage::getUrlCategoria($id,"",$departamento->getDepartamento())."\">".$departamento->getDepartamento()."</a>"; //} else { // $link = $departamento->getDepartamento(); //} echo "» ".$link; } if($idsubcategoria != 0) { /* echo "<li> » ".$subdepartamento->getSubdepartamento()."</li>";*/ echo " » <a href=\"".UrlManage::getUrlSubCategoria($id,$departamento->getDepartamento(),$idsubcategoria,$subdepartamento->getSubdepartamento())."\">".$subdepartamento->getSubdepartamento()."</a>"; } echo "<br>"; }
{ require_once "class/" . $classe . ".class.php"; } $id = $_GET['id']; $titulo = $_GET['titulo']; $sub = $_GET['sub']; $subtitulo = $_GET['subtitulo']; $cid = $_GET['cid']; $cliente = $_GET['cliente']; $departamentoDAO = new DepartamentoDAO(); $subdepartamentos = $departamentoDAO->ListaSubdepartamentos($id); $layout = new Layout(); $departamentos = new Departamento(); $departamentosDAO = new DepartamentoDAO(); $departamentos = $departamentosDAO->Lista(); $nomeDepartamento = $departamentosDAO->getDepartamentosPorId($id); $banners = new Banner(); $bannerDAO = new BannerDAO(); $banners = $bannerDAO->ListaBannerPorDepartamentoPosicao($id, "lateral", 10); if (count($banners == 0)) { $banners = $bannerDAO->ListaBannerPorDepartamentoPosicao("inicial", "lateral", 10); } ?> <html> <head> <?php echo $layout->head($nomeDepartamento); ?> <body> <div> <div id="main">
$setCidade = $_POST["cidade"]; $setEstado = $_POST["estado"]; $setTelefones = $_POST["telefones"]; $setDetalhe = $_POST["detalhe"]; $setEmail = $_POST["email"]; $setSite = $_POST["site"]; $setDe = $anuncio->FormataData($_POST["de"]); $setAte = $anuncio->FormataData($_POST["ate"]); $setTexto = stripslashes($_POST["descricao_text"]); $setKeywords = $_POST["keywords"]; if ($setDetalhe == '0') { $setDestaque = '0'; } else { $setDestaque = $_POST["destaque"]; } $departamento = $departamentoDAO->getDepartamentosPorId($setIddepartamento); $pesquisa_dep = $departamento->getDepartamento(); if ($setIdsubdepartamento != '0') { $subdepartamento = $subdepartamentoDAO->getSubdepartamentosPorId($setIdsubdepartamento); $pesquisa_subdep = $subdepartamento->getSubdepartamento(); $setPesquisa = $pesquisa_dep . " , " . $pesquisa_subdep; } else { $setPesquisa = $pesquisa_dep; } $anuncio->setIddepartamento($setIddepartamento); $anuncio->setIdsubdepartamento($setIdsubdepartamento); $anuncio->setNome($setNome); $anuncio->setCep($setCep); $anuncio->setEndereco($setEndereco); $anuncio->setNumero($setNumero); $anuncio->setComplemento($setComplemento);
</div> <div class="miolo"> <div id="destaqueHome"> <h2>Destaques</h2> <ul> <? $anuncio = new Anuncio(); $anuncioDAO = new AnuncioDAO(); $anuncio = $anuncioDAO->ListaAnunciosDestaqueHome(); $departamento = new Departamento(); $departamentoDAO = new DepartamentoDAO(); for($i=0; $i < count($anuncio);$i++) { $departamento = $departamentoDAO->getDepartamentosPorId($anuncio[$i]->getIddepartamento()); echo " <li> <img width=\"175\" height=\"80\" alt=\"".$anuncio[$i]->getNome()."\" src=\"".$layout->image_path."images/destaques/".$anuncio[$i]->getLogoDestaque()."\" onclick=\"contaAcesso('".$anuncio[$i]->getIdAnuncio()."');abrirDestaque('".$layout->image_path."anunciante.php?id=".$anuncio[$i]->getIdAnuncio()."','".$anuncio[$i]->getNome()."',700,500)\"> <p><a href=\"".UrlManage::getUrlCategoria($anuncio[$i]->getIddepartamento(),"",$departamento->getDepartamento())."\">".$departamento->getDepartamento()."</a></p> </li>"; } ?> </ul> </div> <div id="homeMeio"> </div> <div id="servicos"> <?//=$layout->montaClimaTempo(); ?> <?//=$layout->montaCotacaoDolar();?>
function DepartamentoALT() { $departamento = new Departamento(); $departamentoDAO = new DepartamentoDAO(); $iddepartamento = $_GET["iddepartamento"]; $departamento = $departamentoDAO->getDepartamentosPorId($iddepartamento); ?> <span class="TituloPage">• Alterar Departamento</span> <div align="right"><a class="TextoPageLink" href="?menu=2&act=mostra">Retornar para relação de Departamentos</a></div> <br/> <br/> <table width="558" cellspacing="1" cellpadding="4" border="0" class="BordaTabela"> <form action="act/Departamento.act.php?acao=altdep" name="departamento" method="post"> <input type="hidden" value="<?=$departamento->getIdDepartamento();?>" name="iddepartamento"/> <tbody> <? switch ($_GET["msg"]) { case 1: $this->mostraMSG("Subdepartamento cadastrado com sucesso."); break; case 2: $this->mostraMSG("Subdepartamento alterado com sucesso.."); break; case 3: $this->mostraMSG("Subdepartamento removido com sucesso."); break; } ?> <tr class="Linha2Tabela"> <td colspan="2"> <table width="558" cellspacing="1" cellpadding="4" border="0" class="BordaTabela"> <tbody> <tr class="Linha1Tabela"> <td align="right"><b> NOME DO DEPARTAMENTO</b></td> <td><input type="text" value="<?=$departamento->getDepartamento();?>" class="FORMbox" size="75" name="departamento"/></td> </tr> </tbody> </table> </td> </tr> <tr class="Linha3Tabela"> <td align="right" colspan="2"><input type="submit" class="bttn4" value="Alterar Departamento" name="alterar"/> <input type="submit" class="bttn3" onclick="return confirma_apagar();" value="Apagar Departamento" name="remover"/></td> </tr> </tbody> </table> </form> <? $subdepartamentosHTML = new SubdepartamentoHTML(); $subdepartamentosHTML->SubdepartamentoMostra($departamento,10); ?> <? }