<?php

	/*
	*	Gekko - Open Source Web Development Framework
	*	------------------------------------------------------------------------
	*	Copyright (C) 2004-2005, J. Carlos Nieto <xiam@users.sourceforge.net>
	*	This program is Free Software.
	*
	*	@package	Gekko
	*	@license	http://www.gnu.org/copyleft/gpl.html GNU/GPL License 2.0
	*	@author		J. Carlos Nieto <xiam@users.sf.net>
	*	@version	CVS: $Id:$
	*	@link		http://gekkoware.sourceforge.net
	*/

	if (!defined("IN-BLOCK")) die();

	/*
	<%%>
	<?xml version="1.0" encoding="UTF-8"?>
	<blockscript>
		<info lang="en">
			<title>Style</title>
			<description>Gives the visitor the chance to use a custom style for our website</description>
			<author><![CDATA[xiam &lt;<a href="mailto:xiam@users.sourceforge.net">xiam@users.sourceforge.net</a>&gt;]]></author>
			<homepage><![CDATA[<a href="http://www.gekkoware.org">http://www.gekkoware.org</a>]]></homepage>
		</info>
		<info lang="es">
			<title>Estilo</title>
			<description><![CDATA[Le da al visitante la posibilidad de escoger un estilo del sitio]]></description>
		</info>
	</blockscript>
	<%%>
	*/

	$return = Array();
	$styles = listdir(GEKKO_ROOT."templates/"._l("C_SITE.TEMPLATE"));
	foreach ($styles as $style) {
		if (substr($style, -4) == ".css") {
			$return[substr($style, 0, -4)] = ucwords(preg_replace("/_|-/", " ", substr($style, 0, -4)));
		}
	}

	$return = mkSelect($return, _l("C_SITE.STYLESHEET"), "style", "onchange=\"location.href='".url_set_var("style", "'+this.value+'")."'\"");
?>