<?php require_once "../includes/connect.php"; ?>

<?php
	 	$result = mysql_query("SELECT * FROM colorcombi",$dbh);
			$myrow=mysql_fetch_array($result); 
			$color1=$myrow['color1'];
			$color2=$myrow['color2'];
			$color3=$myrow['color3'];
			$color4=$myrow['color4'];
			$color5=$myrow['color5'];
?>
<?php
	 	$result1 = mysql_query("SELECT * FROM siteinfo",$dbh);
			$myrow=mysql_fetch_array($result1); 
			$domain1=$myrow['domain'];
			$firma1=$myrow['firma'];
			$sitemail1=$myrow['sitemail'];
			$editor1=$myrow['editor'];
?>
<?php require_once "menuc.php"; ?>

<link rel="stylesheet" href="../sf/thumbnailviewer.css" type="text/css" />
<script type="text/javascript" src="../sf/thumbnailviewer.js"></script>

<?php if ($editor1!='0') { ?>

<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>

<?php if ($editor1=='1') { ?>

<script type="text/javascript">
	tinyMCE.init({
		entity_encoding : "raw", 
		forced_root_block : "",
		force_br_newlines : true,
        force_p_newlines : false,
		mode : "specific_textareas",
		editor_selector : "mceEditor",
		theme : "advanced",
		

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,justifyleft,justifycenter,justifyright,justifyfull,forecolor,backcolor,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,bullist,numlist,hr,charmap,undo,redo,link,unlink,preview,removeformat",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "/styles.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js"

	});
</script>

 <?php } else {?>

<script type="text/javascript">
	tinyMCE.init({
		entity_encoding : "raw", 
		forced_root_block : "",
		force_br_newlines : true,
        force_p_newlines : false,
		mode : "specific_textareas",
		editor_selector : "mceEditor",
		theme : "advanced",
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist",
		

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,forecolor,backcolor,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,search,replace,bullist,numlist,outdent,indent,blockquote,undo,redo,link,unlink,code,insertdate,inserttime,preview",
		theme_advanced_buttons3 : "tablecontrols,hr,sub,sup,charmap,advhr,print,styleprops,nonbreaking,removeformat",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "/styles.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",


		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script><?php } ?>
<?php }?>
