<?php include ("app_needed/config.php");
if(!$_SESSION[unique] || !$logged->is_admin())
header("Location: ".APP_WEBSITE."/login.html");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?= language("CHARSET") ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?= language('PAGE_admin_design_title') ?> - <?= $config->get_value('platform_title') ?></title>
<link rel="shortcut icon" type="image/png" href="<?= $config->get_value('platform_favicon') ?>"/>
<link href="app_needed/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="app_needed/style.tipsy.css" type="text/css" />
<link rel="stylesheet" href="app_needed/colorpicker/css/colorpicker.css" type="text/css" />

</head>

<body>
<div id="wrapper">
	<?php include("module.header.php"); ?>
	<?php include ("module.menu.php"); ?>
	<div class="content">
		<div class="info">
		<h1><?= language('PAGE_admin_design_title') ?></h1>
		</div>
        <form name="my-form" action="app_needed/ajax.colors.php" method="POST" enctype="multipart/form-data">
        <input type="hidden" name="change_colors" value="1" />
        <div class="box">
		  <div class="inside">
           	<div class="title">
                <h2><?= language('PAGE_admin_platform_design_subtitle') ?></h2>
            	</div>
            <table width="100%" border="0">
            	<tr>
            	  <td width="17%">Background Body</td>
            	  <td width="83%"><label class="cp b_body" style="background:#<?= $config->get_value('color_b_body') ?>"></label><input type="text" name="b_body" class="colorpick" value="<?= $config->get_value('color_b_body') ?>" /> </td>
          	  </tr>
            	<tr>
            	  <td>Watermark Background</td>
            	  <td><label class="cp watermark_color" style="background:#<?= $config->get_value('watermark_color') ?>"></label>
            	    <input type="text" name="watermark_color" class="colorpick" value="<?= $config->get_value('watermark_color') ?>" /></td>
          	  </tr>
            	<tr>
            	  <td>Watermark Text</td>
            	  <td><label class="cp watermark_text_color" style="background:#<?= $config->get_value('watermark_text_color') ?>"></label>
            	    <input type="text" name="watermark_text_color" class="colorpick" value="<?= $config->get_value('watermark_text_color') ?>" /></td>
          	  </tr>
            	<tr>
            	  <td><strong>Header Part</strong></td>
            	  <td>&nbsp;</td>
          	  </tr>
            	<tr>
            	  <td>Background</td>
            	  <td><label class="cp b_header" style="background:#<?= $config->get_value('color_b_header') ?>"></label>
            	    <input type="text" name="b_header" class="colorpick" value="<?= $config->get_value('color_b_header') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Border Bottom</td>
            	  <td><label class="cp bo_header" style="background:#<?= $config->get_value('color_bo_header') ?>"></label>
            	    <input type="text" name="bo_header" class="colorpick" value="<?= $config->get_value('color_bo_header') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Color</td>
            	  <td><label class="cp c_header" style="background:#<?= $config->get_value('color_c_header') ?>"></label>
            	    <input type="text" name="c_header" class="colorpick" value="<?= $config->get_value('color_c_header') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Border Buttons</td>
            	  <td><label class="cp bo_menubutton" style="background:#<?= $config->get_value('color_bo_menubutton') ?>"></label>
            	    <input type="text" name="bo_menubutton" class="colorpick" value="<?= $config->get_value('color_bo_menubutton') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Background Buttons</td>
            	  <td><label class="cp b_menubutton" style="background:#<?= $config->get_value('color_b_menubutton') ?>"></label>
            	    <input type="text" name="b_menubutton" class="colorpick" value="<?= $config->get_value('color_b_menubutton') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Hover  Buttons</td>
            	  <td><label class="cp b_h_menubutton" style="background:#<?= $config->get_value('color_b_h_menubutton') ?>"></label>
            	    <input type="text" name="b_h_menubutton" class="colorpick" value="<?= $config->get_value('color_b_h_menubutton') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td><strong>Page Title Box</strong></td>
            	  <td>&nbsp;</td>
          	  </tr>
            	<tr>
            	  <td>Background</td>
            	  <td><label class="cp b_info" style="background:#<?= $config->get_value('color_b_info') ?>"></label>
            	    <input type="text" name="b_info" class="colorpick" value="<?= $config->get_value('color_b_info') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Color</td>
            	  <td><label class="cp c_info" style="background:#<?= $config->get_value('color_c_info') ?>"></label>
            	    <input type="text" name="c_info" class="colorpick" value="<?= $config->get_value('color_c_info') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Button Background</td>
            	  <td><label class="cp b_info_btn" style="background:#<?= $config->get_value('color_b_info_btn') ?>"></label>
            	    <input type="text" name="b_info_btn" class="colorpick" value="<?= $config->get_value('color_b_info_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Button Hover</td>
            	  <td><label class="cp b_h_info_btn" style="background:#<?= $config->get_value('color_b_h_info_btn') ?>"></label>
            	    <input type="text" name="b_h_info_btn" class="colorpick" value="<?= $config->get_value('color_b_h_info_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Color Button</td>
            	  <td><label class="cp c_info_btn" style="background:#<?= $config->get_value('color_c_info_btn') ?>"></label>
            	    <input type="text" name="c_info_btn" class="colorpick" value="<?= $config->get_value('color_c_info_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Color Button Hover</td>
            	  <td><label class="cp c_h_info_btn" style="background:#<?= $config->get_value('color_c_h_info_btn') ?>"></label>
            	    <input type="text" name="c_h_info_btn" class="colorpick" value="<?= $config->get_value('color_c_h_info_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td><strong>Buttons </strong></td>
            	  <td>&nbsp;</td>
          	  </tr>
            	<tr>
            	  <td> Background</td>
            	  <td><label class="cp b_btn" style="background:#<?= $config->get_value('color_b_btn') ?>"></label>
            	    <input type="text" name="b_btn" class="colorpick" value="<?= $config->get_value('color_b_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Background Hover</td>
            	  <td><label class="cp b_h_btn" style="background:#<?= $config->get_value('color_b_h_btn') ?>"></label>
            	    <input type="text" name="b_h_btn" class="colorpick" value="<?= $config->get_value('color_b_h_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Color text</td>
            	  <td><label class="cp c_btn" style="background:#<?= $config->get_value('color_c_btn') ?>"></label>
            	    <input type="text" name="c_btn" class="colorpick" value="<?= $config->get_value('color_c_btn') ?>"/>
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Color Text hover</td>
            	  <td><label class="cp c_h_btn" style="background:#<?= $config->get_value('color_c_h_btn') ?>"></label>
            	    <input type="text" name="c_h_btn" class="colorpick" value="<?= $config->get_value('color_c_h_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Border  Color</td>
            	  <td><label class="cp bo_btn" style="background:#<?= $config->get_value('color_bo_btn') ?>"></label>
            	    <input type="text" name="bo_btn" class="colorpick" value="<?= $config->get_value('color_bo_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Border  Hover color </td>
            	  <td><label class="cp bo_h_btn" style="background:#<?= $config->get_value('color_bo_h_btn') ?>"></label>
            	    <input type="text" name="bo_h_btn" class="colorpick" value="<?= $config->get_value('color_bo_h_btn') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td><strong>Left Side Menu</strong></td>
            	  <td>&nbsp;</td>
          	  </tr>
            	<tr>
            	  <td>Background</td>
            	  <td><label class="cp b_menu" style="background:#<?= $config->get_value('color_b_menu') ?>"></label>
            	    <input type="text" name="b_menu" class="colorpick" value="<?= $config->get_value('color_b_menu') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Title</td>
            	  <td><label class="cp c_menutitle" style="background:#<?= $config->get_value('color_c_menutitle') ?>"></label>
            	    <input type="text" name="c_menutitle" class="colorpick" value="<?= $config->get_value('color_c_menutitle') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Hover and Active bg.</td>
            	  <td><label class="cp b_h_acc" style="background:#<?= $config->get_value('color_b_h_acc') ?>"></label>
            	    <input type="text" name="b_h_acc" class="colorpick" value="<?= $config->get_value('color_b_h_acc') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Hover and Active</td>
            	  <td><label class="cp c_h_acc" style="background:#<?= $config->get_value('color_c_h_acc') ?>"></label>
            	    <input type="text" name="c_h_acc" class="colorpick" value="<?= $config->get_value('color_c_h_acc') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Background Dropdown </td>
            	  <td><label class="cp b_sub" style="background:#<?= $config->get_value('color_b_sub') ?>"></label>
            	    <input type="text" name="b_sub" class="colorpick" value="<?= $config->get_value('color_b_sub') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Color Text Dropdown </td>
            	  <td><label class="cp c_sub" style="background:#<?= $config->get_value('color_c_sub') ?>"></label>
            	    <input type="text" name="c_sub" class="colorpick" value="<?= $config->get_value('color_c_sub') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Background Hover Dropdown</td>
            	  <td><label class="cp b_h_sub" style="background:#<?= $config->get_value('color_b_h_sub') ?>"></label>
            	    <input type="text" name="b_h_sub" class="colorpick" value="<?= $config->get_value('color_b_h_sub') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Text Hover Dropdown </td>
            	  <td><label class="cp c_h_sub" style="background:#<?= $config->get_value('color_c_h_sub') ?>"></label>
            	    <input type="text" name="c_h_sub" class="colorpick" value="<?= $config->get_value('color_c_h_sub') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Border Left </td>
            	  <td><label class="cp bo_acc" style="background:#<?= $config->get_value('color_bo_acc') ?>"></label>
            	    <input type="text" name="bo_acc" class="colorpick" value="<?= $config->get_value('color_bo_acc') ?>" />
            	    <br /></td>
          	  </tr>
            	<tr>
            	  <td>Color Text</td>
            	  <td><label class="cp c_acc" style="background:#<?= $config->get_value('color_c_acc') ?>"></label>
            	    <input type="text" name="c_acc" class="colorpick" value="<?= $config->get_value('color_c_acc') ?>" />
            	    <br /></td>
          	  </tr>
            
            	<tr>
            	  <td><input type="submit"  value="<?= language('BUTTON_submit') ?>" /></td>
            	  <td id="response"></td>
          	  </tr>
            	<tr>
            	  <td><strong><?= language('FORM_restore_colors') ?></strong></td>
            	  <td><a href="javascript:restore_colors()"><strong><?= language('FORM_restore_colors_text') ?></strong></a></td>
          	  </tr>
          	</table>
          </div>
        </div>
        </form>
	</div>
</div>
<div id='confirm'>
<div class="left">
	<div class='title'><span><?= language('CONFIRM') ?></span></div>
	<div class='message'></div>
</div>
<div class="right">
	<div class='buttons'>
				<span class='no simplemodal-close'><?= language('NO') ?></span><span class='yes'><?= language('YES') ?></span>
               
	</div>
</div>
<div class="clear"></div>
	</div>
		<!-- preload the images -->
	<div style='display:none'>
		<img src='img/confirm/header.gif' alt='' />
		<img src='img/confirm/button.gif' alt='' />
	</div>

<script type="text/javascript" src="app_needed/jquery-1.9.0.min.js"></script>
<script type='text/javascript' src='app_needed/jquery.accordionmenu.js'></script>
<script type='text/javascript' src='app_needed/jquery.checkbox.js'></script>
<script type='text/javascript' src='app_needed/jquery.tipsy.js'></script>
<script type='text/javascript' src='app_needed/function.ajax.js'></script>
<script type='text/javascript' src='app_needed/simply-toast.min.js'></script>
<script type='text/javascript' src='app_needed/jquery.simplemodal.js'></script>
<script type='text/javascript' src='app_needed/functions.js'></script>
<script type="text/javascript" src="app_needed/colorpicker/js/colorpicker.js"></script>
<script type="text/javascript" src="app_needed/colorpicker/js/eye.js"></script>
<script type="text/javascript" src="app_needed/colorpicker/js/utils.js"></script>
<script >
$('.colorpick').ColorPicker({
	onSubmit: function(hsb, hex, rgb, el) {
		$(el).val(hex);
		$(el).ColorPickerHide();
		name = $(el).attr('name');
		$("."+name).css("background-color","#"+hex);
	},
	onBeforeShow: function () {
		$(this).ColorPickerSetColor(this.value);
	}
})
.bind('keyup', function(){
	$(this).ColorPickerSetColor(this.value);

});
</script>
</body>
</html>
<?php mysql_close($conn); ?>