/** * Install Header, Furasta.Org * * Header which is loaded on all the install pages. * * @author Conor Mac Aoidh <*****@*****.**> * @license http://furasta.org/licence.txt The BSD License * @version 1.0 * @package installer */ /** * get the home dir */ define('HOME', substr(dirname(__FILE__), 0, -7)); define('SITE_URL', calculate_url()); /** * cannot install if .settings.php exists */ if (file_exists(HOME . '.settings.php')) { require HOME . '_inc/define.php'; error('You can\'t install Furasta CMS because it is already installed. If you would like to re-install then simply remove the <i>../.settings.php</i> file and reload this page.', 'Already Installed!'); } /** * load javascript */ echo ' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <noscript><meta http-equiv="refresh" content="0;url=../_inc/noscript.php"></noscript>
die; } if (MT_ERR) { error_reporting(E_ALL); ini_set('display_errors', 'On'); } else { error_reporting(0); } if (basename(__FILE__) == 'mytracking.php') { die('For your safety: you should really change the name of this file'); } if (!empty($_GET['test'])) { die("OK: " . MT_RELEASE); } $hop = isset($_GET['hop']) ? $_GET['hop'] : ''; process_content(retrieve_content(calculate_url($hop))); exit; function calculate_url($link) { $returnurl = ''; if ($link == '') { $returnurl = 'http://trkapi.com/mytrackingok.gif'; } else { if (preg_match("/.+/", $link)) { $src = array('/m/', '/r/', '/l/'); $rpl = array('', '/', '/'); $link = str_replace($src, $rpl, $link); $returnurl = 'http://trkapi.com/' . $link; // 2.0 format } }