HtmlToText
','{','}','?','','!','','&',"'",'"',','); $r = array('u','a','a','','-','e','i','o','u','e','n','n','i','o','1','2','3','4','5','6','7','8','9','0','-','-','','','','','','','','','','','','','','','y','','',''); $s=str_replace($p, $r, $s); $s = strtolower($s); return $s; } function principal () { global $prefix, $db; $selectdate = intval($selectdate); $datedb = (date("d-m-y", $selectdate)); $dateview = (date("f d, y", $selectdate)); include("header.php"); opentable(); $sql = $db->sql_query("select * from ".$prefix."_postales where activo=1 order by id desc limit 5"); echo' '; while ($mostrar = $db->sql_fetchrow($sql)) { $time = $mostrar['fecha']; setlocale (lc_time, $locale); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime(""._linksdatestring."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); $datetime = ucfirst($datetime); echo ' '.$mostrar[titulo].' '; echo' '; opentable2(); if (is_admin($admin)) { echo' [ editar borrar ] '; } echo' '.$mostrar[descripcion].' '.$mostrar[ncat].' '; closetable2(); echo' '; } echo' '; $sql = $db->sql_query("select * from ".$prefix."_postales where activo=1 order by id desc limit 5 , 5"); echo' '; while ($mostrar = $db->sql_fetchrow($sql)) { $time = $mostrar['fecha']; setlocale (lc_time, $locale); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime(""._linksdatestring."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); $datetime = ucfirst($datetime); echo ' '.$mostrar[titulo].' '; echo' '; opentable2(); if (is_admin($admin)) { echo' [ editar borrar ] '; } echo' '.$mostrar[descripcion].' '.$mostrar[ncat].' '; closetable2(); echo' '; } echo' '; closetable(); opentable(); echo' '; echo ' siguiente pgina '; closetable(); $db->sql_freeresult($sql); include("footer.php"); } //ficha de las postales function ficha () { global $prefix, $pagetitle, $descpag, $db, $keypag,$sitename, $slogan, $nukeurl, $module_name, $plantilla, $prefix, $forma_mail, $charset,$sitekey,$gfx_chk; $sql = $db->sql_query("select * from ".$prefix."_postales where id='".strip_tags($_get[pwid])."'"); $mostrar=$db->sql_fetchrow($sql); $time = $mostrar['fecha']; setlocale (lc_time, $locale); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime(""._linksdatestring."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); $datetime = ucfirst($datetime); // titulo de la ficha $pagetitle='postal '.$mostrar[titulo].''; // fin // descripcion de la ficha $descpag='enviar postal '.$mostrar[descripcion].' de '.$mostrar[ncat].'. miles de postales para enviar online gratis. postales de amor, navidad...'; $keypag=''.$mostrar[keywords].', postal de '.$mostrar[ncat].',postal,postales,card,san valentin, tarjeta,tarjetas,amor,cumpleaos,felicitaciones,mama,papa,novia,novio,cario'; // fin include("header.php"); opentable(); if (isset($_post[enviar])) { $amigo2=strip_tags($_post['amigo2']); $nombre=strip_tags($_post['nombre']); $email=strip_tags($_post['email']); $amigo=strip_tags($_post['amigo']); $mensaje=strip_tags($_post['mensaje']); if(!$nombre){ $error .='el campo nombre esta vacio. '; } if ((!$email) or ($email=="") or (!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,6}$",$email))) { $error .= 'no es un email valido. '; } if (strrpos($email,' ') > 0) { $error .= 'no puedes dejar espacios en blanco en el email. '; } if ((!$amigo) or ($amigo=="") or (!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,6}$",$amigo))) { $error .= 'no es un email valido el de destino. '; } if (strrpos($amigo,' ') > 0) { $error .= 'no puedes dejar espacios en blanco en el email de tu amigo. '; } if ($amigo!=$amigo2) { $error .= 'las direcciones de correo introducidas no coinciden. '; } if(count($error)==1) { echo ' '.$error.' '; } if(count($error)==0) { $sql = $db->sql_query("select * from ".$prefix."_postales where id='".strip_tags($_get[pwid])."'"); $mostrar=$db->sql_fetchrow($sql); $visitas=$mostrar[visitas]+1; $db->sql_query("update ".$prefix."_postales set visitas = $visitas where id ='".strip_tags($_get[pwid])."'"); echo ' postal enviada al email: '.$amigo.' volver al inicio '; if($fmail=="" || !eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$fmail) || $ymail=="" || !eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$ymail)){ $stop = " "._errorinvemail." "; } $subject = ''.$_post[nombre].' te envia una postal'; $sql = "select cabecera,color,pie from ".$prefix."_plantilla where tipo='$plantilla'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $cabecera = $row['cabecera']; $color = $row['color']; $pie = $row['pie']; $postale=' '; $fname = htmlentities(strip_tags($_post[nombre]),ent_quotes,$charset); $fmail = htmlentities(strip_tags($_post[amigo]),ent_quotes,$charset); $yname = htmlentities(strip_tags($_post[nombre]),ent_quotes,$charset); $ymail = htmlentities(strip_tags($_post[email]),ent_quotes,$charset); $message = "".stripslashes($cabecera)." ".$_post[nombre]." te envia una postal de milespostales.com ".$_post[mensaje]." ".$postale." ".stripslashes($pie).""; if($forma_mail=="0"){ mail($fmail, $subject, $message, "from: \"$yname\" <$ymail>\ncontent-type: text/html; charset=iso-8859-1\nmime-version: 1.0\r\n"); }else{ include("includes/smtp.php"); smtpmail($fmail, $subject, $message, "content-type: text/html; charset=iso-8859-1"); } } } if (is_admin($admin)) { opentable2(); echo' [ editar - borrar ] '; closetable2(); } echo' postal '.$mostrar[titulo].' '; echo' '.$mostrar[descripcion].' '; echo' tu nombre: tu email: email a enviar: repite el email de tu amigo correctamente: mensaje: '.$mensaje.' '; $db->sql_freeresult($sql); closetable(); include("footer.php"); } function todos () { global $prefix, $pagetitle, $db, $descpag,$keypag; // comprobamos si la variable $pag= esta rellena y si es asi aadimos la pagina actual en el titulo para que no haya titulos repetidos. if(strip_tags(empty($_get[pag]))) { $pagetitle='miles postales, postales de amor, postales de navidad...'; }else{ $pagetitle='postales - pgina '.strip_tags($_get[pag]).' - postales de amor, postales de navidad, amistad, cumpleaos, humor ... - '; } $descpag='las mejores postales ordenados por categorias estas en la pgina '.strip_tags($_get[pag]).', envia una postal en segundos. postales de navidad, de amor...'; $keypag='pagina '.strip_tags($_get[pag]).',postal,tarjeta,postales,card,humor,amor,amistad,paisajes,coches,risas,animales, navidad, navideas'; // fin include("header.php"); opentable(); // paginacion $archivo='postales/pagina/'; // url de paginacion $tabla="".$prefix."_postales"; // tabla de la db $cant=5; // cantidad por pagina $to="where activo='1'"; // require_once("modules/postales/includes/paginacionsql.php"); // fin echo' postales '; echo' '; while ($mostrar = $db->sql_fetchrow($sql)) { $time = $mostrar['fecha']; setlocale (lc_time, $locale); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime(""._linksdatestring."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); $datetime = ucfirst($datetime); echo ' '.$mostrar[titulo].' '; echo' '; opentable2(); if (is_admin($admin)) { echo' [ editar borrar ] '; } echo' '.$mostrar[descripcion].' '.$mostrar[ncat].' '; closetable2(); echo' '; } echo' '; // paginacion echo $pagfinal; // fin $db->sql_freeresult($sql); $db->sql_freeresult($numeracion); closetable(); include("footer.php"); } function categorias () { global $prefix, $db, $pagetitle, $keypag, $descpag; $sql = $db->sql_query("select * from ".$prefix."_postales_categorias where id='".strip_tags($_get[cwid])."'"); $mostrar=$db->sql_fetchrow($sql); $pagetitle=''; if(str