Jumat, 18 November 2011

[ PHP ] Mailer

# Author : Poticous
# Tool Name : Mailer
# Version : 1.0

Password = poticous

<?php
session_start();
?>
<html>
<head>
<title>Poticous Mailer</title>
<style>
body{
    background-color:#000000;
    color:#00FF00;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 11px;
}
.kotak{
    border:1px dashed #00FF00;
    background-color:#000000;
    font-size: 11px;
    padding:5px;
    width:180px;
}
input{
    background-color:#000000;
    color:#FF0000;
    border:1px dashed #00FF00;
    width:130px;
}
.submit{
    background-color:#000000;
    color:#FF0000;
    border:1px dashed #00FF00;
    width:20px;
}
textarea{
    background-color:#000000;
    color:#FF0000;
    border:1px dashed #00FF00;
    width:150px;
    height:100px;
}
</style>
</head>
<body>
<?
$password = "poticous";
if($_POST['password'] == $password){
$_SESSION['poticous'] = "$password";
}
if(!isset($_SESSION['poticous'])){
?>
<center>
<table width="100px" class="kotak">
<tr>
<td>
<center><b>Login Poticous Mailer</b></center><br>
<form action="" method="post">
<label>Password:<br>
<input type="password" name="password"><input type="submit" name="login" value=">>" class="submit">
</label>
</form>
<font color="orange"><b>Host :</b> <?php echo $_SERVER["HTTP_HOST"];?><br>
<font color="orange"><b>Your ip :</b> <?php echo $_SERVER['REMOTE_ADDR'];?>
</td>
</tr>
</table>
<?
}else{
?>
<center>
<table width="100px" class="kotak">
<tr>
<td>
<center><b>Poticous Mailer</b></center><br>
<form action="" method="post">
<label>Email Tujuan<br>
<input type="text" name="kepada">
</label><br><br>
<label>Email Pengirim<br>
<input type="text" name="dari">
</label><br><br>
<label>Nama Pengirim<br>
<input type="text" name="nama">
</label><br><br>
<label>Judul<br>
<input type="text" name="judul">
</label><br><br>
<label>Jumlah<br>
<input type="text" name="jumlah" value="1">
</label><br><br>
<label>Pesan<br>
<textarea name="pesan"></textarea>
</label><br><br>
<input type="submit" name="kirim" value="Kirim...!">
</form>
</td>
</tr>
</table>
<?
$kepada = $_POST['kepada'];
$dari = "Reply-To:" .$_POST['dari']."";
$dari = "From:" .$_POST['dari']."";
$judul = $_POST['judul'];
$pesan = $_POST['pesan'];
$jumlah = $_POST['jumlah'];
if(empty($kepada)){
$error = "<b><font color=\"red\">[-]</font> <font color=\"orange\">Email Tujuan Belum Di Isi!</font></b>";
}else if(empty($dari)){
$error = "<b><font color=\"red\">[-]</font> <font color=\"orange\">Email/Nama Pengirim Belum Di Isi!</font></b>";
}else if(empty($judul)){
$error = "<b><font color=\"red\">[-]</font> <font color=\"orange\">Judul Belum Di Isi!</font></b>";
}else if(strlen($jumlah >= 10)){
$error = "<b><font color=\"red\">[-]</font> <font color=\"orange\">Jumlah Jangan Lebih Dari 10!</font></b>";
}
if($_POST['kirim']){
if(isset($error)){
?>
<br>
<br>
<table width="100px" class="kotak">
<tr>
<td>
<center>
<font color="red" size="3"><b>Pemberitahuan !!!</b></font><br><br>
<?php
echo $error;
}else{
for ($i = 1; $i <= $jumlah; $i++){
mail($kepada,$judul,$pesan,$dari);
}
?>
<br>
<br>
<table width="100px" class="kotak">
<tr>
<td>
<center>
<font color="red" size="3"><b>Pemberitahuan !!!</b></font><br><br>
<b><font color="green">[+]</font> <font color="orange">Berhasil Mengirim Email Sebanyak <?php echo $jumlah; ?> !</font></b>
<?
}
?>
</center>
</td>
</tr>
</table>
<?
}
}
if(isset($_GET['logout'])){
unset($_SESSION['poticous']);
}
?>

0 komentar:

Posting Komentar