Viewing file: documento.php (1.51 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php require_once('Connections/oa.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;
}
}
$cm_rsCONT = "0";
if (isset($cm)) {
$cm_rsCONT = (get_magic_quotes_gpc()) ? $cm : addslashes($cm);
}
mysql_select_db($database_oa, $oa);
$query_rsCONT = sprintf("SELECT titulo, textoinicial FROM contenidos WHERE idcat = %s ORDER BY orden", GetSQLValueString($cm_rsCONT, "int"));
$rsCONT = mysql_query($query_rsCONT, $oa) or die(mysql_error());
$row_rsCONT = mysql_fetch_assoc($rsCONT);
$totalRows_rsCONT = mysql_num_rows($rsCONT);?>
<?php echo $row_rsCONT['titulo']; ?>
<? mysql_free_result($rsCONT);
?>
|