This commit has been accessed 606 times via Git panel.
commit b9867231504b82f7d91324af2abdd7aee131e041
tree 788fb89c68b74ec0c4950593fc23ec96d33517ff
parent 70dc934a9f3221acba244824384acfb4e2ba8e35
author Psylocke Antonio <psylocke@majcms.org> 1321880756 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1321880756 +0800
Fix entry delete preview
diff --git a/del.php b/del.php
index 3439ff8..e1ba29d 100644
--- a/del.php
+++ b/del.php
@@ -127,139 +127,69 @@ if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username
exit();
}
+include("css.php");
+
+echo "\n<style>body { margin: {$maj_wspace}px; } .input, .click { width: 125px; }</style>\n";
+
?>
<title>Delete</title>
-<style>
-
-body {
- color: #666666;
- margin: 10px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- background-color: #FFFFFF;
-}
+<p><table border="0" cellspacing="0" cellpadding="0">
-p, td {
- font-size: 11px;
-}
+<tr><td valign="top">
-a {
- font-weight: bold;
- text-decoration: none;
-}
+<table border="0" cellspacing="0" cellpadding="0"><tr><td width="520">
-a:link, a:visited {
- color: #666666;
-}
+<div class="panel_wrapper">
-a:hover {
- color: #336699;
-}
+<div class="panel_title"><?php
+ readfile("$maj_data_directory/items/$maj_req_entry/title.txt");
+?></div>
+<div class="panel_body"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php
-a:active {
- color: #336699;
-}
+ echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
-.input_submit {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 125px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px
-}
-
-#panel_title {
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
-}
-
-#panel_body {
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$font_panel_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 1px 1px;
- border-style: solid solid solid solid;
-}
-
-#panel_footer {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_footer},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 0px 1px 1px 1px;
- border-style: none solid solid solid;
-}
+ if (file_exists("$maj_data_directory/items/$maj_req_entry/author.txt")) {
+ readfile("$maj_data_directory/items/$maj_req_entry/author.txt");
+ echo " - ";
+ }
+
+ entry2date($maj_req_entry);
+
+ if (file_exists("$maj_data_directory/items/$maj_req_entry/revisions.txt")) {
+ echo ' (Revision ';
+ readfile("$maj_data_directory/items/$maj_req_entry/revisions.txt");
+ echo " - ";
+ echo date("l, M j, Y, g:i A", filemtime("$maj_data_directory/items/$maj_req_entry/body.txt"));
+ echo ')';
+ }
-</style>
+ echo "</font><div style=\"height: {$maj_wspace}px;\"></div>";
-<p><table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"><tr><td width="525">
-<div id="panel_title"><?php readfile("data/items/{$_REQUEST['entry']}/title.txt"); ?></div>
-<div id="panel_body"><?php readfile("data/items/{$_REQUEST['entry']}/body.txt"); ?></div>
-<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php readfile("data/items/{$_REQUEST['entry']}/date.txt"); ?></font></div>
-</td></tr></table></p>
+ readfile("$maj_data_directory/items/$maj_req_entry/body.txt");
+?></td></tr></table></div></div>
+</td></tr></table>
+</p>
<p><table border="0" cellspacing="2" cellpadding="0">
<tr><td>
<form enctype="multipart/form-data" action="del.php" method="post">
<input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>">
<input type="hidden" name="action" value="delete">
-<input class="input_submit" type="submit" value="delete">
+<input class="click" type="submit" value="delete">
</form>
</td><td>
<form enctype="multipart/form-data" action="del.php" method="post">
<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
<input type="hidden" name="action" value="edit">
-<input class="input_submit" type="submit" value="edit">
+<input class="click" type="submit" value="edit">
</form>
</td><td>
<form enctype="multipart/form-data" action="del.php" method="post">
<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
<input type="hidden" name="action" value="home">
-<input class="input_submit" type="submit" value="home">
+<input class="click" type="submit" value="home">
</form>
</td></tr>
</table>
tree 788fb89c68b74ec0c4950593fc23ec96d33517ff
parent 70dc934a9f3221acba244824384acfb4e2ba8e35
author Psylocke Antonio <psylocke@majcms.org> 1321880756 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1321880756 +0800
Fix entry delete preview
diff --git a/del.php b/del.php
index 3439ff8..e1ba29d 100644
--- a/del.php
+++ b/del.php
@@ -127,139 +127,69 @@ if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username
exit();
}
+include("css.php");
+
+echo "\n<style>body { margin: {$maj_wspace}px; } .input, .click { width: 125px; }</style>\n";
+
?>
<title>Delete</title>
-<style>
-
-body {
- color: #666666;
- margin: 10px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- background-color: #FFFFFF;
-}
+<p><table border="0" cellspacing="0" cellpadding="0">
-p, td {
- font-size: 11px;
-}
+<tr><td valign="top">
-a {
- font-weight: bold;
- text-decoration: none;
-}
+<table border="0" cellspacing="0" cellpadding="0"><tr><td width="520">
-a:link, a:visited {
- color: #666666;
-}
+<div class="panel_wrapper">
-a:hover {
- color: #336699;
-}
+<div class="panel_title"><?php
+ readfile("$maj_data_directory/items/$maj_req_entry/title.txt");
+?></div>
+<div class="panel_body"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php
-a:active {
- color: #336699;
-}
+ echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
-.input_submit {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 125px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px
-}
-
-#panel_title {
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
-}
-
-#panel_body {
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$font_panel_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 1px 1px;
- border-style: solid solid solid solid;
-}
-
-#panel_footer {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_footer},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 0px 1px 1px 1px;
- border-style: none solid solid solid;
-}
+ if (file_exists("$maj_data_directory/items/$maj_req_entry/author.txt")) {
+ readfile("$maj_data_directory/items/$maj_req_entry/author.txt");
+ echo " - ";
+ }
+
+ entry2date($maj_req_entry);
+
+ if (file_exists("$maj_data_directory/items/$maj_req_entry/revisions.txt")) {
+ echo ' (Revision ';
+ readfile("$maj_data_directory/items/$maj_req_entry/revisions.txt");
+ echo " - ";
+ echo date("l, M j, Y, g:i A", filemtime("$maj_data_directory/items/$maj_req_entry/body.txt"));
+ echo ')';
+ }
-</style>
+ echo "</font><div style=\"height: {$maj_wspace}px;\"></div>";
-<p><table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"><tr><td width="525">
-<div id="panel_title"><?php readfile("data/items/{$_REQUEST['entry']}/title.txt"); ?></div>
-<div id="panel_body"><?php readfile("data/items/{$_REQUEST['entry']}/body.txt"); ?></div>
-<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php readfile("data/items/{$_REQUEST['entry']}/date.txt"); ?></font></div>
-</td></tr></table></p>
+ readfile("$maj_data_directory/items/$maj_req_entry/body.txt");
+?></td></tr></table></div></div>
+</td></tr></table>
+</p>
<p><table border="0" cellspacing="2" cellpadding="0">
<tr><td>
<form enctype="multipart/form-data" action="del.php" method="post">
<input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>">
<input type="hidden" name="action" value="delete">
-<input class="input_submit" type="submit" value="delete">
+<input class="click" type="submit" value="delete">
</form>
</td><td>
<form enctype="multipart/form-data" action="del.php" method="post">
<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
<input type="hidden" name="action" value="edit">
-<input class="input_submit" type="submit" value="edit">
+<input class="click" type="submit" value="edit">
</form>
</td><td>
<form enctype="multipart/form-data" action="del.php" method="post">
<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
<input type="hidden" name="action" value="home">
-<input class="input_submit" type="submit" value="home">
+<input class="click" type="submit" value="home">
</form>
</td></tr>
</table>