This blob has been accessed 368 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);
- }
- }
- $_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['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['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['xbold']) and !empty($_POST['xbold']) and ($_POST['xbold'] == "on") and !file_exists("data/xbold.txt")) {
- touch("data/xbold.txt");
- }
- if (!isset($_POST['xbold']) or empty($_POST['xbold'])) {
- if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
- if (file_exists("data/xbold.txt")) {
- unlink("data/xbold.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");
- }
- }
- }
- // start of wiki mod (20071130)
- 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");
- }
- }
- }
- // end of wiki mod (20071130)
- 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['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']);
- }
- }
- 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'])) {
- $login_url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/login.php";
- $login_url = str_replace("//login.php", "/login.php", $login_url);
- header("Location: $login_url");
- }
- ?>
- <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="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <input type=hidden name=edit value=on>
- <tr><td><p>blog title*</p></td><td><input autocomplete=off class=input type=text name=title value="<?php readfile("data/title.txt"); ?>"></td></tr>
- <tr><td><p>author*</p></td><td><input autocomplete=off class=input type=text name=author value="<?php readfile("data/author.txt"); ?>"></td></tr>
- <tr><td><p>e-mail address*</p></td><td><input autocomplete=off class=input type=text name=email <?php if (file_exists("data/email.txt")) { echo 'value="'; readfile("data/email.txt"); } ?>"></td></tr>
- <tr><td><p>username*</p></td><td><input autocomplete=off class=input type=text name=username value="<?php readfile("data/username.txt"); ?>"></td></tr>
- <tr><td><p>entries per page</p></td><td><input autocomplete=off class=input type=text name=increase value="<?php readfile("data/increase.txt"); ?>"></td></tr>
- <tr><td><p>timezone offset in seconds</p></td><td><input autocomplete=off class=input type=text name=offset value="<?php readfile("data/offset.txt"); ?>"></td></tr>
- <tr><td><p>spread firefox <a href="http://www.spreadfirefox.com/?q=user/register&r=76458" target=_maj>affiliate</a> id</p></td><td><input autocomplete=off class=input type=text name=sfx value="<?php readfile("data/sfx.txt"); ?>"></td></tr>
- <tr><td><p>ping on content change</p></td><td><input autocomplete=off class=input type=text name=ping value="<?php readfile("data/ping.txt"); ?>"></td></tr>
- <tr><td rowspan=<?php
- if (file_exists("data/email.txt")) {
- echo "12";
- }
- else {
- echo "11";
- }
- ?>
- ><p>toggles</p></td><td><p><input type=checkbox name=nocomment <?php if (file_exists("data/nocomment.txt")) { echo checked; } ?>> Do not allow visitors to post comments.</p></td></tr>
- <?php if (file_exists("data/email.txt")) { ?>
- <tr><td><p><input type=checkbox name=nak <?php if (file_exists("data/nak.txt")) { echo checked; } ?>> Do not acknowledge comment submissions via e-mail.</p></td></tr>
- <?php } ?>
- <tr><td><p><input type=checkbox name=nopdf <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</p></td></tr>
- <tr><td><p><input type=checkbox name=xrecent <?php if (file_exists("data/xrecent.txt")) { echo checked; } ?>> Do not show recent entries panel to guests.</p></td></tr>
- <tr><td><p><input type=checkbox name=xrand <?php if (file_exists("data/xrand.txt")) { echo checked; } ?>> Do not show random entries panel.</p></td></tr>
- <tr><td><p><input type=checkbox name=xarc <?php if (file_exists("data/xarc.txt")) { echo checked; } ?>> Do not show archives panel.</p></td></tr>
- <tr><td><p><input type=checkbox name=xcat <?php if (file_exists("data/xcat.txt")) { echo checked; } ?>> Do not show categories panel.</p></td></tr>
- <tr><td><p><input type=checkbox name=nocat <?php if (file_exists("data/nocat.txt")) { echo checked; } ?>> Do not show categorized items with unfiled entries.</p></td></tr>
- <tr><td><p><input type=checkbox name=xbold <?php if (file_exists("data/xbold.txt")) { echo checked; } ?>> Do not make hyperlinks bold.</p></td></tr>
- <tr><td><p><input type=checkbox name=round <?php if (file_exists("data/round.txt")) { echo checked; } ?>> Use round corners.</p></td></tr>
- <tr><td><p><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.</p></td></tr>
- <tr><td><p><input type=checkbox name=old <?php if (file_exists("data/old.txt")) { echo checked; } ?>> Display entries from oldest to newest.</p></td></tr>
- <?php
- if (file_exists("favicon.ico")) {
- echo '<tr><td></td><td><p><input type=checkbox name=del_favicon> Delete existing favicon.ico.</p></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><p><input type=checkbox name=del_picture> Delete existing profile picture.</p></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><p><input type=checkbox name=del_background> Delete existing background image.</p></td></tr>';
- echo '<tr><td></td><td><p><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.</p></td></tr>';
- echo '<tr><td rowspan=4><p>background repeat</td><td><p><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.</p></td></tr>';
- echo '<tr><td><p><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.</p></td></tr>';
- echo '<tr><td><p><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.</p></td></tr>';
- echo '<tr><td><p><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.</p></td></tr>';
- if (file_exists("data/bg-repeat.txt")) {
- echo '<tr><td><p>background position</td><td>
- <table border=0 cellspacing=1 cellpadding=1 bgcolor=#999999>
- <tr><td bgcolor=#FFFFFF width=25% align=center><p>Position</p></td><td bgcolor=#FFFFFF width=25% align=center><p>Left</p></td><td bgcolor=#FFFFFF width=25% align=center><p>Center</p></td><td bgcolor=#FFFFFF width=25% align=center><p>Right</p></td></tr>
- <tr><td bgcolor=#FFFFFF><p>Top</p></td>
- <td bgcolor=#FFFFFF align=center>
- <p><input type="radio" name="bg_position" value="top left" style="background : #FFFFFF; color : #666666"';
- if (!file_exists("data/bg-position.txt")) {
- echo ' checked';
- }
- echo '></p></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><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 '></p></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><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 '></p></td></tr>';
- echo '<tr><td bgcolor=#FFFFFF><p>Center</p></td><td bgcolor=#FFFFFF align=center><p><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 '></p></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><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 '></p></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><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 '></p></td></tr>';
- echo '<tr><td bgcolor=#FFFFFF><p>Bottom</p></td><td bgcolor=#FFFFFF align=center><p><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 '></p></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><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 '></p></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><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 '></p></td></tr></table></td></tr>';
- }
- }
- ?>
- <tr><td><p>upload <a href=http://tools.dynamicdrive.com/favicon/ target=_maj>favicon.ico</a></p></td><td><input autocomplete=off type=file name=favicon></td></tr>
- <tr><td><p>upload profile picture</p></td><td><input autocomplete=off type=file name=picture></td></tr>
- <tr><td><p>upload background image</p></td><td><input autocomplete=off type=file name=background></td></tr>
- <tr><td><p>profile*</p></td><td><textarea class=input name=profile rows=10><?php readfile("data/profile.php"); ?></textarea></td></tr>
- <tr><td><p>current password</p></td><td><input autocomplete=off class=input type=password name=passwd_cur></td></tr>
- <tr><td><p>new password</p></td><td><input autocomplete=off class=input type=password name=passwd_new></td></tr>
- <tr><td><p>confirm new password</p></td><td><input autocomplete=off class=input type=password name=passwd_conf></td></tr>
- <?php if (!file_exists("data/lite.txt")) { ?>
- <tr><td><p>profanity filter</p></td><td><p><input type=checkbox name=pf <?php if (file_exists("data/pf.txt")) { echo checked; } ?>> Enable profanity filter.</p></td></tr>
- <?php if (file_exists("data/pf.txt")) { ?>
- <tr><td><p>badwords</p></td><td><p><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></p></td></tr>
- <tr><td><p>censor mark</p></td><td><p><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");
- }
- ?>></p></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>
- <tr><td <?php if (file_exists("data/bb.txt") and !file_exists("images/avatar.jpg") and !file_exists("images/avatar.gif") and !file_exists("images/avatar.png")) { echo "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"))) { echo "rowspan=11"; } ?>><p>bulletin board</p></td><td><p><input type=checkbox name=bb <?php if (file_exists("data/bb.txt")) { echo checked; } ?>> Enable simple bulletin board.</p></td></tr>
- <?php if (file_exists("data/bb.txt")) { ?>
- <tr><td><p><input type=checkbox name=reg <?php if (file_exists("data/reg.txt")) { echo checked; } ?>> Enable new user registration.</p></td></tr>
- <tr><td><p><input type=checkbox name=xapp <?php if (file_exists("data/xapp.txt")) { echo checked; } ?>> Enable automatic activation of confirmed users.</p></td></tr>
- <tr><td><p><input type=checkbox name=reset <?php if (file_exists("data/reset.txt")) { echo checked; } ?>> Enable password reset requests.</p></td></tr>
- <tr><td><p><input type=checkbox name=member <?php if (file_exists("data/member.txt")) { echo checked; } ?>> Only members can view posts of other members.</p></td></tr>
- <tr><td><p><input type=checkbox name=stats <?php if (file_exists("data/bb-stats.txt")) { echo checked; } ?>> Enable statistics panel.</p></td></tr>
- <tr><td><p><input type=checkbox name=summary <?php if (file_exists("data/bb-summary.txt")) { echo checked; } ?>> Enable summary panel.</p></td></tr>
- <tr><td><p><input type=checkbox name=rank <?php if (file_exists("data/rank.txt")) { echo checked; } ?>> Enable ranks.</p></td></tr>
- <tr><td><p><input type=checkbox name=sigs <?php if (file_exists("data/bb-sig.txt")) { echo checked; } ?>> Enable signatures.</p></td></tr>
- <tr><td><p><input type=checkbox name=avatars <?php if (file_exists("data/avatar.txt")) { echo checked; } ?>> Enable avatars.</p></td></tr>
- <?php
- if (file_exists("images/avatar.gif") or file_exists("images/avatar.jpg") or file_exists("images/avatar.png")) {
- echo '<tr><td><p><input type=checkbox name=del_avatar> Delete existing avatar.</p></td></tr>';
- }
- ?>
- <tr><td><p>upload avatar</p></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><p>signature</p></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><p>minimum password length</p></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><p>minimum age to register</p></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><p>maximum age to register</p></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><p>maximum idle time in minutes</p></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><p>reserved usernames</p></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><p>disclaimer</p></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"; } ?>><p>mailing list</p></td><td><p><input type=checkbox name=ml <?php if (file_exists("data/ml.txt")) { echo checked; } ?>> Enable simple mailing list.</p></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><p>reply-to</p></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><p>prepend to subject</p></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><p>header</p></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><p>footer</p></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><p>password changed</p></td></tr>";
- }
- }
- ?>
- </form>
- <form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
- <tr><td></td><td><input class=input type=submit value="click here to go to the index page"></td></tr>
- </form>
- </table>