<?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;
}
}

$colname_Rsprocura = "-1";
if (isset($_GET['id'])) {
  $colname_Rsprocura = $_GET['id'];
}
mysql_select_db($database_conreceitas, $conreceitas);
$query_Rsprocura = sprintf("SELECT * FROM receitas WHERE id = %s ORDER BY id ASC", GetSQLValueString($colname_Rsprocura, "int"));
$Rsprocura = mysql_query($query_Rsprocura, $conreceitas) or die(mysql_error());
$row_Rsprocura = mysql_fetch_assoc($Rsprocura);
$totalRows_Rsprocura = mysql_num_rows($Rsprocura);
?>

<script type="text/javascript">
<!--
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>




<link href="css_procura.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="detalhe">

<div class="detalhetable">

<table width="100%" cellspacing="15">
  <tr>
    <td align="center"><h4><?php echo $row_Rsprocura['titulo']; ?></h4></td>
  </tr>
  <tr>
    <td><h4>INGREDIENTES</h4></td>
  </tr>
  <tr>
    <td><?php echo nl2br($row_Rsprocura['ingredientes']); ?></td>
  </tr>
  <tr>
    <td><h4>PREPARO</h4></td>
  </tr>
  <tr>
    <td><?php echo nl2br($row_Rsprocura['preparo']); ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
    <tr>
    <td align="center" class="stilo2"><a href="../admin/inicio.php" target="_parent">VOLTAR</a></td>
  </tr>
  <tr>
    <td align="center" class="stilo2" onClick="MM_callJS('print()')"><a href="#">IMPRIMIR</a></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>


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