Initial Commit of AgileBill Open Source
This commit is contained in:
88
plugins/whois/DEFAULT.php
Normal file
88
plugins/whois/DEFAULT.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?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
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* @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
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
class plgn_whois_DEFAULT
|
||||
{
|
||||
function check($domain,$tld,$tld_array)
|
||||
{
|
||||
//return true;
|
||||
// check the domain validity:
|
||||
if(!eregi('^[a-zA-Z0-9\-]{1,}$', $domain)) return false;
|
||||
if(eregi('[-]{2,}', $domain)) return false;
|
||||
if(eregi('^[-]{1,}', $domain)) return false;
|
||||
if(eregi('[-]{1,}$', $domain)) return false;
|
||||
|
||||
|
||||
$data = $this->whois($tld_array["whois_server"],$domain . '.' . $tld);
|
||||
if(!$data) return false;
|
||||
if(eregi($tld_array["avail_response"], $data))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function check_transfer($domain,$tld,$tld_array)
|
||||
{
|
||||
//return true;
|
||||
// check the domain validity:
|
||||
if(!eregi('^[a-zA-Z0-9\-]{1,}$', $domain)) return false;
|
||||
if(eregi('[-]{2,}', $domain)) return false;
|
||||
if(eregi('^[-]{1,}', $domain)) return false;
|
||||
if(eregi('[-]{1,}$', $domain)) return false;
|
||||
|
||||
|
||||
$data = $this->whois($tld_array["whois_server"],$domain . '.' . $tld);
|
||||
if(!$data) return false;
|
||||
if(eregi($tld_array["avail_response"], $data))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function whois($server,$domain)
|
||||
{
|
||||
$data = " ";
|
||||
$fp = fsockopen($server, 43);
|
||||
if($fp) {
|
||||
fputs($fp, $domain."\r\n");
|
||||
while(!feof($fp)) $data .= fread($fp, 1000);
|
||||
fclose($fp);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
// not implemented
|
||||
function details()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
56
plugins/whois/SUBDOMAIN.php
Normal file
56
plugins/whois/SUBDOMAIN.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?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
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* @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
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
class plgn_whois_SUBDOMAIN
|
||||
{
|
||||
function check($domain,$tld,$tld_array)
|
||||
{
|
||||
// check the domain validity:
|
||||
if(!eregi('^[a-zA-Z0-9\-]{1,}$', $domain)) return false;
|
||||
if(eregi('[-]{2,}', $domain)) return false;
|
||||
if(eregi('^[-]{1,}', $domain)) return false;
|
||||
if(eregi('[-]{1,}$', $domain)) return false;
|
||||
|
||||
$db = &DB();
|
||||
$dbm = new CORE_database;
|
||||
$sql = $dbm->sql_select('service', 'id', "domain_name = ::$domain:: AND domain_tld = ::$tld::","", $db);
|
||||
$rs = $db->Execute($sql);
|
||||
if($rs == false || $rs->RecordCount() > 0)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
function check_transfer($domain,$tld,$tld_array)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// not implemented
|
||||
function details()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
69
plugins/whois/WHOIS_CO_ZA.php
Normal file
69
plugins/whois/WHOIS_CO_ZA.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* @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
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
class plgn_whois_WHOIS_CO_ZA
|
||||
{
|
||||
function check($domain,$tld,$tld_array)
|
||||
{
|
||||
|
||||
// check the domain validity:
|
||||
if(!eregi('^[a-zA-Z0-9\-]{1,}$', $domain)) return false;
|
||||
if(eregi('[-]{2,}', $domain)) return false;
|
||||
if(eregi('^[-]{1,}', $domain)) return false;
|
||||
if(eregi('[-]{1,}$', $domain)) return false;
|
||||
if($tld != "co.za") return false;
|
||||
|
||||
$data = $this->whois( $domain );
|
||||
if($data) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_transfer($domain,$tld,$tld_array)
|
||||
{
|
||||
// check the domain validity:
|
||||
if(!eregi('^[a-zA-Z0-9\-]{1,}$', $domain)) return false;
|
||||
if(eregi('[-]{2,}', $domain)) return false;
|
||||
if(eregi('^[-]{1,}', $domain)) return false;
|
||||
if(eregi('[-]{1,}$', $domain)) return false;
|
||||
if($tld != "co.za") return false;
|
||||
|
||||
$data = $this->whois( $domain );
|
||||
if(!$data) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function whois($domain)
|
||||
{
|
||||
$lines = file('http://whois.co.za/cgi-bin/whois.sh?Domain='.$domain);
|
||||
foreach ($lines as $line_num => $line) {
|
||||
if(eregi("Nothing matched", $line)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// not implemented
|
||||
function details()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user