Profile
MAJ is an Open Source, PHP-based content management system (CMS) that can be deployed as a blog, bulletin or message board, Internet forum, and wiki. It is extensible via PHP panels and is HTML5 and CSS3 ready.
Git
This commit has been accessed 947 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>
 
Credits
Sunday, Sep 18, 2005, 12:00 AM (Revision 11 - Thursday, Jul 14, 2011, 7:30 PM)
Open Source enables software developers to stand on the shoulders of giants instead of reinventing the wheel, so to speak. Kudos and many thanks to the folks who made their work freely available for reuse in MAJ.

read more
Bugs and Exploits
Friday, Aug 26, 2005, 12:00 AM (Revision 23 - Wednesday, May 29, 2013, 5:25 AM)
Although MAJ started as a family project, care has been taken to make it as "safe" as possible. With more people now working on MAJ, bugs and exploitable code may sometimes slip in. We invite you to poke around and see if you can find any. Generally, there are two things you can do when you find a MAJ or PHP-related bug or exploit:

1. Take advantage of it. But hey, what's so exciting about messing up someone's blog? Ho-hum, right?
2. Report it here so that we can work on a fix and make MAJ better.

read more
Search
Download
MAJ 2.0
75 files
33012 downloads
MAJ 1.0
26 files
13143 downloads
MAJ 0.14
45 files
35025 downloads