Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
Kalens - Blob - ViewGit - Blue Static
<?php
/*=====================================================================*\
|| ###################################################################
|| # Kalens [#]version[#]
|| # Copyright ©2002-[#]year[#] Iris Studios, Inc.
|| #
|| # 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; version [#]gpl[#] of the License.
|| #
|| # This program is distributed in the hope that it will be useful, but
|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|| # more details.
|| #
|| # You should have received a copy of the GNU General Public License along
|| # with this program; if not, write to the Free Software Foundation, Inc.,
|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|| ###################################################################
\*=====================================================================*/

$js_template_manager =
<<<EOD
<script type="text/javascript">
<!--
	var $jslang
	var styleid = $jsout_style;
	var sel = null;

	function change_handler()
	{
		sel = document.templatemanager.manager;
		sel = sel.options[sel.selectedIndex];

		if (sel.getAttribute("tname") == "")
		{
			button_magic(0, 0, 0);
			write_div(jslang["templateinfo_div_init"]);
		}
		else
		{
			if (sel.getAttribute("tid") == "^")
			{
				button_magic(1, 0, 0);
				write_div(construct_phrase(jslang["templateinfo_div_nochange"], sel.getAttribute("tname")));
			}
			else
			{
				button_magic(1, 1, 1);
				write_div(construct_phrase(jslang["templateinfo_div_changed"], sel.getAttribute("tname"), (sel.getAttribute("date") ? sel.getAttribute("date") : "?")));
			}
		}
	}

	function click_handler(type)
	{
		if (sel.getAttribute("tname") != "")
		{
			if (type == "edit")
			{
				button_magic(0, 0, 0);
				if (sel.getAttribute("tid") == "^")
				{
					window.location = "templates.php?do=edit&styleid=" + styleid + "&name=" + sel.getAttribute("tname");
				}
				else
				{
					template_action("edit", sel.getAttribute("tid"));
				}
			}
			else if (type == "view")
			{
				open_window("templates.php?do=view&template=" + sel.getAttribute("tname"), "original");
			}
			else if (type == "revert")
			{
				button_magic(0, 0, 0);
				template_action("delete&template=" + sel.getAttribute("tname"), sel.getAttribute("tid"));
			}
			else
			{
				button_magic(0, 0, 0);
				write_div(construct_phrase(jslang["js_undefined"], selected_template));
			}
		}
	}

	function template_action(doaction, templateid)
	{
		window.location = "templates.php?do=" + doaction + "&id=" + templateid;
	}

	function button_magic(edit, revert, view)
	{
		document.templatemanager.revertbutton.disabled = "disabled";
		document.templatemanager.vieworigbutton.disabled = "disabled";
		document.templatemanager.editbutton.disabled = "disabled";

		if (revert)
		{
			document.templatemanager.revertbutton.disabled = "";
		}

		if (view)
		{
			document.templatemanager.vieworigbutton.disabled = "";
		}

		if (edit)
		{
			document.templatemanager.editbutton.disabled = "";
		}
	}

	function write_div(result_text)
	{
		resultdiv = newobj("templateinfo");
		resultdiv.innerHTML = result_text;
	}
-->
</script>
EOD;

/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>