function listar_downloads($cod_projeto) { $prepared = $this->mysqli->prepare("SELECT * FROM downloads WHERE cod_projeto={$cod_projeto}"); $prepared->execute(); $prepared->bind_result($codigo, $cod_projeto, $versao, $diretorio, $privado); $results = array(); while ($prepared->fetch()) { $results[] = array('codigo' => $codigo, 'projeto' => $cod_projeto, 'versao' => $versao, 'diretorio' => $diretorio, 'privado' => $privado); } $prepared->close(); $pDao = new ProjetoDAO($this->mysqli); foreach ($results as &$down) { $down['projeto'] = $pDao->obter_projeto_por_codigo($down['projeto']); } return $results; }
<?php define("ROOT", "../.."); define("NAV", "side_btn_p"); require ROOT."/libs/lib_list.php"; $projeto = null; $participantes = null; $tarefas = null; if(array_key_exists('cod_projeto', $_GET)){ $pDao = new ProjetoDAO(get_connection()); $projeto = $pDao->obter_projeto_por_codigo($_GET['cod_projeto']); $participantes = $pDao->listar_participantes($_GET['cod_projeto']); $tarefas = $pDao->listar_tarefas($_GET['cod_projeto']); } require ROOT."/site/header.php"; require ROOT."/site/sidebar.php"; ?> <link rel="stylesheet" type="text/css" href="css/editar.css"> <script type="text/javascript" src="js/editar.js"></script> <div class="sub_body"> <fieldset> <legend>Dados do projeto</legend> <div id="alert_info" role="alert" style="display: none"></div> <form class="panel panel-default panel-body"> <div class="row"> <div class="col-lg-5">
<?php define("ROOT", "../../.."); define("NAV", "side_btn_mp"); require ROOT . "/libs/lib_list.php"; require ROOT . "/site/header.php"; require ROOT . "/site/sidebar.php"; $cod_projeto = $_GET['cod_projeto']; $pDao = new ProjetoDAO(get_connection()); $projeto = $pDao->obter_projeto_por_codigo($cod_projeto); $parts = $pDao->listar_participantes($cod_projeto); $tarefas = $pDao->listar_tarefas($cod_projeto); ?> <div class="sub_body"> <fieldset> <legend>Dados do projeto</legend> <div id="alert_info" role="alert" style="display: none"></div> <div class="panel panel-default"> <div class="panel-body"> <div class="row"> <div class="col-lg-1"> <a href="listar_projetos.php?cod_projeto=<?php echo $projeto['codigo']; ?> " class="btn btn-primary">Voltar</a> </div> <div class="col-lg-1"> <a href="chat/chat.php?cod_projeto=<?php