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 blob has been accessed 946 times via Git panel.

  1. <?php
  2.  
  3. require("core.php");
  4.  
  5. if (!isset($maj_req_entry) or empty($maj_req_entry)) {
  6.         exit();
  7. }
  8.  
  9. if (!isset($maj_req_show) or empty($maj_req_show)) {
  10.         exit();
  11. }
  12.  
  13. if (!file_exists("images/$maj_req_entry/album/$maj_req_show")) {
  14.         exit();
  15. }
  16.  
  17. if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "delete")) {
  18.  
  19.         unlink("images/$maj_req_entry/album/$maj_req_show");
  20.  
  21.         if (file_exists("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt")) {
  22.                 unlink("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt");
  23.         }
  24.  
  25.         if (file_exists("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt")) {
  26.                 unlink("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt");
  27.         }
  28.  
  29.         if (count(glob("images/$maj_req_entry/album/*")) < 1) {
  30.                 header("Location: index.php?entry=$maj_req_entry");
  31.         }
  32.         else {
  33.                 if (!empty($_REQUEST['next'])) {
  34.                         header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['next']}");
  35.                 }
  36.                 else {
  37.                         if (!empty($_REQUEST['prev'])) {
  38.                                 header("Location: album.php?entry=$maj_req_entry&show={$_REQUEST['prev']}");
  39.                         }
  40.                 }              
  41.         }
  42. }
  43.  
  44. if (isset($_POST['filename']) and !empty($_POST['filename']) and isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "rename") and !file_exists("images/$maj_req_entry/album/{$_POST['filename']}")) {
  45.  
  46.         $filename = strip_tags($_POST['filename']);
  47.         $filename = mb_strtolower($_POST['filename']);
  48.         $filename = str_replace(" ","_",$filename);
  49.         $filename = trim($filename);
  50.  
  51.         rename("images/$maj_req_entry/album/$maj_req_show","images/$maj_req_entry/album/$filename");
  52.  
  53.         if (file_exists("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt")) {
  54.                 rename("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt","data/items/$maj_req_entry/album/captions/{$filename}.txt");
  55.         }
  56.  
  57.         if (file_exists("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt")) {
  58.                 rename("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt","data/items/$maj_req_entry/album/views/{$filename}.txt");
  59.         }
  60.        
  61.         header("Location: album.php?entry=$maj_req_entry&show=$filename");
  62. }
  63.  
  64. if ((!isset($_POST['caption']) or empty($_POST['caption'])) and isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "caption")) {
  65.  
  66.         if (file_exists("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt")) {
  67.                 unlink("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt");
  68.         }
  69. }
  70.  
  71. if (isset($_POST['caption']) and !empty($_POST['caption']) and isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($_POST['edit']) and ($_POST['edit'] == "caption")) {
  72.         $caption_put = ucfirst($_POST['caption']);
  73.         $caption_put = str_replace(':((', '<img src="images/smileys/crying.png" border="0">', $caption_put);
  74.         $caption_put = str_replace(':(', '<img src="images/smileys/frown.png" border="0">', $caption_put);
  75.         $caption_put = str_replace(':|', '<img src="images/smileys/indifferent.png" border="0">', $caption_put);
  76.         $caption_put = str_replace(':D', '<img src="images/smileys/laughing.png" border="0">', $caption_put);
  77.         $caption_put = str_replace(':P', '<img src="images/smileys/lick.png" border="0">', $caption_put);
  78.         $caption_put = str_replace(':O', '<img src="images/smileys/ohno.png" border="0">', $caption_put);
  79.         $caption_put = str_replace(':)', '<img src="images/smileys/smile.png" border="0">', $caption_put);
  80.         $caption_put = str_replace('=)', '<img src="images/smileys/surprised.png" border="0">', $caption_put);
  81.         $caption_put = str_replace(':\\', '<img src="images/smileys/undecided.png" border="0">', $caption_put);
  82.         $caption_put = str_replace(';)', '<img src="images/smileys/wink.png" border="0">', $caption_put);
  83.         $caption_put = str_replace('[code]', '<code>', $caption_put);
  84.         $caption_put = str_replace('[/code]', '</code>', $caption_put);
  85.         $caption_put = str_replace("\n", '<br />', $caption_put);
  86.         $caption_put = str_replace('[b]', '<b>', $caption_put);
  87.         $caption_put = str_replace('[/b]', '</b>', $caption_put);
  88.         $caption_put = str_replace('[i]', '<i>', $caption_put);
  89.         $caption_put = str_replace('[/i]', '</i>', $caption_put);
  90.         $caption_put = str_replace('[u]', '<u>', $caption_put);
  91.         $caption_put = str_replace('[/u]', '</u>', $caption_put);
  92.         $caption_put = str_replace('[strike]', '<strike>', $caption_put);
  93.         $caption_put = str_replace('[/strike]', '</strike>', $caption_put);
  94.         $caption_put = str_replace('[sup]', '<sup>', $caption_put);
  95.         $caption_put = str_replace('[/sup]', '</sup>', $caption_put);
  96.         $caption_put = str_replace('[sub]', '<sub>', $caption_put);
  97.         $caption_put = str_replace('[/sub]', '</sub>', $caption_put);
  98.         $caption_put = str_replace('[highlight]', '<highlight>', $caption_put);
  99.         $caption_put = str_replace('[/highlight]', '</highlight>', $caption_put);
  100.         $caption_put = str_replace('<highlight>', '<span style="background-color: #ffff00;">', $caption_put);
  101.         $caption_put = str_replace('</highlight>', '</span>', $caption_put);
  102.  
  103.         if (!file_exists("data/items/$maj_req_entry/album")) {
  104.                 mkdir("data/items/$maj_req_entry/album");
  105.         }
  106.  
  107.         if (!file_exists("data/items/$maj_req_entry/album/captions")) {
  108.                 mkdir("data/items/$maj_req_entry/album/captions");
  109.         }
  110.  
  111.         $open_caption_txt_file = fopen("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt","w");
  112.         fwrite($open_caption_txt_file,$caption_put);
  113.         fclose($open_caption_txt_file);
  114. }
  115.  
  116. include("css.php");
  117.  
  118. echo "\n<style>body { margin: {$maj_wspace}px; } .input, .click { width: 100%; }</style>\n";
  119.  
  120. echo "\n<title>$maj_req_show</title>\n";
  121.  
  122. if (file_exists("$maj_data_directory/gl.txt")) {
  123.         echo "\n<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script>\n";
  124. }
  125.  
  126. if (file_exists("images/$maj_req_entry/album")) {
  127.         if ($dh_album = opendir("images/$maj_req_entry/album")) {
  128.                 while (($entry_album = readdir($dh_album)) !== false) {
  129.                         if ($entry_album != "." && $entry_album != "..") {
  130.                                 $sort_album[] = $entry_album;
  131.                         }
  132.                 }
  133.         closedir($dh_album);
  134.         }
  135.  
  136.         sort($sort_album);
  137. }
  138.  
  139. $key_view = array_search($maj_req_show,$sort_album);
  140.  
  141. $key_prev = $key_view - 1;
  142. $key_next = $key_view + 1;
  143.  
  144. $show_prev = $sort_album[$key_prev];
  145. $show_next = $sort_album[$key_next];
  146.  
  147. $count_album_entry = count($sort_album);
  148.  
  149. $album_image_colspan = 4;
  150.  
  151. if (file_exists("images/$maj_req_entry/album/$maj_req_show")) {
  152.  
  153.         if (!file_exists("data/items/$maj_req_entry/album/views")) {
  154.                 mkdir("data/items/$maj_req_entry/album/views");
  155.         }
  156.  
  157.         if (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) {
  158.                 $fp_image_views_txt = fopen("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt","r");
  159.                 $image_views_value = fread($fp_image_views_txt,filesize("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt"));
  160.                 fclose($fp_image_views_txt);
  161.                 $image_views_value = $image_views_value + 1;
  162.                 $fp_image_views_txt = fopen("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt","w");
  163.                 fwrite($fp_image_views_txt, $image_views_value);
  164.                 fclose($fp_image_views_txt);
  165.         }
  166.  
  167.         echo "\n<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\"><tr><td valign=\"top\">";
  168.  
  169.         echo "\n<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" bgcolor=\"#cccccc\"><tr bgcolor=\"#ffffff\">";
  170.  
  171.         if ($key_prev >= 0) {
  172.  
  173.                 $album_image_colspan = $album_image_colspan + 1;
  174.        
  175.                 echo "<td align=\"left\" width=\"11\"><a href=\"album.php?entry=$maj_req_entry&show=$show_prev\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\"></a></td>";
  176.         }
  177.  
  178.         echo "<td align=\"center\"><b>$maj_req_show</b></td><td align=\"center\">";
  179.  
  180.         $album_image_size = getimagesize("images/$maj_req_entry/album/$maj_req_show",$album_image_info);
  181.         $album_image_width = $album_image_size[0];
  182.         $album_image_height = $album_image_size[1];
  183.  
  184.         echo "$album_image_width x $album_image_height pixels";
  185.  
  186.         $size = filesize("images/$maj_req_entry/album/$maj_req_show");
  187.         $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  188.         echo "</td><td align=\"center\">$size_string</td><td align=\"center\">";
  189.  
  190.         $album_image_views = file_get_contents("data/items/$maj_req_entry/album/views/{$maj_req_show}.txt");
  191.         echo "$album_image_views view";
  192.  
  193.         if ($album_image_views > 1) {
  194.                 echo "s";
  195.         }
  196.  
  197.         echo "</td>";
  198.  
  199.         if ($key_next < $count_album_entry) {
  200.  
  201.                 $album_image_colspan = $album_image_colspan + 1;
  202.  
  203.                 echo "<td align=\"right\" width=\"11\"><a href=\"album.php?entry=$maj_req_entry&show=$show_next\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\"></a></td>";
  204.         }
  205.  
  206.         echo "</tr>";
  207.  
  208.         echo "<tr bgcolor=\"#ffffff\"><td colspan=\"$album_image_colspan\" align=\"center\">";
  209.         echo "<img src=images/$maj_req_entry/album/$maj_req_show width=$album_image_width height=$album_image_height border=0>";
  210.         echo "</td></tr>";
  211.         if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
  212.                 echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
  213.                 echo "<input type=hidden name=entry value=$maj_req_entry>";
  214.                 echo "<input type=hidden name=show value=$maj_req_show>";
  215.                 echo "<input type=hidden name=prev value=$show_prev>";
  216.                 echo "<input type=hidden name=next value=$show_next>";
  217.                 echo "<input type=hidden name=edit value=delete>";             
  218.                 echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\"><input type=submit class=click value=\"click here to delete image\"></td></tr>";
  219.                 echo "</form>";
  220.                 echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
  221.                 echo "<input type=hidden name=entry value=$maj_req_entry>";
  222.                 echo "<input type=hidden name=show value=$maj_req_show>";
  223.                 echo "<input type=hidden name=edit value=rename>";
  224.                 echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\"><input type=text autocomplete=off class=input name=filename value=$maj_req_show></td></tr>";
  225.                 echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\"><input type=submit class=click value=\"click here to rename image\"></td></tr>";
  226.                 echo "</form>";
  227.                 echo "<form enctype=\"multipart\/form-data\" action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">";
  228.                 echo "<input type=hidden name=entry value=$maj_req_entry>";
  229.                 echo "<input type=hidden name=show value=$maj_req_show>";
  230.                 echo "<input type=hidden name=edit value=caption>";
  231.                 echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\">";
  232.                 echo "<textarea class=input name=caption rows=3 required>";
  233.                 if (file_exists("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt")) {
  234.                         $caption_get = file_get_contents("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt");
  235.                         $caption_get = str_replace('<br />', "\n", $caption_get);
  236.                         $caption_get = str_replace('<img src="images/smileys/crying.png" border="0">', ':((', $caption_get);
  237.                         $caption_get = str_replace('<img src="images/smileys/frown.png" border="0">', ':(', $caption_get);
  238.                         $caption_get = str_replace('<img src="images/smileys/indifferent.png" border="0">', ':|', $caption_get);
  239.                         $caption_get = str_replace('<img src="images/smileys/laughing.png" border="0">', ':D', $caption_get);
  240.                         $caption_get = str_replace('<img src="images/smileys/lick.png" border="0">', ':P', $caption_get);
  241.                         $caption_get = str_replace('<img src="images/smileys/ohno.png" border="0">', ':O', $caption_get);
  242.                         $caption_get = str_replace('<img src="images/smileys/smile.png" border="0">', ':)', $caption_get);
  243.                         $caption_get = str_replace('<img src="images/smileys/surprised.png" border="0">', '=)', $caption_get);
  244.                         $caption_get = str_replace('<img src="images/smileys/undecided.png" border="0">', ':\\', $caption_get);
  245.                         $caption_get = str_replace('<img src="images/smileys/wink.png" border="0">', ';)', $caption_get);
  246.                         $caption_get = str_replace('<span style="background-color: #ffff00;">', '<highlight>', $caption_get);
  247.                         $caption_get = str_replace('</span>', '</highlight>', $caption_get);
  248.                         echo $caption_get;
  249.                 }
  250.                 echo "</textarea>";
  251.                 echo "<input type=submit class=click value=\"click here to update caption\">";
  252.                 echo "</td></tr></form>";
  253.         }
  254.         if (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) {
  255.                 if (file_exists("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt")) {
  256.                         echo "<tr bgcolor=\"#ffffff\"><td colspan=\"$album_image_colspan\" width=\"$album_image_width\">";
  257.                         $caption_get = file_get_contents("data/items/$maj_req_entry/album/captions/{$maj_req_show}.txt");
  258.                         echo $caption_get;
  259.                         echo "</td></tr>";
  260.                 }
  261.         }
  262.  
  263.         echo "</table>";
  264.  
  265.         echo "</td><td width=\"10\"></td><td valign=\"top\">";
  266.  
  267.         //if(isset($album_image_info['APP13'])) {
  268.         //
  269.         //      $album_image_iptc = iptcparse($album_image_info['APP13']);
  270.         //
  271.         //      foreach (array_keys($album_image_iptc) as $album_image_iptc_array) {
  272.         //
  273.         //              $c = count($album_image_iptc[$album_image_iptc_array]);
  274.         //
  275.         //              for ($i=0; $i <$c; $i++) {
  276.         //                      echo $album_image_iptc_array . ' = ' . $album_image_iptc[$album_image_iptc_array][$i] .'<br>';
  277.         //              }
  278.         //      }
  279.         //}
  280.  
  281.         $album_image_exif = exif_read_data("images/$maj_req_entry/album/$maj_req_show", 0, true);
  282.        
  283.         foreach ($album_image_exif as $album_image_exif_key => $album_image_exif_section) {
  284.                
  285.                 foreach ($album_image_exif_section as $album_image_exif_name => $album_image_exif_value) {
  286.                        
  287.                         $album_image_exif_value = strip_tags($album_image_exif_value);
  288.  
  289.                         if ((($album_image_exif_key == "EXIF") or ($album_image_exif_key == "IFD0")) and !empty($album_image_exif_value) and ($album_image_exif_name != "MakerNote") and ($album_image_exif_name != "ComponentsConfiguration") and ($album_image_exif_name != "FileSource") and ($album_image_exif_name != "SceneType") and ($album_image_exif_name != "CFAPattern") and !preg_match("/UndefinedTag/",$album_image_exif_name)) {
  290.                                 echo "<nobr>$album_image_exif_name: $album_image_exif_value</nobr><br>";
  291.                         }
  292.                 }
  293.         }
  294.  
  295.         echo "</td></tr></table>";
  296.  
  297.         if ((file_exists("$maj_data_directory/gl.txt") and file_exists("$maj_data_directory/items/$maj_req_entry/gl.txt")) or (file_exists("data/fb.txt") and file_exists("data/items/$maj_req_entry/fb.txt"))) {
  298.  
  299.                 if (isset($_SERVER['HTTPS'])) {
  300.                         $entry_url = "https://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/album.php?entry=$maj_req_entry&show=$maj_req_show";
  301.                 }
  302.                 else {
  303.                         $entry_url = "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/album.php?entry=$maj_req_entry&show=$maj_req_show";
  304.                 }
  305.         }
  306.  
  307.         if (file_exists("$maj_data_directory/gl.txt") and file_exists("$maj_data_directory/items/$maj_req_entry/gl.txt")) {
  308.                 echo "<div style=\"margin: 4px;\"><g:plusone size=\"medium\" href=\"$entry_url\"></g:plusone></div>";
  309.         }
  310.        
  311.        
  312.         if (file_exists("data/fb.txt") and file_exists("data/items/$maj_req_entry/fb.txt")) {
  313.                 echo "<div style=\"margin: 4px;\"><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"$album_image_width\" show_faces=\"true\" font=\"\"></fb:like></div>";
  314.         }
  315.        
  316.         echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><td valign=\"top\" colspan=\"3\">";
  317.  
  318.         echo "<table cellspacing=1 cellpadding=2 border=0 bgcolor=#cccccc><tr bgcolor=#ffffff><td width=100%><p><b>Album</b></p></td></tr><tr bgcolor=#ffffff><td width=100%>";
  319.  
  320.         if (file_exists("images/$maj_req_entry/thumbnails")) {
  321.                 if ($dh_album = opendir("images/$maj_req_entry/thumbnails")) {
  322.                         while (($thumbnail_album = readdir($dh_album)) !== false) {
  323.                                 if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*",$thumbnail_album)) {
  324.                                         $current_thumbnail = "images/$maj_req_entry/thumbnails/$thumbnail_album";
  325.                                         $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
  326.                                         $parent_image = "images/$maj_req_entry/album/$parent_image";
  327.                                         if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
  328.                                                 unlink($current_thumbnail);
  329.                                         }
  330.                                 }
  331.                         }
  332.                 }
  333.         }
  334.        
  335.         if ($count_album_entry < 1) {
  336.                 rmdirr("images/$maj_req_entry/album");
  337.                 rmdirr("images/$maj_req_entry/thumbnails");                            
  338.         }
  339.         else {
  340.                 foreach($sort_album as $album_entry) {
  341.                         $current_image = "images/$maj_req_entry/album/$album_entry";
  342.                         $current_image_size = getimagesize($current_image);
  343.                         $current_width = $current_image_size[0];
  344.                         $current_height = $current_image_size[1];
  345.                         $max_width = 98;
  346.                         $max_height = 73;
  347.        
  348.                         if (($current_width > $max_width) || ($current_height > $max_height)) {  
  349.  
  350.                                 if ($current_height > $current_width) {
  351.                                         $sizefactor = (double) ($max_height / $current_height);
  352.                                 }
  353.                                 else {
  354.                                         $sizefactor = (double) ($max_width / $current_width) ;
  355.                                 }
  356.  
  357.                                 $new_width = (int) ($current_width * $sizefactor);
  358.                                 $new_height = (int) ($current_height * $sizefactor);
  359.                         }
  360.                         else {
  361.                                 $new_width = $current_width;
  362.                                 $new_height = $current_height;
  363.                         }
  364.  
  365.                         if (!file_exists("images/$maj_req_entry/thumbnails/{$album_entry}-thumbnail.jpg")) {
  366.        
  367.                                 $work_thumb = imagecreatetruecolor($new_width,$new_height);
  368.                                 $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
  369.  
  370.                                 switch($get_mimetype) {
  371.                                         case "image/jpg":
  372.                                         case "image/jpeg":
  373.                                                 $work_image = imagecreatefromjpeg($current_image);
  374.                                                 break;
  375.                                         case "image/gif":
  376.                                                 $work_image = imagecreatefromgif($current_image);
  377.                                                 break;
  378.                                         case "image/png":
  379.                                                 $work_image = imagecreatefrompng($current_image);
  380.                                                 break;
  381.                                 }
  382.        
  383.                                 imagecopyresampled($work_thumb,$work_image,0,0,0,0,$new_width,$new_height,$current_width,$current_height);
  384.        
  385.                                 if (!file_exists("images/$maj_req_entry/thumbnails")) {
  386.                                         mkdir("images/$maj_req_entry/thumbnails");
  387.                                 }
  388.        
  389.                                 imagejpeg($work_thumb,"images/$maj_req_entry/thumbnails/{$album_entry}-thumbnail.jpg",80);
  390.  
  391.                                 imagedestroy($work_thumb);
  392.                                 imagedestroy($work_image);
  393.                         }
  394.  
  395.                         echo "<a href=\"album.php?entry=$maj_req_entry&show=$album_entry\">";
  396.  
  397.                         if (!file_exists("images/$maj_req_entry/thumbnails/{$album_entry}-thumbnail.jpg")) {
  398.                                 echo "<img src=\"images/$maj_req_entry/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  399.                         }
  400.                         else {
  401.                                 echo "<img src=\"images/$maj_req_entry/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  402.                         }
  403.  
  404.                         if (file_exists("data/items/$maj_req_entry/album/captions/{$album_entry}.txt")) {
  405.                                 echo ' alt="';
  406.                                 $img_alt = file_get_contents("data/items/$maj_req_entry/album/captions/{$album_entry}.txt");
  407.                                 $img_alt = strip_tags($img_alt);
  408.                                 echo $img_alt;
  409.                                 echo '"';
  410.                         }
  411.                         echo "></a>";
  412.                 }
  413.         }      
  414.  
  415.         echo "</td></tr><form method=post action=index.php?entry=$maj_req_entry&show=album><tr bgcolor=#ffffff><td><input class=click type=submit value=\"click here to go to the main entry\"></td></tr></form><form method=post action=index.php><tr bgcolor=#ffffff><td><input class=click type=submit value=\"click here to go to the index page\"></td></tr></form></table>";
  416.  
  417.         echo "</td></tr></table>";
  418. }
  419.  
  420. if ($key_prev >= 0) {
  421.         echo "\n\n<script>\n\tvar img_prev = new Image();\n\timg_prev.src = \"images/$maj_req_entry/album/$show_prev\";\n</script>";
  422. }
  423.  
  424. if ($key_next < $count_album_entry) {
  425.         echo "\n\n<script>\n\tvar img_next = new Image();\n\timg_next.src = \"images/$maj_req_entry/album/$show_next\";\n</script>";
  426. }
  427.  
  428. ?>
  429.  
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
13144 downloads
MAJ 0.14
45 files
35026 downloads