This blob has been accessed 324 times via Git panel.
- <?php
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- 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);
- }
- }
- $_REQUEST = stripslashes_array($_REQUEST);
- }
- $login_username = file_get_contents("data/username.txt");
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- }
- if (!file_exists("data/fonts")) {
- mkdir("data/fonts");
- }
- 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($_REQUEST['reset']) and !empty($_REQUEST['reset']) and ($_REQUEST['reset'] == "go")) {
- rmdirr("data/fonts");
- }
- if (isset($_REQUEST['body']) and !empty($_REQUEST['body']) and (file_get_contents("data/fonts/body.txt") != $_REQUEST['body'])) {
- $body_write_content = strtolower($_REQUEST['body']);
- $body_write_content = trim($body_write_content);
- $body_write_content = str_replace(", ",",",$body_write_content);
- $body_write_content = str_replace(" ,",",",$body_write_content);
- $body_write_content = preg_replace("/([!?,.])+/","\\1",$body_write_content);
- $body_write_content = rtrim($body_write_content,',');
- $body_write_content = str_replace(",",", ",$body_write_content);
- $body_write_content = preg_replace('/\s\s+/',' ',$body_write_content);
- $body_write_content = trim($body_write_content);
- }
- if (!isset($_REQUEST['body']) or empty($_REQUEST['body'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/fonts/body.txt")) {
- unlink("data/fonts/body.txt");
- }
- }
- }
- if (isset($_REQUEST['input']) and !empty($_REQUEST['input']) and (file_get_contents("data/fonts/input.txt") != $_REQUEST['input'])) {
- $input_write_content = strtolower($_REQUEST['input']);
- $input_write_content = trim($input_write_content);
- $input_write_content = str_replace(", ",",",$input_write_content);
- $input_write_content = str_replace(" ,",",",$input_write_content);
- $input_write_content = preg_replace("/([!?,.])+/","\\1",$input_write_content);
- $input_write_content = rtrim($input_write_content,',');
- $input_write_content = str_replace(",",", ",$input_write_content);
- $input_write_content = preg_replace('/\s\s+/',' ',$input_write_content);
- $input_write_content = trim($input_write_content);
- }
- if (!isset($_REQUEST['input']) or empty($_REQUEST['input'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/fonts/input.txt")) {
- unlink("data/fonts/input.txt");
- }
- }
- }
- if (isset($_REQUEST['panel_title']) and !empty($_REQUEST['panel_title']) and (file_get_contents("data/fonts/panel-title.txt") != $_REQUEST['panel_title'])) {
- $panel_title_write_content = strtolower($_REQUEST['panel_title']);
- $panel_title_write_content = trim($panel_title_write_content);
- $panel_title_write_content = str_replace(", ",",",$panel_title_write_content);
- $panel_title_write_content = str_replace(" ,",",",$panel_title_write_content);
- $panel_title_write_content = preg_replace("/([!?,.])+/","\\1",$panel_title_write_content);
- $panel_title_write_content = rtrim($panel_title_write_content,',');
- $panel_title_write_content = str_replace(",",", ",$panel_title_write_content);
- $panel_title_write_content = preg_replace('/\s\s+/',' ',$panel_title_write_content);
- $panel_title_write_content = trim($panel_title_write_content);
- }
- if (!isset($_REQUEST['panel_title']) or empty($_REQUEST['panel_title'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/fonts/panel-title.txt")) {
- unlink("data/fonts/panel-title.txt");
- }
- }
- }
- if (isset($_REQUEST['panel_body']) and !empty($_REQUEST['panel_body']) and (file_get_contents("data/fonts/panel-body.txt") != $_REQUEST['panel_body'])) {
- $panel_body_write_content = strtolower($_REQUEST['panel_body']);
- $panel_body_write_content = trim($panel_body_write_content);
- $panel_body_write_content = str_replace(", ",",",$panel_body_write_content);
- $panel_body_write_content = str_replace(" ,",",",$panel_body_write_content);
- $panel_body_write_content = preg_replace("/([!?,.])+/","\\1",$panel_body_write_content);
- $panel_body_write_content = rtrim($panel_body_write_content,',');
- $panel_body_write_content = str_replace(",",", ",$panel_body_write_content);
- $panel_body_write_content = preg_replace('/\s\s+/',' ',$panel_body_write_content);
- $panel_body_write_content = trim($panel_body_write_content);
- }
- if (!isset($_REQUEST['panel_body']) or empty($_REQUEST['panel_body'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/fonts/panel-body.txt")) {
- unlink("data/fonts/panel-body.txt");
- }
- }
- }
- if (isset($_REQUEST['panel_footer']) and !empty($_REQUEST['panel_footer']) and (file_get_contents("data/fonts/panel-footer.txt") != $_REQUEST['panel_footer'])) {
- $panel_footer_write_content = strtolower($_REQUEST['panel_footer']);
- $panel_footer_write_content = trim($panel_footer_write_content);
- $panel_footer_write_content = str_replace(", ",",",$panel_footer_write_content);
- $panel_footer_write_content = str_replace(" ,",",",$panel_footer_write_content);
- $panel_footer_write_content = preg_replace("/([!?,.])+/","\\1",$panel_footer_write_content);
- $panel_footer_write_content = rtrim($panel_footer_write_content,',');
- $panel_footer_write_content = str_replace(",",", ",$panel_footer_write_content);
- $panel_footer_write_content = preg_replace('/\s\s+/',' ',$panel_footer_write_content);
- $panel_footer_write_content = trim($panel_footer_write_content);
- }
- if (!isset($_REQUEST['panel_footer']) or empty($_REQUEST['panel_footer'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/fonts/panel-footer.txt")) {
- unlink("data/fonts/panel-footer.txt");
- }
- }
- }
- ?>
- <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;
- }
- </style>
- <table border=0 cellspacing=10 cellpadding=2><tr><td>
- <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 your preferred fonts to override the defaults. You may specify more than one font, separated by commas, for each field. The following fonts are relatively web safe:</p><p>Arial<br>Arial Black<br>Comic Sans MS<br>Courier New<br>Georgia<br>Impact<br>Times New Roman<br>Trebuchet MS<br>Verdana<br>Courier<br>Helvetica<br>Times<br>Andale Mono<br>Bitstream Vera Sans<br>Bitstream Vera Sans Mono<br>Bitstream Vera Serif</p><p>While this serves as a convenient preview, fonts 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>
- <form action=fonts.php method=post>
- <input type=hidden name=edit value=on>
- <table border=0 cellspacing=1 cellpadding=2 bgcolor=#cccccc>
- <tr><td bgcolor=#ffffff><p>body</p></td><td bgcolor=#ffffff><input type=text class=input name=body autocomplete=off<?php if (file_exists("data/fonts/body.txt")) {
- echo ' value="';
- readfile("data/fonts/body.txt");
- echo '"';
- } ?>></td></tr>
- <tr><td bgcolor=#ffffff><p>input</p></td><td bgcolor=#ffffff><input type=text class=input name=input autocomplete=off<?php if (file_exists("data/fonts/input.txt")) {
- echo ' value="';
- readfile("data/fonts/input.txt");
- echo '"';
- } ?>></td></tr>
- <tr><td bgcolor=#ffffff><p>panel title</p></td><td bgcolor=#ffffff><input type=text class=input name=panel_title autocomplete=off<?php if (file_exists("data/fonts/panel-title.txt")) {
- echo ' value="';
- readfile("data/fonts/panel-title.txt");
- echo '"';
- } ?>></td></tr>
- <tr><td bgcolor=#ffffff><p>panel body</p></td><td bgcolor=#ffffff><input type=text class=input name=panel_body autocomplete=off<?php if (file_exists("data/fonts/panel-body.txt")) {
- echo ' value="';
- readfile("data/fonts/panel-body.txt");
- echo '"';
- } ?>></td></tr>
- <tr><td bgcolor=#ffffff><p>panel footer</p></td><td bgcolor=#ffffff><input type=text class=input name=panel_footer autocomplete=off<?php if (file_exists("data/fonts/panel-footer.txt")) {
- echo ' value="';
- readfile("data/fonts/panel-footer.txt");
- echo '"';
- } ?>></td></tr>
- <tr><td bgcolor=#ffffff rowspan=3><p></p></td><td bgcolor=#ffffff><input type=submit class=input value="click here to apply fonts"></td></tr>
- </form>
- <form action=fonts.php method=post>
- <input type=hidden name=reset value=go>
- <tr><td bgcolor=#ffffff><input type=submit class=input value="click here to use default fonts"></td></tr>
- </form>
- <form action=index.php method=post>
- <tr><td bgcolor=#ffffff><input type=submit class=input value="click here to go to the index page"></td></tr>
- </form>
- </table>
- </td></tr></table>