Viewing file: doc1.php (2.08 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 idcontenido, titulo, textoinicial FROM contenidos WHERE idcat = %s ORDER BY orden", $cm_rsCONT);
$rsCONT = mysql_query($query_rsCONT, $oa) or die(mysql_error());
$row_rsCONT = mysql_fetch_assoc($rsCONT);
$totalRows_rsCONT = mysql_num_rows($rsCONT);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
LI.list1 {list-style: circle outside;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="css/enlaces.css" rel="stylesheet" type="text/css" />
</head>
<body>
<li class="list1"><span class="textoTitulo"><?php echo $row_rsCONT['titulo']; ?></span>
<p class="textoNormal"><?php echo $row_rsCONT['textoinicial']; ?> </p>
</body>
</html>
<?php
mysql_free_result($rsCONT);
?>
|