This blob has been accessed 349 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['title']) and !empty($_POST['title']) and (file_get_contents("data/title.txt") != $_POST['title'])) {
- $title_write_content = ucfirst($_POST['title']);
- }
- if (isset($_POST['author']) and !empty($_POST['author']) and (file_get_contents("data/author.txt") != $_POST['author'])) {
- $author_write_content = ucfirst($_POST['author']);
- }
- if (isset($_POST['email']) and !empty($_POST['email']) and (file_get_contents("data/email.txt") != $_POST['email']) and (ereg("@", $_POST['email'])) and (ereg("\.", $_POST['email']))) {
- $email_write_content = strtolower($_POST['email']);
- $email_write_content = trim($email_write_content);
- $email_write_content = htmlentities($email_write_content, ENT_NOQUOTES);
- }
- if (!isset($_POST['email']) or empty($_POST['email'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/email.txt")) {
- unlink("data/email.txt");
- }
- }
- }
- if (isset($_POST['increase']) and !empty($_POST['increase']) and is_numeric($_POST['increase']) and ($_POST['increase'] > 0) and (file_get_contents("data/increase.txt") != $_POST['increase'])) {
- $increase_write_content = number_format($_POST['increase'],0,'.','');
- }
- if (!isset($_POST['increase']) or empty($_POST['increase']) or !is_numeric($_POST['increase']) or ($_POST['increase'] <= 0)) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/increase.txt")) {
- unlink("data/increase.txt");
- }
- }
- }
- if (isset($_POST['offset']) and !empty($_POST['offset']) and is_numeric($_POST['offset']) and (file_get_contents("data/offset.txt") != $_POST['offset'])) {
- }
- if (!isset($_POST['offset']) or empty($_POST['offset']) or !is_numeric($_POST['offset'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/offset.txt")) {
- unlink("data/offset.txt");
- }
- }
- }
- if (isset($_POST['sfx']) and !empty($_POST['sfx']) and is_numeric($_POST['sfx']) and (file_get_contents("data/sfx.txt") != $_POST['sfx'])) {
- }
- if (!isset($_POST['sfx']) or empty($_POST['sfx']) or !is_numeric($_POST['sfx'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/sfx.txt")) {
- unlink("data/sfx.txt");
- }
- }
- }
- if (isset($_POST['ping']) and !empty($_POST['ping']) and (file_get_contents("data/ping.txt") != $_POST['ping']) and (ereg("\.", $_POST['ping'])) and (ereg("http://", $_POST['ping']))) {
- $ping_write_content = strtolower($_POST['ping']);
- $ping_write_content = trim($ping_write_content);
- $ping_write_content = htmlentities($ping_write_content, ENT_NOQUOTES);
- }
- if (!isset($_POST['ping']) or empty($_POST['ping'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ping.txt")) {
- unlink("data/ping.txt");
- }
- }
- }
- if (isset($_POST['nocomment']) and !empty($_POST['nocomment']) and ($_POST['nocomment'] == "on") and !file_exists("data/nocomment.txt")) {
- touch("data/nocomment.txt");
- }
- if (!isset($_POST['nocomment']) or empty($_POST['nocomment'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/nocomment.txt")) {
- unlink("data/nocomment.txt");
- }
- }
- }
- if (isset($_POST['memcomment']) and !empty($_POST['memcomment']) and ($_POST['memcomment'] == "on") and !file_exists("data/memcomment.txt")) {
- touch("data/memcomment.txt");
- }
- if (!isset($_POST['memcomment']) or empty($_POST['memcomment'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/memcomment.txt")) {
- unlink("data/memcomment.txt");
- }
- }
- }
- if (isset($_POST['nak']) and !empty($_POST['nak']) and ($_POST['nak'] == "on") and !file_exists("data/nak.txt")) {
- touch("data/nak.txt");
- }
- if (!isset($_POST['nak']) or empty($_POST['nak'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/nak.txt")) {
- unlink("data/nak.txt");
- }
- }
- }
- if (isset($_POST['xscreen']) and !empty($_POST['xscreen']) and ($_POST['xscreen'] == "on") and !file_exists("data/xscreen.txt")) {
- touch("data/xscreen.txt");
- }
- if (!isset($_POST['xscreen']) or empty($_POST['xscreen'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xscreen.txt")) {
- unlink("data/xscreen.txt");
- }
- }
- }
- if (file_exists("data/nocomment.txt") and !file_exists("data/memcomment.txt")) {
- if (file_exists("data/nak.txt")) {
- unlink("data/nak.txt");
- }
- if (file_exists("data/xscreen.txt")) {
- unlink("data/xscreen.txt");
- }
- }
- if (!file_exists("data/nocomment.txt") and file_exists("data/memcomment.txt")) {
- unlink("data/memcomment.txt");
- }
- if (isset($_POST['nopdf']) and !empty($_POST['nopdf']) and ($_POST['nopdf'] == "on") and !file_exists("data/nopdf.txt")) {
- touch("data/nopdf.txt");
- }
- if (!isset($_POST['nopdf']) or empty($_POST['nopdf'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/nopdf.txt")) {
- unlink("data/nopdf.txt");
- }
- }
- }
- if (isset($_POST['xrand']) and !empty($_POST['xrand']) and ($_POST['xrand'] == "on") and !file_exists("data/xrand.txt")) {
- touch("data/xrand.txt");
- }
- if (!isset($_POST['xrand']) or empty($_POST['xrand'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xrand.txt")) {
- unlink("data/xrand.txt");
- }
- }
- }
- if (isset($_POST['xarc']) and !empty($_POST['xarc']) and ($_POST['xarc'] == "on") and !file_exists("data/xarc.txt")) {
- touch("data/xarc.txt");
- }
- if (!isset($_POST['xarc']) or empty($_POST['xarc'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xarc.txt")) {
- unlink("data/xarc.txt");
- }
- }
- }
- if (isset($_POST['xcat']) and !empty($_POST['xcat']) and ($_POST['xcat'] == "on") and !file_exists("data/xcat.txt")) {
- touch("data/xcat.txt");
- }
- if (!isset($_POST['xcat']) or empty($_POST['xcat'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xcat.txt")) {
- unlink("data/xcat.txt");
- }
- }
- }
- if (isset($_POST['nocat']) and !empty($_POST['nocat']) and ($_POST['nocat'] == "on") and !file_exists("data/nocat.txt")) {
- touch("data/nocat.txt");
- }
- if (!isset($_POST['nocat']) or empty($_POST['nocat'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/nocat.txt")) {
- unlink("data/nocat.txt");
- }
- }
- }
- if (isset($_POST['xrecent']) and !empty($_POST['xrecent']) and ($_POST['xrecent'] == "on") and !file_exists("data/xrecent.txt")) {
- touch("data/xrecent.txt");
- }
- if (!isset($_POST['xrecent']) or empty($_POST['xrecent'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xrecent.txt")) {
- unlink("data/xrecent.txt");
- }
- }
- }
- if (isset($_POST['xucomment']) and !empty($_POST['xucomment']) and ($_POST['xucomment'] == "on") and !file_exists("data/xucomment.txt")) {
- touch("data/xucomment.txt");
- }
- if (!isset($_POST['xucomment']) or empty($_POST['xucomment'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xucomment.txt")) {
- unlink("data/xucomment.txt");
- }
- }
- }
- if (isset($_POST['round']) and !empty($_POST['round']) and ($_POST['round'] == "on") and !file_exists("data/round.txt")) {
- touch("data/round.txt");
- }
- if (!isset($_POST['round']) or empty($_POST['round'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/round.txt")) {
- unlink("data/round.txt");
- }
- }
- }
- if (isset($_POST['center']) and !empty($_POST['center']) and ($_POST['center'] == "on") and !file_exists("data/center.txt")) {
- touch("data/center.txt");
- }
- if (!isset($_POST['center']) or empty($_POST['center'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/center.txt")) {
- unlink("data/center.txt");
- }
- }
- }
- if (isset($_POST['old']) and !empty($_POST['old']) and ($_POST['old'] == "on") and !file_exists("data/old.txt")) {
- touch("data/old.txt");
- }
- if (!isset($_POST['old']) or empty($_POST['old'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/old.txt")) {
- unlink("data/old.txt");
- }
- }
- }
- if (isset($_POST['wiki']) and !empty($_POST['wiki']) and ($_POST['wiki'] == "on") and !file_exists("data/wiki.txt")) {
- touch("data/wiki.txt");
- }
- if (!isset($_POST['wiki']) or empty($_POST['wiki'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/wiki.txt")) {
- unlink("data/wiki.txt");
- }
- }
- }
- if (isset($_POST['pf']) and !empty($_POST['pf']) and ($_POST['pf'] == "on") and !file_exists("data/pf.txt")) {
- touch("data/pf.txt");
- }
- if (!isset($_POST['pf']) or empty($_POST['pf'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/pf.txt")) {
- unlink("data/pf.txt");
- }
- }
- }
- if (isset($_POST['pf_badwords']) and !empty($_POST['pf_badwords']) and (file_get_contents("data/pf-badwords.txt") != $_POST['pf_badwords'])) {
- $pf_badwords_write_content = strtolower($_POST['pf_badwords']);
- $pf_badwords_write_content = str_replace("\n","|",$pf_badwords_write_content);
- $pf_badwords_write_content = str_replace("\r","|",$pf_badwords_write_content);
- $pf_badwords_write_content = str_replace("||","|",$pf_badwords_write_content);
- $pf_badwords_write_content = trim($pf_badwords_write_content);
- }
- if (!isset($_POST['pf_badwords']) or empty($_POST['pf_badwords'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/pf-badwords.txt")) {
- unlink("data/pf-badwords.txt");
- }
- }
- }
- if (isset($_POST['pf_censor']) and !empty($_POST['pf_censor']) and (file_get_contents("data/pf-censor.txt") != $_POST['pf_censor'])) {
- $pf_censor_write_content = strtolower($_POST['pf_censor']);
- $pf_censor_write_content = trim($pf_censor_write_content);
- }
- if (!isset($_POST['pf_censor']) or empty($_POST['pf_censor'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/pf-censor.txt")) {
- unlink("data/pf-censor.txt");
- }
- }
- }
- if (isset($_POST['bb']) and !empty($_POST['bb']) and ($_POST['bb'] == "on") and !file_exists("data/bb.txt")) {
- touch("data/bb.txt");
- }
- if (!isset($_POST['bb']) or empty($_POST['bb'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb.txt")) {
- unlink("data/bb.txt");
- }
- }
- }
- if (isset($_POST['reg']) and !empty($_POST['reg']) and ($_POST['reg'] == "on") and !file_exists("data/reg.txt")) {
- touch("data/reg.txt");
- }
- if (!isset($_POST['reg']) or empty($_POST['reg'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/reg.txt")) {
- unlink("data/reg.txt");
- }
- }
- }
- if (isset($_POST['xapp']) and !empty($_POST['xapp']) and ($_POST['xapp'] == "on") and !file_exists("data/xapp.txt")) {
- touch("data/xapp.txt");
- }
- if (!isset($_POST['xapp']) or empty($_POST['xapp'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xapp.txt")) {
- unlink("data/xapp.txt");
- }
- }
- }
- if (isset($_POST['reset']) and !empty($_POST['reset']) and ($_POST['reset'] == "on") and !file_exists("data/reset.txt")) {
- touch("data/reset.txt");
- }
- if (!isset($_POST['reset']) or empty($_POST['reset'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/reset.txt")) {
- unlink("data/reset.txt");
- }
- }
- }
- if (isset($_POST['member']) and !empty($_POST['member']) and ($_POST['member'] == "on") and !file_exists("data/member.txt")) {
- touch("data/member.txt");
- }
- if (!isset($_POST['member']) or empty($_POST['member'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/member.txt")) {
- unlink("data/member.txt");
- }
- }
- }
- if (isset($_POST['ml']) and !empty($_POST['ml']) and ($_POST['ml'] == "on") and !file_exists("data/ml.txt")) {
- touch("data/ml.txt");
- }
- if (!isset($_POST['ml']) or empty($_POST['ml'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ml.txt")) {
- unlink("data/ml.txt");
- }
- }
- }
- if (isset($_POST['stats']) and !empty($_POST['stats']) and ($_POST['stats'] == "on") and !file_exists("data/bb-stats.txt")) {
- touch("data/bb-stats.txt");
- }
- if (!isset($_POST['stats']) or empty($_POST['stats'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-stats.txt")) {
- unlink("data/bb-stats.txt");
- }
- }
- }
- if (isset($_POST['summary']) and !empty($_POST['summary']) and ($_POST['summary'] == "on") and !file_exists("data/bb-summary.txt")) {
- touch("data/bb-summary.txt");
- }
- if (!isset($_POST['summary']) or empty($_POST['summary'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-summary.txt")) {
- unlink("data/bb-summary.txt");
- }
- }
- }
- if (isset($_POST['rank']) and !empty($_POST['rank']) and ($_POST['rank'] == "on") and !file_exists("data/rank.txt")) {
- touch("data/rank.txt");
- }
- if (!isset($_POST['rank']) or empty($_POST['rank'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/rank.txt")) {
- unlink("data/rank.txt");
- }
- }
- }
- if (isset($_POST['sigs']) and !empty($_POST['sigs']) and ($_POST['sigs'] == "on") and !file_exists("data/bb-sig.txt")) {
- touch("data/bb-sig.txt");
- }
- if (!isset($_POST['sigs']) or empty($_POST['sigs'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-sig.txt")) {
- unlink("data/bb-sig.txt");
- }
- }
- }
- if (isset($_POST['avatars']) and !empty($_POST['avatars']) and ($_POST['avatars'] == "on") and !file_exists("data/avatar.txt")) {
- touch("data/avatar.txt");
- }
- if (!isset($_POST['avatars']) or empty($_POST['avatars'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/avatar.txt")) {
- unlink("data/avatar.txt");
- }
- }
- }
- if (isset($_POST['resize_jpg_avatars']) and !empty($_POST['resize_jpg_avatars']) and ($_POST['resize_jpg_avatars'] == "on") and !file_exists("data/avatar-resize-jpg.txt")) {
- touch("data/avatar-resize-jpg.txt");
- }
- if (!isset($_POST['resize_jpg_avatars']) or empty($_POST['resize_jpg_avatars'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/avatar-resize-jpg.txt")) {
- unlink("data/avatar-resize-jpg.txt");
- }
- }
- }
- if (isset($_POST['resize_png_avatars']) and !empty($_POST['resize_png_avatars']) and ($_POST['resize_png_avatars'] == "on") and !file_exists("data/avatar-resize-png.txt")) {
- touch("data/avatar-resize-png.txt");
- }
- if (!isset($_POST['resize_png_avatars']) or empty($_POST['resize_png_avatars'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/avatar-resize-png.txt")) {
- unlink("data/avatar-resize-png.txt");
- }
- }
- }
- if (isset($_POST['resize_gif_avatars']) and !empty($_POST['resize_gif_avatars']) and ($_POST['resize_gif_avatars'] == "on") and !file_exists("data/avatar-resize-gif.txt")) {
- touch("data/avatar-resize-gif.txt");
- }
- if (!isset($_POST['resize_gif_avatars']) or empty($_POST['resize_gif_avatars'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/avatar-resize-gif.txt")) {
- unlink("data/avatar-resize-gif.txt");
- }
- }
- }
- if ((!isset($_POST['sig']) or empty($_POST['sig'])) and isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- unlink("data/sig.txt");
- }
- if (isset($_POST['sig']) and !empty($_POST['sig'])) {
- $sig = str_replace("[b]","<b>",$_POST['sig']);
- $sig = str_replace("[/b]","</b>",$sig);
- $sig = str_replace("[i]","<i>",$sig);
- $sig = str_replace("[/i]","</i>",$sig);
- $sig = str_replace("[u]","<u>",$sig);
- $sig = str_replace("[/u]","</u>",$sig);
- $sig = str_replace("[sup]","<sup>",$sig);
- $sig = str_replace("[/sup]","</sup>",$sig);
- $sig = str_replace("[sub]","<sub>",$sig);
- $sig = str_replace("[/sub]","</sub>",$sig);
- $sig = str_replace("[strike]","<strike>",$sig);
- $sig = str_replace("[/strike]","</strike>",$sig);
- $sig = str_replace("\n","<br>", $sig);
- $sig = ucfirst($sig);
- $sig = trim($sig);
- }
- if (isset($_POST['pass_len']) and !empty($_POST['pass_len']) and is_numeric($_POST['pass_len']) and ($_POST['pass_len'] > 0) and (file_get_contents("data/bb-passlen.txt") != $_POST['pass_len'])) {
- $pass_len_write_content = number_format($_POST['pass_len'],0,'.','');
- }
- if (!isset($_POST['pass_len']) or empty($_POST['pass_len']) or !is_numeric($_POST['pass_len']) or ($_POST['pass_len'] <= 0)) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-passlen.txt")) {
- unlink("data/bb-passlen.txt");
- }
- }
- }
- if (isset($_POST['min_age']) and !empty($_POST['min_age']) and is_numeric($_POST['min_age']) and ($_POST['min_age'] > 0) and (file_get_contents("data/bb-min-age.txt") != $_POST['min_age'])) {
- $min_age_write_content = number_format($_POST['min_age'],0,'.','');
- }
- if (!isset($_POST['min_age']) or empty($_POST['min_age']) or !is_numeric($_POST['min_age']) or ($_POST['min_age'] <= 0)) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-min-age.txt")) {
- unlink("data/bb-min-age.txt");
- }
- }
- }
- if (isset($_POST['max_age']) and !empty($_POST['max_age']) and is_numeric($_POST['max_age']) and ($_POST['max_age'] > 0) and (file_get_contents("data/bb-max-age.txt") != $_POST['max_age'])) {
- $max_age_write_content = number_format($_POST['max_age'],0,'.','');
- }
- if (!isset($_POST['max_age']) or empty($_POST['max_age']) or !is_numeric($_POST['max_age']) or ($_POST['max_age'] <= 0)) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-max-age.txt")) {
- unlink("data/bb-max-age.txt");
- }
- }
- }
- if (isset($_POST['bb_idle']) and !empty($_POST['bb_idle']) and is_numeric($_POST['bb_idle']) and ($_POST['bb_idle'] > 0) and (file_get_contents("data/bb-idle.txt") != $_POST['bb_idle'])) {
- $bb_idle_write_content = number_format($_POST['bb_idle'],0,'.','');
- }
- if (!isset($_POST['bb_idle']) or empty($_POST['bb_idle']) or !is_numeric($_POST['bb_idle']) or ($_POST['bb_idle'] <= 0)) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-idle.txt")) {
- unlink("data/bb-idle.txt");
- }
- }
- }
- if (isset($_POST['bb_reserved']) and !empty($_POST['bb_reserved']) and (file_get_contents("data/bb-reserved.txt") != $_POST['bb_reserved'])) {
- $bb_reserved_write_content = strtolower($_POST['bb_reserved']);
- $bb_reserved_write_content = trim($bb_reserved_write_content);
- }
- if (!isset($_POST['bb_reserved']) or empty($_POST['bb_reserved'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-reserved.txt")) {
- unlink("data/bb-reserved.txt");
- }
- }
- }
- if (isset($_POST['bb_disclaimer']) and !empty($_POST['bb_disclaimer']) and (file_get_contents("data/bb-disclaimer.txt") != $_POST['bb_disclaimer'])) {
- $bb_disclaimer_write_content = ucfirst($_POST['bb_disclaimer']);
- $bb_disclaimer_write_content = str_replace("\n","<br>",$bb_disclaimer_write_content);
- $bb_disclaimer_write_content = trim($bb_disclaimer_write_content);
- }
- if (!isset($_POST['bb_disclaimer']) or empty($_POST['bb_disclaimer'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bb-disclaimer.txt")) {
- unlink("data/bb-disclaimer.txt");
- }
- }
- }
- if (isset($_POST['ml_from']) and !empty($_POST['ml_from'])) {
- touch("data/ml-from.txt");
- }
- if (!isset($_POST['ml_from']) or empty($_POST['ml_from'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ml-from.txt")) {
- unlink("data/ml-from.txt");
- }
- }
- }
- if (isset($_POST['ml_reply2']) and !empty($_POST['ml_reply2']) and (file_get_contents("data/ml-reply2.txt") != $_POST['ml_reply2']) and (ereg("@", $_POST['ml_reply2'])) and (ereg("\.", $_POST['ml_reply2']))) {
- $ml_reply2_write_content = strtolower($_POST['ml_reply2']);
- $ml_reply2_write_content = trim($ml_reply2_write_content);
- $ml_reply2_write_content = htmlentities($ml_reply2_write_content, ENT_NOQUOTES);
- }
- if (!isset($_POST['ml_reply2']) or empty($_POST['ml_reply2'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ml-reply2.txt")) {
- unlink("data/ml-reply2.txt");
- }
- if (file_exists("data/ml-from.txt")) {
- unlink("data/ml-from.txt");
- }
- }
- }
- if (isset($_POST['ml_prepend']) and !empty($_POST['ml_prepend']) and (file_get_contents("data/ml-prepend.txt") != $_POST['ml_prepend'])) {
- $ml_prepend_write_content = ucfirst($_POST['ml_prepend']);
- $ml_prepend_write_content = trim($ml_prepend_write_content);
- }
- if (!isset($_POST['ml_prepend']) or empty($_POST['ml_prepend'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ml-prepend.txt")) {
- unlink("data/ml-prepend.txt");
- }
- }
- }
- if (isset($_POST['ml_header']) and !empty($_POST['ml_header']) and (file_get_contents("data/ml-header.txt") != $_POST['ml_header'])) {
- $ml_header_write_content = ucfirst($_POST['ml_header']);
- $ml_header_write_content = trim($ml_header_write_content);
- }
- if (!isset($_POST['ml_header']) or empty($_POST['ml_header'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ml-header.txt")) {
- unlink("data/ml-header.txt");
- }
- }
- }
- if (isset($_POST['ml_footer']) and !empty($_POST['ml_footer']) and (file_get_contents("data/ml-footer.txt") != $_POST['ml_footer'])) {
- $ml_footer_write_content = ucfirst($_POST['ml_footer']);
- $ml_footer_write_content = trim($ml_footer_write_content);
- }
- if (!isset($_POST['ml_footer']) or empty($_POST['ml_footer'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/ml-footer.txt")) {
- unlink("data/ml-footer.txt");
- }
- }
- }
- if (isset($_POST['del_favicon']) and !empty($_POST['del_favicon']) and ($_POST['del_favicon'] == "on")) {
- if (file_exists("favicon.ico")) {
- unlink("favicon.ico");
- }
- }
- if (isset($_POST['del_picture']) and !empty($_POST['del_picture']) and ($_POST['del_picture'] == "on")) {
- if (file_exists("images/profile.gif")) {
- unlink("images/profile.gif");
- }
- if (file_exists("images/profile.jpg")) {
- unlink("images/profile.jpg");
- }
- if (file_exists("images/profile.png")) {
- unlink("images/profile.png");
- }
- }
- if (isset($_POST['del_avatar']) and !empty($_POST['del_avatar']) and ($_POST['del_avatar'] == "on")) {
- if (file_exists("images/avatar.gif")) {
- unlink("images/avatar.gif");
- }
- if (file_exists("images/avatar.jpg")) {
- unlink("images/avatar.jpg");
- }
- if (file_exists("images/avatar.png")) {
- unlink("images/avatar.png");
- }
- }
- if (isset($_POST['bg_scroll']) and !empty($_POST['bg_scroll']) and ($_POST['bg_scroll'] == "on") and !file_exists("data/bg-scroll.txt")) {
- touch("data/bg-scroll.txt");
- }
- if (!isset($_POST['bg_scroll']) or empty($_POST['bg_scroll'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/bg-scroll.txt")) {
- unlink("data/bg-scroll.txt");
- }
- }
- }
- if (isset($_POST['bg_repeat']) and !empty($_POST['bg_repeat']) and (file_get_contents("data/bg-repeat.txt") != $_POST['bg_repeat']) and ($_POST['bg_repeat'] != "repeat")) {
- }
- if (isset($_POST['bg_repeat']) and !empty($_POST['bg_repeat']) and (file_get_contents("data/bg-repeat.txt") != $_POST['bg_repeat']) and ($_POST['bg_repeat'] == "repeat") and file_exists("data/bg-repeat.txt")) {
- unlink("data/bg-repeat.txt");
- }
- if (isset($_POST['bg_position']) and !empty($_POST['bg_position']) and (file_get_contents("data/bg-position.txt") != $_POST['bg_position']) and ($_POST['bg_position'] != "top left")) {
- }
- if (isset($_POST['bg_position']) and !empty($_POST['bg_position']) and (file_get_contents("data/bg-position.txt") != $_POST['bg_position']) and ($_POST['bg_position'] == "top left") and file_exists("data/bg-position.txt")) {
- unlink("data/bg-position.txt");
- }
- if (isset($_POST['del_background']) and !empty($_POST['del_background']) and ($_POST['del_background'] == "on")) {
- if (file_exists("images/background.gif")) {
- unlink("images/background.gif");
- }
- if (file_exists("images/background.jpg")) {
- unlink("images/background.jpg");
- }
- if (file_exists("images/background.png")) {
- unlink("images/background.png");
- }
- if (file_exists("data/bg-scroll.txt")) {
- unlink("data/bg-scroll.txt");
- }
- if (file_exists("data/bg-repeat.txt")) {
- unlink("data/bg-repeat.txt");
- }
- if (file_exists("data/bg-position.txt")) {
- unlink("data/bg-position.txt");
- }
- }
- $max_image_size = 8000000;
- if (isset($_FILES['favicon']) and !empty($_FILES['favicon'])) {
- if (is_uploaded_file($_FILES['favicon']['tmp_name'])) {
- if ($_FILES['favicon']['size']<=$max_image_size) {
- if ($_FILES['favicon']['name'] == "favicon.ico") {
- if (file_exists("favicon.ico")) {
- unlink("favicon.ico");
- }
- $res = copy($_FILES['favicon']['tmp_name'], "favicon.ico");
- unlink($_FILES['favicon']['tmp_name']);
- }
- else {
- unlink($_FILES['favicon']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['favicon']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['favicon']['tmp_name']);
- }
- }
- if (isset($_FILES['picture']) and !empty($_FILES['picture'])) {
- if (is_uploaded_file($_FILES['picture']['tmp_name'])) {
- if ($_FILES['picture']['size']<=$max_image_size) {
- if (($_FILES['picture']['type']=="image/gif") || ($_FILES['picture']['type']=="image/pjpeg") || ($_FILES['picture']['type']=="image/jpeg") || ($_FILES['picture']['type']=="image/png")) {
- if (!file_exists("images")) {
- mkdir("images");
- }
- if (file_exists("images/profile.gif")) {
- unlink("images/profile.gif");
- }
- if (file_exists("images/profile.jpg")) {
- unlink("images/profile.jpg");
- }
- if (file_exists("images/profile.png")) {
- unlink("images/profile.png");
- }
- if ($_FILES['picture']['type']=="image/gif") {
- $res = copy($_FILES['picture']['tmp_name'], "images/profile.gif");
- unlink($_FILES['picture']['tmp_name']);
- }
- if (($_FILES['picture']['type']=="image/jpeg") or ($_FILES['picture']['type']=="image/pjpeg")) {
- $res = copy($_FILES['picture']['tmp_name'], "images/profile.jpg");
- unlink($_FILES['picture']['tmp_name']);
- }
- if ($_FILES['picture']['type']=="image/png") {
- $res = copy($_FILES['picture']['tmp_name'], "images/profile.png");
- unlink($_FILES['picture']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['picture']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['picture']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['picture']['tmp_name']);
- }
- }
- if (isset($_FILES['avatar']) and !empty($_FILES['avatar'])) {
- if (is_uploaded_file($_FILES['avatar']['tmp_name'])) {
- if ($_FILES['avatar']['size']<=$max_image_size) {
- if (($_FILES['avatar']['type']=="image/gif") || ($_FILES['avatar']['type']=="image/pjpeg") || ($_FILES['avatar']['type']=="image/jpeg") || ($_FILES['avatar']['type']=="image/png")) {
- if (!file_exists("images")) {
- mkdir("images");
- }
- if (file_exists("images/avatar.gif")) {
- unlink("images/avatar.gif");
- }
- if (file_exists("images/avatar.jpg")) {
- unlink("images/avatar.jpg");
- }
- if (file_exists("images/avatar.png")) {
- unlink("images/avatar.png");
- }
- if ($_FILES['avatar']['type']=="image/gif") {
- $res = copy($_FILES['avatar']['tmp_name'], "images/avatar.gif");
- unlink($_FILES['avatar']['tmp_name']);
- }
- if (($_FILES['avatar']['type']=="image/jpeg") or ($_FILES['avatar']['type']=="image/pjpeg")) {
- $res = copy($_FILES['avatar']['tmp_name'], "images/avatar.jpg");
- unlink($_FILES['avatar']['tmp_name']);
- }
- if ($_FILES['avatar']['type']=="image/png") {
- $res = copy($_FILES['avatar']['tmp_name'], "images/avatar.png");
- unlink($_FILES['avatar']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['avatar']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['avatar']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['avatar']['tmp_name']);
- }
- }
- if (isset($_FILES['background']) and !empty($_FILES['background'])) {
- if (is_uploaded_file($_FILES['background']['tmp_name'])) {
- if ($_FILES['background']['size']<=$max_image_size) {
- if (($_FILES['background']['type']=="image/gif") || ($_FILES['background']['type']=="image/pjpeg") || ($_FILES['background']['type']=="image/jpeg") || ($_FILES['background']['type']=="image/png")) {
- if (!file_exists("images")) {
- mkdir("images");
- }
- if (file_exists("images/background.gif")) {
- unlink("images/background.gif");
- }
- if (file_exists("images/background.jpg")) {
- unlink("images/background.jpg");
- }
- if (file_exists("images/background.png")) {
- unlink("images/background.png");
- }
- if ($_FILES['background']['type']=="image/gif") {
- $res = copy($_FILES['background']['tmp_name'], "images/background.gif");
- unlink($_FILES['background']['tmp_name']);
- }
- if (($_FILES['background']['type']=="image/jpeg") or ($_FILES['background']['type']=="image/pjpeg")) {
- $res = copy($_FILES['background']['tmp_name'], "images/background.jpg");
- unlink($_FILES['background']['tmp_name']);
- }
- if ($_FILES['background']['type']=="image/png") {
- $res = copy($_FILES['background']['tmp_name'], "images/background.png");
- unlink($_FILES['background']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['background']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['background']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['background']['tmp_name']);
- }
- }
- unlink("data/css.txt");
- }
- if (isset($_POST['css']) and !empty($_POST['css'])) {
- $css_write_content = str_replace("<style>","",$_POST['css']);
- $css_write_content = str_replace("</style>","",$css_write_content);
- $css_write_content = trim($css_write_content);
- }
- }
- if (!isset($_POST['css']) or empty($_POST['css'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/css.txt")) {
- unlink("data/css.txt");
- }
- }
- }
- if (isset($_POST['profile']) and !empty($_POST['profile']) and (file_get_contents("data/profile.txt") != $_POST['profile'])) {
- $profile_write_content = ucfirst($_POST['profile']);
- }
- if (isset($_POST['username']) and !empty($_POST['username']) and (file_get_contents("data/username.txt") != $_POST['username'])) {
- header("Location: login.php");
- }
- ?>
- <title>Settings</title>
- <style>
- body {
- color: #666666;
- margin: 10px;
- 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, a:visited {
- color: #666666;
- }
- a:hover {
- color: #336699;
- }
- a:active {
- color: #336699;
- }
- .input {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 300px;
- 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
- }
- </style>
- <table border="0" cellspacing="1" cellpadding="2">
- <form enctype="multipart/form-data" action="settings.php" method="post">
- <input type="hidden" name="edit" value="on">
- <tr><td>blog title*</td><td><input autocomplete="off" class="input" type="text" name="title" value="<?php readfile("data/title.txt"); ?>"></td></tr>
- <tr><td>author*</td><td><input autocomplete="off" class="input" type="text" name="author" value="<?php readfile("data/author.txt"); ?>"></td></tr>
- <tr><td>e-mail address*</td><td><input autocomplete="off" class="input" type="text" name="email" <?php if (file_exists("data/email.txt")) { echo 'value="'; readfile("data/email.txt"); echo '"'; } ?>></td></tr>
- <tr><td>username*</td><td><input autocomplete="off" class="input" type="text" name="username" value="<?php readfile("data/username.txt"); ?>"></td></tr>
- <tr><td>entries per page</td><td><input autocomplete="off" class="input" type="text" name="increase" value="<?php readfile("data/increase.txt"); ?>"></td></tr>
- <tr><td>timezone offset in seconds</td><td><input autocomplete="off" class="input" type="text" name="offset" value="<?php readfile("data/offset.txt"); ?>"></td></tr>
- <tr><td>spread firefox <a href="http://www.spreadfirefox.com/?q=user/register&r=76458" target="_maj">affiliate</a> id</td><td><input autocomplete="off" class="input" type="text" name="sfx" value="<?php readfile("data/sfx.txt"); ?>"></td></tr>
- <tr><td>ping on content change</td><td><input autocomplete="off" class="input" type="text" name="ping" value="<?php readfile("data/ping.txt"); ?>"></td></tr>
- <tr><td rowspan="<?php
- $toggles_rowspan = "13";
- if (file_exists("data/email.txt")) {
- $toggles_rowspan = $toggles_rowspan + 1;
- }
- if (file_exists("data/lite.txt")) {
- $toggles_rowspan = $toggles_rowspan - 2;
- }
- echo $toggles_rowspan;
- ?>">toggles</td><td><input type="checkbox" name="nocomment" <?php if (file_exists("data/nocomment.txt")) { echo checked; } ?>> Do not allow visitors to post comments.</td></tr>
- <?php if (!file_exists("data/lite.txt")) { ?>
- <tr><td><input type="checkbox" name="memcomment" <?php if (file_exists("data/memcomment.txt")) { echo checked; } ?>> Do not prevent members from posting comments.</td></tr>
- <?php } ?>
- <?php if (file_exists("data/email.txt")) { ?>
- <tr><td><input type="checkbox" name="nak" <?php if (file_exists("data/nak.txt")) { echo checked; } ?>> Do not acknowledge comment submissions via e-mail.</td></tr>
- <?php } ?>
- <?php if (!file_exists("data/lite.txt")) { ?>
- <tr><td><input type="checkbox" name="xscreen" <?php if (file_exists("data/xscreen.txt")) { echo checked; } ?>> Do not screen comments. Automatically approve them.</td></tr>
- <?php } ?>
- <tr><td><input type="checkbox" name="nopdf" <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</td></tr>
- <tr><td><input type="checkbox" name="xrecent" <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel to guests.</td></tr>
- <tr><td><input type="checkbox" name="xucomment" <?php if (file_exists("data/xucomment.txt")) { echo checked; } ?>> Do not show unread comments panel.</td></tr>
- <tr><td><input type="checkbox" name="xrand" <?php if (file_exists("data/xrand.txt")) { echo checked; } ?>> Do not show random entries panel.</td></tr>
- <tr><td><input type="checkbox" name="xarc" <?php if (file_exists("data/xarc.txt")) { echo checked; } ?>> Do not show archives panel.</td></tr>
- <tr><td><input type="checkbox" name="xcat" <?php if (file_exists("data/xcat.txt")) { echo checked; } ?>> Do not show categories panel.</td></tr>
- <tr><td><input type="checkbox" name="nocat" <?php if (file_exists("data/nocat.txt")) { echo checked; } ?>> Do not show categorized items with unfiled entries.</td></tr>
- <tr><td><input type="checkbox" name="round" <?php if (file_exists("data/round.txt")) { echo checked; } ?>> Use round corners.</td></tr>
- <tr><td><input type="checkbox" name="center" <?php if (file_exists("data/center.txt")) { echo checked; } ?>> Display <?php
- if (file_exists("data/bb.txt")) {
- echo "bulletin board";
- }
- else {
- echo "blog";
- }
- ?> on center of page.</td></tr>
- <tr><td><input type="checkbox" name="old" <?php if (file_exists("data/old.txt")) { echo checked; } ?>> Display entries from oldest to newest.</td></tr>
- <?php
- if (file_exists("favicon.ico")) {
- echo '<tr><td></td><td><input type="checkbox" name="del_favicon"> Delete existing favicon.ico.</td></tr>';
- }
- if (file_exists("images/profile.gif") or file_exists("images/profile.jpg") or file_exists("images/profile.png")) {
- echo '<tr><td></td><td><input type="checkbox" name="del_picture"> Delete existing profile picture.</td></tr>';
- }
- if (file_exists("images/background.gif") or file_exists("images/background.jpg") or file_exists("images/background.png")) {
- echo '<tr><td></td><td><input type="checkbox" name="del_background"> Delete existing background image.</td></tr>';
- echo '<tr><td></td><td><input type="checkbox" name="bg_scroll"';
- if (file_exists("data/bg-scroll.txt")) {
- echo " checked";
- }
- echo '> Background image scrolls with the rest of the page.</td></tr>';
- echo '<tr><td rowspan=4>background repeat</td><td><input type="radio" name="bg_repeat" value="repeat"
- style="background : #ffffff; color : #666666"';
- if (!file_exists("data/bg-repeat.txt")) {
- echo " checked";
- }
- echo '> Background image will be repeated vertically and horizontally.</td></tr>';
- echo '<tr><td><input type="radio" name="bg_repeat" value="repeat-x"
- style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-repeat.txt") and (file_get_contents("data/bg-repeat.txt") == "repeat-x")) {
- echo ' checked';
- }
- echo '> Background image will be repeated horizontally.</td></tr>';
- echo '<tr><td><input type="radio" name="bg_repeat" value="repeat-y"
- style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-repeat.txt") and (file_get_contents("data/bg-repeat.txt") == "repeat-y")) {
- echo ' checked';
- }
- echo '> Background image will be repeated vertically.</td></tr>';
- echo '<tr><td><input type="radio" name="bg_repeat" value="no-repeat"
- style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-repeat.txt") and (file_get_contents("data/bg-repeat.txt") == "no-repeat")) {
- echo ' checked';
- }
- echo '> Background image will be displayed only once.</td></tr>';
- if (file_exists("data/bg-repeat.txt")) {
- echo "<tr><td>background position</td><td>";
- echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\" bgcolor=\"#999999\">";
- echo "<tr>";
- echo "<td bgcolor=\"#ffffff\" width=\"25%\" align=\"center\">Position</td>";
- echo "<td bgcolor=\"#ffffff\" width=\"25%\" align=\"center\">Left</td>";
- echo "<td bgcolor=\"#ffffff\" width=\"25%\" align=\"center\">Center</td>";
- echo "<td bgcolor=\"#ffffff\" width=\"25%\" align=\"center\">Right</td>";
- echo "</tr>";
- echo "<tr><td bgcolor=\"#ffffff\">Top</td><td bgcolor=\"#ffffff\" align=\"center\">";
- echo "<input type=\"radio\" name=\"bg_position\" value=\"top left\" style=\"background : #ffffff; color : #666666\"";
- if (!file_exists("data/bg-position.txt")) {
- echo ' checked';
- }
- echo '></td>';
- echo '<td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="top center" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "top center")) {
- echo ' checked';
- }
- echo '></td>';
- echo '<td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="top right" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "top right")) {
- echo ' checked';
- }
- echo '></td></tr>';
- echo '<tr><td bgcolor=#ffffff>Center</td><td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="center left" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "center left")) {
- echo ' checked';
- }
- echo '></td>';
- echo '<td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="center center" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "center center")) {
- echo ' checked';
- }
- echo '></td>';
- echo '<td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="center right" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "center right")) {
- echo ' checked';
- }
- echo '></td></tr>';
- echo '<tr><td bgcolor=#ffffff>Bottom</td><td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="bottom left" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "bottom left")) {
- echo ' checked';
- }
- echo '></td>';
- echo '<td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="bottom center" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "bottom center")) {
- echo ' checked';
- }
- echo '></td>';
- echo '<td bgcolor=#ffffff align=center><input type="radio" name="bg_position" value="bottom right" style="background : #ffffff; color : #666666"';
- if (file_exists("data/bg-position.txt") and (file_get_contents("data/bg-position.txt") == "bottom right")) {
- echo ' checked';
- }
- echo '></td></tr></table></td></tr>';
- }
- }
- ?>
- <tr><td>upload <a href="http://tools.dynamicdrive.com/favicon/" target="_maj">favicon.ico</a></td><td><input autocomplete="off" type="file" name="favicon"></td></tr>
- <tr><td>upload profile picture</td><td><input autocomplete="off" type="file" name="picture"></td></tr>
- <tr><td>upload background image</td><td><input autocomplete="off" type="file" name="background"></td></tr>
- <tr><td>user-defined css</td><td><textarea class="input" name="css" rows="10"><?php readfile("data/css.txt"); ?></textarea></td></tr>
- <tr><td>profile*</td><td><textarea class="input" name="profile" rows="10"><?php readfile("data/profile.php"); ?></textarea></td></tr>
- <tr><td>current password</td><td><input autocomplete="off" class="input" type="password" name="passwd_cur"></td></tr>
- <tr><td>new password</td><td><input autocomplete="off" class="input" type="password" name="passwd_new"></td></tr>
- <tr><td>confirm new password</td><td><input autocomplete="off" class="input" type="password" name="passwd_conf"></td></tr>
- <?php if (!file_exists("data/lite.txt")) { ?>
- <tr><td>profanity filter</td><td><input type="checkbox" name="pf" <?php if (file_exists("data/pf.txt")) { echo checked; } ?>> Enable profanity filter.</td></tr>
- <?php if (file_exists("data/pf.txt")) { ?>
- <tr><td>badwords</td><td><textarea class="input" name="pf_badwords"><?php if (file_exists("data/pf-badwords.txt")) { echo str_replace("|","\n",file_get_contents("data/pf-badwords.txt")); } ?></textarea></td></tr>
- <tr><td>censor mark</td><td><input class="input" autocomplete="off" type="text" name="pf_censor" <?php
- if (file_exists("data/pf-censor.txt")) {
- echo "value=";
- readfile("data/pf-censor.txt");
- }
- ?>></td></tr>
- <?php } ?>
- <tr><td>wiki</td><td><input type="checkbox" name="wiki" <?php if (file_exists("data/wiki.txt")) { echo checked; } ?>> Enable wiki-style editing.</td></tr>
- <?php
- $bb_rowspan = "10";
- if (file_exists("data/bb.txt") and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
- $bb_rowspan = $bb_rowspan + 1;
- }
- if (file_exists("data/avatar.txt")) {
- $bb_rowspan = $bb_rowspan + 3;
- }
- ?>
- <tr><td rowspan=<?php echo $bb_rowspan; ?>>bulletin board</td><td><input type="checkbox" name=bb <?php if (file_exists("data/bb.txt")) { echo checked; } ?>> Enable simple bulletin board.</td></tr>
- <?php if (file_exists("data/bb.txt")) { ?>
- <tr><td><input type="checkbox" name="reg" <?php if (file_exists("data/reg.txt")) { echo checked; } ?>> Enable new user registration.</td></tr>
- <tr><td><input type="checkbox" name="xapp" <?php if (file_exists("data/xapp.txt")) { echo checked; } ?>> Enable automatic activation of confirmed users.</td></tr>
- <tr><td><input type="checkbox" name="reset" <?php if (file_exists("data/reset.txt")) { echo checked; } ?>> Enable password reset requests.</td></tr>
- <tr><td><input type="checkbox" name="member" <?php if (file_exists("data/member.txt")) { echo checked; } ?>> Only members can view posts of other members.</td></tr>
- <tr><td><input type="checkbox" name="stats" <?php if (file_exists("data/bb-stats.txt")) { echo checked; } ?>> Enable statistics panel.</td></tr>
- <tr><td><input type="checkbox" name="summary" <?php if (file_exists("data/bb-summary.txt")) { echo checked; } ?>> Enable summary panel.</td></tr>
- <tr><td><input type="checkbox" name="rank" <?php if (file_exists("data/rank.txt")) { echo checked; } ?>> Enable ranks.</td></tr>
- <tr><td><input type="checkbox" name="sigs" <?php if (file_exists("data/bb-sig.txt")) { echo checked; } ?>> Enable signatures.</td></tr>
- <tr><td><input type="checkbox" name="avatars" <?php if (file_exists("data/avatar.txt")) { echo checked; } ?>> Enable avatars.</td></tr>
- <?php if (file_exists("data/avatar.txt")) { ?>
- <tr><td><input type="checkbox" name="resize_jpg_avatars" <?php if (file_exists("data/avatar-resize-jpg.txt")) { echo checked; } ?>> Resize JPG avatars.</td></tr>
- <tr><td><input type="checkbox" name="resize_png_avatars" <?php if (file_exists("data/avatar-resize-png.txt")) { echo checked; } ?>> Resize PNG avatars.</td></tr>
- <tr><td><input type="checkbox" name="resize_gif_avatars" <?php if (file_exists("data/avatar-resize-gif.txt")) { echo checked; } ?>> Resize GIF avatars. Disables animation.</td></tr>
- <?php } ?>
- <?php
- if (file_exists("images/avatar.gif") or file_exists("images/avatar.jpg") or file_exists("images/avatar.png")) {
- echo '<tr><td><input type="checkbox" name="del_avatar"> Delete existing avatar.</td></tr>';
- }
- ?>
- <tr><td>upload avatar</td><td><input autocomplete="off" type="file" name="avatar"></td></tr>
- <?php if (file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) { ?>
- <tr><td>signature</td><td><textarea class="input" name="sig"><?php if (file_exists("data/sig.txt")) {
- $get_sig = file_get_contents("data/sig.txt");
- $get_sig = str_replace("<b>","[b]",$get_sig);
- $get_sig = str_replace("</b>","[/b]",$get_sig);
- $get_sig = str_replace("<i>","[i]",$get_sig);
- $get_sig = str_replace("</i>","[/i]",$get_sig);
- $get_sig = str_replace("<u>","[u]",$get_sig);
- $get_sig = str_replace("</u>","[/u]",$get_sig);
- $get_sig = str_replace("<sup>","[sup]",$get_sig);
- $get_sig = str_replace("</sup>","[/sup]",$get_sig);
- $get_sig = str_replace("<sub>","[sub]",$get_sig);
- $get_sig = str_replace("</sub>","[/sub]",$get_sig);
- $get_sig = str_replace("<strike>","[strike]",$get_sig);
- $get_sig = str_replace("</strike>","[/strike]",$get_sig);
- $get_sig = str_replace("<br>","\n",$get_sig);
- echo $get_sig;
- } ?></textarea></td></tr>
- <?php } ?>
- <tr><td>minimum password length</td><td><input class="input" autocomplete="off" type="text" name="pass_len" <?php
- if (file_exists("data/bb-passlen.txt")) {
- echo "value=";
- readfile("data/bb-passlen.txt");
- }
- ?>></td></tr>
- <tr><td>minimum age to register</td><td><input class="input" autocomplete="off" type="text" name="min_age" <?php
- if (file_exists("data/bb-min-age.txt")) {
- echo "value=";
- readfile("data/bb-min-age.txt");
- }
- ?>></td></tr>
- <tr><td>maximum age to register</td><td><input class="input" autocomplete="off" type="text" name="max_age" <?php
- if (file_exists("data/bb-max-age.txt")) {
- echo "value=";
- readfile("data/bb-max-age.txt");
- }
- ?>></td></tr>
- <tr><td>maximum idle time in minutes</td><td><input class="input" autocomplete="off" type="text" name="bb_idle" <?php
- if (file_exists("data/bb-idle.txt")) {
- echo "value=";
- readfile("data/bb-idle.txt");
- }
- ?>></td></tr>
- <tr><td>reserved usernames</td><td><textarea class="input" name="bb_reserved"><?php if (file_exists("data/bb-reserved.txt")) { readfile("data/bb-reserved.txt"); } ?></textarea></td></tr>
- <tr><td>disclaimer</td><td><textarea class="input" name="bb_disclaimer"><?php if (file_exists("data/bb-disclaimer.txt")) { echo str_replace("<br>","\n",file_get_contents("data/bb-disclaimer.txt")); } ?></textarea></td></tr>
- <?php } ?>
- <tr><td<?php
- if (file_exists("data/ml-reply2.txt")) { echo " rowspan=2"; } ?>>mailing list</td><td><input type="checkbox" name="ml" <?php if (file_exists("data/ml.txt")) { echo checked; } ?>> Enable simple mailing list.</td></tr>
- <?php
- if (file_exists("data/ml-reply2.txt")) {
- echo "<tr><td><input type=\"checkbox\" name=\"ml_from\"";
- if (file_exists("data/ml-from.txt")) {
- echo " checked";
- }
- echo ">Use reply-to as sender address.</td></tr>";
- }
- ?>
- <?php if (file_exists("data/ml.txt")) { ?>
- <tr><td>reply-to</td><td><input class="input" autocomplete="off" type="text" name="ml_reply2" <?php if (file_exists("data/ml-reply2.txt")) { echo "value=\""; readfile("data/ml-reply2.txt"); echo "\""; } ?>></td></tr>
- <tr><td>prepend to subject</td><td><input class="input" autocomplete="off" type="text" name="ml_prepend" <?php if (file_exists("data/ml-prepend.txt")) { echo "value=\""; readfile("data/ml-prepend.txt"); echo "\""; } ?>></td></tr>
- <tr><td>header</td><td><textarea class="input" name="ml_header"><?php if (file_exists("data/ml-header.txt")) { readfile("data/ml-header.txt"); } ?></textarea></td></tr>
- <tr><td>footer</td><td><textarea class="input" name="ml_footer"><?php if (file_exists("data/ml-footer.txt")) { readfile("data/ml-footer.txt"); } ?></textarea></td></tr>
- <?php } } ?>
- <tr><td></td><td><input class="input" type="submit" value="click here to activate new settings"></td></tr>
- <?php
- if (isset($_POST['passwd_new']) and !empty($_POST['passwd_new']) and isset($_POST['passwd_cur']) and !empty($_POST['passwd_cur']) and isset($_POST['passwd_conf']) and !empty($_POST['passwd_conf']) and ($_POST['passwd_new'] == $_POST['passwd_conf'])) {
- $passwd_new_crypt = sha1($_POST['passwd_new']);
- $passwd_new_crypt = md5($passwd_new_crypt);
- $passwd_new_crypt = crypt($passwd_new_crypt, $passwd_new_crypt);
- $passwd_cur_crypt = sha1($_POST['passwd_cur']);
- $passwd_cur_crypt = md5($passwd_cur_crypt);
- $passwd_cur_crypt = crypt($passwd_cur_crypt, $passwd_cur_crypt);
- if ((file_get_contents("data/password.txt") != $passwd_new_crypt) and (file_get_contents("data/password.txt") == $passwd_cur_crypt)) {
- echo "<tr><td></td><td>password changed</td></tr>";
- }
- }
- ?>
- </form>
- <form enctype="multipart/form-data" action="index.php" method="post">
- <tr><td></td><td><input class="input" type="submit" value="click here to go to the index page"></td></tr>
- </form>
- </table>