Ir para conteúdo
Fórum Script Brasil
  • 0

Galeria de Vídeos - Me ajudem


WebMarcio

Pergunta

Ola...

Baixei uma galeria de vídeos onde cadastro vídeos do youtube.

Os resultados (vídeos) aparecem em apenas uma coluna.

Não consegui colocar em 2 colunas os resultados.

Alguém pode me ajudar?

O código da index onde aparecem os resultados é esse:

<?php require_once('bd/videos.php'); ?>

<?php

$maxColumns_VideoDetalhes = 3;

$pg = 0;

if (isset($_GET['pg'])) {

$pg = $_GET['pg'];

}

$startcolumn_VideoDetalhes = $pg * $maxColumns_VideoDetalhes;

mysql_select_db($database_videos, $videos);

$query_VideoDetalhes = "SELECT * FROM video WHERE status_youtube=ON' ORDER BY id desc";

$query_limit_VideoDetalhes = sprintf("%s LIMIT %d, %d", $query_VideoDetalhes, $startcolumn_VideoDetalhes, $maxColumns_VideoDetalhes);

$VideoDetalhes = mysql_query($query_limit_VideoDetalhes, $videos) or die(mysql_error());

$column_VideoDetalhes = mysql_fetch_assoc($VideoDetalhes);

$colunas = "2";

if (isset($_GET['video])) {

$video = $_GET['video'];

} else {

$all_VideoDetalhes = mysql_query($query_VideoDetalhes);

$video = mysql_num_rows($all_VideoDetalhes);

}

$totalPages_VideoDetalhes = ceil($video/$maxColumns_VideoDetalhes)-1;

$queryString_VideoDetalhes = "";

if (!empty($_SERVER['QUERY_STRING'])) {

$params = explode("&", $_SERVER['QUERY_STRING']);

$newParams = array();

foreach ($params as $param) {

if (stristr($param, "pg") == false &&

stristr($param, "video") == false) {

array_push($newParams, $param);

}

}

if (count($newParams) != 0) {

$queryString_VideoDetalhes = "&" . htmlentities(implode("&", $newParams));

}

}

$queryString_VideoDetalhes = sprintf("&video=%d%s", $video, $queryString_VideoDetalhes);

?>

<html>

<head>

<meta http-equiv=Content-Type" content="text/html; charset=iso-8859-1" />

<title></title>

<link href="css/site.css" rel="stylesheet" type="text/css" />

</head>

<style type="text/css">

<!--

.style1 {

color: #FFCC00;

font-weight: verdana;

}

-->

</style>

<body bgcolor="#666666">

<p> <br>

<?php do { ?>

</p>

<table width="345" border="0" align="center" cellpadding="2" cellspacing="2">

<tr>

<td width="300" valign="top"> <div align="center"><a href="http://www.youtube.com/watch?v=<?php echo $column_VideoDetalhes['url_youtube];?>" target="_blank">

</a>

<object data="http://www.youtube.com/watch?v=<?php echo $olumn_VideoDetalhes['url_youtube'];?>" width=300" height="264"><param name="movie" value="<?php echo $row_VideoDetalhes['url_youtube];?>"</param>

<param name="wmode" value="transparent"></param>

<embed src="http://www.youtube.com/watch?v=<?php echo $column_VideoDetalhes['url_youtube'];?>" type=application/x-shockwave-flash" wmode="transparent" width="300" height="264"></embed>

</object>

<table width="300" height="40" border="0" cellpadding="1" cellspacing="0">

<tr>

<td height="20" valign="top"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Nome:

<?php echo $column_VideoDetalhes['nome_youtube]; ?> </font></div></td>

</tr>

<tr>

<td height="20" valign="top"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Link

no Youtube: <a href="http://www.youtube.com/watch?v=<?php echo $column_VideoDetalhes['url_youtube']; ?>" target=_blank">

<span class="style1"><?php echo $column_VideoDetalhes['nome_youtube]; ?></span>

</a></font></div></td>

</tr>

</table>

</div>

<div align="left"> </div></td>

<td width="31" valign="top">&nbsp;</td>

</tr>

<tr>

<td colspan="2"> <div align="center"></div></td>

</tr>

<tr>

<td colspan="2">&nbsp;</td>

</tr>

</table>

<table border="0" align="center">

<tr>

<td> </td>

</tr>

</table>

<?php } while ($column_VideoDetalhes = mysql_fetch_assoc($VideoDetalhes)); ?></body>

</html>

<?php

mysql_free_result($VideoDetalhes);

?>

<div align="center"><?php if ($pg > 0) { // inicio ?>

<a href="<?php printf("%s?pg=%d%s", $currentPage, 0, $queryString_VideoDetalhes); ?>"><span class="style1">PRIMEIRO</span></a> |

<?php } // fim ?>

</td>

<td><?php if ($pg > 0) { // inicio ?>

<a href="<?php printf("%s?pg=%d%s", $currentPage, max(0, $pg - 1), $queryString_VideoDetalhes); ?>"><span class="style1">ANTERIOR</span></a>

<?php } // fim ?>

</td>

<td><?php if ($pg < $totalPages_VideoDetalhes) { // inicioe ?>

<a href="<?php printf("%s?pg=%d%s", $currentPage, min($totalPages_VideoDetalhes, $pg + 1), $queryString_VideoDetalhes); ?>"><span class="style1">PRÓXIMO</span></a> |

<?php } // fim ?>

</td>

<td><?php if ($pg < $totalPages_VideoDetalhes) { // inicio ?>

<a href="<?php printf("%s?pg=%d%s", $currentPage, $totalPages_VideoDetalhes, $queryString_VideoDetalhes); ?>"><span class="style1">ÚLTIMO</span></a>

<?php } // fim ?> </div>

Se alguém puder me ajudar a fazer os resultados em 02 colunas agradeço desde já.

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,9k
×
×
  • Criar Novo...