summary refs log tree commit diff stats
path: root/pages/error.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/error.php')
-rw-r--r--pages/error.php84
1 files changed, 84 insertions, 0 deletions
diff --git a/pages/error.php b/pages/error.php new file mode 100644 index 0000000..7f6c505 --- /dev/null +++ b/pages/error.php
@@ -0,0 +1,84 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 pages/error.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25if (!isset($errorid) && isset($_GET['id']))
26{
27 $errorid = $_GET['id'];
28}
29
30if ($errorid == '404')
31{
32 header("HTTP/1.0 404 Not Found");
33
34 $template = new FITemplate('errors/404');
35
36 $strReferer = strtolower($_SERVER['HTTP_REFERER']);
37
38 if (strlen($strReferer) == 0)
39 {
40 $template->adds_block('NOREFERER',array('exi'=>1));
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))
43 {
44 $arrSite = split("/",$strReferer);
45 $arrParams = split("?",$strReferer);
46 $strSearchTerms = $arrParams[1];
47 $arrParams = split("&",$strSearchTerms);
48 $strSite = $arrSite[2];
49 $sQryStr="";
50 $arrQueryStrings = array("q=","p=","ask=","key=");
51
52 for ($i=0;$i<count($arrParams);$i++)
53 {
54 for ($q=0;$q<count($arrQueryStrings);$q++)
55 {
56 $sQryStr = $arrQueryStrings[$q];
57 if (strpos($arrParams[$i],$sQryStr)==0)
58 {
59 $strSearchTerms = $arrParams[$i];
60 $strSearchTerms = split($sQryStr,$strSearchTerms);
61 $strSearchTerms = $strSearchTerms[1];
62 $strSearchTerms = str_replace("+"," ",$strSearchTerms);
63 }
64 }
65 }
66 $template->adds_block('SEARCHREF',array( 'REF' => $strReferer,
67 'SITE' => $strSite,
68 'TERMS' => $strSearchTerms));
69 } else {
70 $strSite = $strReferer;
71 $strSite = split("/",$strSite);
72 $strSite = $strSite[2];
73
74 if (preg_match('/fourisland\.com/',$strSite) == 1)
75 {
76 $template->adds_block('OURBAD',array('exi'=>1));
77 }
78 $template->adds_block('NORMALREF',array( 'REF' => $strReferer,
79 'SITE' => $strSite));
80 }
81 }
82
83 $template->display();
84}