diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2008-12-21 11:18:19 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2008-12-21 11:18:19 -0500 |
commit | 7d049520112991edf1f1fd1f446bb892fc680b9c (patch) | |
tree | df8206b5d12ada89bd34820af5449469ce9f1403 /pages | |
parent | 7b0c0ef6aeee750eed8258d2e125144bd95a7a43 (diff) | |
download | fourisland-7d049520112991edf1f1fd1f446bb892fc680b9c.tar.gz fourisland-7d049520112991edf1f1fd1f446bb892fc680b9c.tar.bz2 fourisland-7d049520112991edf1f1fd1f446bb892fc680b9c.zip |
Re-did 404 page
For some reason, the 404 page was previously filled with terrible semantics, IE classes and it didn't look great. Now, the HTML has been improved. The Search clause has been fixed, there was a bug with displaying the search terms. Also, the error document has been set to the 404 page so the 404 page is actually shown when a page cannot be found.
Diffstat (limited to 'pages')
-rwxr-xr-x | pages/error.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pages/error.php b/pages/error.php index 7f6c505..969b7da 100755 --- a/pages/error.php +++ b/pages/error.php | |||
@@ -41,10 +41,10 @@ if ($errorid == '404') | |||
41 | } else { | 41 | } else { |
42 | if ((strpos($strReferer,".looksmart.co")>0) || (strpos($strReferer,".ifind.freeserve")>0) || (strpos($strReferer,".ask.co")>0) || (strpos($strReferer,"google.co")>0) || (strpos($strReferer,"altavista.co")>0) || (strpos($strReferer,"msn.co")>0) || (strpos($strReferer,"yahoo.co")>0)) | 42 | if ((strpos($strReferer,".looksmart.co")>0) || (strpos($strReferer,".ifind.freeserve")>0) || (strpos($strReferer,".ask.co")>0) || (strpos($strReferer,"google.co")>0) || (strpos($strReferer,"altavista.co")>0) || (strpos($strReferer,"msn.co")>0) || (strpos($strReferer,"yahoo.co")>0)) |
43 | { | 43 | { |
44 | $arrSite = split("/",$strReferer); | 44 | $arrSite = explode("/",$strReferer); |
45 | $arrParams = split("?",$strReferer); | 45 | $arrParams = explode("?",$strReferer); |
46 | $strSearchTerms = $arrParams[1]; | 46 | $strSearchTerms = $arrParams[1]; |
47 | $arrParams = split("&",$strSearchTerms); | 47 | $arrParams = explode("&",$strSearchTerms); |
48 | $strSite = $arrSite[2]; | 48 | $strSite = $arrSite[2]; |
49 | $sQryStr=""; | 49 | $sQryStr=""; |
50 | $arrQueryStrings = array("q=","p=","ask=","key="); | 50 | $arrQueryStrings = array("q=","p=","ask=","key="); |
@@ -54,12 +54,14 @@ if ($errorid == '404') | |||
54 | for ($q=0;$q<count($arrQueryStrings);$q++) | 54 | for ($q=0;$q<count($arrQueryStrings);$q++) |
55 | { | 55 | { |
56 | $sQryStr = $arrQueryStrings[$q]; | 56 | $sQryStr = $arrQueryStrings[$q]; |
57 | if (strpos($arrParams[$i],$sQryStr)==0) | 57 | if (strpos($arrParams[$i],$sQryStr) === 0) |
58 | { | 58 | { |
59 | $strSearchTerms = $arrParams[$i]; | 59 | $strSearchTerms = $arrParams[$i]; |
60 | $strSearchTerms = split($sQryStr,$strSearchTerms); | 60 | $strSearchTerms = explode($sQryStr,$strSearchTerms); |
61 | $strSearchTerms = $strSearchTerms[1]; | 61 | $strSearchTerms = $strSearchTerms[1]; |
62 | $strSearchTerms = str_replace("+"," ",$strSearchTerms); | 62 | $strSearchTerms = str_replace("+"," ",$strSearchTerms); |
63 | |||
64 | break; | ||
63 | } | 65 | } |
64 | } | 66 | } |
65 | } | 67 | } |