<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>BitacoraWeb</title>
	<atom:link href="http://www.bitacoraweb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bitacoraweb.com</link>
	<description>Recursos y códigos Web, Códigos PHP, MySQL, AJAX, Javascript, Diseño, Ilustración, Redes, Informática, Windows, Internet</description>
	<pubDate>Wed, 02 Jul 2008 10:35:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Formulario de envío de correos con Archivos Adjuntos</title>
		<link>http://www.bitacoraweb.com/2008/07/02/formulario-envio-correo-con-archivos-adjuntos/</link>
		<comments>http://www.bitacoraweb.com/2008/07/02/formulario-envio-correo-con-archivos-adjuntos/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 10:29:40 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[adjuntos]]></category>

		<category><![CDATA[correo]]></category>

		<category><![CDATA[formulario]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=24</guid>
		<description><![CDATA[Hace poco tuve que hacer un sistema que me permitiera enviar archivos adjuntos en un correo enviado desde la web. Hay muchas webs donde hay ejemplos para hacer esto, yo encontré este, no sé exactamente donde pero ahí va.
Primero la función de envío.
PHP:




function form_mail&#40;$sPara, $sAsunto, $sTexto, $sDe&#41;


&#123; 


&#160; &#160; $bHayFicheros = 0; 


&#160; &#160; $sCabeceraTexto [...]]]></description>
			<content:encoded><![CDATA[<p>Hace poco tuve que hacer un sistema que me permitiera enviar archivos adjuntos en un correo enviado desde la web. Hay muchas webs donde hay ejemplos para hacer esto, yo encontré este, no sé exactamente donde pero ahí va.</p>
<p>Primero la función de envío.</p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> form_mail<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sPara</span>, <span style="color:#0000FF;">$sAsunto</span>, <span style="color:#0000FF;">$sTexto</span>, <span style="color:#0000FF;">$sDe</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$bHayFicheros</span> = <span style="color:#CC66CC;color:#800000;">0</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceraTexto</span> = <span style="color:#FF0000;">""</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sAdjuntos</span> = <span style="color:#FF0000;">""</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sDe</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#0000FF;">$sCabeceras</span> = <span style="color:#FF0000;">"From:"</span>.<span style="color:#0000FF;">$sDe</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">else</span> <span style="color:#0000FF;">$sCabeceras</span> = <span style="color:#FF0000;">""</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceras</span> .= <span style="color:#FF0000;">"MIME-version: 1.0<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">foreach</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_FILES</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$bHayFicheros</span> == <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$bHayFicheros</span> = <span style="color:#CC66CC;color:#800000;">1</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceras</span> .= <span style="color:#FF0000;">"Content-type: multipart/mixed;"</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceras</span> .= <span style="color:#FF0000;">"boundary=<span style="color:#000099; font-weight:bold;">\"</span>--_Separador-de-mensajes_--<span style="color:#000099; font-weight:bold;">\"</span><span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceraTexto</span> = <span style="color:#FF0000;">"----_Separador-de-mensajes_--<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceraTexto</span> .= <span style="color:#FF0000;">"Content-type: text/plain;charset=iso-8859-1<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sCabeceraTexto</span> .= <span style="color:#FF0000;">"Content-transfer-encoding: 7BIT<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sTexto</span> = <span style="color:#0000FF;">$sCabeceraTexto</span>.<span style="color:#0000FF;">$sTexto</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"size"</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt; <span style="color:#CC66CC;color:#800000;">1048576</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#000000; font-weight:bold;">false</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"size"</span><span style="color:#006600; font-weight:bold;">&#93;</span>&gt; <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sAdjuntos</span> .= <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span><span style="color:#000099; font-weight:bold;">\n</span>----_Separador-de-mensajes_--<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sAdjuntos</span> .= <span style="color:#FF0000;">"Content-type: "</span>.<span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"type"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">";name=<span style="color:#000099; font-weight:bold;">\"</span>"</span>.<span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"name"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\"</span><span style="color:#000099; font-weight:bold;">\n</span>"</span>;; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sAdjuntos</span> .= <span style="color:#FF0000;">"Content-Transfer-Encoding: BASE64<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sAdjuntos</span> .= <span style="color:#FF0000;">"Content-disposition: attachment;filename=<span style="color:#000099; font-weight:bold;">\"</span>"</span>.<span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"name"</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\"</span><span style="color:#000099; font-weight:bold;">\n</span><span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$oFichero</span> = <a href="http://www.php.net/fopen"><span style="color:#000066;">fopen</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"tmp_name"</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#FF0000;">'r'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sContenido</span> = <a href="http://www.php.net/fread"><span style="color:#000066;">fread</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$oFichero</span>, <a href="http://www.php.net/filesize"><span style="color:#000066;">filesize</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$vAdjunto</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"tmp_name"</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$sAdjuntos</span> .= <a href="http://www.php.net/chunk_split"><span style="color:#000066;">chunk_split</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/base64_encode"><span style="color:#000066;">base64_encode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sContenido</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color:#000066;">fclose</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$oFichero</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$bHayFicheros</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$sTexto</span> .= <span style="color:#0000FF;">$sAdjuntos</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span><span style="color:#000099; font-weight:bold;">\n</span>----_Separador-de-mensajes_----<span style="color:#000099; font-weight:bold;">\n</span>"</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mail"><span style="color:#000066;">mail</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sPara</span>, <span style="color:#0000FF;">$sAsunto</span>, <span style="color:#0000FF;">$sTexto</span>, <span style="color:#0000FF;">$sCabeceras</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Luego el formulario que recoge los datos</p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-5">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"formulario"</span> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">"enviar.php"</span> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"post"</span> <span style="color: #000066;">enctype</span>=<span style="color: #ff0000;">"multipart/form-data"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"nombre"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> Nombre<span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"email"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> E-mail<span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"asunto"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> Asunto<span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Comentarios<span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/textarea.html"><span style="color: #000000; font-weight: bold;">&lt;textarea</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"comentarios"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/textarea&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"file"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"adjunto"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> Archivo adjunto<span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"submit"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"submit"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"Enviar"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Por último el código que procesa el formulario.</p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'submit'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$namefrom</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'nombre'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$emailfrom</span>=<span style="color:#FF0000;">'admin@dominio.com'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$emailto</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'email'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$subject</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'asunto'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$mensaje</span> = <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>Nombre: "</span>.<span style="color:#0000FF;">$namefrom</span>.<span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span><span style="color:#000099; font-weight:bold;">\n</span>"</span>.<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'comentarios'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//llamamos a la funcion de envio</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; form_mail<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$emailto</span>,<span style="color:#0000FF;">$subject</span>, <span style="color:#0000FF;">$mensaje</span>, <span style="color:#0000FF;">$emailfrom</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/07/02/formulario-envio-correo-con-archivos-adjuntos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>alternar color de fila en listados</title>
		<link>http://www.bitacoraweb.com/2008/06/10/alternar-color-de-fila-en-listados/</link>
		<comments>http://www.bitacoraweb.com/2008/06/10/alternar-color-de-fila-en-listados/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 15:15:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[color]]></category>

		<category><![CDATA[consulta]]></category>

		<category><![CDATA[listado]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=23</guid>
		<description><![CDATA[Hoy os explicaré un pequeño truco para aquellos que se inician con PHP, se trata de mostrar la información de forma más bonita. Al hacer consultas en la base de datos para mostrar un listado al usuario podemos colorear alternativamente las filas para que no haya un cansancio visual al leer.
Al colorear alternativamente evitamos que [...]]]></description>
			<content:encoded><![CDATA[<p>Hoy os explicaré un pequeño truco para aquellos que se inician con PHP, se trata de mostrar la información de forma más bonita. Al hacer consultas en la base de datos para mostrar un listado al usuario podemos colorear alternativamente las filas para que no haya un cansancio visual al leer.</p>
<p>Al colorear alternativamente evitamos que el lector se pierda al leer un listado demasiado extenso.</p>
<p>Para ello utilizamos una simple operación matemática que nos proporcione el resto de la división <strong>$i%2</strong> (siendo % el resto de la división). La variable $i será un contador de filas, al dividirlo por 2, obtendremos alternativamente el valor 1 y valor 0 como resto de la división. </p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;tr&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;td&gt;&lt;b&gt;Usuario&lt;/b&gt;&lt;/td&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;td&gt;&lt;b&gt;Email&lt;/b&gt;&lt;/td&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;td&gt;&lt;b&gt;Fecha Registro&lt;/b&gt;&lt;/td&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/tr&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$result</span>=<a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT * FROM usuarios"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$row</span> = <a href="http://www.php.net/mysql_fetch_array"><span style="color:#000066;">mysql_fetch_array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$i</span>++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span>%<span style="color:#CC66CC;color:#800000;">2</span>==<span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$class</span>=<span style="color:#FF0000;">'style=&quot;background-color:#f3f3f3;&quot;'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$class</span>=<span style="color:#FF0000;">'style=&quot;background-color:#cccccc;&quot;'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;tr&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;td '</span>.<span style="color:#0000FF;">$class</span>.<span style="color:#FF0000;">'&gt;'</span>.<span style="color:#0000FF;">$row</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'username'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">'&lt;/td&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;td '</span>.<span style="color:#0000FF;">$class</span>.<span style="color:#FF0000;">'&gt;'</span>.<span style="color:#0000FF;">$row</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'email'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">'&lt;/td&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;td '</span>.<span style="color:#0000FF;">$class</span>.<span style="color:#FF0000;">'&gt;'</span>.<span style="color:#0000FF;">$row</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'fecha_reg'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#FF0000;">'&lt;/td&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/tr&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/table&gt;'</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Salu2 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/06/10/alternar-color-de-fila-en-listados/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Capa centrada con CSS</title>
		<link>http://www.bitacoraweb.com/2008/06/05/capa-centrada-con-css/</link>
		<comments>http://www.bitacoraweb.com/2008/06/05/capa-centrada-con-css/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 18:47:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[css]]></category>

		<category><![CDATA[capas]]></category>

		<category><![CDATA[centrada]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=21</guid>
		<description><![CDATA[Este "truquito" para centrar una capa es bastante útil. Personalmente lo uso bastante si quiero mostrar algún aviso en la web o si quiero mostrar contenido por encima de todo el sitio. Hay que tener en cuenta que los margenes top y left, son exactamente a mitad de height y width pero negativos.
HTML:




&#60;style&#62;


#capa_centrada{


&#160; &#160; position: [...]]]></description>
			<content:encoded><![CDATA[<p>Este "truquito" para centrar una capa es bastante útil. Personalmente lo uso bastante si quiero mostrar algún aviso en la web o si quiero mostrar contenido por encima de todo el sitio. Hay que tener en cuenta que los margenes <em>top</em> y <em>left</em>, son exactamente a mitad de <em>height</em> y <em>width</em> pero negativos.</p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-11">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/style.html"><span style="color: #000000; font-weight: bold;">&lt;style&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#capa_centrada{</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; position: absolute;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background-color:#cccccc;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; width: 400px; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; height: 300px; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; top: 50%; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; left:50%; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin-top: -150px; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; margin-left: -200px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"capa_centrada"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Los más entendidos ya sabrán que si quiero mostrar una capa por encima de las demás debo utilizar <span style="color: #0000ff;">position:absolute;</span> pudiendo especificar el nivel o altura relativa que tendrá con otras capas absolutas con la propiedad <span style="color: #0000ff;">z-index</span>.</p>
<p>Por ejemplo podemos aplicarle el style <span style="color: #0000ff;">display:block;</span> para mostrar la capa y con javascript podemos ocultar o mostrarla de la siguiente forma.</p>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-12">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"capa_centrada"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">"block"</span>; <span style="color: #009900; font-style: italic;">//muestra</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"capa_centrada"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">"none"</span>; <span style="color: #009900; font-style: italic;">//oculta </span></div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Salu2</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/06/05/capa-centrada-con-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Leer archivo Excel con PHP</title>
		<link>http://www.bitacoraweb.com/2008/06/04/leer-archivo-excel-con-php/</link>
		<comments>http://www.bitacoraweb.com/2008/06/04/leer-archivo-excel-con-php/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 14:44:22 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[csv]]></category>

		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=20</guid>
		<description><![CDATA[Hoy vamos a ver algo que puede resultar muy útil, he titulado "leer archivo excel", aunque el ejemplo que voy a poner no es exactamente con un archivo excel, sino con un csv creado desde excel. PHP proporciona una función que permite leer este tipo de archivos fgetcsv
PHP:




&#60;?php


$fp = fopen &#40;"archivo.csv","r"&#41;;


//bucle while que se ejecutará [...]]]></description>
			<content:encoded><![CDATA[<p>Hoy vamos a ver algo que puede resultar muy útil, he titulado "leer archivo excel", aunque el ejemplo que voy a poner no es exactamente con un archivo excel, sino con un <strong>csv</strong> creado desde excel. PHP proporciona una función que permite leer este tipo de archivos <span style="color: #0000ff;">fgetcsv</span></p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$fp</span> = <a href="http://www.php.net/fopen"><span style="color:#000066;">fopen</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"archivo.csv"</span>,<span style="color:#FF0000;">"r"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//bucle while que se ejecutará mientras haya filas que leer</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$data</span> = <a href="http://www.php.net/fgetcsv"><span style="color:#000066;">fgetcsv</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$fp</span> , <span style="color:#CC66CC;color:#800000;">10000</span> , <span style="color:#FF0000;">";"</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> !== <span style="color:#000000; font-weight:bold;">FALSE</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//mostramos los datos de cada fila</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">foreach</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$data</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$row</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$row</span>.<span style="color:#FF0000;">'&amp;nbsp;&amp;nbsp;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;br&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>De esta forma podríamos por ejemplo adaptar el script para insertar esos datos en nuestra base de datos, y podriamos crear un sistema que nos permitiera por ejemplo actualizar un catálogo y tienda online mediante un archivo <strong>csv</strong> que habriamos manipulado desde Excel.</p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/06/04/leer-archivo-excel-con-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Estilos CSS</title>
		<link>http://www.bitacoraweb.com/2008/06/03/estilos-css/</link>
		<comments>http://www.bitacoraweb.com/2008/06/03/estilos-css/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 14:51:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Básicos]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[estilos]]></category>

		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=19</guid>
		<description><![CDATA[En días anteriores hemos visto como se realizaba una maquetación básica con HTML. Si observáis he incluido colores de celda, márgenes, borde,... Estos atributos permiten modificar el aspecto de la web, pero si como normalmente se utilizan muchos atributos no es viable incrustarlos en el propio código HTML.
Podemos separar los estilos de la maquetación básica [...]]]></description>
			<content:encoded><![CDATA[<p>En días anteriores hemos visto como se realizaba una maquetación básica con HTML. Si observáis he incluido colores de celda, márgenes, borde,... Estos atributos permiten modificar el aspecto de la web, pero si como normalmente se utilizan muchos atributos no es viable incrustarlos en el propio código HTML.</p>
<p>Podemos separar los estilos de la maquetación básica de la página utilizando estilos, ya sea incluidos directamente dentro de la etiqueta &lt;head&gt;&lt;/head&gt; o en un archivo externo CSS.</p>
<p>Para incluirlos directamente sólo tenemos que utilizar las etiquetas &lt;style&gt;&lt;/style&gt; e incluir todos los estilos dentro.</p>
<p>En el caso de una hoja de estilo CSS externa, enlazamos el archivo mediante la siguiente etiqueta:</p>
<p>&lt;link rel="stylesheet" type="text/css" href="carpeta/estilos.css"&gt;</p>
<p>Una hoja de estilo tipica sería la siguiente:</p>
<p><strong>estilos.css</strong></p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-16">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">BODY {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; background: #ffffff;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; color: #000000;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; margin: 0px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; font-family:arial,verdana,helvetica;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; font-size:12px;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.head {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background-image: url('images/template/bg_head.jpg');</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background-repeat: repeat-x;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; background-color: #ffffff;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#box {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; border: 1px solid #cccccc;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">A:link {COLOR: #000000; TEXT-DECORATION: underline}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">A:visited {COLOR: #000000; TEXT-DECORATION: underline}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">A:active {COLOR: #000000; TEXT-DECORATION: underline}</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">A:hover {COLOR: #990000; TEXT-DECORATION:none} </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Explicación:</p>
<p>- primeramente a la etiqueta BODY le aplicamos color de fondo blanco, color de texto negro, sin margen, fuentes arial, tamaño 12 px.</p>
<p>- despues incluimos una clase "head", esto sólo afectará al elemento que tenga definida esta clase, por ejemplo: &lt;td class="head"&gt;</p>
<p>- luego incluimos un estilo para un elemento concreto que debe ser identificado con un id. Por ejemplo: &lt;table id="box"&gt;</p>
<p>- por últimos aplicamos estilos a todos los enlaces (etiqueta A) que haya en la web de forma que tendrán un color negro con subrayado y cuando el cursor pase por encima se coloreará a rojo sin subrayado.</p>
<p> <br />
Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/06/03/estilos-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Redimensión de imágenes con PHP</title>
		<link>http://www.bitacoraweb.com/2008/05/30/redimension-de-imagenes-con-php/</link>
		<comments>http://www.bitacoraweb.com/2008/05/30/redimension-de-imagenes-con-php/#comments</comments>
		<pubDate>Fri, 30 May 2008 09:44:33 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[gd]]></category>

		<category><![CDATA[imagemagick]]></category>

		<category><![CDATA[redimensión]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=18</guid>
		<description><![CDATA[Hoy vamos a hablar acerca de la redimensión de imágenes. Hay muchas cosas que decir acerca de esto, de hecho podríamos escribir un libro porque este tema da mucho que hablar por la gran cantidad de opciones y configuraciones que hay que tener en cuenta.
Básicamente tenemos dos opciones a la hora de redimensionar, la más [...]]]></description>
			<content:encoded><![CDATA[<p>Hoy vamos a hablar acerca de la redimensión de imágenes. Hay muchas cosas que decir acerca de esto, de hecho podríamos escribir un libro porque este tema da mucho que hablar por la gran cantidad de opciones y configuraciones que hay que tener en cuenta.</p>
<p>Básicamente tenemos dos opciones a la hora de redimensionar, la más común pero limitada es la <a href="http://www.libgd.org" target="_blank">librería GD</a> que viene normalmente instalada en todos los servidores junto con PHP, y luego tenemos <a href="http://www.imagemagick.org" target="_blank">ImageMagick</a> que últimamente se está empezando a ver en los nuevos servidores que nos porporcionan los <a href="http://es.wikipedia.org/wiki/ISP" target="_blank">ISP</a>.</p>
<p>En el caso de la <strong>librería GD</strong>, debemos tener en cuenta que consume muchos recursos del servidor, por lo que es bastante lento. Esto provoca que si el archivo de origen es muy grande tengamos problemas de memoria <em>memory_limit</em> y tiempo de ejecución <em>max_execution_time</em>. Podemos modificar los valores del php.ini o mediante el archivo .htaccess, pero aún así no podremos aplicar esta librería para archivos más grandes de 1 ó 2 MB.</p>
<p>Otra limitación es que no podemos utilizar un archivo TIFF como base, aunque la librería soporta bastantes formatos gif, jpeg, png, ... En caso de necesitar redimensionar archivos TIFF o con un gran tamaño deberemos utilizar <strong>Imagemagick.</strong></p>
<p>A continuación incluyo un ejemplo para redimensionar una imagen jpeg con la <strong>librería GD</strong> que ha sido subida mediante un <a href="http://www.bitacoraweb.com/2008/05/23/upload-de-archivos-con-php/">upload de archivos</a>. El script redimensionará la imagen a un ancho máximo de 200 píxeles y la copiará a la carpeta que especifiquemos.</p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$anchura_maxima</span> = <span style="color:#CC66CC;color:#800000;">200</span>; <span style="color:#FF9933; font-style:italic;">//ancho máximo en pixeles</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$nombre_temporal</span> = <span style="color:#0000FF;">$_FILES</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'foto'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'tmp_name'</span><span style="color:#006600; font-weight:bold;">&#93;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$nombre_archivo</span> = <span style="color:#0000FF;">$_FILES</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'foto'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'name'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$datos</span> = <a href="http://www.php.net/getimagesize"><span style="color:#000066;">getimagesize</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$nombre_temporal</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//calculo de altura</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$ratio</span> = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$datos</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span> / <span style="color:#0000FF;">$anchura_maxima</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$altura</span> = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$datos</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span> / <span style="color:#0000FF;">$ratio</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$img</span> = @imagecreatefromjpeg<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$nombre_temporal</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$thumb</span> = imagecreatetruecolor<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$anchura_maxima</span>,<span style="color:#0000FF;">$altura</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">imagecopyresampled<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$thumb</span>, <span style="color:#0000FF;">$img</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#0000FF;">$anchura_maxima</span>, <span style="color:#0000FF;">$altura</span>, <span style="color:#0000FF;">$datos</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#0000FF;">$datos</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ImageJPEG<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$thumb</span>, <span style="color:#FF0000;">"fotos/"</span>.<span style="color:#0000FF;">$nombre_archivo</span>,<span style="color:#CC66CC;color:#800000;">75</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#FF9933; font-style:italic;">//copiamos la imagen JPG con compresión 75</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">imagedestroy<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$thumb</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">imagedestroy<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$img</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/05/30/redimension-de-imagenes-con-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maquetación básica para Web</title>
		<link>http://www.bitacoraweb.com/2008/05/29/maquetacion-basica-para-web/</link>
		<comments>http://www.bitacoraweb.com/2008/05/29/maquetacion-basica-para-web/#comments</comments>
		<pubDate>Thu, 29 May 2008 14:10:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Básicos]]></category>

		<category><![CDATA[maquetación]]></category>

		<category><![CDATA[tablas]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=16</guid>
		<description><![CDATA[En el último post de esta serie de consejos básicos para los que se inician en el desarrollo web, comentamos que toda web html debe tener un estructura básica que incluya las etiquetas &#60;html&#62;, &#60;head&#62; y &#60;body&#62;
Hoy vamos a realizar una estructura completa por medio de tablas, para una web típica que tendrá encabezado, menú lateral, [...]]]></description>
			<content:encoded><![CDATA[<p>En el <a href="http://www.bitacoraweb.com/2008/05/27/iniciarse-con-la-maquetacion/">último post</a> de esta serie de consejos básicos para los que se inician en el desarrollo web, comentamos que toda web html debe tener un estructura básica que incluya las etiquetas <strong>&lt;html&gt;, &lt;head&gt;</strong> y <strong>&lt;body&gt;</strong></p>
<p>Hoy vamos a realizar una estructura completa por medio de tablas, para una web típica que tendrá encabezado, menú lateral, contenido y pie de página.</p>
<p> </p>
<p style="text-align: center;"><a href="http://www.bitacoraweb.com/wp-content/uploads/2008/05/est_basic.gif"><img class="size-medium wp-image-17 aligncenter" title="est_basic" src="http://www.bitacoraweb.com/wp-content/uploads/2008/05/est_basic-300x240.gif" alt="" width="300" height="240" /></a></p>
<p> </p>
<p>Debo decir que la maquetación con tablas a día de hoy no está recomendada, sino que se recomienda el uso de capas, pero creo que para alguien que se inicia es mucho más fácil de entender el uso de las tablas y el resultado será igualmente válido.</p>
<p>Para definir una tabla con html debemos usar la etiqueta <strong>&lt;table&gt;&lt;/table&gt;</strong>, dentro incorporaremos filas <strong>&lt;tr&gt;&lt;/tr&gt;</strong> y columnas o celdas <strong>&lt;td&gt;&lt;/td&gt;.</strong> Podemos incorporar atributos a la tabla para espaciado de celdas <span style="text-decoration: underline;">cellspacing</span> y margen <span style="text-decoration: underline;">cellpadding</span>, incluyendo el valor del espaciado y margen en píxeles. También podemos incorporar un borde, <span style="text-decoration: underline;">border="1"</span> y un color de fondo hexadecimal, <span style="text-decoration: underline;">bgcolor="#000000".</span></p>
<p>Para las celdas podemos incorporar un atributo de alineamiento del texto vertical <span style="text-decoration: underline;">valign="top", valign="middle", valign="bottom"</span> o si queremos alineamiento horizontal <span style="text-decoration: underline;">align="left", align="right", align="center".</span></p>
<p>Podemos anidar todas las tablas que queramos, para ello sólo debemos incorporar la nueva tabla anidada dentro de una celda <strong>&lt;td&gt;&lt;/td&gt;</strong></p>
<p>Utilizaremos para el ejemplo una tabla principal con un ancho fijo <strong>width="860"</strong> y una altura que ocupará el 100% de la ventana, <strong>height="100%"</strong>.</p>
<p>Hemos limitado la cabecera y el pie con una altura fija (height) mientras que la sección central no está limitada por lo que ocupará el espacio restante.</p>
<p>El lateral está limitado a una anchura de 200, y la sección de contenido ocupará el ancho restante. Muy importante esta tabla que está anidada tenga la anchura y altura total de la celda donde está situada, width y height 100%.</p>
<p>Ni que decir tiene que esto ya lo hace frontpage y dreamweaver por nosotros, pero creo interesante tener una base de html.</p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-20">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></a></span>Título de la página<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body</span></a> <span style="color: #000066;">marginwidth</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">marginheight</span>=<span style="color: #ff0000;">"0"</span> topmargin=<span style="color: #ff0000;">"0"</span> bottommargin=<span style="color: #ff0000;">"0"</span> leftmargin=<span style="color: #ff0000;">"0"</span> rightmargin=<span style="color: #ff0000;">"0"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/center.html"><span style="color: #000000; font-weight: bold;">&lt;center&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">&lt;table</span></a> <span style="color: #000066;">border</span>=<span style="color: #ff0000;">"1"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"860"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"100%"</span> <span style="color: #000066;">cellspacing</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">cellpadding</span>=<span style="color: #ff0000;">"0"</span> bordercolor=<span style="color: #ff0000;">"#FFFFFF"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td</span></a> <span style="color: #000066;">bgcolor</span>=<span style="color: #ff0000;">"#cccccc"</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"100"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CABECERA</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">&lt;table</span></a> <span style="color: #000066;">border</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"100%"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"100%"</span> <span style="color: #000066;">cellspacing</span>=<span style="color: #ff0000;">"0"</span> <span style="color: #000066;">cellpadding</span>=<span style="color: #ff0000;">"0"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td</span></a> <span style="color: #000066;">bgcolor</span>=<span style="color: #ff0000;">"#808080"</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">"200"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LATERAL</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td</span></a> <span style="color: #000066;">bgcolor</span>=<span style="color: #ff0000;">"#f3f3f3"</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">"center"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CONTENIDO</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/table&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">&lt;tr&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">&lt;td</span></a> <span style="color: #000066;">bgcolor</span>=<span style="color: #ff0000;">"#cccccc"</span> <span style="color: #000066;">align</span>=<span style="color: #ff0000;">"center"</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">"50"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PIE DE PÁGINA</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/table&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/center&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/05/29/maquetacion-basica-para-web/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Web multilingüe con PHP</title>
		<link>http://www.bitacoraweb.com/2008/05/28/web-multilingue-con-php/</link>
		<comments>http://www.bitacoraweb.com/2008/05/28/web-multilingue-con-php/#comments</comments>
		<pubDate>Wed, 28 May 2008 15:33:31 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[idiomas]]></category>

		<category><![CDATA[multilingüe]]></category>

		<category><![CDATA[navegador]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=15</guid>
		<description><![CDATA[En esta ocasión vamos a ver lo sencillo que es tener un sistema multilingüe para nuestra web. Sólo debemos incorporar el siguiente código al inicio de todas las páginas.
PHP:




//si no existe la variable lang:


//comprobamos si existe la cookie


//en caso contrario asignamos idioma del navegador


$lang=$_GET&#91;'lang'&#93;;


if&#40;$lang==false&#41;&#123;


&#160; &#160; if&#40;$_COOKIE&#91;"lang_cookie"&#93;&#41;&#123;$idioma=$_COOKIE&#91;"lang_cookie"&#93;;&#125;


&#160; &#160; else&#123;


&#160; &#160; &#160; &#160; $navegador=substr&#40;$_SERVER&#91;'HTTP_ACCEPT_LANGUAGE'&#93;,0,2&#41;;


&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>En esta ocasión vamos a ver lo sencillo que es tener un sistema multilingüe para nuestra web. Sólo debemos incorporar el siguiente código al inicio de todas las páginas.</p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-25">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//si no existe la variable lang:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//comprobamos si existe la cookie</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//en caso contrario asignamos idioma del navegador</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$lang</span>=<span style="color:#0000FF;">$_GET</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'lang'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$lang</span>==<span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_COOKIE</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"lang_cookie"</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#0000FF;">$_COOKIE</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"lang_cookie"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$navegador</span>=<a href="http://www.php.net/substr"><span style="color:#000066;">substr</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'HTTP_ACCEPT_LANGUAGE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#CC66CC;color:#800000;">0</span>,<span style="color:#CC66CC;color:#800000;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$navegador</span>==<span style="color:#FF0000;">'en'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#FF0000;">'en'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">elseif</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$navegador</span>==<span style="color:#FF0000;">'fr'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#FF0000;">'fr'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#FF0000;">'es'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$lang</span>==<span style="color:#FF0000;">'en'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#FF0000;">'en'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">elseif</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$lang</span>==<span style="color:#FF0000;">'fr'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#FF0000;">'fr'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$idioma</span>=<span style="color:#FF0000;">'es'</span>;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//enviamos cookie para mantener la selección del usuario</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"lang_cookie"</span>,<span style="color:#0000FF;">$idioma</span>,<a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">3600</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$idioma</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Este código lo que hará en primer lugar es asignar un idioma a los usuarios nuevos, que será el idioma principal que tenga su navegador. Esto supongo que ya sabréis donde se cambia, pero por si acaso, sólo es necesario ir a <strong>Herramientas</strong> -&gt; <strong>Opciones de Internet</strong> -&gt; <strong>Idiomas</strong>, en nuestro navegador.</p>
<p>Luego podemos poner las típicas banderitas de idiomas con un enlace a cualquier página o $PHP_SELF, incluyendo la variable "lang" con el idioma que proceda. Por ejemplo:</p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-26">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"index.php?lang=es"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Español<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"index.php?lang=fr"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Français<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"index.php?lang=en"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>English<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Con la variable $idioma que retorna el script, podemos hacer después un include al archivo de idioma en cuestión, que contrendrá las traducciones de los contenidos:</p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-27">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">include</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"languages/"</span>.<span style="color:#0000FF;">$idioma</span>.<span style="color:#FF0000;">".php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Ejemplo de archivo de idioma español, <strong>es.php</strong>:</p>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-28">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'HEADER_TITLE'</span>, <span style="color:#FF0000;">'Inicio'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'CONTENT'</span>, <span style="color:#FF0000;">'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua&lt;br&gt;&lt;br&gt;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'FOOTER'</span>, <span style="color:#FF0000;">'&amp;copy; 2008 bitacoraweb.com'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">... </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/05/28/web-multilingue-con-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Iniciarse con la maquetación</title>
		<link>http://www.bitacoraweb.com/2008/05/27/iniciarse-con-la-maquetacion/</link>
		<comments>http://www.bitacoraweb.com/2008/05/27/iniciarse-con-la-maquetacion/#comments</comments>
		<pubDate>Tue, 27 May 2008 15:42:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Básicos]]></category>

		<category><![CDATA[editor]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[maquetar]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=14</guid>
		<description><![CDATA[Ayer vimos algunos cosejos básicos a la hora de diseñar una web, hoy vamos a ver lo básico para empezar a maquetar ese diseño en HTML.
Para empezar necesitamos un editor. En el mercado existen multitud de ellos, más o menos completos, como puede ser Dreamweaver o FrontPage de MS Office. Para la gente que se inicia [...]]]></description>
			<content:encoded><![CDATA[<p>Ayer vimos algunos cosejos básicos a la hora de <a href="http://www.bitacoraweb.com/2008/05/26/empezar-a-hacer-webs/">diseñar una web</a>, hoy vamos a ver lo básico para empezar a maquetar ese diseño en HTML.</p>
<p>Para empezar necesitamos un editor. En el mercado existen multitud de ellos, más o menos completos, como puede ser <a href="http://www.adobe.com/products/dreamweaver/" target="_blank">Dreamweaver</a> o <a href="http://office.microsoft.com" target="_blank">FrontPage</a> de MS Office. Para la gente que se inicia yo no recomendaría Dreamweaver, ya que pienso que es mucho más complicado su uso, aunque si es cierto que proporciona muchas más herramientas. El uso de estos dos programas, es adecuado si no conoces el código HTML, ya que hacen ese trabajo por ti.</p>
<p>Yo particularmente, no utilizo ninguno de los dos, ya que me gusta escribir a mano todo el código, así lo controlo perfectamente y no se me incluye código no deseado que normalmente incluyen estos programas. Con el simple editor de notas de windows, puedes escribir el código, pero es más adecuado un editor un poco más potente que te ponga el código en colores, para facilitar la visión, por eso utilizo <a href="http://www.adobe.com/products/homesite/" target="_blank">HomeSite</a> o <a href="http://notepad2.softonic.com/" target="_blank">notepad2</a>.</p>
<p>El código HTML está constituido por TAGS (etiquetas), todo lo que esté contenido dentro de la etiqueta de inicio y la de cierre estará afectado por ella. Ejemplo de estiquetas:</p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-32">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/b.html"><span style="color: #000000; font-weight: bold;">&lt;b&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/b&gt;</span></span>&nbsp; negrita</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/i.html"><span style="color: #000000; font-weight: bold;">&lt;i&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/i&gt;</span></span> cursiva</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/u.html"><span style="color: #000000; font-weight: bold;">&lt;u&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>/u&gt;</span> subrayado</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span> enlace</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">... </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Las etiquetas pueden tener a su vez atributos, que se incluyen en la etiqueta de inicio, por ejemplo href permite incluir la URL a la que se irá al pinchar en el enlace:</p>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-33">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"http://www.bitacoraweb.com/"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Bitacoraweb<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Pues bien, lo que tienen en común todas las web es la estructura básica, con los tags: <strong>&lt;html&gt;</strong>, que indica que se trata de una página con código html, <strong>&lt;head&gt;</strong>, es la zona donde se incluyen códigos de optimización para buscadores y algunos scripts, <strong>&lt;body&gt;</strong>, zona donde se va a incluir el contenido de la web.</p>
<p> 
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-34">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></a></span>Título de nuestra web<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Este código ya podríamos guardarlo en un archivo <strong>index.html</strong>, si lo abrimos con el el explorador, veremos que la ventana es nombrada mediante la etiqueta <strong>&lt;title&gt;&lt;/title&gt;</strong> dentro de <strong>&lt;head&gt;&lt;/head&gt;</strong></p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/05/27/iniciarse-con-la-maquetacion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A quién te pareces</title>
		<link>http://www.bitacoraweb.com/2008/05/27/a-quien-te-pareces/</link>
		<comments>http://www.bitacoraweb.com/2008/05/27/a-quien-te-pareces/#comments</comments>
		<pubDate>Tue, 27 May 2008 11:57:06 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[reconocimiento facial]]></category>

		<guid isPermaLink="false">http://www.bitacoraweb.com/?p=11</guid>
		<description><![CDATA[Vaya risas que pasamos con esta web en la oficina... y la pregunta es ¿Cómo estará hecho? ¿en que se basan para el reconocimiento facial? Cuando lo hice yo me salio que era clavadito a Mary-Kate Olsen... je je je


 
Está claro que han debido usar un software de reconocimiento facial, igual al que ofrecen en [...]]]></description>
			<content:encoded><![CDATA[<p>Vaya risas que pasamos con esta web en la oficina... y la pregunta es ¿Cómo estará hecho? ¿en que se basan para el reconocimiento facial? Cuando lo hice yo me salio que era clavadito a <a href="http://www.imdb.com/media/rm1380030976/nm0001581" target="_blank">Mary-Kate Olsen</a>... je je je</p>
<p style="text-align: center;"><a href="http://www.myheritage.es/reconocimiento-facial-celebridades"><img class="size-medium wp-image-12 aligncenter" title="myheritage_logo" src="http://www.bitacoraweb.com/wp-content/uploads/2008/05/myheritage_logo.jpg" alt="" width="247" height="82" /></a></p>
<p style="text-align: center;"><a href="http://www.myheritage.es/reconocimiento-facial-celebridades"><img class="size-medium wp-image-13 aligncenter" title="myheritage_sample" src="http://www.bitacoraweb.com/wp-content/uploads/2008/05/myheritage_sample-300x192.jpg" alt="" width="300" height="192" /></a></p>
<p> </p>
<p>Está claro que han debido usar un software de reconocimiento facial, igual al que ofrecen en <a href="http://www.ayonix.com/zoom.php?cat_id=0&amp;subcat_id=0&amp;id=30" target="_blank">esta empresa</a>. Supongo que instándolo en el servidor, podremos utilizarlo con el comando system() o exec() de <strong>PHP</strong>, siempre que estemos con SAFE_MODE desactivado.</p>
<p>Salu2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bitacoraweb.com/2008/05/27/a-quien-te-pareces/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
