| [ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* PHP-NUKE: Advanced Content Management System */ 5 /* ============================================ */ 6 /* */ 7 /* Copyright (c) 2005 by Francisco Burzi */ 8 /* http://phpnuke.org */ 9 /* */ 10 /* This program is free software. You can redistribute it and/or modify */ 11 /* it under the terms of the GNU General Public License as published by */ 12 /* the Free Software Foundation; either version 2 of the License. */ 13 /************************************************************************/ 14 15 require_once ("mainfile.php"); 16 global $prefix, $db, $admin_file; 17 18 if (isset($op) AND ($op == "ad_click") AND isset($bid)) { 19 $bid = intval($bid); 20 $sql = "SELECT clickurl FROM ".$prefix."_banner WHERE bid='$bid'"; 21 $result = $db->sql_query($sql); 22 list($clickurl) = $db->sql_fetchrow($result); 23 $db->sql_query("UPDATE ".$prefix."_banner SET clicks=clicks+1 WHERE bid='$bid'"); 24 update_points(21); 25 Header("Location: ".htmlentities($clickurl)); 26 die(); 27 } 28 29 $modpath = ''; 30 define('MODULE_FILE', true); 31 $_SERVER['PHP_SELF'] = "modules.php"; 32 $row = $db->sql_fetchrow($db->sql_query("SELECT main_module from ".$prefix."_main")); 33 $name = $row['main_module']; 34 define('HOME_FILE', true); 35 36 if (isset($url) AND is_admin($admin)) { 37 Header("Location: $url"); 38 die(); 39 } 40 41 if ($httpref == 1) { 42 if (isset($_SERVER['HTTP_REFERER'])) { 43 $referer = $_SERVER['HTTP_REFERER']; 44 $referer = check_html($referer, "nohtml"); 45 } 46 if (!empty($referer) && !stripos_clone($referer, "unknown") && !stripos_clone($referer, "bookmark") && !stripos_clone($referer, $_SERVER['HTTP_HOST'])) { 47 $result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '".$referer."')"); 48 } 49 $numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_referer")); 50 if($numrows>=$httprefmax) { 51 $result2 = $db->sql_query("DELETE FROM ".$prefix."_referer"); 52 } 53 } 54 if (!isset($mop)) { $mop="modload"; } 55 if (!isset($mod_file)) { $mod_file="index"; } 56 $name = trim($name); 57 if (isset($file)) { $file = trim($file); } 58 $mod_file = trim($mod_file); 59 $mop = trim($mop); 60 if (stripos_clone($name,"..") || (isset($file) && stripos_clone($file,"..")) || stripos_clone($mod_file,"..") || stripos_clone($mop,"..")) { 61 die("You are so cool..."); 62 } else { 63 $ThemeSel = get_theme(); 64 if (file_exists("themes/$ThemeSel/module.php")) { 65 include("themes/$ThemeSel/module.php"); 66 if (is_active("$default_module") AND file_exists("modules/$default_module/".$mod_file.".php")) { 67 $name = $default_module; 68 } 69 } 70 if (file_exists("themes/$ThemeSel/modules/$name/".$mod_file.".php")) { 71 $modpath = "themes/$ThemeSel/"; 72 } 73 $modpath .= "modules/$name/".$mod_file.".php"; 74 if (file_exists($modpath)) { 75 include($modpath); 76 } else { 77 define('INDEX_FILE', true); 78 include ("header.php"); 79 OpenTable(); 80 if (is_admin($admin)) { 81 echo "<center><font class=\"\"><b>"._HOMEPROBLEM."</b></font><br><br>[ <a href=\"".$admin_file.".php?op=modules\">"._ADDAHOME."</a> ]</center>"; 82 } else { 83 echo "<center>"._HOMEPROBLEMUSER."</center>"; 84 } 85 CloseTable(); 86 include ("footer.php"); 87 } 88 } 89 90 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |