<?php require_once('../Connections/conreceitas.php'); ?>

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $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;
}
}

mysql_select_db($database_conreceitas, $conreceitas);
$query_RSpasteis = "SELECT * FROM receitas WHERE categoria = 'PASTÉIS' ORDER BY titulo ASC";
$RSpasteis = mysql_query($query_RSpasteis, $conreceitas) or die(mysql_error());
$row_RSpasteis = mysql_fetch_assoc($RSpasteis);
$totalRows_RSpasteis = mysql_num_rows($RSpasteis);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sem título</title>
 <link href="../css/estilos.css" rel="stylesheet" type="text/css">    
</head>
<body>
<div class="detalhesgeral">
    PASTÉIS
</div>
  <?php do { ?>    
<div class="detalhesgeralconteudo">

     <a href="receitasDetalhes.php/?id=<?php echo $row_RSpasteis['id']; ?>=<?php echo $row_RSpasteis['id']; ?>"><?php echo $row_RSpasteis['titulo']; ?></a>
      </div>
 <?php } while ($row_RSpasteis = mysql_fetch_assoc($RSpasteis)); ?>


</body>
</html>
<?php
mysql_free_result($RSpasteis);
?>
