| [ Index ] |
PHP Cross Reference of Nuke-Evolution v2.0.5 |
[Summary view] [Print] [Text view]
1 <?php 2 3 /*======================================================================= 4 Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System 5 =======================================================================*/ 6 7 /************************************************************************ 8 Nuke-Evolution: Evolution Functions 9 ============================================ 10 Copyright (c) 2005 by The Nuke-Evolution Team 11 12 Filename : functions_tap.php 13 Author : Technocrat (www.nuke-evolution.com) 14 Version : 1.0.0 15 Date : 01.26.2005 (mm.dd.yyyy) 16 17 Notes : Evo's Google tap functions 18 ************************************************************************/ 19 20 if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) { 21 exit('Access Denied'); 22 } 23 24 define('TAP_PREFIX', 'Evo-'); 25 26 define('TAP_SCOPE','[a-z0-9_-]'); 27 28 /*========================================================================== 29 $lazy_tap = 0; = Tap Off 30 $lazy_tap = 1; = Bots ONLY see the tap 31 $lazy_tap = 2; = Everyone sees the tap 32 $lazy_tap = 3; = Admin's only see the tap && bots 33 ==========================================================================*/ 34 35 if ($lazy_tap && !defined('ADMIN_FILE') && !defined('FORUM_ADMIN') && !defined('IN_ADMIN') && !defined('CNBYA')) { 36 37 function tap($buffer) { 38 $buffer = str_replace('&&', '&',$buffer); 39 $find = array('/("|\')index.php("|\')/','/("|\')modules.php\?name=('.TAP_SCOPE.'+)("|\')/i'); 40 41 $base = '/("|\')modules.php\?name=('.TAP_SCOPE.'+)'; 42 $add = '(&|&|&&|&&)('.TAP_SCOPE.'+)=('.TAP_SCOPE.'+)'; 43 $close = '("|\')/i'; 44 $close2 = '\#('.TAP_SCOPE.'+)("|\')/i'; 45 for ($i = 1; $i < 5; $i++) { 46 $combined = $base; 47 for ($j = 0; $j < $i; $j++) { 48 $combined .= $add; 49 } 50 $find[] = $combined . $close; 51 $find[] = $combined . $close2; 52 } 53 54 $replace = array('$1'.TAP_PREFIX.'index.html$2','$1'.TAP_PREFIX.'$2.html$3'); 55 $base = '$1'.TAP_PREFIX.'$2'; 56 $close = '.html'; 57 $close2 = '.html#'; 58 for ($i = 2; $i < 6; $i++) { 59 $combined = $base; 60 for ($j = 4; $j < ($i * 3); $j = $j + 3) { 61 $combined .= '_-_$'.$j.'_-_$'.($j+1); 62 $last = $j + 2; 63 } 64 $replace[] = $combined . $close . '$' . $last; 65 $replace[] = $combined . $close2 . '$' . $last . '$' . ($last+1); 66 } 67 68 //$buffer = preg_replace('/"modules.php\?name=([a-z0-9]+)&([a-z0-9]+)=([a-z0-9]+)&([a-z0-9]+)=([a-z0-9]+)"/i','="modules_name_$1_$2_$3_$4_$5.html"',$buffer); 69 $buffer = preg_replace($find,$replace,$buffer); 70 return $buffer; 71 } 72 73 $user_agent = identify::identify_agent(); 74 75 $tap_fire = 0; 76 if(($lazy_tap == 1 || $lazy_tap == 3) && !defined('ADMIN_FILE')) { 77 if($user_agent['engine'] == 'bot') { 78 $tap_fire = 1; 79 } else if(is_admin() && $lazy_tap == 3) { 80 $tap_fire = 1; 81 } 82 } else if ($lazy_tap == 2) { 83 $tap_fire = 1; 84 } 85 86 if($tap_fire && !defined('ADMIN_FILE')) { 87 ob_start("tap"); 88 } 89 } 90 91 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jun 6 11:38:01 2007 | Cross-referenced by PHPXref 0.7 |