// dadaIMC: $Id: home,v 1.9 2005/03/08 19:34:01 spud Exp $ // license: GNU LGPL // copyright 2001-2002: dada typo and contributors ?> header ('http/1.1 200 OK'); /////////////////////////////////////////////////////////////// // Can handle URLs in the format // where 'n' is the integer set in $ind: // // http://$g_url/home/function/ID // n n+1 // /////////////////////////////////////////////////////////////// $is_css = false; $url_array=explode('/',$_SERVER['PHP_SELF']); /* // uncomment this for debugging reset ($url_array); while(list($i,$v) = each ($url_array)) echo(""); */ // figure out what page name they requested $page = end($url_array); if (strpos($page,'.css') !== false) { $is_css = true; header('Content-type: text/css'); } /* // uncomment this and place a 16 x 16 image named 'favicon.ico' // in the images folder for IE bookmarks (saves web server errors, too) if ($page == 'favicon.ico') { Header("Content-Type: image/gif"); $fn=fopen('images/favicon.ico','r'); fpassthru($fn); exit(); } */ // assume they want 'index.php' if the request is only for '/' // unless they explicitly ask for the raw page (which has no
wrappers if ($page != 'raw.php') $page = 'index.php'; // set the module to "home" $handler = 'home'; $module = 'home'; // $ind tell the script where to start parsing the URL // it should be 2 for if this site is a full domain, e.g. "baltimore.indymedia.org" // or 3 for subdirectories, e.g. "www.somecollectivesite.com/indymedia/" if (file_exists('dt_dbinfo.php')) { include_once('dt_dbinfo.php'); } if (isset($g_use_subdirectory)) { $ind = $g_use_subdirectory; } else { $ind = 2; } if ($is_css) { $pathtocss = 'mods'; for($x=$ind;$x