49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* AgileBill - Open Billing Software
|
|
*
|
|
* This body of work is free software; you can redistribute it and/or
|
|
* modify it under the terms of the Open AgileBill License
|
|
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
|
*
|
|
* Originally authored by Tony Landis, AgileBill LLC
|
|
*
|
|
* Recent modifications by Deon George
|
|
*
|
|
* @author Deon George <deonATleenooksDOTnet>
|
|
* @copyright 2009 Deon George
|
|
* @link http://osb.leenooks.net
|
|
*
|
|
* @link http://www.agileco.com/
|
|
* @copyright 2004-2008 Agileco, LLC.
|
|
* @license http://www.agileco.com/agilebill/license1-4.txt
|
|
* @author Tony Landis <tony@agileco.com>
|
|
* @package AgileBill
|
|
* @subpackage Module:BlockedEmail
|
|
*/
|
|
|
|
/**
|
|
* The main AgileBill Blocked Email Class
|
|
*
|
|
* @package AgileBill
|
|
* @subpackage Module:BlockedEmail
|
|
*/
|
|
class blocked_email extends OSB_module {
|
|
/**
|
|
* Is Email Blocked?
|
|
*/
|
|
public function is_blocked($email) {
|
|
if ($email && ! preg_match('/@/',$email))
|
|
return true;
|
|
|
|
$dom = explode('@',$email);
|
|
$db = &DB();
|
|
$result = $db->Execute(sqlSelect($db,'blocked_email','id',sprintf('email=::%s:: OR email=::%s::',$email,$dom[1])));
|
|
if ($result && $result->RecordCount() > 0)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
}
|
|
?>
|