Viewing file: derecha.php (2.53 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php require_once('Connections/oab.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$a_rsSabias = "0";
if (isset($catP)) {
$a_rsSabias = (get_magic_quotes_gpc()) ? $catP : addslashes($catP);
}
$b_rsSabias = "0";
if (isset($catS)) {
$b_rsSabias = (get_magic_quotes_gpc()) ? $catS : addslashes($catS);
}
mysql_select_db($database_oab, $oab);
$query_rsSabias = sprintf("select texto from sabias where idcatp=%s and idcats=%s", GetSQLValueString($a_rsSabias, "int"),GetSQLValueString($b_rsSabias, "int"));
$rsSabias = mysql_query($query_rsSabias, $oab) or die(mysql_error());
$row_rsSabias = mysql_fetch_assoc($rsSabias);
$totalRows_rsSabias = mysql_num_rows($rsSabias);
?><div id="rightColumn">
<img src="images/p2006b.gif" alt="Project 2006 Details" width="150" height="76" style="margin-bottom:1em;">
<div id="navlist">
<h2>Quick Links</h2>
<ul>
<li><a href="#">Red del Aire</a></li>
<li><a href="#">Secretaría de Salud</a></li>
<li><a href="#">Secretaría de Tránsito</a></li>
<li><a href="#">Web DAMA</a></li>
</ul>
</div><div id="firstTimerStory">
<?php if ($totalRows_rsSabias > 0) { // Show if recordset not empty ?>
<table width="95%" border="0">
<tr>
<td>:::Sabías que... ::: </td>
</tr>
<tr>
<td><?php echo $row_rsSabias['texto']; ?></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php } // Show if recordset not empty ?><h2> </h2>
</div>
</div>
<?php
mysql_free_result($rsSabias);
?>
|