Пример #1
0
 function index()
 {
     $name = at($_POST, 'name');
     $email = at($_POST, 'email');
     $c = at($_POST, 'comments');
     if ($this->isPostRequest() && V\isValidEmailAddr($email)) {
         if (strlen($c) < 25 || count(explode(' ', $c)) < 5) {
             return $this->renderForm("That's all you're gonna write?");
         } else {
             if (stristr($c, '<a ')) {
                 return $this->renderForm('Sorry, no links allowed. Too many spammers out there.');
             } else {
                 sendTextEmail('*****@*****.**', $this->sendCommentsTo, 'A BitcoinChipin.com inquiry', "Someone has submitted the Contact form at BitcoinChipin.com. Details follow...\n\n" . "Name: {$name}\n" . "Email: {$email}\n\n" . "Comments:\n" . $c);
                 return $this->renderForm();
             }
         }
     } else {
         return $this->renderForm();
     }
 }
Пример #2
0
 /**
  * This is just a temporary measure to keep an eye on registrations (make sure we're not
  * getting spammed) until we have a more robust, scalable mechanism for blocking spam
  * and keeping a general eye on things.
  */
 private function userCreatedNotification(User $user)
 {
     sendTextEmail('*****@*****.**', '*****@*****.**', 'New BitcoinChipin.com Account Created', "A new user has been created...\n\n" . asString($user));
 }