Viewing file: centro.php (2.52 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
$kp_rsDocs = "0";
if (isset($catP)) {
$kp_rsDocs = (get_magic_quotes_gpc()) ? $catP : addslashes($catP);
}
$ks_rsDocs = "0";
if (isset($catS)) {
$ks_rsDocs = (get_magic_quotes_gpc()) ? $catS : addslashes($catS);
}
mysql_select_db($database_oab, $oab);
$query_rsDocs = sprintf("SELECT idcontenido, titulo, textoinicial, textocompleto FROM contenidos WHERE catP = %s and catS = %s ORDER BY idcontenido", $kp_rsDocs,$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>
<br>
</span> <a href="index_dos.php?ruta=<? echo $ruta;?>&documento=<?php echo $row_rsDocs['idcontenido']; ?>" class="textoNormal">Texto
completo</a><br>
<br>
</p>
</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['textocompleto']; ?><br>
<br>
</span>
<br>
</p>
</td>
</tr>
</table>
<?php } while ($row_rsDocs = mysql_fetch_assoc($rsDocs)); ?>
<? echo "</div>";?>
<?php
mysql_free_result($rsDocs);
?>
<? }?>
|