<?php
####################################################################################
##                                                                                ##
##                      Sample Attribute Filter for Domains                       ##
##                 Filename = [attribute name (lower case)].inc.php			      ##
##                                                                                ##
##                               Available variables:                             ##
##                                                                                ##
##                    $filter_attributeid, $filter_attributename,                 ##
##                    $filter_attributevalue, $filter_productid,				  ##
##                                                                                ##
##                               Available functions:                             ##
##                                                                                ##
##             ashop_duplicatecheck($filter_attributeid, $filter_attributevalue)  ##
##                                                                                ##
##                    Checks for duplicate attribute values.					  ##
##                    Returns the number of duplicates.							  ##
##                                                                                ##
##                                                                                ##
##             ashop_cleanattributes($filter_attributeid, $filter_productid)	  ##
##                                                                                ##
##                    Removes unused attribute values.							  ##
##                                                                                ##
####################################################################################

// Check for non alpha-numeric characters...
preg_match_all('/(?:([-()0-9]+)|.)/i', $filter_attributevalue, $matches);
if (!$filter_attributevalue || $filter_attributevalue != strtolower(implode('', $matches[1]))) {
	echo "<html><head><title>Invalid domain!</title></head>
	<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\">
		<center><font face=\"Arial, Helvetica, sans-serif\" size=\"3\">You must enter a valid phone number.<br><br><font size=\"2\"><a href=\"javascript:history.back()\">Try again!</a></font></font><br></center></body></html>";
	exit;
}
?>