/** * UNITED-NUKE CMS: Just Manage! * http://united-nuke.openland.cz/ * http://united-nuke.openland.cz/forums/ * * 2002 - 2005, (c) Jiri Stavinoha * http://united-nuke.openland.cz/weblog/ * * Portions of this software are based on PHP-Nuke * http://phpnuke.org - 2002, (c) Francisco Burzi * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. **/ require_once("mainfile.php"); global $db, $admin_file; if ($op == "ad_click" && isset($bid)) { $bid = intval($bid); $sql = "SELECT clickurl FROM ".UN_TABLENAME_BANNER." WHERE bid='".$bid."'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $db->sql_query("UPDATE ".UN_TABLENAME_BANNER." SET clicks=clicks+1 WHERE bid='".$bid."'"); update_points(21); Header("Location: ".$row['clickurl']); exit(); } if (isset($url) AND is_admin($admin)) { $url = urldecode($url); echo ""; exit(); } // Calling SLUFU daemon un_update_system_daemon(); // For compatibility with PHP-Nuke 8.0 (added since 4.2.07ms2) define('MODULE_FILE', true); $modpath = ''; $_SERVER['SCRIPT_NAME'] = "modules.php"; $result = $db->sql_query("SELECT main_module FROM ".UN_TABLENAME_MAIN); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $name = $row['main_module']; $home = 1; define("UN_HOME_FILE", true); // For compatibility with PHP-Nuke 8.0 (added since 4.2.07ms2) define('HOME_FILE', true); if ($httpref == 1) { $referer = addslashes($_SERVER['HTTP_REFERER']); $referer = strip_tags($referer); if (!empty($referer) AND strpos(strtoupper($referer), strtoupper("unknown")) !== 0 AND substr(str_replace('https://', 'http://', $referer), 0, strlen($nukeurl)) != $nukeurl AND strpos(strtoupper($referer), strtoupper("bookmark")) !== 0) { $db->sql_query("INSERT INTO ".UN_TABLENAME_REFERER." VALUES (NULL, '".$referer."')"); } $nresult = $db->sql_query("SELECT COUNT(*) AS numrows FROM ".UN_TABLENAME_REFERER); $nrows = $db->sql_fetchrow($nresult); $db->sql_freeresult($nresult); $numrows = $nrows['numrows']; if($numrows >= $httprefmax) { $maxdel = round($httprefmax / 10); $db->sql_query("DELETE FROM ".UN_TABLENAME_REFERER." LIMIT ".$maxdel); } } if (!isset($mop)) $mop = "modload"; if (!isset($mod_file)) $mod_file = "index"; $name = trim($name); $file = trim($file); $mod_file = trim($mod_file); $mop = trim($mop); if (strpos($name, "..") !== false || strpos($file, "..") !== false || strpos($mod_file, "..") !== false || strpos($mop, "..") !== false) { echo "You are so cool..."; } else { $ThemeSel = get_theme(); if (file_exists("themes/".$ThemeSel."/module.php")) { include("themes/".$ThemeSel."/module.php"); if (is_active($default_module) AND file_exists("modules/".$default_module."/".$mod_file.".php")) { $name = $default_module; } } if (file_exists("themes/".$ThemeSel."/modules/".$name."/".$mod_file.".php")) { $modpath = "themes/".$ThemeSel."/"; } $modpath .= "modules/".$name."/".$mod_file.".php"; if (file_exists($modpath)) { include($modpath); } else { $index = 1; include("header.php"); OpenTable(); if (is_admin($admin)) { echo "
"._HOMEPROBLEM."

[ "._ADDAHOME." ]
"; } else { echo "
"._HOMEPROBLEMUSER."
"; } CloseTable(); include("footer.php"); } } ?>