<?
//***************************************************
// http://www.niadesain.com
// Solusi Hemat Script Bisnis Online Anda
// Menerima Jasa Pembuatan Website & Template Website
//***************************************************
?>
<?
function anti_injection($data){
  $filter = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));
  return $filter;
}

function strright($rightstring, $length) {
  return(substr($rightstring, -$length));
}
  $label_domain = anti_injection($_POST['cs_domain']);
  $name         = anti_injection($_POST['name']);
  $email        = anti_injection($_POST['email']);
  $hp           = anti_injection($_POST['hp']);
  $subject_form = anti_injection($_POST['subject']);
//$message_form = anti_injection($_POST['message']);



        //kirim pesan email ke info.scriptindonesia@gmail.com ----------------------------------
        //---------------------------------------------------------------------------------------
//      $to         =   "info.scriptindonesia@gmail.com";
        $to         =   $db->config("email");
        $subject    =   'Kontak a/n ('.$name.') : '.$subject_form.' ';
        $nama       =   htmlentities($name);
        $email      =   htmlentities($email);
        $hp         =   htmlentities($hp);
        $message    =   htmlentities($message);

$message    =   "

$subject_form
---------------------------------------------------
Nama     : $name
Email      : $email
HP           : $hp
---------------------------------------------------\n
Pesan      : \n
$message \n\n
Terima Kasih
$name \n
$label_domain
design by $set_develop\n";


        //---------------------------------------------------------------------------------------
          $from       =  $db->config("email_noreply"); //buat email account di cpanel dulu ya (peraturan baru)
          $headers   .= "From: $label_domain <".$db->config("email_noreply").">";

          @mail($to, $subject, $message, $headers);
        //---------------------------------------------------------------------------------------
        include "kirimpesanberhasil.php";

?>