Размер файла: 1.42Kb
<?php
/**
* Wap Portal русская версия
*
* Copyright (C) 2002 - 2005 Красников Виктор
*
* Wap Portal
* Developer: Красников Виктор - [email protected]
* Homepage: http://tut.spb.su
* Date: 05/05/2005
* Version #: 1.0
**/
$wmlsession = 1;
require("../regglobals.php");
// send wml headers
header("Content-type: text/vnd.wap.wml\n");
echo("<?xml version=\"1.0\"?>\n");
echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
?>
<wml>
<card id="sendmail" title="Send E-mail">
<p>
<?
if ($your_email && $send_to && $message) {
if (NotValidEmail($your_email) || NotValidEmail($send_to)) {
print "Please enter valid e-mail!";
} else {
$message = $message."\n
Check out Wap Portal Server
http://www.sakic.net/wps";
// determine whether email was properly sent
if (@mail($send_to, $subject, $message,
"From: $your_email\n"
."X-Mailer: PHP/" . phpversion())) :
print "E-mail has been successfully sent.";
else :
print "Error! E-mail could not be sent.";
endif;
}
} else {
print "Please go back and complete all fields!";
}
?>
</p>
<p align="center">
<anchor>Back
<prev/>
</anchor>
</p>
</card>
</wml>
<?
function NotValidEmail($email) {
if (eregi("^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3}))$", $email)) {
return FALSE;
} else {
return TRUE;
}
}
?>