This commit has been accessed 589 times via Git panel.
commit e011ee437bfb34cf32d77eb1f22ae07947616f69
tree 9a69bb9491d04baaa7fb37d18ff77225297e915a
parent 83fe9a2e8147f6f12ead031ffe6dda1d80032667
author Engels Antonio <engels@majcms.org> 1277314201 +0800
committer Engels Antonio <engels@majcms.org> 1277314201 +0800
maj-0.14-20081107-bb.zip
diff --git a/edit.php b/edit.php
index 463e8c8..79ae111 100644
--- a/edit.php
+++ b/edit.php
@@ -178,7 +178,7 @@ a:active {
padding: 5px 5px 5px 5px;
background-color: #ffffff;
margin: 0px;
- border-color: #CCCCCC;
+ border-color: #cccccc;
border-width: 1px 1px 0px 1px;
border-style: solid solid none solid;
}
@@ -195,7 +195,7 @@ a:active {
padding: 5px 5px 5px 5px;
background-color: #ffffff;
margin: 0px;
- border-color: #CCCCCC;
+ border-color: #cccccc;
border-width: 1px 1px 1px 1px;
border-style: solid solid solid solid;
}
@@ -212,19 +212,19 @@ a:active {
padding: 5px 5px 5px 5px;
background-color: #ffffff;
margin: 0px;
- border-color: #CCCCCC;
+ border-color: #cccccc;
border-width: 0px 1px 1px 1px;
border-style: none solid solid solid;
}
+
+<?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
+
</style>
<?php
if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_POST['comment_txt']) and !empty($_POST['comment_txt']) and isset($_REQUEST['type']) and !empty($_REQUEST['type']) and (($_REQUEST['type'] == "live") or ($_REQUEST['type'] == "pending"))) {
-
$comment_txt = ucfirst($_POST['comment_txt']);
- //$comment_txt = htmlentities($comment_txt, ENT_NOQUOTES);
- // $comment_txt = str_replace('href=', 'target=_maj href=', $comment_txt);
$comment_txt = str_replace("\n", '<br />', $comment_txt);
$comment_txt = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $comment_txt);
$comment_txt = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $comment_txt);
@@ -249,7 +249,6 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_POS
$fp_comment_revisions_file = fopen($comment_revisions_file, "w");
fwrite($fp_comment_revisions_file, $comment_revisions_count);
fclose($fp_comment_revisions_file);
-
}
if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['type']) and !empty($_REQUEST['type']) and (($_REQUEST['type'] == "live") or ($_REQUEST['type'] == "pending"))) {
@@ -259,10 +258,10 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
}
?>
- <p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>
- <div id=panel_title><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/firstname.txt"); ?> <?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/lastname.txt"); ?> <<?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/email.txt"); ?>></div>
- <div id=panel_body><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt"); ?></div>
- <div id=panel_footer><font style="font-size: 10px; color: #999999;">
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc"><tr><td width="525">
+ <div id="panel_title"><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/firstname.txt"); ?> <?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/lastname.txt"); ?> <<?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/email.txt"); ?>></div>
+ <div id="panel_body"><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt"); ?></div>
+ <div id="panel_footer"><font style="font-size: 10px; color: #999999;">
<?php
readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/timestamp.txt");
if (file_exists("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt")) {
@@ -272,11 +271,11 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
}
?>
</font></div>
- </td></tr></table></p>
+ </td></tr></table>
- <p><table border=0 cellspacing=2 cellpadding=0>
- <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <tr><td><textarea class=input_body name=comment_txt rows=10><?php
+ <table border="0" cellspacing="2" cellpadding="0">
+ <form enctype="multipart/form-data" action="edit.php" method="post">
+ <tr><td><textarea class="input_body" name="comment_txt" rows="10"><?php
$comment_txt_file = "data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt";
$open_comment_txt_file = fopen($comment_txt_file,"r");
@@ -284,44 +283,34 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
fclose($open_comment_txt_file);
$comment_smiley2emoticon = str_replace('<br />', "\n", $read_comment_txt_file);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/crying.png border=0>', ':((', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/frown.png border=0>', ':(', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/indifferent.png border=0>', ':|', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/laughing.png border=0>', ':D', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/lick.png border=0>', ':P', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/ohno.png border=0>', ':O', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/smile.png border=0>', ':)', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/surprised.png border=0>', '=)', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/undecided.png border=0>', ':\\', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/wink.png border=0>', ';)', $comment_smiley2emoticon);
echo $comment_smiley2emoticon;
?></textarea></td></tr>
- <tr><td><input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>"></td></tr>
- <tr><td><input type=hidden name=comment value="<?php echo $_REQUEST['comment']; ?>"></td></tr>
- <tr><td><input type=hidden name=type value="<?php echo $_REQUEST['type']; ?>"></td></tr>
- <tr><td><input class=input_body type=submit value="click here to update this comment"></td></tr>
+ <tr><td><input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>"></td></tr>
+ <tr><td><input type="hidden" name="comment" value="<?php echo $_REQUEST['comment']; ?>"></td></tr>
+ <tr><td><input type="hidden" name="type" value="<?php echo $_REQUEST['type']; ?>"></td></tr>
+ <tr><td><input class="input_body" type="submit" value="click here to update this comment"></td></tr>
</form>
<form enctype="multipart/form-data" action="index.php?entry=<?php echo $_REQUEST['entry']; ?>&show=comments" method="post">
- <tr><td><input class=input_body type=submit value="click here to view posted entry"></td></tr>
+ <tr><td><input class="input_body" type="submit" value="click here to view posted entry"></td></tr>
</form>
- <form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
- <tr><td><input class=input_body type=submit value="click here to go to the index page"></td></tr>
+ <form enctype="multipart/form-data" action="index.php" method="post">
+ <tr><td><input class="input_body" type="submit" value="click here to go to the index page"></td></tr>
</form>
- </table></p>
+ </table>
<?php
exit();
@@ -329,11 +318,11 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
?>
-<p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>
+<table border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc"><tr><td width="525">
-<div id=panel_title><?php readfile($title_file); ?></div>
-<div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr><td><p><?php readfile($body_file); ?></p></td></tr></table></div>
-<div id=panel_footer><font style="font-size: 10px; color: #999999;"><?php
+<div id="panel_title"><?php readfile($title_file); ?></div>
+<div id="panel_body"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php readfile($body_file); ?></td></tr></table></div>
+<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php
if (file_exists("data/items/{$_REQUEST['entry']}/author.txt")) {
readfile("data/items/{$_REQUEST['entry']}/author.txt");
@@ -351,7 +340,7 @@ if (file_exists($revisions_file)) {
}
if (file_exists("data/items/{$_REQUEST['entry']}/category.txt")) {
- echo ' Filed under ';
+ echo " Filed under ";
$category_key = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
$category_key = strtolower($category_key);
if (file_exists("data/categories/{$category_key}/title.txt")) {
@@ -364,20 +353,23 @@ if (file_exists("data/items/{$_REQUEST['entry']}/category.txt")) {
}
?></font></div>
-</td></tr></table></p>
+</td></tr></table>
+
-<p>
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<form enctype="multipart/form-data" action="edit.php" method="post">
<?php if (($_SESSION['logged_in'] == $login_username) or (file_exists("data/members/active/{$_SESSION['logged_in']}/ul.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt"))) { ?>
- <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_image_size; ?>">
- <input autocomplete=off type=file name=album_image_input> Upload optional album image. Enter optional caption below.</p>
- <p><input autocomplete=off type=text name=caption class=input_body></p>
- <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>">
- <input autocomplete=off type=file name=entry_image_input> Upload optional entry image.</p>
- <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>">
- <input autocomplete=off type=file name=file_input> Upload optional file.</p>
+<input type="hidden" name="max_file_size" value="<?php echo $max_image_size; ?>">
+
+<p><table border="0" cellspacing="2" cellpadding="0" bgcolor="#ffffff">
+
+<tr><td><input autocomplete="off" type="file" name="album_image_input"> Upload optional album image. Enter optional caption below.</td></tr>
+<tr><td><input autocomplete="off" type="text" name="caption" class="input_body"></td></tr>
+<tr><td><input type="hidden" name="max_file_size" value="<?php echo $max_file_size; ?>"></td></tr>
+<tr><td><input autocomplete="off" type="file" name="entry_image_input"> Upload optional entry image.</td></tr>
+<tr><td><input type="hidden" name="max_file_size" value="<?php echo $max_file_size; ?>"></td></tr>
+<tr><td><input autocomplete="off" type="file" name="file_input"> Upload optional file.</td></tr>
<?php
@@ -387,10 +379,10 @@ if ($_SESSION['logged_in'] == $login_username) {
?>
- <p><input autocomplete=off type=password name=passwd <?php
+ <tr><td><input autocomplete="off" type="password" name="passwd" <?php
if (file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
- echo "value=password";
+ echo "value=\"password\"";
}
?>
@@ -402,7 +394,7 @@ if ($_SESSION['logged_in'] == $login_username) {
else {
echo "Enter optional password.";
}
- ?></p>
+ ?></td></tr>
<?php
if (file_exists("data/categories")) {
@@ -422,7 +414,7 @@ if ($_SESSION['logged_in'] == $login_username) {
if ($count_cat > 0) {
- echo "<p><select name=\"category\"><option>unfiled";
+ echo "<tr><td><select name=\"category\"><option>unfiled";
foreach ($show_cat as $category) {
echo "<option value=\"";
@@ -443,19 +435,19 @@ if ($_SESSION['logged_in'] == $login_username) {
}
}
- echo "</select> Select category.</p>";
+ echo "</select> Select category.</td></tr>";
}
}
?>
- <p><input type=checkbox name=sticky <?php $sticky_sem = 'data/sticky/' . $_REQUEST['entry']; if (file_exists($sticky_sem)) { echo checked; } ?>>Put entry title in Quick Links box.<br>
- <input type=checkbox name=pdf <?php if (file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) { echo checked; } ?>>Allow PDF generation for this entry.<br>
- <input type=checkbox name=display <?php $display_sem = "data/items/{$_REQUEST['entry']}/cat.txt"; if (file_exists($display_sem)) { echo checked; } ?>>Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.<br>
- <input type=checkbox name=private <?php $private_sem = "data/items/{$_REQUEST['entry']}/private.txt"; if (file_exists($private_sem)) { echo checked; } ?>>Private entry. This entry will unconditionally be invisible to visitors<?php if (file_exists("data/ml.txt")) { echo " and to the mailing list"; } ?>, even if always display is set.
+ <tr><td><input type="checkbox" name="sticky" <?php $sticky_sem = 'data/sticky/' . $_REQUEST['entry']; if (file_exists($sticky_sem)) { echo checked; } ?>>Put entry title in Quick Links box.</td></tr>
+ <tr><td><input type="checkbox" name="pdf" <?php if (file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) { echo checked; } ?>>Allow PDF generation for this entry.</td></tr>
+ <tr><td><input type="checkbox" name="display" <?php $display_sem = "data/items/{$_REQUEST['entry']}/cat.txt"; if (file_exists($display_sem)) { echo checked; } ?>>Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.</td></tr>
+ <tr><td><input type="checkbox" name="private" <?php $private_sem = "data/items/{$_REQUEST['entry']}/private.txt"; if (file_exists($private_sem)) { echo checked; } ?>>Private entry. This entry will unconditionally be invisible to visitors<?php if (file_exists("data/ml.txt")) { echo " and to the mailing list"; } ?>, even if always display is set.</td></tr>
<?php if (file_exists("data/bb.txt")) { ?>
- <br>
- <input type=checkbox name=member <?php $member_sem = "data/items/{$_REQUEST['entry']}/member.txt"; if (file_exists($member_sem)) { echo checked; } ?>>Only registered members can view this entry.
+
+ <tr><td><input type="checkbox" name="member" <?php $member_sem = "data/items/{$_REQUEST['entry']}/member.txt"; if (file_exists($member_sem)) { echo checked; } ?>>Only registered members can view this entry.</td></tr>
<?php } ?>
@@ -464,8 +456,8 @@ if ($_SESSION['logged_in'] == $login_username) {
// start of wiki mod (20071130)
if (file_exists("data/bb.txt") and file_exists("data/wiki.txt")) { ?>
- <br>
- <input type=checkbox name=edit <?php $edit_sem = "data/items/{$_REQUEST['entry']}/edit.txt"; if (file_exists($edit_sem)) { echo checked; } ?>>Registered members can edit this entry.
+
+ <tr><td><input type="checkbox" name="edit" <?php $edit_sem = "data/items/{$_REQUEST['entry']}/edit.txt"; if (file_exists($edit_sem)) { echo checked; } ?>>Registered members can edit this entry.</td></tr>
<?php
@@ -475,19 +467,21 @@ if ($_SESSION['logged_in'] == $login_username) {
?>
- <br><input type=checkbox name=lastmod <?php $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt"; if (file_exists($lastmod_sem)) { echo checked; } ?>>Display last modification date and time.
+ <tr><td><input type="checkbox" name="lastmod" <?php $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt"; if (file_exists($lastmod_sem)) { echo checked; } ?>>Display last modification date and time.</td></tr>
- </p>
+
<?php } ?>
-<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
+</table></p>
+
+<input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>">
-<table border=0 cellspacing=0 cellpadding=0><tr><td>
+<table border="0" cellspacing="0" cellpadding="0"><tr><td>
-<table border=0 cellspacing=2 cellpadding=0>
-<tr><td><input autocomplete=off class=input_title type=text name=title_input value="<?php readfile($title_file); ?>"></td></tr>
-<tr><td><textarea class=input_body name=body_input rows=15>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td><input autocomplete="off" class="input_title" type="text" name="title_input" value="<?php readfile($title_file); ?>"></td></tr>
+<tr><td><textarea class="input_body" name="body_input" rows="15">
<?php
$open_body_file = fopen($body_file,"r");
@@ -514,38 +508,36 @@ echo $body_read_content;
?>
</textarea></td></tr>
-<tr><td><input class=input_body type=submit value="click here to update this entry"></td></tr>
+<tr><td><input class="input_body" type="submit" value="click here to update this entry"></td></tr>
</form>
<form enctype="multipart/form-data" action="index.php?entry=<?php echo $_REQUEST['entry']; ?>" method="post">
<tr><td><input class=input_body type=submit value="click here to view posted entry"></td></tr>
</form>
-<form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
-<tr><td><input class=input_body type=submit value="click here to go to the index page"></td></tr>
+<form enctype="multipart/form-data" action="index.php" method="post">
+<tr><td><input class="input_body" type="submit" value="click here to go to the index page"></td></tr>
</form>
</table>
-</td><td width=10></td><td>
-
-<table border=0 cellspacing=1 cellpadding=2>
-<tr><td><img src=images/smileys/crying.png border=0></td><td><p>:((</p></td><td ><p>crying</p></td></tr>
-<tr><td><img src=images/smileys/frown.png border=0></td><td><p>:(</p></td><td><p>frown</p></td></tr>
-<tr><td><img src=images/smileys/indifferent.png border=0></td><td><p>:|</p></td><td><p>indifferent</p></td></tr>
-<tr><td><img src=images/smileys/laughing.png border=0></td><td><p>:D</p></td><td><p>laughing</p></td></tr>
-<tr><td><img src=images/smileys/lick.png border=0></td><td><p>:P</p></td><td><p>lick</p></td></tr>
-<tr><td><img src=images/smileys/ohno.png border=0></td><td><p>:O</p></td><td><p>oh no!</p></td></tr>
-<tr><td><img src=images/smileys/smile.png border=0></td><td><p>:)</p></td><td><p>smile</p></td></tr>
-<tr><td><img src=images/smileys/surprised.png border=0></td><td><p>=)</p></td><td><p>surprised</p></td></tr>
-<tr><td><img src=images/smileys/undecided.png border=0></td><td><p>:\</p></td><td><p>undecided</p></td></tr>
-<tr><td><img src=images/smileys/wink.png border=0></td><td><p>;)</p></td><td><p>wink</p></td></tr>
-</td></tr>
+</td><td width="10"></td><td>
+
+<table border="0" cellspacing="1" cellpadding="2">
+<tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
+<tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
+<tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
+<tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
+<tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
+<tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
+<tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
+<tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
+<tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
+<tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
</table>
</td></tr></table>
-
<?php
if (!isset($_POST['title_input']) or !isset($_POST['body_input']) or empty($_POST['title_input']) or empty($_POST['body_input'])) {
exit();
@@ -775,7 +767,7 @@ if (isset($_FILES['entry_image_input']) and !empty($_FILES['entry_image_input'])
$entry_image_height = (int) ($entry_image_height * $sizefactor);
}
- $body_write_content = "<img src=\"images/{$_REQUEST['entry']}/$entry_image_input_name\" border=\"0\" width=\"$entry_image_width\" height=\"$entry_image_height\"><br>$body_write_content";
+ $body_write_content = "<img src=\"images/{$_REQUEST['entry']}/$entry_image_input_name\" border=\"0\" width=\"$entry_image_width\" height=\"$entry_image_height\">\n\r$body_write_content";
}
else {
unlink($_FILES['entry_image_input']['tmp_name']);
@@ -1017,9 +1009,7 @@ if ($_SESSION['logged_in'] == $login_username) {
function PDF($orientation='P',$unit='mm',$format='letter')
{
- //Call parent constructor
$this->FPDF($orientation,$unit,$format);
- //Initialization
$this->B=0;
$this->I=0;
$this->U=0;
@@ -1028,14 +1018,12 @@ if ($_SESSION['logged_in'] == $login_username) {
function WriteHTML($html)
{
- //HTML parser
$html=str_replace("\n",' ',$html);
$a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
foreach($a as $i=>$e)
{
if($i%2==0)
{
- //Text
if($this->HREF)
$this->PutLink($this->HREF,$e);
else
@@ -1043,12 +1031,10 @@ if ($_SESSION['logged_in'] == $login_username) {
}
else
{
- //Tag
if($e{0}=='/')
$this->CloseTag(strtoupper(substr($e,1)));
else
{
- //Extract attributes
$a2=explode(' ',$e);
$tag=strtoupper(array_shift($a2));
$attr=array();
@@ -1063,7 +1049,6 @@ if ($_SESSION['logged_in'] == $login_username) {
function OpenTag($tag,$attr)
{
- //Opening tag
if($tag=='B' or $tag=='I' or $tag=='U')
$this->SetStyle($tag,true);
if($tag=='A')
@@ -1074,7 +1059,6 @@ if ($_SESSION['logged_in'] == $login_username) {
function CloseTag($tag)
{
- //Closing tag
if($tag=='B' or $tag=='I' or $tag=='U')
$this->SetStyle($tag,false);
if($tag=='A')
@@ -1083,7 +1067,6 @@ if ($_SESSION['logged_in'] == $login_username) {
function SetStyle($tag,$enable)
{
- //Modify style and select corresponding font
$this->$tag+=($enable ? 1 : -1);
$style='';
foreach(array('B','I','U') as $s)
@@ -1092,9 +1075,8 @@ if ($_SESSION['logged_in'] == $login_username) {
$this->SetFont('',$style);
}
- function PutLink($URL,$txt)
+ function PutLink($URL,$txt)
{
- //Put a hyperlink
$this->SetTextColor(0,0,255);
$this->SetStyle('U',true);
$this->Write(5,$txt,$URL);
@@ -1167,12 +1149,6 @@ $get_ping_urls = explode("|", $ping_urls);
foreach ($get_ping_urls as $ping_url) {
$ping = file_get_contents($ping_url);
-
- //$ping_urls_edit_file = "data/ping-edit.txt";
- //$fp_ping_urls_edit_txt = fopen($ping_urls_edit_file,"w");
- //fwrite($fp_ping_urls_edit_txt, $ping);
- //fclose($fp_ping_urls_edit_txt);
-
unset($ping);
}
diff --git a/index.php b/index.php
index 4691490..6804582 100644
--- a/index.php
+++ b/index.php
@@ -1302,6 +1302,9 @@ a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
}
?>
}
+
+<?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
+
</style>
<link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
diff --git a/settings.php b/settings.php
index c3ccf24..bde310e 100644
--- a/settings.php
+++ b/settings.php
@@ -972,6 +972,30 @@ if (isset($_FILES['background']) and !empty($_FILES['background'])) {
}
}
+if (file_exists("data/css.txt") and (strlen("data/css.txt") < 1)) {
+ 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 (strlen($css_write_content) > 0) {
+ $fp_css_txt = fopen("data/css.txt","w");
+ fwrite($fp_css_txt,$css_write_content);
+ fclose($fp_css_txt);
+ }
+}
+
+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']);
@@ -1007,7 +1031,7 @@ body {
echo "{$font_body},";
}
?> arial, helvetica, sans-serif;
- background-color: #FFFFFF;
+ background-color: #ffffff;
}
p, td {
@@ -1049,38 +1073,37 @@ a:active {
<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><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
+<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
if (file_exists("data/email.txt")) {
echo "14";
}
else {
echo "13";
}
-?>
-><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=memcomment <?php if (file_exists("data/memcomment.txt")) { echo checked; } ?>> Do not prevent members from posting comments.</p></td></tr>
+?>">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>
+<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 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>
+<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 } ?>
-<tr><td><p><input type=checkbox name=xscreen <?php if (file_exists("data/xscreen.txt")) { echo checked; } ?>> Do not screen comments. Automatically approve them.</p></td></tr>
-<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=xlcomment <?php if (file_exists("data/xlcomment.txt")) { echo checked; } ?>> Do not show latest comments 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=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
+<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>
+<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="xlcomment" <?php if (file_exists("data/xlcomment.txt")) { echo checked; } ?>> Do not show latest comments panel to guests.</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";
@@ -1089,160 +1112,165 @@ 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>
+?> 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><p><input type=checkbox name=del_favicon> Delete existing favicon.ico.</p></td></tr>';
+ 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><p><input type=checkbox name=del_picture> Delete existing profile picture.</p></td></tr>';
+ 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><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';
+ 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.</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"';
+ 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 " 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"';
+ 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.</p></td></tr>';
- echo '<tr><td><p><input type="radio" name="bg_repeat" value="repeat-y"
- style="background : #FFFFFF; color : #666666"';
+ 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.</p></td></tr>';
- echo '<tr><td><p><input type="radio" name="bg_repeat" value="no-repeat"
- style="background : #FFFFFF; color : #666666"';
+ 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.</p></td></tr>';
+ echo '> Background image will be displayed only once.</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"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="top center" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="top right" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td></tr>';
+ echo '></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"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="center center" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="center right" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td></tr>';
+ echo '></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"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="bottom center" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="bottom right" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td></tr></table></td></tr>';
+ echo '></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>
+<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><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>
+<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><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
+<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");
}
-?>></p></td></tr>
+?>></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>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>
+<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"; } ?>>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><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>
+<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("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>';
+ echo '<tr><td><input type="checkbox" name="del_avatar"> Delete existing avatar.</td></tr>';
}
?>
-<tr><td><p>upload avatar</p></td><td><input autocomplete=off type=file name=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><p>signature</p></td><td><textarea class=input name=sig><?php if (file_exists("data/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);
@@ -1263,7 +1291,7 @@ if (file_exists("images/avatar.gif") or file_exists("images/avatar.jpg") or file
} ?></textarea></td></tr>
<?php } ?>
-<tr><td><p>minimum password length</p></td><td><input class=input autocomplete=off type=text name=pass_len <?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");
@@ -1271,7 +1299,7 @@ if (file_exists("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
+<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");
@@ -1279,7 +1307,7 @@ if (file_exists("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
+<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");
@@ -1287,28 +1315,28 @@ if (file_exists("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
+<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><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>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><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>
+<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"; } ?>><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>
+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";
+ echo "<tr><td><input type=\"checkbox\" name=\"ml_from\"";
if (file_exists("data/ml-from.txt")) {
echo " checked";
@@ -1321,15 +1349,15 @@ if (file_exists("data/ml-reply2.txt")) {
<?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>
+<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>
+<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'])) {
@@ -1345,13 +1373,14 @@ if (isset($_POST['passwd_new']) and !empty($_POST['passwd_new']) and isset($_POS
$fp_passwd_new_txt = fopen("data/password.txt","w");
fwrite($fp_passwd_new_txt,$passwd_new_crypt);
fclose($fp_passwd_new_txt);
- echo "<tr><td></td><td><p>password changed</p></td></tr>";
+ echo "<tr><td></td><td>password changed</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 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>
diff --git a/wiki.php b/wiki.php
index 83a51b0..2f3bb8a 100644
--- a/wiki.php
+++ b/wiki.php
@@ -8,17 +8,16 @@ 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;
+ if (is_array($data)) {
+ foreach ($data as $key => $value) {
+ $data[$key] = stripslashes_array($value);
+ }
+ return $data;
}
- else{
- return stripslashes($data);
+ else {
+ return stripslashes($data);
}
}
-
$_REQUEST = stripslashes_array($_REQUEST);
}
@@ -211,6 +210,10 @@ del {
$entry = $_REQUEST['entry'];
+if (isset($_REQUEST['del']) and !empty($_REQUEST['del']) and file_exists("data/items/$entry/wiki/delta/{$_REQUEST['del']}") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
+ rmdirr("data/items/$entry/wiki/delta/{$_REQUEST['del']}");
+}
+
if (file_exists("data/items/$entry/wiki/delta")) {
if ($dh_delta = opendir("data/items/$entry/wiki/delta")) {
@@ -291,10 +294,16 @@ if (file_exists("data/items/$entry/wiki/delta")) {
$diff = str_replace("<br>","<br>",$diff);
$diff = trim($diff);
- echo "<p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>";
- echo "<div id=panel_title>$title</div>";
- echo "<div id=panel_body><font style=\"font-size: 10px; color: #999999;\">$author - $date<br><br></font>$diff</div>";
- echo "<div id=panel_footer>Edited by $editor last $mod</div>";
+ echo "<p><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#CCCCCC\"><tr><td width=\"525\">";
+ echo "<div id=\"panel_title\">$title";
+
+ if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
+ echo "<a href=\"wiki.php?entry=$entry&del=$item\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete\"></a>";
+ }
+
+ echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"restore\">";
+ echo "</div><div id=\"panel_body\"><font style=\"font-size: 10px; color: #999999;\">$author - $date<br><br></font>$diff</div>";
+ echo "<div id=\"panel_footer\">Edited by $editor last $mod</div>";
echo "</td></tr></table></p>";
unset($diff);
tree 9a69bb9491d04baaa7fb37d18ff77225297e915a
parent 83fe9a2e8147f6f12ead031ffe6dda1d80032667
author Engels Antonio <engels@majcms.org> 1277314201 +0800
committer Engels Antonio <engels@majcms.org> 1277314201 +0800
maj-0.14-20081107-bb.zip
diff --git a/edit.php b/edit.php
index 463e8c8..79ae111 100644
--- a/edit.php
+++ b/edit.php
@@ -178,7 +178,7 @@ a:active {
padding: 5px 5px 5px 5px;
background-color: #ffffff;
margin: 0px;
- border-color: #CCCCCC;
+ border-color: #cccccc;
border-width: 1px 1px 0px 1px;
border-style: solid solid none solid;
}
@@ -195,7 +195,7 @@ a:active {
padding: 5px 5px 5px 5px;
background-color: #ffffff;
margin: 0px;
- border-color: #CCCCCC;
+ border-color: #cccccc;
border-width: 1px 1px 1px 1px;
border-style: solid solid solid solid;
}
@@ -212,19 +212,19 @@ a:active {
padding: 5px 5px 5px 5px;
background-color: #ffffff;
margin: 0px;
- border-color: #CCCCCC;
+ border-color: #cccccc;
border-width: 0px 1px 1px 1px;
border-style: none solid solid solid;
}
+
+<?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
+
</style>
<?php
if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_POST['comment_txt']) and !empty($_POST['comment_txt']) and isset($_REQUEST['type']) and !empty($_REQUEST['type']) and (($_REQUEST['type'] == "live") or ($_REQUEST['type'] == "pending"))) {
-
$comment_txt = ucfirst($_POST['comment_txt']);
- //$comment_txt = htmlentities($comment_txt, ENT_NOQUOTES);
- // $comment_txt = str_replace('href=', 'target=_maj href=', $comment_txt);
$comment_txt = str_replace("\n", '<br />', $comment_txt);
$comment_txt = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $comment_txt);
$comment_txt = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $comment_txt);
@@ -249,7 +249,6 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_POS
$fp_comment_revisions_file = fopen($comment_revisions_file, "w");
fwrite($fp_comment_revisions_file, $comment_revisions_count);
fclose($fp_comment_revisions_file);
-
}
if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['type']) and !empty($_REQUEST['type']) and (($_REQUEST['type'] == "live") or ($_REQUEST['type'] == "pending"))) {
@@ -259,10 +258,10 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
}
?>
- <p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>
- <div id=panel_title><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/firstname.txt"); ?> <?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/lastname.txt"); ?> <<?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/email.txt"); ?>></div>
- <div id=panel_body><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt"); ?></div>
- <div id=panel_footer><font style="font-size: 10px; color: #999999;">
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc"><tr><td width="525">
+ <div id="panel_title"><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/firstname.txt"); ?> <?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/lastname.txt"); ?> <<?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/email.txt"); ?>></div>
+ <div id="panel_body"><?php readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt"); ?></div>
+ <div id="panel_footer"><font style="font-size: 10px; color: #999999;">
<?php
readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/timestamp.txt");
if (file_exists("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt")) {
@@ -272,11 +271,11 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
}
?>
</font></div>
- </td></tr></table></p>
+ </td></tr></table>
- <p><table border=0 cellspacing=2 cellpadding=0>
- <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <tr><td><textarea class=input_body name=comment_txt rows=10><?php
+ <table border="0" cellspacing="2" cellpadding="0">
+ <form enctype="multipart/form-data" action="edit.php" method="post">
+ <tr><td><textarea class="input_body" name="comment_txt" rows="10"><?php
$comment_txt_file = "data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt";
$open_comment_txt_file = fopen($comment_txt_file,"r");
@@ -284,44 +283,34 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
fclose($open_comment_txt_file);
$comment_smiley2emoticon = str_replace('<br />', "\n", $read_comment_txt_file);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/crying.png border=0>', ':((', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/frown.png border=0>', ':(', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/indifferent.png border=0>', ':|', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/laughing.png border=0>', ':D', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/lick.png border=0>', ':P', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/ohno.png border=0>', ':O', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/smile.png border=0>', ':)', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/surprised.png border=0>', '=)', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/undecided.png border=0>', ':\\', $comment_smiley2emoticon);
-
$comment_smiley2emoticon = str_replace('<img src=images/smileys/wink.png border=0>', ';)', $comment_smiley2emoticon);
echo $comment_smiley2emoticon;
?></textarea></td></tr>
- <tr><td><input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>"></td></tr>
- <tr><td><input type=hidden name=comment value="<?php echo $_REQUEST['comment']; ?>"></td></tr>
- <tr><td><input type=hidden name=type value="<?php echo $_REQUEST['type']; ?>"></td></tr>
- <tr><td><input class=input_body type=submit value="click here to update this comment"></td></tr>
+ <tr><td><input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>"></td></tr>
+ <tr><td><input type="hidden" name="comment" value="<?php echo $_REQUEST['comment']; ?>"></td></tr>
+ <tr><td><input type="hidden" name="type" value="<?php echo $_REQUEST['type']; ?>"></td></tr>
+ <tr><td><input class="input_body" type="submit" value="click here to update this comment"></td></tr>
</form>
<form enctype="multipart/form-data" action="index.php?entry=<?php echo $_REQUEST['entry']; ?>&show=comments" method="post">
- <tr><td><input class=input_body type=submit value="click here to view posted entry"></td></tr>
+ <tr><td><input class="input_body" type="submit" value="click here to view posted entry"></td></tr>
</form>
- <form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
- <tr><td><input class=input_body type=submit value="click here to go to the index page"></td></tr>
+ <form enctype="multipart/form-data" action="index.php" method="post">
+ <tr><td><input class="input_body" type="submit" value="click here to go to the index page"></td></tr>
</form>
- </table></p>
+ </table>
<?php
exit();
@@ -329,11 +318,11 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
?>
-<p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>
+<table border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc"><tr><td width="525">
-<div id=panel_title><?php readfile($title_file); ?></div>
-<div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr><td><p><?php readfile($body_file); ?></p></td></tr></table></div>
-<div id=panel_footer><font style="font-size: 10px; color: #999999;"><?php
+<div id="panel_title"><?php readfile($title_file); ?></div>
+<div id="panel_body"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php readfile($body_file); ?></td></tr></table></div>
+<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php
if (file_exists("data/items/{$_REQUEST['entry']}/author.txt")) {
readfile("data/items/{$_REQUEST['entry']}/author.txt");
@@ -351,7 +340,7 @@ if (file_exists($revisions_file)) {
}
if (file_exists("data/items/{$_REQUEST['entry']}/category.txt")) {
- echo ' Filed under ';
+ echo " Filed under ";
$category_key = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
$category_key = strtolower($category_key);
if (file_exists("data/categories/{$category_key}/title.txt")) {
@@ -364,20 +353,23 @@ if (file_exists("data/items/{$_REQUEST['entry']}/category.txt")) {
}
?></font></div>
-</td></tr></table></p>
+</td></tr></table>
+
-<p>
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<form enctype="multipart/form-data" action="edit.php" method="post">
<?php if (($_SESSION['logged_in'] == $login_username) or (file_exists("data/members/active/{$_SESSION['logged_in']}/ul.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt"))) { ?>
- <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_image_size; ?>">
- <input autocomplete=off type=file name=album_image_input> Upload optional album image. Enter optional caption below.</p>
- <p><input autocomplete=off type=text name=caption class=input_body></p>
- <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>">
- <input autocomplete=off type=file name=entry_image_input> Upload optional entry image.</p>
- <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>">
- <input autocomplete=off type=file name=file_input> Upload optional file.</p>
+<input type="hidden" name="max_file_size" value="<?php echo $max_image_size; ?>">
+
+<p><table border="0" cellspacing="2" cellpadding="0" bgcolor="#ffffff">
+
+<tr><td><input autocomplete="off" type="file" name="album_image_input"> Upload optional album image. Enter optional caption below.</td></tr>
+<tr><td><input autocomplete="off" type="text" name="caption" class="input_body"></td></tr>
+<tr><td><input type="hidden" name="max_file_size" value="<?php echo $max_file_size; ?>"></td></tr>
+<tr><td><input autocomplete="off" type="file" name="entry_image_input"> Upload optional entry image.</td></tr>
+<tr><td><input type="hidden" name="max_file_size" value="<?php echo $max_file_size; ?>"></td></tr>
+<tr><td><input autocomplete="off" type="file" name="file_input"> Upload optional file.</td></tr>
<?php
@@ -387,10 +379,10 @@ if ($_SESSION['logged_in'] == $login_username) {
?>
- <p><input autocomplete=off type=password name=passwd <?php
+ <tr><td><input autocomplete="off" type="password" name="passwd" <?php
if (file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
- echo "value=password";
+ echo "value=\"password\"";
}
?>
@@ -402,7 +394,7 @@ if ($_SESSION['logged_in'] == $login_username) {
else {
echo "Enter optional password.";
}
- ?></p>
+ ?></td></tr>
<?php
if (file_exists("data/categories")) {
@@ -422,7 +414,7 @@ if ($_SESSION['logged_in'] == $login_username) {
if ($count_cat > 0) {
- echo "<p><select name=\"category\"><option>unfiled";
+ echo "<tr><td><select name=\"category\"><option>unfiled";
foreach ($show_cat as $category) {
echo "<option value=\"";
@@ -443,19 +435,19 @@ if ($_SESSION['logged_in'] == $login_username) {
}
}
- echo "</select> Select category.</p>";
+ echo "</select> Select category.</td></tr>";
}
}
?>
- <p><input type=checkbox name=sticky <?php $sticky_sem = 'data/sticky/' . $_REQUEST['entry']; if (file_exists($sticky_sem)) { echo checked; } ?>>Put entry title in Quick Links box.<br>
- <input type=checkbox name=pdf <?php if (file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) { echo checked; } ?>>Allow PDF generation for this entry.<br>
- <input type=checkbox name=display <?php $display_sem = "data/items/{$_REQUEST['entry']}/cat.txt"; if (file_exists($display_sem)) { echo checked; } ?>>Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.<br>
- <input type=checkbox name=private <?php $private_sem = "data/items/{$_REQUEST['entry']}/private.txt"; if (file_exists($private_sem)) { echo checked; } ?>>Private entry. This entry will unconditionally be invisible to visitors<?php if (file_exists("data/ml.txt")) { echo " and to the mailing list"; } ?>, even if always display is set.
+ <tr><td><input type="checkbox" name="sticky" <?php $sticky_sem = 'data/sticky/' . $_REQUEST['entry']; if (file_exists($sticky_sem)) { echo checked; } ?>>Put entry title in Quick Links box.</td></tr>
+ <tr><td><input type="checkbox" name="pdf" <?php if (file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) { echo checked; } ?>>Allow PDF generation for this entry.</td></tr>
+ <tr><td><input type="checkbox" name="display" <?php $display_sem = "data/items/{$_REQUEST['entry']}/cat.txt"; if (file_exists($display_sem)) { echo checked; } ?>>Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.</td></tr>
+ <tr><td><input type="checkbox" name="private" <?php $private_sem = "data/items/{$_REQUEST['entry']}/private.txt"; if (file_exists($private_sem)) { echo checked; } ?>>Private entry. This entry will unconditionally be invisible to visitors<?php if (file_exists("data/ml.txt")) { echo " and to the mailing list"; } ?>, even if always display is set.</td></tr>
<?php if (file_exists("data/bb.txt")) { ?>
- <br>
- <input type=checkbox name=member <?php $member_sem = "data/items/{$_REQUEST['entry']}/member.txt"; if (file_exists($member_sem)) { echo checked; } ?>>Only registered members can view this entry.
+
+ <tr><td><input type="checkbox" name="member" <?php $member_sem = "data/items/{$_REQUEST['entry']}/member.txt"; if (file_exists($member_sem)) { echo checked; } ?>>Only registered members can view this entry.</td></tr>
<?php } ?>
@@ -464,8 +456,8 @@ if ($_SESSION['logged_in'] == $login_username) {
// start of wiki mod (20071130)
if (file_exists("data/bb.txt") and file_exists("data/wiki.txt")) { ?>
- <br>
- <input type=checkbox name=edit <?php $edit_sem = "data/items/{$_REQUEST['entry']}/edit.txt"; if (file_exists($edit_sem)) { echo checked; } ?>>Registered members can edit this entry.
+
+ <tr><td><input type="checkbox" name="edit" <?php $edit_sem = "data/items/{$_REQUEST['entry']}/edit.txt"; if (file_exists($edit_sem)) { echo checked; } ?>>Registered members can edit this entry.</td></tr>
<?php
@@ -475,19 +467,21 @@ if ($_SESSION['logged_in'] == $login_username) {
?>
- <br><input type=checkbox name=lastmod <?php $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt"; if (file_exists($lastmod_sem)) { echo checked; } ?>>Display last modification date and time.
+ <tr><td><input type="checkbox" name="lastmod" <?php $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt"; if (file_exists($lastmod_sem)) { echo checked; } ?>>Display last modification date and time.</td></tr>
- </p>
+
<?php } ?>
-<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
+</table></p>
+
+<input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>">
-<table border=0 cellspacing=0 cellpadding=0><tr><td>
+<table border="0" cellspacing="0" cellpadding="0"><tr><td>
-<table border=0 cellspacing=2 cellpadding=0>
-<tr><td><input autocomplete=off class=input_title type=text name=title_input value="<?php readfile($title_file); ?>"></td></tr>
-<tr><td><textarea class=input_body name=body_input rows=15>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td><input autocomplete="off" class="input_title" type="text" name="title_input" value="<?php readfile($title_file); ?>"></td></tr>
+<tr><td><textarea class="input_body" name="body_input" rows="15">
<?php
$open_body_file = fopen($body_file,"r");
@@ -514,38 +508,36 @@ echo $body_read_content;
?>
</textarea></td></tr>
-<tr><td><input class=input_body type=submit value="click here to update this entry"></td></tr>
+<tr><td><input class="input_body" type="submit" value="click here to update this entry"></td></tr>
</form>
<form enctype="multipart/form-data" action="index.php?entry=<?php echo $_REQUEST['entry']; ?>" method="post">
<tr><td><input class=input_body type=submit value="click here to view posted entry"></td></tr>
</form>
-<form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
-<tr><td><input class=input_body type=submit value="click here to go to the index page"></td></tr>
+<form enctype="multipart/form-data" action="index.php" method="post">
+<tr><td><input class="input_body" type="submit" value="click here to go to the index page"></td></tr>
</form>
</table>
-</td><td width=10></td><td>
-
-<table border=0 cellspacing=1 cellpadding=2>
-<tr><td><img src=images/smileys/crying.png border=0></td><td><p>:((</p></td><td ><p>crying</p></td></tr>
-<tr><td><img src=images/smileys/frown.png border=0></td><td><p>:(</p></td><td><p>frown</p></td></tr>
-<tr><td><img src=images/smileys/indifferent.png border=0></td><td><p>:|</p></td><td><p>indifferent</p></td></tr>
-<tr><td><img src=images/smileys/laughing.png border=0></td><td><p>:D</p></td><td><p>laughing</p></td></tr>
-<tr><td><img src=images/smileys/lick.png border=0></td><td><p>:P</p></td><td><p>lick</p></td></tr>
-<tr><td><img src=images/smileys/ohno.png border=0></td><td><p>:O</p></td><td><p>oh no!</p></td></tr>
-<tr><td><img src=images/smileys/smile.png border=0></td><td><p>:)</p></td><td><p>smile</p></td></tr>
-<tr><td><img src=images/smileys/surprised.png border=0></td><td><p>=)</p></td><td><p>surprised</p></td></tr>
-<tr><td><img src=images/smileys/undecided.png border=0></td><td><p>:\</p></td><td><p>undecided</p></td></tr>
-<tr><td><img src=images/smileys/wink.png border=0></td><td><p>;)</p></td><td><p>wink</p></td></tr>
-</td></tr>
+</td><td width="10"></td><td>
+
+<table border="0" cellspacing="1" cellpadding="2">
+<tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
+<tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
+<tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
+<tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
+<tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
+<tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
+<tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
+<tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
+<tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
+<tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
</table>
</td></tr></table>
-
<?php
if (!isset($_POST['title_input']) or !isset($_POST['body_input']) or empty($_POST['title_input']) or empty($_POST['body_input'])) {
exit();
@@ -775,7 +767,7 @@ if (isset($_FILES['entry_image_input']) and !empty($_FILES['entry_image_input'])
$entry_image_height = (int) ($entry_image_height * $sizefactor);
}
- $body_write_content = "<img src=\"images/{$_REQUEST['entry']}/$entry_image_input_name\" border=\"0\" width=\"$entry_image_width\" height=\"$entry_image_height\"><br>$body_write_content";
+ $body_write_content = "<img src=\"images/{$_REQUEST['entry']}/$entry_image_input_name\" border=\"0\" width=\"$entry_image_width\" height=\"$entry_image_height\">\n\r$body_write_content";
}
else {
unlink($_FILES['entry_image_input']['tmp_name']);
@@ -1017,9 +1009,7 @@ if ($_SESSION['logged_in'] == $login_username) {
function PDF($orientation='P',$unit='mm',$format='letter')
{
- //Call parent constructor
$this->FPDF($orientation,$unit,$format);
- //Initialization
$this->B=0;
$this->I=0;
$this->U=0;
@@ -1028,14 +1018,12 @@ if ($_SESSION['logged_in'] == $login_username) {
function WriteHTML($html)
{
- //HTML parser
$html=str_replace("\n",' ',$html);
$a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
foreach($a as $i=>$e)
{
if($i%2==0)
{
- //Text
if($this->HREF)
$this->PutLink($this->HREF,$e);
else
@@ -1043,12 +1031,10 @@ if ($_SESSION['logged_in'] == $login_username) {
}
else
{
- //Tag
if($e{0}=='/')
$this->CloseTag(strtoupper(substr($e,1)));
else
{
- //Extract attributes
$a2=explode(' ',$e);
$tag=strtoupper(array_shift($a2));
$attr=array();
@@ -1063,7 +1049,6 @@ if ($_SESSION['logged_in'] == $login_username) {
function OpenTag($tag,$attr)
{
- //Opening tag
if($tag=='B' or $tag=='I' or $tag=='U')
$this->SetStyle($tag,true);
if($tag=='A')
@@ -1074,7 +1059,6 @@ if ($_SESSION['logged_in'] == $login_username) {
function CloseTag($tag)
{
- //Closing tag
if($tag=='B' or $tag=='I' or $tag=='U')
$this->SetStyle($tag,false);
if($tag=='A')
@@ -1083,7 +1067,6 @@ if ($_SESSION['logged_in'] == $login_username) {
function SetStyle($tag,$enable)
{
- //Modify style and select corresponding font
$this->$tag+=($enable ? 1 : -1);
$style='';
foreach(array('B','I','U') as $s)
@@ -1092,9 +1075,8 @@ if ($_SESSION['logged_in'] == $login_username) {
$this->SetFont('',$style);
}
- function PutLink($URL,$txt)
+ function PutLink($URL,$txt)
{
- //Put a hyperlink
$this->SetTextColor(0,0,255);
$this->SetStyle('U',true);
$this->Write(5,$txt,$URL);
@@ -1167,12 +1149,6 @@ $get_ping_urls = explode("|", $ping_urls);
foreach ($get_ping_urls as $ping_url) {
$ping = file_get_contents($ping_url);
-
- //$ping_urls_edit_file = "data/ping-edit.txt";
- //$fp_ping_urls_edit_txt = fopen($ping_urls_edit_file,"w");
- //fwrite($fp_ping_urls_edit_txt, $ping);
- //fclose($fp_ping_urls_edit_txt);
-
unset($ping);
}
diff --git a/index.php b/index.php
index 4691490..6804582 100644
--- a/index.php
+++ b/index.php
@@ -1302,6 +1302,9 @@ a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
}
?>
}
+
+<?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
+
</style>
<link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
diff --git a/settings.php b/settings.php
index c3ccf24..bde310e 100644
--- a/settings.php
+++ b/settings.php
@@ -972,6 +972,30 @@ if (isset($_FILES['background']) and !empty($_FILES['background'])) {
}
}
+if (file_exists("data/css.txt") and (strlen("data/css.txt") < 1)) {
+ 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 (strlen($css_write_content) > 0) {
+ $fp_css_txt = fopen("data/css.txt","w");
+ fwrite($fp_css_txt,$css_write_content);
+ fclose($fp_css_txt);
+ }
+}
+
+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']);
@@ -1007,7 +1031,7 @@ body {
echo "{$font_body},";
}
?> arial, helvetica, sans-serif;
- background-color: #FFFFFF;
+ background-color: #ffffff;
}
p, td {
@@ -1049,38 +1073,37 @@ a:active {
<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><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
+<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
if (file_exists("data/email.txt")) {
echo "14";
}
else {
echo "13";
}
-?>
-><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=memcomment <?php if (file_exists("data/memcomment.txt")) { echo checked; } ?>> Do not prevent members from posting comments.</p></td></tr>
+?>">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>
+<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 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>
+<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 } ?>
-<tr><td><p><input type=checkbox name=xscreen <?php if (file_exists("data/xscreen.txt")) { echo checked; } ?>> Do not screen comments. Automatically approve them.</p></td></tr>
-<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=xlcomment <?php if (file_exists("data/xlcomment.txt")) { echo checked; } ?>> Do not show latest comments 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=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
+<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>
+<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="xlcomment" <?php if (file_exists("data/xlcomment.txt")) { echo checked; } ?>> Do not show latest comments panel to guests.</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";
@@ -1089,160 +1112,165 @@ 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>
+?> 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><p><input type=checkbox name=del_favicon> Delete existing favicon.ico.</p></td></tr>';
+ 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><p><input type=checkbox name=del_picture> Delete existing profile picture.</p></td></tr>';
+ 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><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';
+ 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.</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"';
+ 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 " 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"';
+ 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.</p></td></tr>';
- echo '<tr><td><p><input type="radio" name="bg_repeat" value="repeat-y"
- style="background : #FFFFFF; color : #666666"';
+ 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.</p></td></tr>';
- echo '<tr><td><p><input type="radio" name="bg_repeat" value="no-repeat"
- style="background : #FFFFFF; color : #666666"';
+ 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.</p></td></tr>';
+ echo '> Background image will be displayed only once.</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"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="top center" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="top right" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td></tr>';
+ echo '></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"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="center center" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="center right" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td></tr>';
+ echo '></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"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="bottom center" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td>';
+ echo '></td>';
- echo '<td bgcolor=#FFFFFF align=center><p><input type="radio" name="bg_position" value="bottom right" style="background : #FFFFFF; color : #666666"';
+ 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 '></p></td></tr></table></td></tr>';
+ echo '></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>
+<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><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>
+<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><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
+<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");
}
-?>></p></td></tr>
+?>></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>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>
+<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"; } ?>>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><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>
+<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("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>';
+ echo '<tr><td><input type="checkbox" name="del_avatar"> Delete existing avatar.</td></tr>';
}
?>
-<tr><td><p>upload avatar</p></td><td><input autocomplete=off type=file name=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><p>signature</p></td><td><textarea class=input name=sig><?php if (file_exists("data/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);
@@ -1263,7 +1291,7 @@ if (file_exists("images/avatar.gif") or file_exists("images/avatar.jpg") or file
} ?></textarea></td></tr>
<?php } ?>
-<tr><td><p>minimum password length</p></td><td><input class=input autocomplete=off type=text name=pass_len <?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");
@@ -1271,7 +1299,7 @@ if (file_exists("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
+<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");
@@ -1279,7 +1307,7 @@ if (file_exists("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
+<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");
@@ -1287,28 +1315,28 @@ if (file_exists("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
+<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><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>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><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>
+<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"; } ?>><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>
+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";
+ echo "<tr><td><input type=\"checkbox\" name=\"ml_from\"";
if (file_exists("data/ml-from.txt")) {
echo " checked";
@@ -1321,15 +1349,15 @@ if (file_exists("data/ml-reply2.txt")) {
<?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>
+<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>
+<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'])) {
@@ -1345,13 +1373,14 @@ if (isset($_POST['passwd_new']) and !empty($_POST['passwd_new']) and isset($_POS
$fp_passwd_new_txt = fopen("data/password.txt","w");
fwrite($fp_passwd_new_txt,$passwd_new_crypt);
fclose($fp_passwd_new_txt);
- echo "<tr><td></td><td><p>password changed</p></td></tr>";
+ echo "<tr><td></td><td>password changed</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 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>
diff --git a/wiki.php b/wiki.php
index 83a51b0..2f3bb8a 100644
--- a/wiki.php
+++ b/wiki.php
@@ -8,17 +8,16 @@ 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;
+ if (is_array($data)) {
+ foreach ($data as $key => $value) {
+ $data[$key] = stripslashes_array($value);
+ }
+ return $data;
}
- else{
- return stripslashes($data);
+ else {
+ return stripslashes($data);
}
}
-
$_REQUEST = stripslashes_array($_REQUEST);
}
@@ -211,6 +210,10 @@ del {
$entry = $_REQUEST['entry'];
+if (isset($_REQUEST['del']) and !empty($_REQUEST['del']) and file_exists("data/items/$entry/wiki/delta/{$_REQUEST['del']}") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
+ rmdirr("data/items/$entry/wiki/delta/{$_REQUEST['del']}");
+}
+
if (file_exists("data/items/$entry/wiki/delta")) {
if ($dh_delta = opendir("data/items/$entry/wiki/delta")) {
@@ -291,10 +294,16 @@ if (file_exists("data/items/$entry/wiki/delta")) {
$diff = str_replace("<br>","<br>",$diff);
$diff = trim($diff);
- echo "<p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>";
- echo "<div id=panel_title>$title</div>";
- echo "<div id=panel_body><font style=\"font-size: 10px; color: #999999;\">$author - $date<br><br></font>$diff</div>";
- echo "<div id=panel_footer>Edited by $editor last $mod</div>";
+ echo "<p><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#CCCCCC\"><tr><td width=\"525\">";
+ echo "<div id=\"panel_title\">$title";
+
+ if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
+ echo "<a href=\"wiki.php?entry=$entry&del=$item\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete\"></a>";
+ }
+
+ echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"restore\">";
+ echo "</div><div id=\"panel_body\"><font style=\"font-size: 10px; color: #999999;\">$author - $date<br><br></font>$diff</div>";
+ echo "<div id=\"panel_footer\">Edited by $editor last $mod</div>";
echo "</td></tr></table></p>";
unset($diff);