Imprimir resultado de script.php que está no mysql via PHP
Boa tarde pessoal do fórum, estou com um probleminha e gostaria de pedir ajuda a vocês. Crie uma tabela com um loop para o pessoal poder baixar três arquivos PDF(s) para um site que estou mandando, Cadastrei o nome, o tamanho e a Capa dela (Caminho gravado no Mysql) Deu certinho. Mais o script que conta o download não é exibido como os outros valores, tentei gravar somente o endereço no mysql, igual fiz com a imagem e que de certo, pensei que ele fosse executar o script e mostrar o resultado porém ele não mostra.
//Script do PDF 1 que mostra o numero que foi baixado, valor que stá cadastrado e é alterado automaticamente por um outro script que altera tbm no mysql. Os dois funcionam perfeitamente. Mais não funcionam no Mysql
<?php
error_reporting(0);
$con = mysql_connect('localhost', 'root', 'root');
$db = mysql_select_db('banco de dados');
$query = mysql_query ("SELECT * FROM tabela");
$result = mysql_fetch_array($query);
$id1 = $result['id1'];
?> <h1 style="color: #404040; font-size: 14pt; font-weight: bold; text-align:center; color: font: calibri;"> <?php echo $id1; ?> </h1>
TABELA PARTE 1 da tabela
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="pcss/matriz-pagina-do-subdiretorio.css?12-0-2-17-635836552027916353" media="screen" />
<link rel="stylesheet" type="text/css" href="style/reset.css?12-0-2-17" media="screen,print" />
<link rel="stylesheet" type="text/css" href="style/print.css?12-0-2-17" media="print" />
<link rel="stylesheet" type="text/css" href="style/style.css?12-0-2-17" media="screen,print" />
<link rel="stylesheet" type="text/css" href="style/template.css?12-0-2-17" media="screen" />
<link rel="stylesheet" type="text/css" href="style/menu.css?12-0-2-17" media="screen" />
<link rel="stylesheet" type="text/css" href="pcss/matriz-pagina-do-subdiretorio.css?12-0-2-17-635836552027916353" media="screen" />
<script type="text/javascript" src="res/jquery.js?12-0-2-17"></script>
<script type="text/javascript" src="res/x5engine.js?12-0-2-17" data-files-version="12-0-2-17"></script>
<title>Tabela</title>
<div class="text-tab-content" id="imTableObject_35_tab0" style="text-align: left;">
<div class="text-inner">
<table data-minrequestedwidth="1013" data-computedwidth="1013" style="width: 1013px;"><tbody>
<tr><td colspan="6" rowspan="1" style="width: 1005px; height: 74px; margin-top: 0px; margin-left: 0px; background-color: transparent;" class="imVt">
<div><img class="image-0 fleft" src="images/Acelerador-de-Donwload--67x67-.png" title="" alt=""/>
</div><div><br></div><div><b><span class="fs56 cf1">Áudio conversão TESTE</span></b><span class="fs16 cf1"> (5 resultados encontrados)</span></div>
</td></tr><tr><td colspan="3" rowspan="1" style="width: 383px; height: 24px; margin-top: 0px; margin-left: 0px; background-color: transparent;" class="imVt">
<div style="text-align: left;"><span class="fs21 cf2">Classificar Por:</span><span class="fs16"> </span></div></td>
<td colspan="3" rowspan="1" style="width: 615px; height: 24px; margin-top: 0px; margin-left: 0px; background-color: transparent;" class="imVt"></td></tr>
<tr><td style="text-align: center; width: 93px; height: 39px; margin-top: 0px; margin-left: 0px;" colspan="1" class="imVc"><img class="image-4" src="images/Icon-Logo.png" title="" alt=""/></td>
<td style="text-align: center; width: 282px; height: 39px; margin-top: 0px; margin-left: 0px;" colspan="1" class="imVc"><img class="image-3" src="images/Ordem-Alfabetica.png" title="" alt=""/></td>
<td style="text-align: center; width: 191px; height: 39px; margin-top: 0px; margin-left: 0px;" colspan="2" class="imVc"><img class="image-5" src="images/Avaliacoes.png" title="" alt=""/><br></td>
<td style="text-align: center; width: 210px; height: 39px; margin-top: 0px; margin-left: 0px;" class="imVc"><img class="image-9" src="images/Sobre.png"
title="" alt=""/><br></td>
<td style="text-align: center; width: 201px; height: 39px; margin-top: 0px; margin-left: 0px;" class="imVc"><img class="image-7" src="images/Downloads.png"
title="" alt=""/></td></tr><tr><td colspan="1" rowspan="1" style="width: 93px; height: 24px; margin-top: 0px; margin-left: 0px;" class="imVc">
<div style="text-align: center;"><b class="fs16"><span class="fs19 cf1"> Ícone </span></b></div></td>
<td colspan="1" rowspan="1" style="width: 282px; height: 24px; margin-top: 0px; margin-left: 0px;" class="imVc"><div style="text-align: center;">
<b class="fs19 cf1">Nome</b></div><div></div></td>
<td style="text-align: center; width: 191px; height: 24px; margin-top: 0px; margin-left: 0px;" colspan="2" class="imVc"><b><span class="fs19 cf1">
Avaliações</span></b></td>
<td style="text-align: center; width: 210px; height: 24px; margin-top: 0px; margin-left: 0px;" class="imVc"><b><span class="fs19 cf1">Sobre</span></b><br></td>
<td style="text-align: center; width: 201px; height: 24px; margin-top: 0px; margin-left: 0px;" class="imVc"><b><span class="fs19 cf1">Download</span></b></td>
</tr>
<?php // conecta com o banco de dados para selecionar as colunas como nome, tamanho
error_reporting(0);
//start connection
$connect = mysql_connect("localhost", "root", "root");
// Select database
$db1 = mysql_select_db("audio");
//Creat query
$sql = mysql_query ("SELECT * FROM conv");
$row = mysql_num_rows($sql);
?>
<?php
if ($row > 0){
while ($linha = mysql_fetch_array($sql)){
$Logo = $linha['Logo']; // Imagem do PDF
$Nome = $linha ['Nome']; // Nome do PDF
$Categoria = $linha['Categoria']; // Categoria do PDF
$cont = $linha ['cont']; // Coluna onde gravei o endereço do script PHP
$Idioma = $linha['Idioma']; // Idioma do PDF
include "tabela2.php";// aqui eu incluo a segunda parte da tabela pq não consegui fazer loop nela de outro jeito.
}}
?>
</head>
<body>
</body>
</html>
2 parte da tabela aonde é aplicada o Loop de repetição.
<div class="text-tab-content" id="imTableObject_35_tab0" style="text-align: left;">
<div class="text-inner">
<table data-minrequestedwidth="1013" data-computedwidth="1013" style="width: 1013px;"><tbody>
<td colspan="1" rowspan="1" style="width: 93px; height: 0px; margin-top: 0px; margin-left: 0px;" class="imVc">
<td colspan="1" rowspan="1" style="width: 282px; margin-top: 0px; margin-left: 0px;" class="imVc">
</td>
<td style="text-align: center; width: 191px; margin-top: 0px; margin-left: 0px;" colspan="2" class="imVc">
</td>
<td style="text-align: center; width: 210px; margin-top: 0px; margin-left: 0px;" class="imVc">
</td>
<td style="text-align: center; width: 201px; margin-top: 0px; margin-left: 0px;" class="imVc">
</td>
</tr><tr>
<td style="text-align: center; width: 93px; height: 112px; margin-top: 0px; margin-left: 0px;" class="imVc"> <?php echo $Logo?><br></td>
<td colspan="2" rowspan="1" style="width: 283px; height: 112px; margin-top: 0px; margin-left: 0px;" class="imVc"><b class="fs16"><span class="fs19 cf3"
><?php echo $Nome?></span></b><div><b style="text-align: justify;" class="fs16"><span class="fs13 cf3">Categoria: <?php echo $Categoria ?> </span>
</b><span style="text-align: justify;" class="fs13 cf3"> </span>
<td style="text-align: center; width: 210px; height: 112px; margin-top: 0px; margin-left: 0px;" class="imVc"><div><div><span class="fs16">
<span style="line-height: 25px;" class="cf3">Número de downloads:</span>
<span class="cf3"> </span></span></div><div><span class="fs19 cf3"><b> <?php echo "<?php require $cont ?> "; ?></b></span></div></div> // Aqui era para executar o script que eestá na linha no PDF 1 e imprimir na tela mais não vai
<div><span class="fs16 cf3">Idioma:</span></div><div>
<span class="fs19 cf3"><b>Português</b></span></div></td>
<td style="text-align: left; width: 201px; height: 112px; margin-top: 0px; margin-left: 0px;" class="imVc"><b style="text-align: center;">
<span class="fs19 cf1"> </span></b> <?php echo $Botao ?><b style="text-align: center;" class="fs16">
<span class="fs19 cf1"> </span></b><b style="text-align: center;"><br></b></td></tr></tbody></table>
<div style="height: 0; clear: both;"></div>
</div>
</div>
</div>Discussão (1)
Carregando comentários...