Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Gente,
Tenho uma pagina que contem codigo html e codigo php, só que agora eu preciso separa os 2(ter um Html e um PHP), mas nao estou conseguindo...
O Codigo se refere a uma pagina que contem um formulario que envia automaticamente o curriculo pra um email...
olhem ae e me ajudem...
<html>
<head>
<title>Claudio Cru Advogados</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ImageReady Preload Script (site.psd) -->
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="preloadImages();">
<table width="779" height="326" border="0" align="center" cellpadding="0" cellspacing="0" id="Tabela_01">
<tr>
<td height="74" colspan="12">
<a href="index.html"><img src="images/site_01.gif" alt="" width="779" height="74" border="0"></a></td>
</tr>
<tr>
<td height="19" colspan="12">
<img src="images/site_02.gif" width="779" height="19" alt=""></td>
</tr>
<tr>
<td height="24">
<img src="images/site_03.gif" width="55" height="24" alt=""></td>
<td>
<a href="escritorio.html"
onmouseover="changeImages('site_04', 'images/site_04-over.gif'); return true;"
onmouseout="changeImages('site_04', 'images/site_04.gif'); return true;"
onmousedown="changeImages('site_04', 'images/site_04-over.gif'); return true;"
onmouseup="changeImages('site_04', 'images/site_04-over.gif'); return true;">
<img name="site_04" src="images/site_04.gif" width="78" height="24" border="0" alt=""></a></td>
<td>
<img src="images/site_05.gif" width="60" height="24" alt=""></td>
<td>
<a href="atuacao.html"
onmouseover="changeImages('site_06', 'images/site_06-over.gif'); return true;"
onmouseout="changeImages('site_06', 'images/site_06.gif'); return true;"
onmousedown="changeImages('site_06', 'images/site_06-over.gif'); return true;"
onmouseup="changeImages('site_06', 'images/site_06-over.gif'); return true;">
<img name="site_06" src="images/site_06.gif" width="131" height="24" border="0" alt=""></a></td>
<td>
<img src="images/site_07.gif" width="60" height="24" alt=""></td>
<td>
<a href="editorial.html"
onmouseover="changeImages('site_08', 'images/site_08-over.gif'); return true;"
onmouseout="changeImages('site_08', 'images/site_08.gif'); return true;"
onmousedown="changeImages('site_08', 'images/site_08-over.gif'); return true;"
onmouseup="changeImages('site_08', 'images/site_08-over.gif'); return true;">
<img name="site_08" src="images/site_08.gif" width="68" height="24" border="0" alt=""></a></td>
<td colspan="2">
<img src="images/site_09.gif" width="64" height="24" alt=""></td>
<td>
<a href="localizacao.html"
onmouseover="changeImages('site_10', 'images/site_10-over.gif'); return true;"
onmouseout="changeImages('site_10', 'images/site_10.gif'); return true;"
onmousedown="changeImages('site_10', 'images/site_10-over.gif'); return true;"
onmouseup="changeImages('site_10', 'images/site_10-over.gif'); return true;">
<img name="site_10" src="images/site_10.gif" width="98" height="24" border="0" alt=""></a></td>
<td>
<img src="images/site_11.gif" width="43" height="24" alt=""></td>
<td>
<a href="contatos.php"
onmouseover="changeImages('site_12', 'images/site_12-over.gif'); return true;"
onmouseout="changeImages('site_12', 'images/site_12.gif'); return true;"
onmousedown="changeImages('site_12', 'images/site_12-over.gif'); return true;"
onmouseup="changeImages('site_12', 'images/site_12-over.gif'); return true;">
<img name="site_12" src="images/site_12.gif" width="81" height="24" border="0" alt=""></a></td>
<td>
<img src="images/site_13.gif" width="41" height="24" alt=""></td>
</tr>
<tr>
<td height="19" colspan="12">
<img src="images/site_14.gif" width="779" height="19" alt=""></td>
</tr>
<tr>
<td height="115" colspan="12"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0) width="779" height="115">
<param name="movie" value="anima4.swf" />
<param name="quality" value="high" />
<embed src="anima4.swf" quality="high" pluginspage="[http://www.macromedia.com/go/getflashplayer"](http://www.macromedia.com/go/getflashplayer) type="application/x-shockwave-flash" width="779" height="115"></embed>
</object></td>
</tr>
<tr>
<td height="16" colspan="12">
<img src="images/site_16a.gif" width="779" height="12" alt=""></td>
</tr>
<tr>
<td height="34" colspan="12" bgcolor="#EEECE0"><img src="images/tit_contatos.jpg" width="779" height="44"><br>
<table width="736" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><p align="justify" class="style1"><br>
<br>
<br>
<br></p>
<p class="style1">
<a href=""><strong><em></em></strong></a><br>
</p>
<p class="style1"><strong>RECRUTAMENTO</strong><br>
<br>
Se você tem interesse em trabalhar conosco, seja no departamento jurídico ou administrativo e secretariado, envie seu Curriculum Vitae em formato .DOC/Word:</p>
<FORM METHOD="post" ENCTYPE="multipart/form-data">
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="1000000">
<INPUT TYPE="hidden" NAME="action" VALUE="upload">
<table width="332" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="110"><span class="style4">Nome:</span></td>
<td width="222"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#999999">
<input type="text" class=login name="nome">
</font></td>
</tr>
<tr>
<td><span class="style4">E-mail:</span></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#999999">
<input type="text" class=login name="from">
</font></td>
</tr>
<tr>
<td><span class="style4">Área de Interesse :</span></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#999999">
<input type="text" class=login name="ai">
</font></td>
</tr>
<tr>
<td><span class="style4">Anexar arquivo:</span></td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#999999">
<input type="file" name="anexo" class=login >
</font></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#999999">
<input type="submit" class=login name="Submit" value="Enviar">
</font></td>
</tr>
</table>
</FORM>
<?php
$action = $_POST["action"];
if ($action == "upload"){
$nome = $_POST["nome"];
$ai = $_POST["ai"];
$email = $_POST["from"];
$mime_list = array("html"=>"text/html","htm"=>"text/html", "txt"=>"text/plain", "rtf"=>"text/enriched","csv"=>"text/tab-separated-values","css"=>"text/css","gif"=>"image/gif");
$ABORT = FALSE;
$boundary = "XYZ-" . date(dmyhms) . "-ZYX";
$body = "Nome:$nome
Email:$email
Area de Interesse:$ai
Curriculo Anexado.
";
$message = "--$boundary\n";
$message .= "Content-Transfer-Encoding: 8bits\n";
$message .= "Content-Type: text/plain; charset=\"ISO-8859-1\"\n\n";
$message .= $body;
$message .= "\n";
$attachments[1] = $anexo;
foreach ($attachments as $key => $full_path) {
if ($full_path !='') {
if (file_exists($full_path)){
if ($fp = fopen($full_path,"rb")) {
$filename = array_pop(explode(chr(92),$full_path));
$contents = fread($fp,filesize($full_path));
$encoded = base64_encode($contents);
$encoded_split = chunk_split($encoded);
fclose($fp);
$message .= "--$boundary\n";
$message .= "Content-Type: $anexo_type\n";
$message .= "Content-Disposition: attachment; filename=\"$anexo_name\" \n";
$message .= "Content-Transfer-Encoding: base64\n\n";
$message .= "$encoded_split\n";
}else{
echo "Impossível abrir o arquivo$key: $filename";
$ABORT = TRUE;
}
}else{
echo "O arquivo $key não existe: $filename";
$ABORT = TRUE;
}
}
}
$message .= "--$boundary--\r\n";
$headers = "MIME-Version: 1.0\n";
$headers .= "From: <$email>\r\n";
$headers .= "Content-type: multipart/mixed; boundary=\"$boundary\"\r\n";
mail("email@email.com","Curriculo - Site", $message, $headers);
echo "Currículo enviado com sucesso";
}
?>
</body>
</html>desculpa se o codigo é grande... mas fikem atentos soh ao php
ficarei mais uma vez grato, se puderem me explicar ou ajudar http://forum.imasters.com.br/public/style_emoticons/default/blush.gif
Carregando comentários...