if ($action == "edit") { try { $transaction = new Transaction(); $Bannersuperior = new Bannersuperior(); $Bannersuperior->id = $_POST['id']; $Bannersuperior->texto1 = $texto1; $Bannersuperior->texto2 = $texto2; $Bannersuperior->datadecriacao = $datainicial; $Bannersuperior->datainicial = $datainicial; $Bannersuperior->datafinal = $datafinal; if (trim($foto1) == "") { $Bannersuperior->imagem = $_POST['foto1only']; } else { $Bannersuperior->imagem = $foto1; } DAOFactory::getBannersuperiorDAO()->update($Bannersuperior); $transaction->commit(); echo "<meta http-equiv='refresh' content=3;url='bannersuperior.php'>"; } catch (Exception $exc) { //header('location: login.php?msg=error'); echo $exc; } } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
</a> </div> <table class="table table-striped custab"> <thead> <tr> <th>Código </th> <th>Imagem </th> <th>Data Inicial</th> <th>Data Final</th> <th class="text-center">Ações</th> </tr> </thead> <?php $array = DAOFactory::getBannersuperiorDAO()->queryAll(); $count = count($array); for ($i = 0; $i < $count; $i++) { $id1 = $array[$i]->id; $datainicial = $array[$i]->datainicial; $datafinal = $array[$i]->datafinal; $imagem = $array[$i]->imagem; ?> <tr> <td> <?php echo $id1; ?> </td> <td><img src="../imagem/bannersuperior/<?php echo $imagem;
<?php include 'sessao.php'; require_once 'conexao.php'; include '../generated/include_dao.php'; $transaction = new Transaction(); $resultado = DAOFactory::getBannersuperiorDAO()->load($_GET['codigo']); $date = new DateTime($resultado->datainicial); $datainicial = $date->format('d/m/Y'); $date = new DateTime($resultado->datafinal); $datafinal = $date->format('d/m/Y'); $texto1 = $resultado->texto1; $texto2 = $resultado->texto2; ?> <!DOCTYPE html> <html> <head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Área Administrativa AKIPOM</title> <meta name="generator" content="Bootply"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <script src="//code.jquery.com/jquery-2.1.0.min.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> <script src="editor.js"></script> <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"> <link href="editor.css" type="text/css" rel="stylesheet"/>