Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include("includes/conexa.php");
- require_once 'init.php';
- require 'check.php';
- $voce = $_SESSION['user_name'];
- $id = $_SESSION['user_id'];
- $salario = $_SESSION['user_salario'];
- ?>
- <?php include("includes/topotw.php");
- echo "Olá, $voce Seu ID: $id Seu Salario: R$ $salario";
- ?>
- <?php
- echo "<div id='linhamaior'>";
- include('includes/conexa.php');
- $consulta = $PDO->query("SELECT * FROM `contas` WHERE id_pessoa LIKE '%".$id."%'");
- while($linha = $consulta ->fetch(PDO::FETCH_ASSOC)) {
- header('Content-Type: text/html; charset=utf-8');
- echo "<div class='linha'><h1>Conta: </h1>{$linha['nome_conta']}</div><br/>";
- echo "<div class='linha'><h1>Valor: </h1>R$ {$linha['valor_conta']}</div><br/>";
- echo "<div class='linha'><h1>Vezes a Pagar:</h1>{$linha['vezes_conta']}</div><br/>";
- $vl = $linha['valor_conta'];
- $vx = $linha['vezes_conta'];
- $total = $vl * $vx;
- echo "<h1>Total: </h1> R$".number_format($total, 2, '.', ',')."<br/>";
- $totalGeral += $vl;
- echo "<br/><br/> <hr>";
- }
- /*
- $somaconta = 200+80+43+38;
- $salario = 430.00;
- echo "R$ $somaconta - Soma de Dividas<br />";
- $geral = $salario - $somaconta;
- echo "R$ $geral - Montante Restante";
- */
- echo "<br />";
- $geral = $salario - $totalGeral;
- echo "<h1>R$ $totalGeral - Soma de Contas <br/></h1>";
- echo "<h1>R$ $geral - Restante <br/></h1>";
- echo "</div>";
- ?>
- <a href="panel.php"><button class="btn button_login">Voltar</button></a>
- <?php include("includes/rodape.php"); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement