<?php
/*
 * $Id
 * Module: SmartSection
 * Author: Sudhaker Raj <http://xoops.biz>
 * Licence: GNU
 */

$seoOp = $_GET['seoOp'];
$seoArg = $_GET['seoArg'];

if (! empty($seoOp)) 
{
	$newUrl = "/modules/smartsection/${seoOp}.php";

	$_ENV['PHP_SELF'] = $newUrl;
	$_SERVER['SCRIPT_NAME'] = $newUrl;
	$_SERVER['PHP_SELF'] = $newUrl;
	switch ($seoOp) {
		case 'category':
			$_SERVER['REQUEST_URI'] = $newUrl . '?categoryid=' . $seoArg;
			$_GET['categoryid'] = $seoArg;
			break;
		case 'item':
		case 'print':
		default:
			$_SERVER['REQUEST_URI'] = $newUrl . '?itemid=' . $seoArg;
			$_GET['itemid'] = $seoArg;
	}
	
	include("${seoOp}.php");
	
} else {
	// TODO - path info handling	
}

exit;

?>