This blob has been accessed 309 times via Git panel.
- <?php
- session_start();
- header("Cache-control: private");
- $login_username = file_get_contents("data/username.txt");
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- }
- if (isset($_REQUEST['title']) and !empty($_REQUEST['title']) and (file_get_contents("data/title.txt") != $_REQUEST['title'])) {
- $title_write_content = ucfirst($_REQUEST['title']);
- chmod("data/title.txt", 0666);
- }
- if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and (file_get_contents("data/author.txt") != $_REQUEST['author'])) {
- $author_write_content = ucfirst($_REQUEST['author']);
- chmod("data/author.txt", 0666);
- }
- if (isset($_REQUEST['email']) and !empty($_REQUEST['email']) and (file_get_contents("data/email.txt") != $_REQUEST['email']) and (ereg("@", $_REQUEST['email'])) and (ereg("\.", $_REQUEST['email']))) {
- $email_write_content = strtolower($_REQUEST['email']);
- $email_write_content = trim($email_write_content);
- $email_write_content = htmlentities($email_write_content, ENT_NOQUOTES);
- chmod("data/email.txt", 0666);
- }
- if (isset($_REQUEST['increase']) and !empty($_REQUEST['increase']) and is_numeric($_REQUEST['increase']) and ($_REQUEST['increase'] > 0) and (file_get_contents("data/increase.txt") != $_REQUEST['increase'])) {
- $increase_write_content = number_format($_REQUEST['increase'],0,'.','');
- chmod("data/increase.txt", 0666);
- }
- if (!isset($_REQUEST['increase']) or empty($_REQUEST['increase']) or !is_numeric($_REQUEST['increase']) or ($_REQUEST['increase'] <= 0)) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/increase.txt")) {
- unlink("data/increase.txt");
- }
- }
- }
- if (isset($_REQUEST['offset']) and !empty($_REQUEST['offset']) and is_numeric($_REQUEST['offset']) and (file_get_contents("data/offset.txt") != $_REQUEST['offset'])) {
- chmod("data/offset.txt", 0666);
- }
- if (!isset($_REQUEST['offset']) or empty($_REQUEST['offset']) or !is_numeric($_REQUEST['offset'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/offset.txt")) {
- unlink("data/offset.txt");
- }
- }
- }
- if (isset($_REQUEST['sfx']) and !empty($_REQUEST['sfx']) and is_numeric($_REQUEST['sfx']) and (file_get_contents("data/sfx.txt") != $_REQUEST['sfx'])) {
- chmod("data/sfx.txt", 0666);
- }
- if (!isset($_REQUEST['sfx']) or empty($_REQUEST['sfx']) or !is_numeric($_REQUEST['sfx'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/sfx.txt")) {
- unlink("data/sfx.txt");
- }
- }
- }
- if (isset($_REQUEST['ping']) and !empty($_REQUEST['ping']) and (file_get_contents("data/ping.txt") != $_REQUEST['ping']) and (ereg("\.", $_REQUEST['ping'])) and (ereg("http://", $_REQUEST['ping']))) {
- $ping_write_content = strtolower($_REQUEST['ping']);
- $ping_write_content = trim($ping_write_content);
- $ping_write_content = htmlentities($ping_write_content, ENT_NOQUOTES);
- chmod("data/ping.txt", 0666);
- }
- if (!isset($_REQUEST['ping']) or empty($_REQUEST['ping'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/ping.txt")) {
- unlink("data/ping.txt");
- }
- }
- }
- if (isset($_REQUEST['nocomment']) and !empty($_REQUEST['nocomment']) and ($_REQUEST['nocomment'] == "on") and !file_exists("data/nocomment.txt")) {
- touch("data/nocomment.txt");
- chmod("data/nocomment.txt", 0666);
- }
- if (!isset($_REQUEST['nocomment']) or empty($_REQUEST['nocomment'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/nocomment.txt")) {
- unlink("data/nocomment.txt");
- }
- }
- }
- if (isset($_REQUEST['nak']) and !empty($_REQUEST['nak']) and ($_REQUEST['nak'] == "on") and !file_exists("data/nak.txt")) {
- touch("data/nak.txt");
- chmod("data/nak.txt", 0666);
- }
- if (!isset($_REQUEST['nak']) or empty($_REQUEST['nak'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/nak.txt")) {
- unlink("data/nak.txt");
- }
- }
- }
- if (isset($_REQUEST['nocat']) and !empty($_REQUEST['nocat']) and ($_REQUEST['nocat'] == "on") and !file_exists("data/nocat.txt")) {
- touch("data/nocat.txt");
- chmod("data/nocat.txt", 0666);
- }
- if (!isset($_REQUEST['nocat']) or empty($_REQUEST['nocat'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/nocat.txt")) {
- unlink("data/nocat.txt");
- }
- }
- }
- if (isset($_REQUEST['old']) and !empty($_REQUEST['old']) and ($_REQUEST['old'] == "on") and !file_exists("data/old.txt")) {
- touch("data/old.txt");
- chmod("data/old.txt", 0666);
- }
- if (!isset($_REQUEST['old']) or empty($_REQUEST['old'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/old.txt")) {
- unlink("data/old.txt");
- }
- }
- }
- if (isset($_REQUEST['del_favicon']) and !empty($_REQUEST['del_favicon']) and ($_REQUEST['del_favicon'] == "on")) {
- if (file_exists("favicon.ico")) {
- unlink("favicon.ico");
- }
- }
- if (isset($_REQUEST['del_picture']) and !empty($_REQUEST['del_picture']) and ($_REQUEST['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($_REQUEST['bg_scroll']) and !empty($_REQUEST['bg_scroll']) and ($_REQUEST['bg_scroll'] == "on") and !file_exists("data/bg-scroll.txt")) {
- touch("data/bg-scroll.txt");
- chmod("data/bg-scroll.txt", 0666);
- }
- if (!isset($_REQUEST['bg_scroll']) or empty($_REQUEST['bg_scroll'])) {
- if (isset($_REQUEST['edit']) and ($_REQUEST['edit'] == "on")) {
- if (file_exists("data/bg-scroll.txt")) {
- unlink("data/bg-scroll.txt");
- }
- }
- }
- if (isset($_REQUEST['bg_repeat']) and !empty($_REQUEST['bg_repeat']) and (file_get_contents("data/bg-repeat.txt") != $_REQUEST['bg_repeat']) and ($_REQUEST['bg_repeat'] != "repeat")) {
- chmod("data/bg-repeat.txt", 0666);
- }
- if (isset($_REQUEST['bg_repeat']) and !empty($_REQUEST['bg_repeat']) and (file_get_contents("data/bg-repeat.txt") != $_REQUEST['bg_repeat']) and ($_REQUEST['bg_repeat'] == "repeat") and file_exists("data/bg-repeat.txt")) {
- unlink("data/bg-repeat.txt");
- }
- if (isset($_REQUEST['bg_position']) and !empty($_REQUEST['bg_position']) and (file_get_contents("data/bg-position.txt") != $_REQUEST['bg_position']) and ($_REQUEST['bg_position'] != "top left")) {
- chmod("data/bg-position.txt", 0666);
- }
- if (isset($_REQUEST['bg_position']) and !empty($_REQUEST['bg_position']) and (file_get_contents("data/bg-position.txt") != $_REQUEST['bg_position']) and ($_REQUEST['bg_position'] == "top left") and file_exists("data/bg-position.txt")) {
- unlink("data/bg-position.txt");
- }
- if (isset($_REQUEST['del_background']) and !empty($_REQUEST['del_background']) and ($_REQUEST['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 = 2000000;
- 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']);
- chmod("favicon.ico", 0666);
- }
- 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", 0777);
- chmod("images", 0777);
- }
- 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']);
- chmod("images/profile.gif", 0666);
- }
- 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']);
- chmod("images/profile.jpg", 0666);
- }
- if ($_FILES['picture']['type']=="image/png") {
- $res = copy($_FILES['picture']['tmp_name'], "images/profile.png");
- unlink($_FILES['picture']['tmp_name']);
- chmod("images/profile.png", 0666);
- }
- }
- else {
- unlink($_FILES['picture']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['picture']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['picture']['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", 0777);
- chmod("images", 0777);
- }
- 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']);
- chmod("images/background.gif", 0666);
- }
- 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']);
- chmod("images/background.jpg", 0666);
- }
- if ($_FILES['background']['type']=="image/png") {
- $res = copy($_FILES['background']['tmp_name'], "images/background.png");
- unlink($_FILES['background']['tmp_name']);
- chmod("images/background.png", 0666);
- }
- }
- else {
- unlink($_FILES['background']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['background']['tmp_name']);
- }
- }
- else {
- unlink($_FILES['background']['tmp_name']);
- }
- }
- if (isset($_REQUEST['profile']) and !empty($_REQUEST['profile']) and (file_get_contents("data/profile.txt") != $_REQUEST['profile'])) {
- $profile_write_content = ucfirst($_REQUEST['profile']);
- chmod("data/profile.txt", 0666);
- }
- if (isset($_REQUEST['username']) and !empty($_REQUEST['username']) and (file_get_contents("data/username.txt") != $_REQUEST['username'])) {
- chmod("data/username.txt", 0666);
- $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: verdana, helvetica, sans-serif;
- background-color: #FFFFFF;
- }
- p
- {
- 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: verdana,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 value="<?php 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=4><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>
- <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>
- <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=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 <i>favicon.ico</i>.</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://www.chami.com/html-kit/services/favicon/ rel=nofollow 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>
- <tr><td></td><td><input class=input type=submit value="click here to activate new settings"></td></tr>
- <?php
- if (isset($_REQUEST['passwd_new']) and !empty($_REQUEST['passwd_new']) and isset($_REQUEST['passwd_cur']) and !empty($_REQUEST['passwd_cur']) and isset($_REQUEST['passwd_conf']) and !empty($_REQUEST['passwd_conf']) and ($_REQUEST['passwd_new'] == $_REQUEST['passwd_conf'])) {
- $passwd_new_crypt = sha1($_REQUEST['passwd_new']);
- $passwd_new_crypt = md5($passwd_new_crypt);
- $passwd_new_crypt = crypt($passwd_new_crypt, $passwd_new_crypt);
- $passwd_cur_crypt = sha1($_REQUEST['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)) {
- chmod("data/password.txt", 0666);
- 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>