# HG changeset patch # User Alex McMahon # Date 1277998273 0 # Node ID e8da4f096fde77fe13a44177ca31d81494dcfaa0 # Parent 5c3c1b82fea26717174e623f0d0ce537bc1e25b3 error code diff -r 5c3c1b82fea2 -r e8da4f096fde add_search.php --- a/add_search.php Thu Jul 01 14:17:07 2010 +0000 +++ b/add_search.php Thu Jul 01 15:31:13 2010 +0000 @@ -45,7 +45,9 @@ if (!validUrl($search_term)) { die(header ('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/details.php?alert=urlerror')); } - + else if ($search_term == "http://www.yourwebsite.com") { + die(header ('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/details.php?alert=urlerror-2')); + } // check to see if private or public if ($search_type == "private") diff -r 5c3c1b82fea2 -r e8da4f096fde details.php --- a/details.php Thu Jul 01 14:17:07 2010 +0000 +++ b/details.php Thu Jul 01 15:31:13 2010 +0000 @@ -190,7 +190,11 @@ } else if ($status == "urlerror") { print "
You have entered an malformed url. Please use this format: http://www.yourwebsite.com
"; - } + } else if ($status == "urlerror-2") + { + print "
You have entered the example url: http://www.yourwebsite.com which is provided as an example. Please enter a valid url
"; + } + ?>