Viewing file: Copia de centro.php (2.68 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php require_once('../Connections/oab.php'); ?>
<?
//SI NO HA SELECCIONADO DOCUMENTO ALGUNO
if (!isset($documento)){
?>
<?php
$tm_rsDocs = "0";
if (isset($tema)) {
$tm_rsDocs = (get_magic_quotes_gpc()) ? $tema : addslashes($tema);
}
$kp_rsDocs = "0";
if (isset($ruta)) {
$kp_rsDocs = (get_magic_quotes_gpc()) ? $ruta : addslashes($ruta);
}
$ks_rsDocs = "0";
if (isset($sm)) {
$ks_rsDocs = (get_magic_quotes_gpc()) ? $sm : addslashes($sm);
}
mysql_select_db($database_oab, $oab);
$query_rsDocs = sprintf("SELECT idcontenido, titulo, textoinicial, textocompleto FROM contenidos WHERE catP = %s and catS = %s and tema=%s ORDER BY idcontenido", $kp_rsDocs,$ks_rsDocs,$tm_rsDocs);
$rsDocs = mysql_query($query_rsDocs, $oab) or die(mysql_error());
$row_rsDocs = mysql_fetch_assoc($rsDocs);
$totalRows_rsDocs = mysql_num_rows($rsDocs);
?>
<link href="../css/ocglobal.css" rel="stylesheet" type="text/css">
<? //echo "<div id='content'>"; ?>
<?php do { ?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><span class="textoTitulo"><?php echo $row_rsDocs['titulo']; ?></span><br>
<?php echo $row_rsDocs['textoinicial']; ?><br>
<a href="inicio.php?mennu=<? echo $mennu;?>&ruta=<? echo $ruta;?>&sm=<? echo $sm;?>&tema=<? echo $tema;?>&documento=<?php echo $row_rsDocs['idcontenido']; ?>
"class="textoNormal">Texto completo</a>
</td>
</tr>
</table>
<?php } while ($row_rsDocs = mysql_fetch_assoc($rsDocs)); ?>
<? //echo "</div>";?>
<?php
mysql_free_result($rsDocs);
?>
<? } else {
?>
<?php
$ks_rsDocs = "0";
if (isset($documento)) {
$ks_rsDocs = (get_magic_quotes_gpc()) ? $documento : addslashes($documento);
}
mysql_select_db($database_oab, $oab);
$query_rsDocs = sprintf("SELECT idcontenido, titulo, textoinicial, textocompleto FROM contenidos WHERE idcontenido = %s ORDER BY idcontenido" ,$ks_rsDocs);
$rsDocs = mysql_query($query_rsDocs, $oab) or die(mysql_error());
$row_rsDocs = mysql_fetch_assoc($rsDocs);
$totalRows_rsDocs = mysql_num_rows($rsDocs);
?>
<link href="../css/ocglobal.css" rel="stylesheet" type="text/css">
<? //echo "<div id='content'>"; ?>
<?php do { ?>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><p><span class="textoTitulo"><?php echo $row_rsDocs['titulo']; ?></span><br>
<span class="textoNormal"><?php echo $row_rsDocs['textoinicial']; ?><br>
<span class="textoNormal"><?php echo $row_rsDocs['textocompleto']; ?><br>
<br>
</span>
<br>
</p>
</td>
</tr>
</table>
<?php } while ($row_rsDocs = mysql_fetch_assoc($rsDocs)); ?>
<? echo "</div>";?>
<?php
mysql_free_result($rsDocs);
?>
<? }?>
|