<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.

Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	// Manage Forum Colors
	// ========================================================================================
	
	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_messageboard.gif" width="26" height="18"> '.$MsgText[2][3];
	$BrowserTitle = $MsgText[2][3];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > '.$MsgText[2][3];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[101] == 'y') {
		
			$query = "select * from `".$Settings['DBPrefix']."mb-Settings`";
			$result = mysql_query($query) or die (mysql_error());
			while ($row = mysql_fetch_array($result)) {
				$mbSettings[$row['Name']] = $row['Value'];
			}
			
	
			$OverridesArray = explode('%%',$mbSettings['ColorOverrides']);
			/*
			$Colors['MBBorder'] = '#888888';			// main border
			$Colors['MBBG'] = '#888888';				// main background
			$Colors['MBAlternateBG'] = '#888888';		// alternate background color
			$Colors['MBSpacerLine'] = '#272727';		// spacer line between categories and messages in a thread
			$Colors['MBHeadingText'] = '#ffffff';		// top headings text
			$Colors['MBHeadingBG'] = '#272727';			// top headings background
			$Colors['MBText'] = '#ffffff';				// main text
			$Colors['MBQCBorder'] = '#888888';			// quotes and code sections border
			$Colors['MBQCBG'] = '#888888';				// quotes and code sections background
			$Colors['MBQCText'] = '#888888';			// quotes and code sections text
			*/
			
				
	
			$PageContents = '<br>'.$MsgText[2][38].'<br><br><form name="PostForm" action="'.$MainURL.'/admin/messageboard_colors-save" method="post">
			
			<img id="PreviousColorsControlImage" src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0">

<script>
var ColorPickerWindowCode = "";
var ColorDestination = "";

function GetCurrentColor() {
	if (ColorDestination != "") {
		return document.forms["PostForm"].elements[ColorDestination].value.substring(1);
	}
	else {
		return "";
	}
}

function LaunchColorPicker(ColorDest) {
	ColorDestination = ColorDest;
	
	var WindowProperties = "width=420,height=300,left=" + (screen.width-420)/2 + ",top=" + (screen.height-300)/2 + ",location=no,menubar=no,directories=no,toolbar=no,status=no,scrollbars=no,resizable=yes";

	ColorPickerWindowCode = window.open("'.$BaseURL.'/color_picker.html","colorpicker",WindowProperties);
}

function ColorSelected(ColorCode) {
	//alert(ColorCode);
	ColorPickerWindowCode.close();
	
	document.forms["PostForm"].elements[ColorDestination].value = ColorCode;
		
	document.getElementById("PreviousColorsControlImage").src = "'.$BaseURL.'/inc-core-admin-editor-previouscolors.php?"+ColorCode.substring(1)+"/"+(Math.random()*123456);
}

</script>
						
			<table border="0" cellpadding="0" cellspacing="0">
    
			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][39].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co1" size="7" value="'.$OverridesArray[1].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co1\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][40].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co2" size="7" value="'.$OverridesArray[2].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co2\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][41].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co3" size="7" value="'.$OverridesArray[3].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co3\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][42].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co4" size="7" value="'.$OverridesArray[4].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co4\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][43].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co5" size="7" value="'.$OverridesArray[5].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co5\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][44].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co6" size="7" value="'.$OverridesArray[6].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co6\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][45].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co7" size="7" value="'.$OverridesArray[7].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co7\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][46].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co8" size="7" value="'.$OverridesArray[8].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co8\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][47].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co9" size="7" value="'.$OverridesArray[9].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co9\');"></td></tr>

			<tr><td><font face="'.$FontFace.'" size="'.$FontSize.'">'.$MsgText[2][48].':</td><td>&nbsp;&nbsp;</td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><input type="text" name="co10" size="7" value="'.$OverridesArray[10].'">&nbsp;<input type="button" value="'.$MsgText[0][556].'" onClick="LaunchColorPicker(\'co10\');"></td></tr>

			
			<tr><td colspan="3" align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><br><br>
			<input type="submit" value="'.$MsgText[0][123].'">
			</form></td></tr>

			
			</table>';
			
			
	
	
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}
	

	// ========================================================================================




?>
