me gustaria dividir esta web en tres columnas iguales pero no se por donde modificar.
Aqui os dejo el index.
Gracias
include ("inc/globales.php");
$maxRows_actualidad = 8;
$pageNum_actualidad = 0;
if (isset($_GET['pageNum_actualidad'])) {
$pageNum_actualidad = $_GET['pageNum_actualidad'];
}
$startRow_actualidad = $pageNum_actualidad * $maxRows_actualidad;
mysql_select_db($database_tusna, $tusna);
$query_actualidad = "SELECT * FROM h_articulos Where tipo='Ultimas_Noticias' ORDER BY id DESC";
$query_limit_actualidad = sprintf("%s LIMIT %d, %d", $query_actualidad, $startRow_actualidad, $maxRows_actualidad);
$actualidad = mysql_query($query_limit_actualidad, $tusna) or die(mysql_error());
$row_actualidad = mysql_fetch_assoc($actualidad);
if (isset($_GET['totalRows_actualidad'])) {
$totalRows_actualidad = $_GET['totalRows_actualidad'];
} else {
$all_actualidad = mysql_query($query_actualidad);
$totalRows_actualidad = mysql_num_rows($all_actualidad);
}
$totalPages_actualidad = ceil($totalRows_actualidad/$maxRows_actualidad)-1;
?><?php
$maxRows_imagen_not = 14;
$pageNum_imagen_not = 0;
if (isset($_GET['pageNum_imagen_not'])) {
$pageNum_imagen_not = $_GET['pageNum_imagen_not'];
}
$startRow_imagen_not = $pageNum_imagen_not * $maxRows_imagen_not;
mysql_select_db($database_tusna, $tusna);
$query_imagen_not = "SELECT * FROM h_articulos WHERE imagen <> '' AND imagen <> 'no_img.jpg' AND tipo='Ultimas_Noticias' ORDER BY id DESC";
$query_limit_imagen_not = sprintf("%s LIMIT %d, %d", $query_imagen_not, $startRow_imagen_not, $maxRows_imagen_not);
$imagen_not = mysql_query($query_limit_imagen_not, $tusna) or die(mysql_error());
$row_imagen_not = mysql_fetch_assoc($imagen_not);
if (isset($_GET['totalRows_imagen_not'])) {
$totalRows_imagen_not = $_GET['totalRows_imagen_not'];
} else {
$all_imagen_not = mysql_query($query_imagen_not);
$totalRows_imagen_not = mysql_num_rows($all_imagen_not);
}
$totalPages_imagen_not = ceil($totalRows_imagen_not/$maxRows_imagen_not)-1;
$maxRows_random = 1;
$pageNum_random = 0;
if (isset($_GET['pageNum_random'])) {
$pageNum_random = $_GET['pageNum_random'];
}
$startRow_random = $pageNum_random * $maxRows_random;
mysql_select_db($database_tusna, $tusna);
$query_random = "SELECT * FROM h_articulos where tipo='Entrevista' ORDER BY id desc";
$query_limit_random = sprintf("%s LIMIT %d, %d", $query_random, $startRow_random, $maxRows_random);
$random = mysql_query($query_limit_random, $tusna) or die(mysql_error());
$row_random = mysql_fetch_assoc($random);
if (isset($_GET['totalRows_random'])) {
$totalRows_random = $_GET['totalRows_random'];
} else {
$all_random = mysql_query($query_random);
$totalRows_random = mysql_num_rows($all_random);
}
$totalPages_random = ceil($totalRows_random/$maxRows_random)-1;
//random2
$maxRows_random2 = 1;
$pageNum_random2 = 0;
if (isset($_GET['pageNum_random2'])) {
$pageNum_random2 = $_GET['pageNum_random2'];
}
$startRow_random2 = $pageNum_random2 * $maxRows_random2;
mysql_select_db($database_tusna, $tusna);
$query_random2 = "SELECT * FROM h_articulos where tipo='Reportaje' ORDER BY id desc";
$query_limit_random2 = sprintf("%s LIMIT %d, %d", $query_random2, $startRow_random2, $maxRows_random2);
$random2 = mysql_query($query_limit_random2, $tusna) or die(mysql_error());
$row_random2 = mysql_fetch_assoc($random2);
if (isset($_GET['totalRows_random2'])) {
$totalRows_random2 = $_GET['totalRows_random2'];
} else {
$all_random2 = mysql_query($query_random2);
$totalRows_random2 = mysql_num_rows($all_random2);
}
$totalPages_random2 = ceil($totalRows_random2/$maxRows_random2)-1;
?>
<!------------------------------------------- FIN HEADER -------------------------------->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="tusna - Revista gratuito del maghreb" />
<meta name="keywords" content="tusna, Africa, Revista, gratuita, inmigracion, barcelona, madrid, trabajo, articulos, deportes, actualidad, curiosidades, cultura, economia, copa de Africa, Africanos, asociacion, asociaciones" />
<link rel="shortcut icon" href="http://www.tusna.es/favicon.ico" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<meta name="google-site-verification" content="SIFx3o_S0Hi6kmqqM5XNV9DkkS-Cj8iWe-dyMxyuYEQ" />
<style type="text/css">
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8167716-2");
pageTracker._trackPageview();
} catch(err) {}</script>
<!--
<meta name="verify-v1" content="P987xbPJSIFOcB8/PjDGu2QxWx1/ZC3zKhvWoQU9pU8=" >
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#glideDiv {
position:absolute;
left:2px; top:185px; z-index:200;
width:10px; height:10px; padding:0px;
}
.Estilo1 {color: #993333}
.Estilo2 {color: #6AA065}
.Estilo4 {color: #6AA065; font-weight: bold; }
.style1 {
color: #FFFFFF;
font-weight: bold;
}
.style2 {color: #000000}
.style3 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
<script type="text/javascript">
function radioload() {
rec = document.radio.canal.value;
MM_openBrWindow('radio.php?rec='+rec,'radio','scrollbars=no,width=320,height=300,top=10,left=10');
}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<script type="text/javascript" language="JavaScript" src="js/fechaTexto.js"></script>
<script src="js/dw_lib.js" type="text/javascript"></script>
<script src="js/dw_glider.js" type="text/javascript"></script>
<script language="javascript" src="ts_files/scroll.js"></script>
<script type="text/javascript">
/*************************************************************************
This code is from Dynamic Web Coding at www.dyn-web.com
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code
as long as this entire notice is included.
*************************************************************************/
function initStatLyr() {
// args: id, left, top, w, h, duration of glide to location onscroll, acceleration factor
// acceleration factor should be -1 to 1. -1 is full deceleration
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
}
}
winW=(winW+850)/2;
var statLyr = new Glider("glideDiv",winW,95,null,null,1000,-1);
statLyr.show();
}
</script>
</head>
<table width="999" border="0" align="center" cellpadding="0" cellspacing="0">
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="110" colspan="2" background="img/newest/top01.jpg"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="24%"> </td>
<td width="76%" align="center" valign="middle"><?php include ("publi/banner01.php");?></td>
</tr>
</table></td>
</tr>
<! --------------------- BARRA SUPERIOR ---------------------- >
<tr>
<td colspan="2" align="left" bgcolor="#FFFFFF" style="background-repeat:repeat-x"><table width="95%" cellspacing="2" cellpadding="2">
<tr>
<td><?php include ("inc/menu_superior.php");?></td>
</tr>
</table></td>
<tr>
<td width="100%" align="left" valign="top">
<! --------------------- FIN BARRA SUPERIOR ---------------------- >
<!--------- admin ------------------>
<?php if ($_SESSION['MM_admin'] == 1){?>
<div align="center"><span class="Estilo1"><span class="p10p"><a href="#" onClick="MM_openBrWindow('ag_frase.php','editD','scrollbars=yes,width=586,height=200')"><img src="jscripts/tiny_mce/themes/advanced/images/mensaje.jpg" width="20" height="20" border="0" align="absmiddle"> FRASE SEMANA </a> | <a href="#" onClick="MM_openBrWindow('ag_edicion.php','editA','scrollbars=yes,width=586,height=619')"><img src="jscripts/tiny_mce/themes/advanced/images/newdocument.gif" width="20" height="20" border="0" align="absmiddle"> NUEVA EDICIÓN </a> | <a href="#" onClick="MM_openBrWindow('ag_articulo.php','editB','scrollbars=yes,width=586,height=619')"><img src="jscripts/tiny_mce/themes/advanced/images/copy.gif" width="20" height="20" border="0" align="absmiddle"> NUEVO ARTICULO</a> | <a href="#" onClick="MM_openBrWindow('ag_evento.php','editC','scrollbars=yes,width=586,height=619')"><img src="jscripts/tiny_mce/plugins/insertdatetime/images/insertdate.gif" width="20" height="20" border="0" align="absmiddle"> NUEVO EVENTO </a>| <img src="img/exit.gif" width="16" height="16" align="absmiddle"><a href="log_edicion.php?w=logout"> DESACTIVAR EDICIÓN WEB </a> <br>
</div>
<div align="center"></div> <?php } ?>
<!--------- FIN admin ------------------>
<table width="100%" border="0" cellspacing="8" cellpadding="0">
<tr>
<td height="494" valign="top" bgcolor="#FFFFFF">
<!------------------------------------------- CENTRO -------------------------------->
<table width="80%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="71%" rowspan="2" align="center" valign="bottom">
<?php
$sqlc2="SELECT * FROM h_articulos Where tipo='Imagen_Dia' ORDER BY id DESC limit 1";
$resultc2=mysql_db_query($database_tusna, $sqlc2);
while ($row2=mysql_fetch_array($resultc2)) {
$idc2=$row2['id'];
$titulo=$row2['titulo'];
$resumen=$row2['resumen'];
$imagen=$row2['imagen'];
if(isset($imagen) && $imagen !="" && $imagen !="no_img.jpg"){
$opendird="img/articulos/".$imagen;
$tam = getimagesize($opendird);
if($tam[0]>$tam[1]){$resize="width=\"328\"";} else { $resize="width=\"350\"";}
}
} mysql_free_result($resultc2); ?>
<div align="center"> <img src="img/articulos/<?php echo $imagen;?>" vspace="5" <?php echo $resize;?> /></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
</tr>
</table>
<td width="59%" height="100"><span class="titulo_negro"><?php echo $titulo;?></span><br>
<span class="texto_leg"><img src="img/newest/gris.gif" width="200" height="1"><br>
<?php echo $resumen;?></span>
<?php if ($_SESSION['MM_admin'] == 1){?>
<a href="#" onClick="MM_openBrWindow('mod_articulo.php?idmod=<?php echo $idc2; ?>','edit1','scrollbars=yes,width=586,height=619')"><img src="img/botao_editar.gif" width="52" height="15" border="0"></a> <a href="#" onClick="MM_openBrWindow('bo_articulo.php?idbo=<?php echo $idc2; ?>','borr1','scrollbars=yes,width=320,height=180')"><img src="img/botao_borrar.gif" width="52" height="15" border="0"></a>
<?php } ?> </td>
</tr>
<tr>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td><img src="img/newest/ultimasnoticias.jpg" width="762" height="78" cellspacing="0" cellpadding="0" /></td>
</table>
<div align="center">
<?php $tab=0; ?>
<?php do { ?>
<?php if($tab==0){?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="img/tbl/tb_lat01.gif"><img src="img/tbl/tb_lat01.gif" width="35" height="9"></td>
<td width="50%" style="border-right:1px solid #CCCCCC"><table width="100%" height="85" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%"><?php
$imagen=$row_actualidad['imagen'];
if(isset($imagen) && $imagen !="" && $imagen !="no_img.jpg"){
$opendird="img/articulos/".$imagen;
$thm="img/articulos/thm/".$imagen;
if(!file_exists($thm)) {
imagemanage($opendird, $thm, 70, 180, '');
}
$tam = getimagesize($opendird);
if($tam[0]>$tam[1]){$resize="width=\"100\"";} else { $resize="height=\"80\"";}
?>
<a href="articulo.php?id=<?php echo $row_actualidad['id']; ?>" class="img"> <img src="img/articulos/thm/<?php echo $imagen;?>" <?php echo $resize;?> class="img" /></a>
<?php
}
$resumen=$row_actualidad['resumen'];
$count_resumen=strlen($resumen);
if($count_resumen>=90){
$resumen=substr($resumen, 0, 90);
$resumen=substr($resumen,0,strrpos($resumen," "));
$resumen=$resumen." (...)";
}
?></td>
<td width="90%"><a href="articulo.php?id=<?php echo $row_actualidad['id']; ?>" class="link_gris3"><strong><?php echo $row_actualidad['titulo']; ?></strong></a><br>
<span class="texto_leg"><?php echo $resumen; ?></span>
<?php if ($_SESSION['MM_admin'] == 1){?>
<a href="#" onClick="MM_openBrWindow('mod_articulo.php?idmod=<?php echo $row_actualidad['id']; ?>','edit1','scrollbars=yes,width=586,height=619')"><img src="img/botao_editar.gif" width="52" height="15" border="0"></a> <a href="#" onClick="MM_openBrWindow('bo_articulo.php?idbo=<?php echo $row_actualidad['id']; ?>','borr1','scrollbars=yes,width=320,height=180')"><img src="img/botao_borrar.gif" width="52" height="15" border="0"></a>
<?php } ?> </td>
</tr>
</table></td>
<?php $tab++ ?>
<?php }elseif($tab==1){?>
<td width="50%"><table width="100%" height="85" border="0" cellpadding="2" cellspacing="2">
<tr>
<td width="5%"><?php
$imagen=$row_actualidad['imagen'];
if(isset($imagen) && $imagen !="" && $imagen !="no_img.jpg"){
$opendird="img/articulos/".$imagen;
$thm="img/articulos/thm/".$imagen;
if(!file_exists($thm)) {
imagemanage($opendird, $thm, 70, 180, '');
}
$tam = getimagesize($opendird);
if($tam[0]>$tam[1]){$resize="width=\"100\"";} else { $resize="height=\"80\"";}
?>
<a href="articulo.php?id=<?php echo $row_actualidad['id']; ?>" class="img"> <img src="img/articulos/thm/<?php echo $imagen;?>" <?php echo $resize;?> class="img" /></a>
<?php
}
$resumen=$row_actualidad['resumen'];
$count_resumen=strlen($resumen);
if($count_resumen>=90){
$resumen=substr($resumen, 0, 90);
$resumen=substr($resumen,0,strrpos($resumen," "));
$resumen=$resumen." (...)";
}
?> </td>
<td width="90%"><a href="articulo.php?id=<?php echo $row_actualidad['id']; ?>" class="link_gris3"><strong><?php echo $row_actualidad['titulo']; ?></strong></a><br>
<span class="texto_leg"><?php echo $resumen; ?></span>
<?php if ($_SESSION['MM_admin'] == 1){?>
<a href="#" onClick="MM_openBrWindow('mod_articulo.php?idmod=<?php echo $row_actualidad['id']; ?>','edit1','scrollbars=yes,width=586,height=619')"><img src="img/botao_editar.gif" width="52" height="15" border="0"></a> <a href="#" onClick="MM_openBrWindow('bo_articulo.php?idbo=<?php echo $row_actualidad['id']; ?>','borr1','scrollbars=yes,width=320,height=180')"><img src="img/botao_borrar.gif" width="52" height="15" border="0"></a>
<?php } ?> </td>
</tr>
</table></td>
<td background="img/tbl/tb_lat02.gif" style="background-repeat:repeat-y"><img src="img/tbl/tb_lat02.gif" width="35" height="9"></td>
</tr>
</table>
<?php $tab=0; ?>
<?php }?>
<?php } while ($row_actualidad = mysql_fetch_assoc($actualidad)); ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4%"><img src="img/tbl/tb_corner03.gif" width="35" height="35"></td>
<td colspan="2" background="img/tbl/tb_bot01.gif"> </td>
<td width="3%"><img src="img/tbl/tb_corner04.gif" width="35" height="35"></td>
</tr>
</table>
<div align="left"><br>
<img src="img/ascii.gif" width="16" height="16" align="absmiddle"> <a href="articulos.php?tipo=Ultimas_Noticias"><strong>Ver más noticias de actualidad
>></strong></a><br>
<br></div>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4814365580936713";
/* Tusna11M */
google_ad_slot = "8550658180";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
</table>
<br>
<a href="http://www.wanafricasport.com" target="_blank"><img src="img/publi/bannersportcom.gif" width="550" height="67" border="0"></a>
<?php // include ("publi/banner02.php");?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" bordercolor="#F0F0F0" background="img/bg_introdestacado_portada.gif"><div align="center"><span class="titulo_negro style1"><span class="titulo_blanco"> Entrevistas</span></span></div></td>
<td width="50%" background="img/bg_introdestacado_portada.gif"><div align="center" class="titulo_blanco"><strong>Reportaje</strong></div></td>
</tr>
</table>
</div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="0%"><img src="img/tbl/tb_corner01.gif" width="35" height="35"></td>
<td width="100%" background="img/tbl/tb_top01.gif"> </td>
<td width="0%"><img src="img/tbl/tb_corner02.gif" width="35" height="35"></td>
</tr>
<tr>
<td background="img/tbl/tb_lat01.gif"><img src="img/tbl/tb_lat01.gif" width="35" height="9"></td>
<td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<? $a=1; ?>
<?php do { ?>
<td width="50%" valign="top" <?php if($a==1){ ?> style="border-right:1px solid #b9c5b8" <?php $a=2;} ?>><table width="320" border="0" <?php if($a==2){ ?>align="left" <?php $a=3; } else { ?>align="right" <? } ?>cellpadding="0" cellspacing="1">
<tr>
<td width="217" class="titulo_not_green"><span class="mini_titulo"> </span>
<a href="articulo.php?id=<?php echo $row_random['id']; ?>"><?php echo $row_random['titulo']; ?></a></td>
</tr>
<tr>
<td><p><br>
<?php if(isset($row_random['imagen']) && $row_random['imagen'] !="" && $row_random['imagen'] !="no_img.jpg"){ ?>
<?php
$imagen=$row_random['imagen'];
$opendird="img/articulos/".$imagen;
$thm="img/articulos/thm/".$imagen;
if(!file_exists($thm)) {
imagemanage($opendird, $thm, 70, 180, '');
}
?>
<a href="articulo.php?id=<?php echo $row_random['id']; ?>" class="img"><img src="img/articulos/thm/<?php echo $row_random['imagen']; ?>" width="100" align="left" class="img"></a><br>
<?php } ?>
<?php echo $row_random['resumen']; ?><br>
<br>
</p></td>
</tr>
<tr>
<td>
<p>
<?php if ($_SESSION['MM_admin'] == 1){?>
<a href="#" onClick="MM_openBrWindow('mod_articulo.php?idmod=<?php echo $row_random['id']; ?>','edit1','scrollbars=yes,width=586,height=619')"><img src="img/botao_editar.gif" width="52" height="15" border="0"></a> <a href="#" onClick="MM_openBrWindow('bo_articulo.php?idbo=<?php echo $row_random['id']; ?>','borr1','scrollbars=yes,width=320,height=180')"><img src="img/botao_borrar.gif" width="52" height="15" border="0"></a>
<?php } ?>
<br>
+ <a href="articulos.php?tipo=Entrevista">Ver más entrevistas...</a></p></td>
</tr>
</table></td>
<?php } while ($row_random = mysql_fetch_assoc($random)); ?>
<!---Random Rep ------>
<?php do { ?>
<td width="50%" valign="top" <?php if($a==1){ ?> style="border-right:1px solid #b9c5b8" <?php $a=2;} ?>><table width="320" border="0" <?php if($a==2){ ?>align="left" <?php $a=3; } else { ?>align="right" <? } ?>cellpadding="0" cellspacing="1">
<tr>
<td width="217" class="titulo_not_green"><span class="mini_titulo"> </span>
<a href="articulo.php?id=<?php echo $row_random2['id']; ?>" ><?php echo $row_random2['titulo']; ?></a></td>
</tr>
<tr>
<td><p><br>
<?php if(isset($row_random2['imagen']) && $row_random2['imagen'] !="" && $row_random2['imagen'] !="no_img.jpg"){ ?>
<?php
$imagen=$row_random2['imagen'];
$opendird="img/articulos/".$imagen;
$thm="img/articulos/thm/".$imagen;
if(!file_exists($thm)) {
imagemanage($opendird, $thm, 70, 180, '');
}
?>
<a href="articulo.php?id=<?php echo $row_random2['id']; ?>" class="img"><img src="img/articulos/thm/<?php echo $row_random2['imagen']; ?>" width="100" align="left" class="img"></a><br>
<?php } ?>
<?php echo $row_random2['resumen']; ?><br>
<br>
</p></td>
</tr>
<tr>
<td>
<p>
<?php if ($_SESSION['MM_admin'] == 1){?>
<a href="#" onClick="MM_openBrWindow('mod_articulo.php?idmod=<?php echo $row_random['id']; ?>','edit1','scrollbars=yes,width=586,height=619')"><img src="img/botao_editar.gif" width="52" height="15" border="0"></a> <a href="#" onClick="MM_openBrWindow('bo_articulo.php?idbo=<?php echo $row_random['id']; ?>','borr1','scrollbars=yes,width=320,height=180')"><img src="img/botao_borrar.gif" width="52" height="15" border="0"></a>
<?php } ?>
<br>
+ <a href="articulos.php?tipo=Reportaje">Ver más reportajes...</a></p></td>
</tr>
</table></td>
<?php } while ($row_random2 = mysql_fetch_assoc($random2)); ?>
</tr>
</table></td>
<td background="img/tbl/tb_lat02.gif" style="background-repeat:repeat-y"><img src="img/tbl/tb_lat02.gif" width="35" height="9"></td>
</tr>
<tr>
<td><img src="img/tbl/tb_corner03.gif" width="35" height="35"></td>
<td background="img/tbl/tb_bot01.gif"> </td>
<td><img src="img/tbl/tb_corner04.gif" width="35" height="35"></td>
</tr>
</table>