This blob has been accessed 321 times via Git panel.
- <?php
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
- header("Location: login.php");
- }
- if (get_magic_quotes_gpc()) {
- function stripslashes_array($data) {
- if (is_array($data)) {
- foreach ($data as $key => $value) {
- $data[$key] = stripslashes_array($value);
- }
- return $data;
- }
- else {
- return stripslashes($data);
- }
- }
- $_POST = stripslashes_array($_POST);
- }
- $login_username = file_get_contents("data/username.txt");
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- }
- if (!isset($_POST['target']) or empty($_POST['target'])) {
- $target = font;
- }
- else {
- $target = $_POST['target'];
- }
- if (!file_exists("data/colors")) {
- mkdir("data/colors");
- }
- if (!file_exists("data/schemes")) {
- mkdir("data/schemes");
- }
- if (!file_exists("data/schemes/colors")) {
- mkdir("data/schemes/colors");
- }
- function rmdirr($recurse_dirname) {
- if (!file_exists($recurse_dirname)) {
- return false;
- }
- if (is_file($recurse_dirname)) {
- return unlink($recurse_dirname);
- }
- $recurse_dir = dir($recurse_dirname);
- while (false !== $recurse_entry = $recurse_dir->read()) {
- if ($recurse_entry == '.' || $recurse_entry == '..') {
- continue;
- }
- rmdirr("$recurse_dirname/$recurse_entry");
- }
- $recurse_dir->close();
- return rmdir($recurse_dirname);
- }
- if (isset($_POST['reset']) and ($_POST['reset'] == "go")) {
- rmdirr("data/colors");
- if (file_exists("data/schemes/current/color.txt")) {
- unlink("data/schemes/current/color.txt");
- }
- }
- if (isset($_POST['target']) and !empty($_POST['target']) and (!isset($_POST['color']) or empty($_POST['color']))) {
- $color_file = str_replace("_", "-", $_POST['target']);
- $color_file = "data/colors/{$color_file}.txt";
- unlink($color_file);
- }
- if (isset($_POST['target']) and !empty($_POST['target']) and isset($_POST['color']) and !empty($_POST['color'])) {
- $color_value = str_replace("%23", "#", $_POST['color']);
- $color_value = strtolower($color_value);
- $valid_colors = array("aqua","black","blue","fuchsia","gray","green","lime","maroon","navy","olive","purple","red","silver","teal","white","yellow","transparent");
- $color_file = str_replace("_", "-", $_POST['target']);
- $color_file = "data/colors/{$color_file}.txt";
- }
- }
- if (isset($_POST['id']) and !empty($_POST['id']) and !file_exists("data/schemes/colors/{$_POST['id']}")) {
- $id = strtolower($_POST['id']);
- $id = trim($id);
- $id = str_replace(" ","_",$id);
- if (!file_exists("data/schemes/colors/$id")) {
- mkdir("data/schemes/colors/$id");
- }
- if (file_exists("data/colors/bg.txt")) {
- copy("data/colors/bg.txt","data/schemes/colors/$id/bg.txt");
- }
- if (file_exists("data/colors/border.txt")) {
- copy("data/colors/border.txt","data/schemes/colors/$id/border.txt");
- }
- if (file_exists("data/colors/font.txt")) {
- copy("data/colors/font.txt","data/schemes/colors/$id/font.txt");
- }
- if (file_exists("data/colors/hover.txt")) {
- copy("data/colors/hover.txt","data/schemes/colors/$id/hover.txt");
- }
- if (file_exists("data/colors/link.txt")) {
- copy("data/colors/link.txt","data/schemes/colors/$id/link.txt");
- }
- if (file_exists("data/colors/pb-bg.txt")) {
- copy("data/colors/pb-bg.txt","data/schemes/colors/$id/pb-bg.txt");
- }
- if (file_exists("data/colors/pb-font.txt")) {
- copy("data/colors/pb-font.txt","data/schemes/colors/$id/pb-font.txt");
- }
- if (file_exists("data/colors/pf-bg.txt")) {
- copy("data/colors/pf-bg.txt","data/schemes/colors/$id/pf-bg.txt");
- }
- if (file_exists("data/colors/pf-font.txt")) {
- copy("data/colors/pf-font.txt","data/schemes/colors/$id/pf-font.txt");
- }
- if (file_exists("data/colors/pt-bg.txt")) {
- copy("data/colors/pt-bg.txt","data/schemes/colors/$id/pt-bg.txt");
- }
- if (file_exists("data/colors/pt-font.txt")) {
- copy("data/colors/pt-font.txt","data/schemes/colors/$id/pt-font.txt");
- }
- if (file_exists("data/colors/vlink.txt")) {
- copy("data/colors/vlink.txt","data/schemes/colors/$id/vlink.txt");
- }
- if (count(glob("data/schemes/colors/*")) === 1) {
- }
- }
- if (isset($_POST['scheme']) and !empty($_POST['scheme'])) {
- $scheme = strtolower($_POST['scheme']);
- $scheme = trim($scheme);
- $scheme = str_replace(" ","_",$scheme);
- if (file_exists("data/schemes/colors/$scheme")) {
- switch ($_POST['scheme_axn']) {
- case 'click here to apply selected scheme':
- if (file_exists("data/colors/bg.txt")) {
- unlink("data/colors/bg.txt");
- }
- if (file_exists("data/colors/border.txt")) {
- unlink("data/colors/border.txt");
- }
- if (file_exists("data/colors/font.txt")) {
- unlink("data/colors/font.txt");
- }
- if (file_exists("data/colors/hover.txt")) {
- unlink("data/colors/hover.txt");
- }
- if (file_exists("data/colors/link.txt")) {
- unlink("data/colors/link.txt");
- }
- if (file_exists("data/colors/pb-bg.txt")) {
- unlink("data/colors/pb-bg.txt");
- }
- if (file_exists("data/colors/pb-font.txt")) {
- unlink("data/colors/pb-font.txt");
- }
- if (file_exists("data/colors/pf-bg.txt")) {
- unlink("data/colors/pf-bg.txt");
- }
- if (file_exists("data/colors/pf-font.txt")) {
- unlink("data/colors/pf-font.txt");
- }
- if (file_exists("data/colors/pt-bg.txt")) {
- unlink("data/colors/pt-bg.txt");
- }
- if (file_exists("data/colors/pt-font.txt")) {
- unlink("data/colors/pt-font.txt");
- }
- if (file_exists("data/colors/vlink.txt")) {
- unlink("data/colors/vlink.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/bg.txt")) {
- copy("data/schemes/colors/$scheme/bg.txt","data/colors/bg.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/border.txt")) {
- copy("data/schemes/colors/$scheme/border.txt","data/colors/border.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/font.txt")) {
- copy("data/schemes/colors/$scheme/font.txt","data/colors/font.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/hover.txt")) {
- copy("data/schemes/colors/$scheme/hover.txt","data/colors/hover.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/link.txt")) {
- copy("data/schemes/colors/$scheme/link.txt","data/colors/link.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/pb-bg.txt")) {
- copy("data/schemes/colors/$scheme/pb-bg.txt","data/colors/pb-bg.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/pb-font.txt")) {
- copy("data/schemes/colors/$scheme/pb-font.txt","data/colors/pb-font.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/pf-bg.txt")) {
- copy("data/schemes/colors/$scheme/pf-bg.txt","data/colors/pf-bg.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/pf-font.txt")) {
- copy("data/schemes/colors/$scheme/pf-font.txt","data/colors/pf-font.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/pt-bg.txt")) {
- copy("data/schemes/colors/$scheme/pt-bg.txt","data/colors/pt-bg.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/pt-font.txt")) {
- copy("data/schemes/colors/$scheme/pt-font.txt","data/colors/pt-font.txt");
- }
- if (file_exists("data/schemes/colors/$scheme/vlink.txt")) {
- copy("data/schemes/colors/$scheme/vlink.txt","data/colors/vlink.txt");
- }
- if (!file_exists("data/schemes/current")) {
- mkdir("data/schemes/current");
- }
- break;
- case 'click here to download selected scheme':
- require "zipstream.php";
- $zip = new ZipStream("{$scheme}.zip");
- if (file_exists("data/schemes/colors/$scheme/bg.txt")) {
- $zip->add_file("bg.txt", file_get_contents("data/schemes/colors/$scheme/bg.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/border.txt")) {
- $zip->add_file("border.txt", file_get_contents("data/schemes/colors/$scheme/border.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/font.txt")) {
- $zip->add_file("font.txt", file_get_contents("data/schemes/colors/$scheme/font.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/hover.txt")) {
- $zip->add_file("hover.txt", file_get_contents("data/schemes/colors/$scheme/hover.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/link.txt")) {
- $zip->add_file("link.txt", file_get_contents("data/schemes/colors/$scheme/link.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/pb-bg.txt")) {
- $zip->add_file("pb-bg.txt", file_get_contents("data/schemes/colors/$scheme/pb-bg.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/pb-font.txt")) {
- $zip->add_file("pb-font.txt", file_get_contents("data/schemes/colors/$scheme/pb-font.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/pf-bg.txt")) {
- $zip->add_file("pf-bg.txt", file_get_contents("data/schemes/colors/$scheme/pf-bg.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/pf-font.txt")) {
- $zip->add_file("pf-font.txt", file_get_contents("data/schemes/colors/$scheme/pf-font.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/pt-bg.txt")) {
- $zip->add_file("pt-bg.txt", file_get_contents("data/schemes/colors/$scheme/pt-bg.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/pt-font.txt")) {
- $zip->add_file("pt-font.txt", file_get_contents("data/schemes/colors/$scheme/pt-font.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/vlink.txt")) {
- $zip->add_file("vlink.txt", file_get_contents("data/schemes/colors/$scheme/vlink.txt"));
- }
- if (file_exists("data/schemes/colors/$scheme/README")) {
- $zip->add_file("README", file_get_contents("data/schemes/colors/$scheme/README"));
- }
- $zip->finish();
- break;
- case 'click here to delete selected scheme':
- rmdirr("data/schemes/colors/$scheme");
- if (file_exists("data/schemes/current/color.txt") and (file_get_contents("data/schemes/current/color.txt") == $scheme)) {
- unlink("data/schemes/current/color.txt");
- rmdirr("data/colors");
- }
- break;
- }
- }
- }
- if (isset($_FILES['upload']) and !empty($_FILES['upload']) and @function_exists('gzinflate')) {
- if (is_uploaded_file($_FILES['upload']['tmp_name'])) {
- if ($_FILES['upload']['type']=="application/zip") {
- if (!file_exists("data/schemes/tmp")) {
- mkdir("data/schemes/tmp");
- }
- $package_name = strtolower($_FILES['upload']['name']);
- $package_name = str_replace(".zip","",$package_name);
- if (!file_exists("data/schemes/colors/$package_name")) {
- mkdir("data/schemes/colors/$package_name");
- include("function_unzip.php");
- require_once ('unzip.lib.php');
- unzipFile($_FILES['upload']['tmp_name'],"data/schemes/colors/$package_name/");
- unlink($_FILES['upload']['tmp_name']);
- }
- else {
- unlink($_FILES['upload']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['upload']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['upload']['tmp_name']);
- }
- }
- ?>
- <title>Colors</title>
- <style>
- body {
- color: #666666;
- margin: 5px 5px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- background-color: #ffffff;
- }
- p, td {
- font-size: 11px;
- }
- a {
- font-weight: bold;
- text-decoration: none;
- }
- a:link {
- color: <?php
- if (file_exists("data/colors/link.txt")) {
- readfile("data/colors/link.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:visited {
- color: <?php
- if (file_exists("data/colors/vlink.txt")) {
- readfile("data/colors/vlink.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:hover {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- readfile("data/colors/hover.txt");
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- a:active {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- readfile("data/colors/hover.txt");
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- #panel_title {
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: <?php
- if (file_exists("data/colors/pt-font.txt")) {
- readfile("data/colors/pt-font.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- readfile("data/colors/pt-bg.txt");
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- readfile("data/colors/border.txt");
- }
- else {
- echo "#CCCCCC";
- }
- ?>;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
- width: 277px;
- }
- #panel_body {
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$font_panel_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/pb-font.txt")) {
- readfile("data/colors/pb-font.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pb-bg.txt")) {
- readfile("data/colors/pb-bg.txt");
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- readfile("data/colors/border.txt");
- }
- else {
- echo "#CCCCCC";
- }
- ?>;
- border-width: 1px 1px 1px 1px;
- border-style: solid solid solid solid;
- width: 277px;
- }
- #panel_footer {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_footer},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/pf-font.txt")) {
- readfile("data/colors/pf-font.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- readfile("data/colors/pf-bg.txt");
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- readfile("data/colors/border.txt");
- }
- else {
- echo "#CCCCCC";
- }
- ?>;
- border-width: 0px 1px 1px 1px;
- border-style: none solid solid solid;
- width: 277px;
- }
- #panel_input {
- color: <?php
- if (file_exists("data/colors/border.txt")) {
- readfile("data/colors/border.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- background: #ffffff;
- border: <?php
- if (file_exists("data/colors/border.txt")) {
- readfile("data/colors/border.txt");
- }
- else {
- echo "#999999";
- }
- ?> solid 1px;
- width: 277px;
- margin: 2px 0px 0px 0px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- padding: 2px 5px 2px 5px;
- }
- .input {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 289px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px
- }
- #panel_out {
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/font.txt")) {
- readfile("data/colors/font.txt");
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/bg.txt") and !file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) {
- readfile("data/colors/bg.txt");
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-width: 0px 0px 0px 0px;
- border-style: solid solid solid solid;
- }
- .farbtastic {
- position: relative;
- }
- .farbtastic * {
- position: absolute;
- cursor: crosshair;
- }
- .farbtastic, .farbtastic .wheel {
- width: 195px;
- height: 195px;
- }
- .farbtastic .color, .farbtastic .overlay {
- top: 47px;
- left: 47px;
- width: 101px;
- height: 101px;
- }
- .farbtastic .wheel {
- background: url(images/color-wheel.png) no-repeat;
- width: 195px;
- height: 195px;
- }
- .farbtastic .overlay {
- background: url(images/color-mask.png) no-repeat;
- }
- .farbtastic .marker {
- width: 17px;
- height: 17px;
- margin: -8px 0 0 -8px;
- overflow: hidden;
- background: url(images/color-marker.png) no-repeat;
- }
- </style>
- <script type="text/javascript" src="js/jquery.js"></script>
- <script type="text/javascript" src="js/farbtastic.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#colorpicker').farbtastic('#color');
- });
- </script>
- <p> </p>
- <table border=0 cellspacing=10 cellpadding=2>
- <tr><td valign=top>
- <table border=0 cellspacing=1 cellpadding=10 bgcolor=#cccccc>
- <tr><td<?php
- if (file_exists("images/background.gif") or file_exists("images/background.jpg") or file_exists("images/background.png")) {
- echo ' style="';
- }
- if (file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>background-image: url('images/background.gif');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (!file_exists("images/background.gif") and file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>background-image: url('images/background.jpg');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (!file_exists("images/background.gif") and !file_exists("images/background.jpg") and file_exists("images/background.png")) { ?>background-image: url('images/background.png');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (file_exists("images/background.gif") or file_exists("images/background.jpg") or file_exists("images/background.png")) {
- echo '"';
- }
- echo ' bgcolor="';
- if (file_exists("data/colors/bg.txt")) {
- $bgcolor = file_get_contents("data/colors/bg.txt");
- if ($bgcolor == "transparent") {
- echo "#ffffff";
- }
- else {
- echo $bgcolor;
- }
- }
- else {
- echo "#ffffff";
- }
- echo '">';
- ?>
- <div id=panel_body><font style="font-size: 10px; color: #999999;">panel body</font><p>Enter any of the sixteen standard colors (<i>aqua</i>, <i>black</i>, <i>blue</i>, <i>fuchsia</i>, <i>gray</i>, <i>green</i>, <i>lime</i>, <i>maroon</i>, <i>navy</i>, <i>olive</i>, <i>purple</i>, <i>red</i>, <i>silver</i>, <i>teal</i>, <i>white</i>, <i>yellow</i>) in the field under the color wheel. For more colors, click on the color wheel. Use <i>transparent</i> for see-through backgrounds.</p><p>While this serves as a convenient preview, colors are actually applied immediately after submission.</p><p><a href=none.php>Hyperlink #1</a><br><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Hyperlink #2</a><br><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Hyperlink #3</a></p></div>
- <div id=panel_footer><font style="font-size: 10px; color: <?php if (file_exists("data/colors/pf-font.txt")) { $color_pf_font = file_get_contents("data/colors/pf-font.txt"); if ($color_pf_font == "transparent") { echo "#ffffff"; } else { echo $color_pf_font; } } else { echo "#999999"; } ?>;">panel footer | <a href="<?php echo $_SERVER['PHP_SELF']; ?>">permalink</a></font></div>
- </td></tr></table>
- </td><td valign=top>
- <table border=0 cellspacing=0 cellpadding=2>
- <tr><td></td></tr>
- <tr><td></td></tr>
- <form action=colors.php method=post>
- <tr><td><input type=text id=color name=color value=#ffffff class=input autocomplete=off></td></tr>
- <tr><td>
- <table border=1 cellspacing=1 cellpadding=0 width=289>
- <tr><td colspan=3>body</td><td></td><td colspan=3>links</td></tr>
- <tr><td><input type=radio name=target value=font <?php if ($target == "font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/font.txt")) { $color_font = file_get_contents("data/colors/font.txt"); if ($color_font == "transparent") { echo "#ffffff"; } else { echo $color_font; } } else { echo "#666666"; } ?>></td><td>font (<?php if (file_exists("data/colors/font.txt")) { $color_font = file_get_contents("data/colors/font.txt"); if ($color_font == "transparent") { echo "#ffffff"; } else { echo $color_font; } } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=link <?php if ($target == "link") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/link.txt")) { $color_link = file_get_contents("data/colors/link.txt"); if ($color_link == "transparent") { echo "#ffffff"; } else { echo $color_link; } } else { echo "#666666"; } ?>></td><td>link (<?php if (file_exists("data/colors/link.txt")) { $color_link = file_get_contents("data/colors/link.txt"); if ($color_link == "transparent") { echo "#ffffff"; } else { echo $color_link; } } else { echo "#666666"; } ?>)</td></tr>
- <tr><td><input type=radio name=target value=border <?php if ($target == "border") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/border.txt")) { $color_border = file_get_contents("data/colors/border.txt"); if ($color_border == "transparent") { echo "#ffffff"; } else { echo $color_border; } } else { echo "#CCCCCC"; } ?>></td><td>border (<?php if (file_exists("data/colors/border.txt")) { $color_border = file_get_contents("data/colors/border.txt"); if ($color_border == "transparent") { echo "#ffffff"; } else { echo $color_border; } } else { echo "#CCCCCC"; } ?>)</td><td width=5></td><td><input type=radio name=target value=vlink <?php if ($target == "vlink") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/vlink.txt")) { $color_vlink = file_get_contents("data/colors/vlink.txt"); if ($color_vlink == "transparent") { echo "#ffffff"; } else { echo $color_vlink; } } else { echo "#666666"; } ?>></td><td>visited (<?php if (file_exists("data/colors/vlink.txt")) { $color_vlink = file_get_contents("data/colors/vlink.txt"); if ($color_vlink == "transparent") { echo "#ffffff"; } else { echo $color_vlink; } } else { echo "#666666"; } ?>)</td></tr>
- <tr><td><input type=radio name=target value=bg <?php if ($target == "bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/bg.txt")) { $color_bg = file_get_contents("data/colors/bg.txt"); if ($color_bg != "transparent") { echo $color_bg; } } ?>></td><td>background (<?php if (file_exists("data/colors/bg.txt")) { $color_bg = file_get_contents("data/colors/bg.txt"); if ($color_bg == "transparent") { echo "transparent"; } else { echo $color_bg; } } else { echo "transparent"; } ?>)</td><td width=5></td><td><input type=radio name=target value=hover <?php if ($target == "hover") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/hover.txt")) { $color_hover = file_get_contents("data/colors/hover.txt"); if ($color_hover == "transparent") { echo "#ffffff"; } else { echo $color_hover; } } else { echo "#336699"; } ?>></td><td>hover (<?php if (file_exists("data/colors/hover.txt")) { $color_hover = file_get_contents("data/colors/hover.txt"); if ($color_hover == "transparent") { echo "#ffffff"; } else { echo $color_hover; } } else { echo "#336699"; } ?>)</td></tr>
- <tr><td colspan=3>panel font</td><td></td><td colspan=3>panel background</td></tr>
- <tr><td><input type=radio name=target value=pt_font <?php if ($target == "pt_font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pt-font.txt")) { $color_pt_font = file_get_contents("data/colors/pt-font.txt"); if ($color_pt_font == "transparent") { echo "#ffffff"; } else { echo $color_pt_font; } } else { echo "#666666"; } ?>></td><td>title (<?php if (file_exists("data/colors/pt-font.txt")) { $color_pt_font = file_get_contents("data/colors/pt-font.txt"); if ($color_pt_font == "transparent") { echo "#ffffff"; } else { echo $color_pt_font; } } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=pt_bg <?php if ($target == "pt_bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pt-bg.txt")) { $color_pt_bg = file_get_contents("data/colors/pt-bg.txt"); if ($color_pt_bg != "transparent") { echo $color_pt_bg; } } ?>></td><td>title (<?php if (file_exists("data/colors/pt-bg.txt")) { $color_pt_bg = file_get_contents("data/colors/pt-bg.txt"); if ($color_pt_bg == "transparent") { echo "transparent"; } else { echo $color_pt_bg; } } else { echo "transparent"; } ?>)</td></tr>
- <tr><td><input type=radio name=target value=pb_font <?php if ($target == "pb_font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pb-font.txt")) { $color_pb_font = file_get_contents("data/colors/pb-font.txt"); if ($color_pb_font == "transparent") { echo "#ffffff"; } else { echo $color_pb_font; } } else { echo "#666666"; } ?>></td><td>body (<?php if (file_exists("data/colors/pb-font.txt")) { $color_pb_font = file_get_contents("data/colors/pb-font.txt"); if ($color_pb_font == "transparent") { echo "#ffffff"; } else { echo $color_pb_font; } } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=pb_bg <?php if ($target == "pb_bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pb-bg.txt")) { $color_pb_bg = file_get_contents("data/colors/pb-bg.txt"); if ($color_pb_bg != "transparent") { echo $color_pb_bg; } } ?>></td><td>body (<?php if (file_exists("data/colors/pb-bg.txt")) { $color_pb_bg = file_get_contents("data/colors/pb-bg.txt"); if ($color_pb_bg == "transparent") { echo "transparent"; } else { echo $color_pb_bg; } } else { echo "transparent"; } ?>)</td></tr>
- <tr><td><input type=radio name=target value=pf_font <?php if ($target == "pf_font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pf-font.txt")) { $color_pf_font = file_get_contents("data/colors/pf-font.txt"); if ($color_pf_font == "transparent") { echo "#ffffff"; } else { echo $color_pf_font; } } else { echo "#666666"; } ?>></td><td>footer (<?php if (file_exists("data/colors/pf-font.txt")) { $color_pf_font = file_get_contents("data/colors/pf-font.txt"); if ($color_pf_font == "transparent") { echo "#ffffff"; } else { echo $color_pf_font; } } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=pf_bg <?php if ($target == "pg_bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pf-bg.txt")) { $color_pf_bg = file_get_contents("data/colors/pf-bg.txt"); if ($color_pf_bg != "transparent") { echo $color_pf_bg; } } ?>></td><td>footer (<?php if (file_exists("data/colors/pf-bg.txt")) { $color_pf_bg = file_get_contents("data/colors/pf-bg.txt"); if ($color_pf_bg == "transparent") { echo "transparent"; } else { echo $color_pf_bg; } } else { echo "transparent"; } ?>)</td></tr>
- </table>
- </td></tr>
- <tr><td><input type=submit class=input value="click here to apply selected color"></td></tr></form>
- <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <input type=hidden name=reset value=go>
- <tr><td><input class=input type=submit value="click here to use default colors"></td></tr>
- </form>
- <form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
- <tr><td><input class=input type=submit value="click here to go to the index page"></td></tr>
- </form>
- </table>
- </td><td valign=top>
- <form action=colors.php method=post>
- <table border=0 cellspacing=1 cellpadding=1 width=290>
- <tr><td><p><b>Color Schemes</b></p>
- <p>You are currently using <?php
- if (!file_exists("data/colors") or (file_exists("data/colors") and (count(glob("data/colors/*")) === 0))) {
- echo "the default colors of MAJ.";
- }
- if (file_exists("data/colors") and !file_exists("data/schemes/current/color.txt") and (count(glob("data/colors/*")) > 0)) {
- echo "a customized color scheme which cannot be restored after a scheme change or color reset.";
- }
- if (file_exists("data/schemes/current/color.txt")) {
- echo "the <b>";
- echo str_replace("_"," ",file_get_contents("data/schemes/current/color.txt"));
- echo "</b> color scheme. Be sure to save any modifications into a new scheme ID for later use.";
- }
- ?></p>
- <p>Enter a unique ID below to save the current color scheme.</p></td></tr>
- <tr><td><input type=text class=input name=id autocomplete=off></td></tr>
- <tr><td><input type=submit class=input value="click here to save current color scheme"></td></tr>
- </table>
- </form>
- <p></p>
- <?php
- if ($dh_color_scheme = opendir("data/schemes/colors")) {
- while (($color_scheme = readdir($dh_color_scheme)) !== false) {
- if ($color_scheme != "." && $color_scheme != ".." && fnmatch("*", $color_scheme)) {
- $color_schemes[] = $color_scheme;
- }
- }
- closedir($dh_color_scheme);
- }
- sort($color_schemes);
- if (count($color_schemes) > 0) {
- echo "<form action=colors.php method=post>";
- echo "<table border=0 cellspacing=1 cellpadding=1>";
- echo "<tr><td><p>Select an existing color scheme to apply or delete below.</p></td></tr>";
- echo "<tr><td><select name=scheme class=input>";
- foreach ($color_schemes as $scheme_name) {
- if (file_exists("data/schemes/current/color.txt") and (file_get_contents("data/schemes/current/color.txt") == $scheme_name)) {
- echo "<option selected>";
- }
- else {
- echo "<option>";
- }
- echo str_replace("_"," ",$scheme_name);
- }
- echo "</select></td></tr>";
- echo "<tr><td><input type=submit name=scheme_axn class=input value=\"click here to apply selected scheme\"></td></tr>";
- echo "<tr><td><input type=submit name=scheme_axn class=input value=\"click here to download selected scheme\"></td></tr>";
- echo "<tr><td><input type=submit name=scheme_axn class=input value=\"click here to delete selected scheme\"></td></tr>";
- echo "</table>";
- echo "</form>";
- echo "<p></p>";
- }
- ?>
- <?php
- if (@function_exists('gzinflate')) {
- ?>
- <form enctype="multipart/form-data" action=colors.php method=post>
- <table border=0 cellspacing=1 cellpadding=1>
- <tr><td><p>Select and upload a color scheme zip file below.</p></td></tr>
- <tr><td><input autocomplete=off type=file name=upload></td></tr>
- <tr><td><input type=submit class=input value="click here to upload scheme"></td></tr>
- </table>
- </form>
- <p></p>
- <?php
- }
- ?>
- </td></tr></table>