الكود

1 view
Skip to first unread message

akram

unread,
Sep 21, 2010, 12:57:09 PM9/21/10
to php-a...@googlegroups.com

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Akram</title>

<meta name="keywords" content="css templates, contact page, free templates, world template" />

<meta name="description" content="World Template, Contact Page - free CSS templates from templatemo.com" />

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

<style type="text/css">

#templatemo_wrapper #templatemo_main #templatemo_content .two_column.float_l h6 strong {

                font-family: Arial, Helvetica, sans-serif;

}

</style>

</head>

 

 

<body>

<?php

function ae_send_mail($from, $to, $subject, $text, $headers="")

{

    if (strtolower(substr(PHP_OS, 0, 3)) === 'win')

        $mail_sep = "\r\n";

    else

        $mail_sep = "\n";

 

    function _rsc($s)

    {

        $s = str_replace("\n", '', $s);

        $s = str_replace("\r", '', $s);

        return $s;

    }

 

    $h = '';

    if (is_array($headers))

    {

        foreach($headers as $k=>$v)

            $h = _rsc($k).': '._rsc($v).$mail_sep;

        if ($h != '') {

            $h = substr($h, 0, strlen($h) - strlen($mail_sep));

            $h = $mail_sep.$h;

        }

    }

 

    $from = _rsc($from);

    $to = _rsc($to);

    $subject = _rsc($subject);

    mail($to, $subject, $text, 'From: '.$from.$h);

}

?>

 

<div id="templatemo_wrapper">

 

                <div id="templatemo_header">

        <div id="site_title"><a href="index.php"><img src="images/templatemo_logo.png" alt="World Template" /><span>Let's start with PHP</span></a></div> <!-- end of site_title -->

    </div> <!-- end of templatemo_header -->

   

    <div id="templatemo_main">

   

                <div id="templatemo_sidebar">

       

            <div id="templatemo_menu">

                <ul>

                    <li><a href="index.php">Home</a></li>

                    <li><a href="gallery1.php">Gallery 1</a></li>

                    <li><a href="gallery2.php">Gallery 2</a></li>

                    <li><a href="contact.php" class="current">Contact Us</a></li>

                </ul>

          </div> <!-- end of templatemo_menu --></div> <!-- end of templatemo_sidebar -->

       

        <div id="templatemo_content">

          <div class="two_column float_l">

           

        <h6><strong><em><u><font size="4">Akram jleilaty</font></u></em></strong></h6>

        <p>&nbsp;</p>

        <p><u><em><strong><font size="4">Aleppo - syria</font></strong></em></u></p>

        <p><u><em><strong><font size="4">Mobile : (963)-992-322760</font></strong></em></u></p>

        <p><u><em><strong><font size="4">Home : (963)-21-5742307</font></strong></em></u></p>

        <p><u><em><strong><font size="4">Email : akram.j...@gmail.com</font></strong></em></u></p>

        <p>&nbsp;</p>

          </div>

          <div id="contact_form">

           

    <h2>Contact Form</h2>

   

          <?php $site_admin = 'akram.j...@gmail.com';

 

// function ae_send_mail (see code above) is pasted here

 

if (($_SERVER['REQUEST_METHOD'] == 'POST') &&

    isset($_POST['subject']) && isset($_POST['text']) &&

    isset($_POST['from1']) && isset($_POST['from2']))

    {

        $from = $_POST['from1'].' <'.$_POST['from2'].'>';

        // nice RFC 2822 From field

 

        ae_send_mail($from, $site_admin, $_POST['subject'], $_POST['text'],

        array('X-Mailer'=>'PHP script at '.$_SERVER['HTTP_HOST']));

        $mail_send = true;

    }

?>

<html><head><title>Send us mail</title>

</head><body>

<?php

if (isset($mail_send)) {

    echo '<h1>Form has been sent, thank you</h1>';

}

else {

?>

<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">

Your Name: <input type="text" name="from1" size="30" /><br />

Your Email: <input type="text" name="from2" size="30" /><br />

Subject: <input type="text" name="subject" size="30" /><br />

Text: <br />

<textarea rows="5" cols="40" name="text"></textarea>

<input type="submit" value="send" />

</form>

<?php } ?>     

                

 

            </div>

                        

        

        </div> <!-- end of templatemo_content -->

   

                <div class="cleaner"></div>

    </div> <!-- end of templatemo_main -->

   

    <div id="templatemo_footer">

      <div id="templatemo_footer2">

        <div id="templatemo_footer3"> Copyright © 2010 <a href="#">akram.jleilaty</a> |

          Designed by <a href="#">akram.jleilaty</a></div>

      </div>

      <!-- end of templatemo_footer -->

</div> <!-- end of templatemo_footer -->

               

    <div class="cleaner"></div>

</div> <!-- end of templatemo_wrapper -->

 

</body>

</html>

Reply all
Reply to author
Forward
0 new messages