This blob has been accessed 468 times via Git panel.
- <?php
- ini_set("session.use_trans_sid", 0);
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- $dir = "data/items";
- $default_title = file_get_contents("data/title.txt");
- if (file_exists("data/offset.txt")) {
- $offset = file_get_contents("data/offset.txt");
- }
- else {
- $offset = 0;
- }
- if (file_exists("data/increase.txt")) {
- $increase = file_get_contents("data/increase.txt");
- }
- else {
- $increase = 5;
- }
- $default_blog_title = "My Activity Journal";
- $default_username = "maj";
- $default_password = "php";
- $default_blog_profile = "This cool site is powered by <a href=http://engels.mortega.net/index.php?entry=20050521000019 target=_blank>My Activity Journal</a>, a dead-simple, <a href=http://php.net/ target=_blank>PHP</a>-based, <a href=http://www.opensource.org/licenses/gpl-license.php target=_blank>GPL</a>'ed blog written from scratch as a spare time family project by <a href=http://engels.mortega.net/ target=_blank>Engels</a>, <a href=http://gaffud.com/ target=_blank>Magie</a>, and <a href=http://psylocke.org/ target=_blank>Psylocke</a> Antonio.";
- $default_blog_author = "My Activity Journal";
- if (!file_exists("data")) {
- mkdir("data");
- }
- if (!file_exists("data/.htaccess")) {
- $htaccess = "Order deny,allow\nDeny from all";
- }
- if (!file_exists("data/title.txt")) {
- }
- if (!file_exists("data/username.txt")) {
- }
- if (!file_exists("data/password.txt")) {
- $default_password = sha1($default_password);
- $default_password = md5($default_password);
- $default_password = crypt($default_password, $default_password);
- }
- if (!file_exists("data/profile.php")) {
- }
- if (!file_exists("data/author.txt")) {
- }
- $login_username = file_get_contents("data/username.txt");
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $global_hits_count = $global_hits_count + 1;
- }
- $agent = $_SERVER['HTTP_USER_AGENT'];
- if (@ereg("Google", $agent)) {
- $google_hits_count = $google_hits_count + 1;
- }
- function str_rand($length = 8, $seeds = 'abcdefghijklmnopqrstuvwxyz0123456789')
- {
- $str = '';
- list($usec, $sec) = explode(' ', microtime());
- $seed = (float) $sec + ((float) $usec * 100000);
- mt_srand($seed);
- for ($i = 0; $length > $i; $i++) {
- $str .= $seeds{mt_rand(0, $seeds_count - 1)};
- }
- return $str;
- }
- function rmdirr($recurse_dirname)
- {
- if (!file_exists($recurse_dirname)) {
- return false;
- }
- if (is_file($recurse_dirname)) {
- return unlink($recurse_dirname);
- }
- $recurse_dir = dir($recurse_dirname);
- while (false !== $recurse_entry = $recurse_dir->read()) {
- if ($recurse_entry == '.' || $recurse_entry == '..') {
- continue;
- }
- rmdirr("$recurse_dirname/$recurse_entry");
- }
- $recurse_dir->close();
- return rmdir($recurse_dirname);
- }
- if (isset($_REQUEST['download']) and !empty($_REQUEST['download'])) {
- ini_set('zlib.output_compression','off');
- $file = str_replace('../','', @$_REQUEST['download']);
- go_download($file);
- die();
- }
- function go_download($dl_file) {
- $d = $_REQUEST['entry'];
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == pdf)) {
- $dl_path = "data/items/$d/pdf/file";
- $count_path = "data/items/$d/pdf/count";
- $count_file = "dl.txt";
- }
- if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == filedrop)) {
- $dl_path = "data/items/$d/filedrop/files";
- $count_path = "data/items/$d/filedrop/count";
- $count_file = "{$dl_file}.txt";
- }
- header("Cache-Control: ");
- header("Pragma: ");
- header("Content-type: application/octet-stream");
- header("Content-Disposition: attachment; filename=\"" . $dl_file . "\"");
- header("Content-length: " . filesize("$dl_path/$dl_file"));
- echo $buf;
- }
- if ($bytes_sent==filesize("$dl_path/$dl_file")) {
- if (!file_exists($count_path)) {
- mkdir($count_path);
- }
- $unique_downloads = "$count_path/$count_file";
- $count_unique_downloads = $count_unique_downloads + 1;
- }
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['key']) and !empty($_REQUEST['key']) and isset($_REQUEST['action']) and !empty($_REQUEST['action'])) {
- $comment_dir = 'data/items/' . $_REQUEST['entry'] .'/comments/pending/' . $_REQUEST['comment'];
- $key_file = $comment_dir . '/key.txt';
- if ($_REQUEST['key'] == $login_key) {
- if ($_REQUEST['action'] == "approve") {
- $live_dir = 'data/items/' . $_REQUEST['entry'] .'/comments/live/' . $_REQUEST['comment'];
- unlink("$live_dir/key.txt");
- }
- if ($_REQUEST['action'] == "delete") {
- rmdirr($comment_dir);
- }
- $pending_comment_flag_dir = $_REQUEST['entry'];
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
- if ($comment_count_value <= 1) {
- rmdirr("data/comments/pending/$pending_comment_flag_dir");
- }
- else {
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
- $comment_count_value = $comment_count_value - 1;
- }
- header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry'] . '&show=comments');
- }
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
- $check = $dir . '/' . $_REQUEST['entry'];
- if (file_exists("$check")) {
- $filter = $_REQUEST['entry'];
- echo '<title>';
- $title = $check . '/title.txt';
- readfile($title);
- echo '</title>';
- $views = $check . '/views.txt';
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $count_views = $count_views + 1;
- }
- if (isset($_REQUEST['show']) and !empty($_REQUEST['show']) and isset($_REQUEST['capcha_put']) and !empty($_REQUEST['capcha_get']) and isset($_REQUEST['firstname']) and !empty($_REQUEST['firstname']) and isset($_REQUEST['lastname']) and !empty($_REQUEST['lastname']) and isset($_REQUEST['email']) and !empty($_REQUEST['email']) and isset($_REQUEST['new_comment']) and !empty($_REQUEST['new_comment']) and isset($_REQUEST['capcha_put']) and !empty($_REQUEST['capcha_put']) and ($_REQUEST['capcha_get'] == $_REQUEST['capcha_put']) and (ereg("@", $_REQUEST['email'])) and (ereg("\.", $_REQUEST['email']))) {
- if (!file_exists("$check/comments")) {
- mkdir("$check/comments");
- }
- if (!file_exists("$check/comments/pending")) {
- mkdir("$check/comments/pending");
- }
- if (!file_exists("$check/comments/live")) {
- mkdir("$check/comments/live");
- }
- // GNU date format
- //$timestamp = date("D M j H:i:s \P\H\T Y", time() + $offset);
- // Simple PHP Blog format
- mkdir("$check/comments/pending/$comment_entry_dir");
- $body_content = ucfirst($_REQUEST['new_comment']);
- $body_content = htmlentities($body_content, ENT_NOQUOTES);
- // $body_content = str_replace('href=', 'rel=nofollow target=_blank href=', $body_content);
- $body_content = str_replace("\n", '<br />', $body_content);
- $body_content = trim($body_content);
- $body_content = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $body_content);
- $body_content = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $body_content);
- $body_content = str_replace(':|', '<img src=images/smileys/indifferent.png border=0>', $body_content);
- $body_content = str_replace(':D', '<img src=images/smileys/laughing.png border=0>', $body_content);
- $body_content = str_replace(':P', '<img src=images/smileys/lick.png border=0>', $body_content);
- $body_content = str_replace(':O', '<img src=images/smileys/ohno.png border=0>', $body_content);
- $body_content = str_replace(':)', '<img src=images/smileys/smile.png border=0>', $body_content);
- $body_content = str_replace('=)', '<img src=images/smileys/surprised.png border=0>', $body_content);
- $body_content = str_replace(':\\', '<img src=images/smileys/undecided.png border=0>', $body_content);
- $body_content = str_replace(';)', '<img src=images/smileys/wink.png border=0>', $body_content);
- $firstname = ucwords($_REQUEST['firstname']);
- $firstname = trim($firstname);
- $firstname = htmlentities($firstname, ENT_NOQUOTES);
- $lastname = ucwords($_REQUEST['lastname']);
- $lastname = trim($lastname);
- $lastname = htmlentities($lastname, ENT_NOQUOTES);
- $email = str_replace('@', ' at ', $_REQUEST['email']);
- $email = strtolower($email);
- $email = trim($email);
- $email = htmlentities($email, ENT_NOQUOTES);
- if (isset($_REQUEST['url']) and !empty($_REQUEST['url']) and (ereg("\.", $_REQUEST['url']))) {
- $url = str_replace('http://', '', $_REQUEST['url']);
- $url = strtolower($url);
- $url = trim($url);
- $url = 'http://' . $url;
- $url = htmlentities($url, ENT_NOQUOTES);
- }
- $key_rand = str_rand(14);
- $comment_quote = ucfirst($_REQUEST['new_comment']);
- $comment_quote = htmlentities($comment_quote, ENT_NOQUOTES);
- $sig_author_file = "data/author.txt";
- $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $sig_url = str_replace('//', '/', $sig_url);
- $sig_url = "http://" . $sig_url;
- $email_to = strtolower($_REQUEST['email']);
- $email_to = $firstname . " " . $lastname . ' <' . $email_to . '>';
- if (file_exists("data/email.txt")) {
- $from_email_file = "data/email.txt";
- }
- $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
- $commented_entry_title_file = "data/items/{$_REQUEST['entry']}/title.txt";
- if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
- $comment_thanks = "Hi $firstname,\n\nThanks for submitting the following comment last $timestamp:\n\n\"$comment_quote\"\n\nIt will be e-mailed to me first for approval. Please visit the following URL to see if it has been posted:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&show=comments\n\nThanks again! =)\n\n--\n$sig_author\n$sig_url\n";
- $comment_thanks = wordwrap($comment_thanks);
- mail($email_to, "Thanks for posting a comment on my blog!", $comment_thanks,
- "From: $from_email\r\n" .
- "Reply-To: $from_email\r\n" .
- "X-Mailer: $mailer");
- }
- if (file_exists("data/email.txt")) {
- $comment_notice = "The following comment was submitted by $email_to last $timestamp for the entry \"$commented_entry_title\":\n\n\"$comment_quote\"\n\nVisit the link below to approve and post this pending comment:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&comment={$comment_entry_dir}&key={$key_rand}&action=approve\n\nVisit the link below to disapprove and delete this pending comment:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&comment={$comment_entry_dir}&key={$key_rand}&action=delete\n\nYou can also approve or disapprove pending comments at a later time by logging on to your blog.";
- $comment_notice = wordwrap($comment_notice);
- mail($from_email, "Pending Blog Comment", $comment_notice,
- "From: $from_email\r\n" .
- "Reply-To: $from_email\r\n" .
- "X-Mailer: $mailer");
- }
- if (!file_exists("data/comments")) {
- mkdir("data/comments");
- }
- if (!file_exists("data/comments/pending")) {
- mkdir("data/comments/pending");
- }
- $pending_comment_flag = $_REQUEST['entry'];
- if (!file_exists("data/comments/pending/$pending_comment_flag")) {
- mkdir("data/comments/pending/$pending_comment_flag");
- }
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag/count.txt"));
- $comment_count_value = $comment_count_value + 1;
- }
- }
- else {
- echo '<title>' . $default_title . '</title>';
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- $filter = $_REQUEST['archive'] . "*";
- }
- else {
- $filter = "*";
- }
- }
- }
- else {
- echo '<title>' . $default_title . '</title>';
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- $filter = $_REQUEST['archive'] . "*";
- }
- else {
- $filter = "*";
- }
- }
- ?>
- <?php
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and file_exists("data/items/{$_REQUEST['entry']}")) {
- $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
- if (!file_exists("data/categories/$cat_dir/private.txt")) {
- if (!file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
- if (!file_exists("data/items/{$_REQUEST['entry']}/private.txt")) {
- $description = file_get_contents("data/items/{$_REQUEST['entry']}/body.txt");
- $description = strip_tags($description);
- $description = html_entity_decode($description);
- $description = str_replace("&","&",$description);
- $description = str_replace("<","<",$description);
- $description = str_replace(">",">",$description);
- $description = str_replace("<br>"," ",$description);
- $description = str_replace("<br />"," ",$description);
- $description = str_replace("\r"," ",$description);
- $description = str_replace("\n"," ",$description);
- $description = str_replace(chr(10)," ",$description);
- $description = str_replace(chr(13)," ",$description);
- $description = trim($description);
- $description = substr($description,0,210);
- $description = htmlentities($description, ENT_NOQUOTES);
- echo "<meta name=\"description\" content=\"{$description}\">";
- }
- }
- }
- }
- ?>
- <style>
- body
- {
- color: <?php
- if (file_exists("data/colors/font.txt")) {
- $font_color = file_get_contents("data/colors/font.txt");
- echo $font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- margin: 0px 0px 10px 10px;
- padding: 0px;
- text-align: left;
- font-family: verdana, helvetica, sans-serif;
- background-color: <?php
- if (file_exists("data/colors/bg.txt")) {
- $background_color = file_get_contents("data/colors/bg.txt");
- echo $background_color;
- }
- else {
- echo "#FFFFFF";
- }
- ?>;
- <?php
- if (file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
- background-image: url('images/background.gif');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (!file_exists("images/background.gif") and file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
- background-image: url('images/background.jpg');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- if (!file_exists("images/background.gif") and !file_exists("images/background.jpg") and file_exists("images/background.png")) { ?>
- background-image: url('images/background.png');
- background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
- background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
- background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
- <?php
- }
- ?>
- }
- p, td
- {
- font-size: 11px;
- }
- a
- {
- font-weight: bold;
- text-decoration: none;
- }
- a:link
- {
- color: <?php
- if (file_exists("data/colors/link.txt")) {
- $a_link_color = file_get_contents("data/colors/link.txt");
- echo $a_link_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:visited
- {
- color: <?php
- if (file_exists("data/colors/vlink.txt")) {
- $a_visited_color = file_get_contents("data/colors/vlink.txt");
- echo $a_visited_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- }
- a:hover
- {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- $a_hover_color = file_get_contents("data/colors/hover.txt");
- echo $a_hover_color;
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- a:active {
- color: <?php
- if (file_exists("data/colors/hover.txt")) {
- $a_active_color = file_get_contents("data/colors/hover.txt");
- echo $a_active_color;
- }
- else {
- echo "#336699";
- }
- ?>;
- }
- #panel_title
- {
- font-family: verdana, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: <?php
- if (file_exists("data/colors/pt-font.txt")) {
- $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
- echo $panel_title_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pt-bg.txt")) {
- $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
- echo $panel_title_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 10px 0px 0px 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_title_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_title_border_color;
- }
- else {
- echo "#CCCCCC";
- }
- ?>;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
- }
- #panel_body
- {
- font-family: verdana, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/pb-font.txt")) {
- $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
- echo $panel_body_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pb-bg.txt")) {
- $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
- echo $panel_body_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_body_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_body_border_color;
- }
- else {
- echo "#CCCCCC";
- }
- ?>;
- border-width: 1px 1px 1px 1px;
- border-style: solid solid solid solid;
- }
- #panel_footer
- {
- font-family: verdana, helvetica, sans-serif;
- font-size: 11px;
- color: <?php
- if (file_exists("data/colors/pf-font.txt")) {
- $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
- echo $panel_footer_font_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- padding: 5px 5px 5px 5px;
- background-color: <?php
- if (file_exists("data/colors/pf-bg.txt")) {
- $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
- echo $panel_footer_background_color;
- }
- else {
- echo "transparent";
- }
- ?>;
- margin: 0px;
- border-color: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_footer_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_footer_border_color;
- }
- else {
- echo "#CCCCCC";
- }
- ?>;
- border-width: 0px 1px 1px 1px;
- border-style: none solid solid solid;
- text-align: right;
- }
- .input {
- color: <?php
- if (file_exists("data/colors/border.txt")) {
- $input_color = file_get_contents("data/colors/border.txt");
- echo $input_color;
- }
- else {
- echo "#666666";
- }
- ?>;
- background: #FFFFFF;
- border: <?php
- if (file_exists("data/colors/border.txt")) {
- $panel_footer_border_color = file_get_contents("data/colors/border.txt");
- echo $panel_footer_border_color;
- }
- else {
- echo "#999999";
- }
- ?> solid 1px;
- width: 300px;
- font-family: verdana,helvetica,sans-serif;
- font-size: 11px;
- }
- .search {
- color: #666666;
- background: #FFFFFF;
- width: 100%;
- font-family: verdana,helvetica,sans-serif;
- font-size: 11px;
- }
- </style>
- <link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
- <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="rss.php?ver=1.0">
- <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php?ver=2.0">
- <?php
- if (file_exists("header.php")) {
- include("header.php");
- echo '<p></p>';
- }
- ?>
- <table border=0 cellspacing=0 cellpadding=0 width=905>
- <tr><td width=175 valign=top>
- <?php
- if (file_exists("images/profile.gif")) {
- $profile_gif_image_size = getimagesize("images/profile.gif");
- $profile_gif_image_width = $profile_gif_image_size[0];
- $profile_gif_image_height = $profile_gif_image_size[1];
- $max_profile_gif_image_width = 163;
- if ($profile_gif_image_width > $max_profile_gif_image_width) {
- $sizefactor = (double) ($max_profile_gif_image_width / $profile_gif_image_width) ;
- $profile_gif_image_width = (int) ($profile_gif_image_width * $sizefactor);
- $profile_gif_image_height = (int) ($profile_gif_image_height * $sizefactor);
- }
- echo "<img src=images/profile.gif border=0 width=";
- echo $profile_gif_image_width;
- echo " height=";
- echo $profile_gif_image_height;
- echo " align=left>";
- }
- if (file_exists("images/profile.jpg")) {
- $profile_jpg_image_size = getimagesize("images/profile.jpg");
- $profile_jpg_image_width = $profile_jpg_image_size[0];
- $profile_jpg_image_height = $profile_jpg_image_size[1];
- $max_profile_jpg_image_width = 163;
- if ($profile_jpg_image_width > $max_profile_jpg_image_width) {
- $sizefactor = (double) ($max_profile_jpg_image_width / $profile_jpg_image_width) ;
- $profile_jpg_image_width = (int) ($profile_jpg_image_width * $sizefactor);
- $profile_jpg_image_height = (int) ($profile_jpg_image_height * $sizefactor);
- }
- echo "<img src=images/profile.jpg border=0 width=";
- echo $profile_jpg_image_width;
- echo " height=";
- echo $profile_jpg_image_height;
- echo " align=left>";
- }
- if (file_exists("images/profile.png")) {
- $profile_png_image_size = getimagesize("images/profile.png");
- $profile_png_image_width = $profile_png_image_size[0];
- $profile_png_image_height = $profile_png_image_size[1];
- $max_profile_png_image_width = 163;
- if ($profile_png_image_width > $max_profile_png_image_width) {
- $sizefactor = (double) ($max_profile_png_image_width / $profile_png_image_width) ;
- $profile_png_image_width = (int) ($profile_png_image_width * $sizefactor);
- $profile_png_image_height = (int) ($profile_png_image_height * $sizefactor);
- }
- echo "<img src=images/profile.png border=0 width=";
- echo $profile_png_image_width;
- echo " height=";
- echo $profile_png_image_height;
- echo " align=left>";
- }
- include("data/profile.php");
- ?>
- </div>
- <a href="<?php echo $_SERVER['PHP_SELF']; ?>">Home</a><br>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=add.php>Add Entry</a><br>';
- echo '<a href=settings.php>Settings</a><br>';
- echo '<a href=panels.php>Panels</a><br>';
- echo '<a href=cat.php>Categories</a><br>';
- echo '<a href=colors.php>Colors</a><br>';
- echo '<a href=login.php>Logout</a>';
- }
- else {
- echo '<a href=login.php>Login</a>';
- }
- ?>
- </div>
- <?php
- if (file_exists("data/sticky")) {
- if ($dh_sticky_list = opendir("data/sticky")) {
- while (($entry_sticky_list = readdir($dh_sticky_list)) !== false) {
- if (file_exists("data/items/$entry_sticky_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $get_cat_dir = file_get_contents("data/items/$entry_sticky_list/category.txt");
- if (file_exists("data/categories/$get_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_sticky_list/cat.txt")) {
- continue;
- }
- if ($entry_sticky_list != "." && $entry_sticky_list != ".." && fnmatch("*", $entry_sticky_list)) {
- $show_sticky_list[] = $entry_sticky_list;
- }
- }
- closedir($dh_sticky_list);
- }
- sort($show_sticky_list);
- reset($show_sticky_list);
- $count_sticky_list = count($show_sticky_list);
- if ($count_sticky_list > 0) {
- echo '<div id=panel_title>Quick Links</div>';
- echo '<div id=panel_body>';
- foreach ($show_sticky_list as $sticky_list_entry) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=';
- echo $sticky_list_entry;
- echo '>';
- readfile("data/items/$sticky_list_entry/title.txt");
- echo '</a><br>';
- }
- echo '</div>';
- }
- }
- ?>
- <?php
- if (file_exists("data/panels")) {
- if ($dh_panel_list = opendir("data/panels")) {
- while (($entry_panel_list = readdir($dh_panel_list)) !== false) {
- if (file_exists("data/panels/$entry_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if ($entry_panel_list != "." && $entry_panel_list != ".." && fnmatch("*", $entry_panel_list)) {
- $show_panel_list[] = $entry_panel_list;
- }
- }
- closedir($dh_panel_list);
- }
- sort($show_panel_list);
- reset($show_panel_list);
- $count_panel_list = count($show_panel_list);
- if ($count_panel_list > 0) {
- foreach ($show_panel_list as $panel_list_entry) {
- echo '<div id=panel_title>';
- readfile("data/panels/$panel_list_entry/title.txt");
- echo '</div><div id=panel_body>';
- include("data/panels/$panel_list_entry/panel.php");
- echo '</div>';
- }
- }
- }
- ?>
- </td><td width=15> </td><td valign=top width=525>
- <?php
- if (is_dir($dir)) {
- if ($dh = opendir($dir)) {
- while (($entry_main = readdir($dh)) !== false) {
- if (file_exists("data/items/$entry_main/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $cat_dir = file_get_contents("data/items/$entry_main/category.txt");
- if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_main/cat.txt")) {
- continue;
- }
- if (file_exists("data/nocat.txt") and file_exists("data/items/$entry_main/category.txt") and !file_exists("data/items/$entry_main/cat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['category']) or empty($_REQUEST['category'])) and (!isset($_REQUEST['entry']) or empty($_REQUEST['entry']))) {
- continue;
- }
- if ($entry_main != "." && $entry_main != ".." && fnmatch($filter, $entry_main)) {
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "-", "data/categories/{$_REQUEST['category']}"))))) {
- $category = str_replace(" ", "-", $_REQUEST['category']);
- $category = strtolower($category);
- $category = strip_tags($category);
- if (file_exists("data/items/$entry_main/category.txt") and (file_get_contents("data/items/$entry_main/category.txt") == "$category")) {
- $items[] = $entry_main;
- }
- }
- else {
- $items[] = $entry_main;
- }
- }
- }
- closedir($dh);
- }
- }
- if (!file_exists("data/old.txt")) {
- rsort($items);
- }
- if (file_exists("data/old.txt")) {
- sort($items);
- }
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
- $category = str_replace(" ", "-", $_REQUEST['category']);
- $category = strtolower($category);
- $category = strip_tags($category);
- if (file_exists("data/categories/$category/book.txt")) {
- sort($items);
- }
- }
- reset($items);
- $start = $_REQUEST['start'];
- if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
- $start = 0;
- }
- $end=$start+$increase;
- $disp=array_slice($items,$start,$increase);
- foreach ($disp as $d) {
- if (file_exists("$dir/$d/category.txt")) {
- $category_check = 'data/categories/' . file_get_contents("$dir/$d/category.txt");
- if (!file_exists($category_check)) {
- unlink("$dir/$d/category.txt");
- }
- }
- if (file_exists("$dir/$d/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- echo '<table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC style="background-color: transparent;"><tr><td width=525><div id=panel_title>';
- readfile("$dir/$d/title.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $d;
- echo '><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete entry"></a>';
- echo '<a href=edit.php?entry=';
- echo $d;
- echo '><img src=images/widget.edit.png border=0 width=11 height=11 align=right alt="edit entry"></a>';
- if (file_exists("$dir/$d/passwd.txt")) {
- echo '<img src=images/widget.protected.png border=0 width=11 height=11 align=right alt="protected entry">';
- }
- if (file_exists("$dir/$d/private.txt")) {
- echo '<img src=images/widget.private.png border=0 width=11 height=11 align=right alt="private entry">';
- }
- if (file_exists("$dir/$d/cat.txt")) {
- echo '<img src=images/widget.cat.png border=0 width=11 height=11 align=right alt="always display">';
- }
- if (file_exists("$dir/$d/category.txt")) {
- $read_cat_dir = file_get_contents("$dir/$d/category.txt");
- if (file_exists("data/categories/$read_cat_dir/private.txt")) {
- echo '<img src=images/widget.hidden.png border=0 width=11 height=11 align=right alt="category hidden">';
- }
- if (file_exists("data/nocat.txt")) {
- echo '<img src=images/widget.isolated.png border=0 width=11 height=11 align=right alt="category isolated">';
- }
- if (file_exists("data/categories/$read_cat_dir/book.txt")) {
- echo '<img src=images/widget.booked.png border=0 width=11 height=11 align=right alt="category booked">';
- }
- echo '<img src=images/widget.filed.png border=0 width=11 height=11 align=right alt="filed under ';
- readfile("$dir/$d/category.txt");
- echo '">';
- }
- }
- echo '</div><div id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt")) {
- $passwd = file_get_contents("$dir/$d/passwd.txt");
- }
- if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
- $crypt_passwd = sha1($_REQUEST['passwd']);
- $crypt_passwd = md5($crypt_passwd);
- $crypt_passwd = crypt($crypt_passwd, $crypt_passwd);
- }
- echo '<font style="font-size: 10px; color: #999999;">';
- readfile("$dir/$d/date.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if (file_exists("$dir/$d/revisions.txt")) {
- echo ' (Revision ';
- readfile("$dir/$d/revisions.txt");
- echo ')';
- }
- if (file_exists("$dir/$d/category.txt")) {
- echo ' Filed under ';
- $category_key = file_get_contents("$dir/$d/category.txt");
- $category_key = strtolower($category_key);
- if (file_exists("data/categories/{$category_key}/title.txt")) {
- $category_dsp = file_get_contents("data/categories/{$category_key}/title.txt");
- echo "$category_key ($category_dsp)";
- }
- else {
- echo "$category_key";
- }
- }
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d>here</a> to enter it.";
- }
- else {
- readfile("$dir/$d/body.txt");
- }
- echo '</div><div id=panel_footer>';
- echo '<font style="font-size: 10px; color: ';
- if (file_exists("data/colors/pf-font.txt")) {
- readfile("data/colors/pf-font.txt");
- }
- else {
- echo "#999999";
- }
- echo ';">';
- if (!file_exists("data/nocomment.txt")) {
- if (!file_exists("$dir/$d/comments/live")) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>add comment</a>';
- }
- else {
- if ($dh_comments = opendir("$dir/$d/comments/live")) {
- while (($entry_comments = readdir($dh_comments)) !== false) {
- if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) {
- $items_comments[] = $entry_comments;
- }
- }
- closedir($dh_comments);
- }
- $comments = count($items_comments);
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>';
- if ($comments == 1) {
- echo $comments . ' comment';
- }
- elseif ($comments < 1) {
- echo 'add comment';
- }
- else {
- echo $comments . ' comments';
- }
- echo '</a>';
- unset($items_comments);
- }
- }
- else {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a>';
- }
- if (file_exists("$dir/$d/views.txt")) {
- if ($views_value == 1) {
- echo ' ( ' . $views_value . ' view ) ';
- }
- elseif ($views_value > 1) {
- echo ' ( ' . $views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- }
- if (!file_exists("images/$d/album")) {
- echo ' ';
- }
- else {
- if ($dh_album = opendir("images/$d/album")) {
- while (($entry_album = readdir($dh_album)) !== false) {
- if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
- $items_album[] = $entry_album;
- }
- }
- closedir($dh_album);
- }
- $album = count($items_album);
- echo ' | <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=album>';
- if ($album == 1) {
- echo $album . ' image';
- }
- elseif ($album < 1) {
- echo 'album';
- }
- else {
- echo $album . ' images';
- }
- echo '</a>';
- unset($items_album);
- }
- if (file_exists("images/$d/album") and isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == album)) {
- if (!file_exists("$dir/$d/album")) {
- mkdir("$dir/$d/album");
- }
- if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $album_views_value = $album_views_value + 1;
- }
- }
- if ($album_views_value == 1) {
- echo ' ( ' . $album_views_value . ' view ) ';
- }
- elseif ($album_views_value > 1) {
- echo ' ( ' . $album_views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- if (!file_exists("data/items/$d/filedrop/files")) {
- echo ' ';
- }
- else {
- if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
- while (($dl_file = readdir($dh_filedrop)) !== false) {
- if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
- $items_filedrop[] = $dl_file;
- }
- }
- closedir($dh_filedrop);
- }
- $filedrop = count($items_filedrop);
- echo ' | <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=filedrop>';
- if ($filedrop == 1) {
- echo $filedrop . ' file';
- }
- elseif ($filedrop < 1) {
- echo 'filedrop';
- }
- else {
- echo $filedrop . ' files';
- }
- echo '</a> ';
- unset($items_filedrop);
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop)) {
- if (!file_exists("$dir/$d/filedrop")) {
- mkdir("$dir/$d/filedrop");
- }
- if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- $filedrop_views_value = $filedrop_views_value + 1;
- }
- }
- if ($filedrop_views_value == 1) {
- echo ' ( ' . $filedrop_views_value . ' view ) ';
- }
- elseif ($filedrop_views_value > 1) {
- echo ' ( ' . $filedrop_views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- if (!file_exists("data/nopdf.txt") and file_exists("$dir/$d/pdf/file")) {
- echo "| <a href={$_SERVER['PHP_SELF']}?entry=$d&show=pdf>pdf</a> ";
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
- $pdf_views_value = $pdf_views_value + 1;
- }
- $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
- if ($pdf_views_value == 1) {
- echo ' ( ' . $pdf_views_value . ' view ) ';
- }
- elseif ($pdf_views_value > 1) {
- echo ' ( ' . $pdf_views_value . ' views ) ';
- }
- else {
- echo ' ';
- }
- }
- if (!file_exists("data/nocomment.txt")) {
- echo '| <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a></font>';
- }
- echo '</div></td></tr></table>';
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == album) and file_exists("images/$d/album")) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
- echo '<div id=panel_title>Album';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $d;
- echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
- }
- echo '</div><div id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=album>here</a> to enter it.";
- }
- else {
- /* thumbnail auto-clean-up (20060409) - This should delete thumbnails of non-existent album images. */
- if (file_exists("images/$d/thumbnails")) {
- if ($dh_album = opendir("images/$d/thumbnails")) {
- while (($thumbnail_album = readdir($dh_album)) !== false) {
- if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*", $thumbnail_album)) {
- $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
- $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
- $parent_image = "images/$d/album/$parent_image";
- if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
- unlink($current_thumbnail);
- }
- }
- }
- }
- }
- /* auto-sort entries (20060409) - MAJ previously relied on readdir() alone, causing entries to be displayed in the order in which they are stored by the filesystem. */
- if (file_exists("images/$d/album")) {
- if ($dh_album = opendir("images/$d/album")) {
- while (($entry_album = readdir($dh_album)) !== false) {
- if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
- $sort_album[] = $entry_album;
- }
- }
- closedir($dh_album);
- }
- sort($sort_album);
- reset($sort_album);
- $count_album_entry = count($sort_album);
- if ($count_album_entry < 1) {
- rmdirr("images/$d/album");
- rmdirr("images/$d/thumbnails");
- }
- else {
- foreach($sort_album as $album_entry) {
- $current_image = "images/$d/album/$album_entry";
- $current_image_size = getimagesize($current_image);
- $current_width = $current_image_size[0];
- $current_height = $current_image_size[1];
- $max_width = 98;
- $max_height = 73;
- if (($current_width > $max_width) || ($current_height > $max_height)) {
- if ($current_height > $current_width) {
- $sizefactor = (double) ($max_height / $current_height);
- }
- else {
- $sizefactor = (double) ($max_width / $current_width) ;
- }
- }
- $new_width = (int) ($current_width * $sizefactor);
- $new_height = (int) ($current_height * $sizefactor);
- /* auto-thumbnails (20060213) - In maj-0.14-20060131, album thumbnails were simply the original images displayed with smaller "width=" and "height=" values. Album index loading was painfully slow since the browser had to download the original images from the server. This should speed things up. We placed the "function" here instead of edit.php or add.php to make auto-thumbnail generation available for maj-0.14-20060131 users who may already have existing albums. */
- if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
- $work_thumb = imagecreatetruecolor($new_width,$new_height);
- $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
- switch($get_mimetype) {
- case "image/jpg":
- case "image/jpeg":
- $work_image = imagecreatefromjpeg($current_image);
- break;
- case "image/gif":
- $work_image = imagecreatefromgif($current_image);
- break;
- case "image/png":
- $work_image = imagecreatefrompng($current_image);
- break;
- }
- imagecopyresampled($work_thumb, $work_image ,0, 0, 0, 0, $new_width, $new_height, $current_width, $current_height);
- if (!file_exists("images/$d/thumbnails")) {
- mkdir("images/$d/thumbnails");
- }
- imagejpeg($work_thumb, "images/$d/thumbnails/{$album_entry}-thumbnail.jpg", 80);
- }
- echo "<a href=images/$d/album/$album_entry>";
- /* auto-thumbnails (20060519) - Just in case php-gd does not exist, do it the old way. */
- if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
- echo "<img src=images/$d/album/$album_entry width=$new_width height=$new_height border=0 hspace=2 vspace=2";
- }
- else {
- echo "<img src=images/$d/thumbnails/{$album_entry}-thumbnail.jpg width=$new_width height=$new_height border=0 hspace=2 vspace=2";
- }
- if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
- echo ' alt="';
- readfile("data/items/$d/album/captions/{$album_entry}.txt");
- echo '"';
- }
- echo "></a>";
- }
- }
- }
- }
- echo '</div></td></tr></table>';
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop) and file_exists("$dir/$d/filedrop/files")) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
- echo '<div id=panel_title>Filedrop';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $d;
- echo '&target=filedrop><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete filedrop"></a>';
- }
- echo '</div><div id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=filedrop>here</a> to enter it.";
- }
- else {
- if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
- while (($dl_file = readdir($dh_filedrop)) !== false) {
- if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
- echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=filedrop>';
- echo '<img src=images/filedrop.png width=36 height=36 border=0 alt="download file"></a></td>';
- echo '<td><p><b>';
- echo $dl_file;
- echo'</b><br>';
- $size = filesize("data/items/$d/filedrop/files/$dl_file");
- echo $size_string;
- $filedrop_count_file = "data/items/$d/filedrop/count/$dl_file" . '.txt';
- if (file_exists($filedrop_count_file)) {
- echo '<br>';
- echo $filedrop_count;
- if ($filedrop_count == 1) {
- echo ' download';
- }
- if ($filedrop_count > 1) {
- echo ' downloads';
- }
- }
- echo '</p></td></tr></table>';
- }
- }
- closedir($dh_filedrop);
- }
- }
- echo '</div></td></tr></table>';
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == pdf) and file_exists("data/items/$d/pdf/file")) {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
- echo '<div id=panel_title>PDF';
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=';
- echo $d;
- echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
- }
- echo '</div><div id=panel_body>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=pdf>here</a> to enter it.";
- }
- else {
- if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
- while (($dl_file = readdir($dh_pdf)) !== false) {
- if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
- echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=pdf>';
- echo '<img src=images/pdf.png width=48 height=48 border=0 alt="download file"></a></td>';
- echo '<td><p><b>';
- echo $dl_file;
- echo'</b><br>';
- $size = filesize("data/items/$d/pdf/file/$dl_file");
- echo $size_string;
- $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
- if (file_exists($pdf_count_file)) {
- echo '<br>';
- echo $pdf_count;
- if ($pdf_count == 1) {
- echo ' download';
- }
- if ($pdf_count > 1) {
- echo ' downloads';
- }
- }
- echo '</p></td></tr></table>';
- }
- }
- closedir($dh_pdf);
- }
- }
- echo '</div></td></tr></table>';
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == comments) and !file_exists("data/nocomment.txt")) {
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- }
- else {
- echo '<table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
- if ($dh_comments = opendir("$dir/$d/comments/live")) {
- while (($entry_comments = readdir($dh_comments)) !== false) {
- if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) { $show_comments[] = $entry_comments;
- }
- }
- closedir($dh_comments);
- }
- asort($show_comments);
- reset($show_comments);
- foreach ($show_comments as $comment) {
- echo '<div id=panel_title>';
- if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
- echo '<a rel=nofollow target=_blank href=';
- readfile("$dir/$d/comments/live/$comment/url.txt");
- echo '>';
- }
- readfile("$dir/$d/comments/live/$comment/firstname.txt");
- echo ' ';
- readfile("$dir/$d/comments/live/$comment/lastname.txt");
- if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
- echo '</a>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo ' <';
- readfile("$dir/$d/comments/live/$comment/email.txt");
- echo '>';
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<a href=del.php?entry=' . $d . '&comment=' . $comment . '&type=live><img src=images/widget.del.png width=10 height=10 border=0 align=right alt="delete comment"></a>';
- echo '<a href=edit.php?entry=' . $d . '&comment=' . $comment . '><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
- }
- echo '</div>';
- echo '<div id=panel_body>';
- echo '<font style="font-size: 10px; color: #999999;">';
- readfile("$dir/$d/comments/live/$comment/timestamp.txt");
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if (file_exists("$dir/$d/comments/live/$comment/revisions.txt")) {
- echo ' (Revision ';
- readfile("$dir/$d/comments/live/$comment/revisions.txt");
- echo ')';
- }
- }
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- readfile("$dir/$d/comments/live/$comment/comment.txt");
- echo '</div>';
- }
- unset($show_comments);
- echo '</td></tr></table>';
- }
- if (!file_exists("data/nocomment.txt")) {
- echo '<p><table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
- echo '<p><font style="font-size: 12px;"><b>Add Comment</b></font></p>';
- if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
- echo "<p>This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=comments>here</a> to enter it.</p>";
- }
- else {
- $capcha_rand = str_rand(7);
- echo '<p>Fill out the form below and enter <b>' . $capcha_rand . '</b> in the anti-spam field to add your comment. Note that it will not be posted immediately, but will be ';
- if (file_exists("data/email.txt")) {
- echo "e-mailed";
- }
- else {
- echo "sent";
- }
- echo ' to me first.</p>';
- ?>
- <table border=0 cellspacing=2 cellpadding=0 width=500>
- <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>?entry=<?php echo $d; ?>&show=comments" method="post">
- <input type=hidden name=capcha_get value="<?php echo $capcha_rand; ?>">
- <tr><td width=75><p>First Name*</p></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td><td rowspan=7 valign=top width=75 align=right>
- <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>
- </table>
- <tr><td><p>Last Name*</p></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
- <tr><td><p>E-mail*</p></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
- <tr><td><p>Website</p></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
- <tr><td ><p>Comment*</p></td><td ><textarea class=input name=new_comment rows=10></textarea></td></tr>
- <tr><td><p>Anti-Spam*</p></td><td><input class=input type=text autocomplete=off name=capcha_put maxlength=7></td></tr>
- <tr><td><p></p></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
- </form>
- </table>
- <?php } ?>
- </td></tr></table></p>
- <?php
- }
- if (!isset($_SESSION['logged_in'])) {
- if (isset($_REQUEST['show']) and !empty($_REQUEST['show']) and isset($_REQUEST['capcha_put']) and !empty($_REQUEST['capcha_get']) and isset($_REQUEST['firstname']) and !empty($_REQUEST['firstname']) and isset($_REQUEST['lastname']) and !empty($_REQUEST['lastname']) and isset($_REQUEST['email']) and !empty($_REQUEST['email']) and isset($_REQUEST['new_comment']) and !empty($_REQUEST['new_comment']) and isset($_REQUEST['capcha_put']) and !empty($_REQUEST['capcha_put']) and ($_REQUEST['capcha_get'] == $_REQUEST['capcha_put']) and (ereg("@", $_REQUEST['email'])) and (ereg("\.", $_REQUEST['email']))) {
- echo '<p><table border=0 cellspacing=0 cellpadding=0><tr><td><p><font style="font-size: 12px;"><b>Thanks!</b></font></p><p>Your comment has been submitted for approval.<br>Please check back soon to see if it has been posted.</p></td></tr></table></p>';
- }
- }
- ?>
- <?php
- }
- }
- ?>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
- if ($dh_pending_comments = opendir("$dir/$d/comments/pending")) {
- while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
- if ($entry_pending_comments != "." && $entry_pending_comments != ".." && fnmatch("*", $entry_pending_comments)) {
- $show_pending_comments[] = $entry_pending_comments;
- }
- }
- closedir($dh_pending_comments);
- }
- asort($show_pending_comments);
- reset($show_pending_comments);
- $count_pending_comments = count($show_pending_comments);
- if ($count_pending_comments > 0) {
- if ($count_pending_comments == 1) {
- echo '<p><b>Pending Comment</b></p>';
- }
- else {
- echo '<p><b>Pending Comments</b></p>';
- }
- foreach ($show_pending_comments as $pending_comment) {
- echo '<p><table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
- echo '<div id=panel_title>';
- if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
- echo '<a rel=nofollow target=_blank href=';
- readfile("$dir/$d/comments/pending/$pending_comment/url.txt");
- echo '>';
- }
- readfile("$dir/$d/comments/pending/$pending_comment/firstname.txt");
- echo ' ';
- readfile("$dir/$d/comments/pending/$pending_comment/lastname.txt");
- if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
- echo '</a>';
- }
- echo ' <';
- readfile("$dir/$d/comments/pending/$pending_comment/email.txt");
- echo '>';
- echo '<a href=del.php?entry=' . $d . '&comment=' . $pending_comment . '&type=pending><img src=images/widget.del.png width=10 height=10 border=0 align=right alt="delete comment"></a>';
- $pending_comment_key_file = "$dir/$d/comments/pending/$pending_comment/key.txt";
- $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&comment=' . $pending_comment . '&key=' . $pending_comment_login_key . '&action=approve><img src=images/widget.cat.png width=11 height=11 border=0 align=right alt="post comment"></a>';
- echo '</div>';
- echo '<div id=panel_body>';
- echo '<font style="font-size: 10px; color: #999999;">';
- readfile("$dir/$d/comments/pending/$pending_comment/timestamp.txt");
- echo '</font><font style="font-size: 5px;"><br><br></font>';
- readfile("$dir/$d/comments/pending/$pending_comment/comment.txt");
- echo '</div>';
- unset($show_pending_comments);
- echo '</td></tr></table></p>';
- }
- }
- }
- ?>
- <p><table border=0 cellspacing=0 cellpadding=0 width=100%><tr>
- <?php
- if (($start >= $increase) and ($start != 0)) {
- echo "<td align=left><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
- echo "category={$_REQUEST['category']}&";
- }
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- echo "archive={$_REQUEST['archive']}&";
- }
- echo "start=" . ($start-$increase) . "\">previous</a></p></td>";
- }
- if ($end < sizeof($items)) {
- echo "<td align=right><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
- if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
- echo "category={$_REQUEST['category']}&";
- }
- if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
- echo "archive={$_REQUEST['archive']}&";
- }
- echo "start=" . ($start+$increase) . "\">next</a></p></td>";
- }
- ?>
- </tr></table></p>
- </td>
- <td width=15> </td>
- <td width=175 valign=top>
- <?php
- if ($dh_latest_items = opendir($dir)) {
- while (($entry_latest_items = readdir($dh_latest_items)) !== false) {
- if (file_exists("data/items/$entry_latest_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $cat_dir = file_get_contents("data/items/$entry_latest_items/category.txt");
- if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_latest_items/cat.txt")) {
- continue;
- }
- if (file_exists("data/nocat.txt") and file_exists("data/items/$entry_latest_items/category.txt") and !file_exists("data/items/$entry_latest_items/cat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if ($entry_latest_items != "." && $entry_latest_items != ".." && fnmatch("*", $entry_latest_items)) {
- $show_latest_items[] = $entry_latest_items;
- }
- }
- closedir($dh_latest_items);
- }
- rsort($show_latest_items);
- reset($show_latest_items);
- $count_latest_items = count($show_latest_items);
- if ($count_latest_items > 0) {
- echo '<div id=panel_title>Recent Entries</div><div id=panel_body>';
- $increment_recent_entries = 0;
- if (($count_latest_items <= $increase) or ($count_latest_items <= $increase * 2)) {
- $increase = $count_latest_items;
- $show_recent_entries = $increase - 1;
- }
- else {
- $show_recent_entries = $increase * 2 - 1;
- }
- while ($increment_recent_entries <= $show_recent_entries) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_items[$increment_recent_entries] . '>';
- readfile("$dir/$show_latest_items[$increment_recent_entries]/title.txt");
- echo '</a><br>';
- $increment_recent_entries = $increment_recent_entries + 1;
- }
- }
- if ($count_latest_items > 0) {
- echo '</div>';
- ?>
- <form enctype="multipart/form-data" action="dig.php" method="post">
- <input type=text class=search name=search autocomplete=off maxlength=55>
- </div>
- </form>
- <?php
- if (file_exists("data/categories")) {
- if ($dh_categories = opendir("data/categories")) {
- while (($entry_categories = readdir($dh_categories)) !== false) {
- if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
- $show_categories[] = $entry_categories;
- }
- }
- closedir($dh_categories);
- }
- sort($show_categories);
- reset($show_categories);
- $count_categories = count($show_categories);
- if ($count_categories > 0) {
- echo '<div id=panel_title>Categories</div><div id=panel_body>';
- foreach ($show_categories as $category) {
- echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
- if (file_exists("data/categories/$category/title.txt")) {
- $category_title = file_get_contents("data/categories/$category/title.txt");
- }
- else {
- $category_title = ucfirst($category);
- }
- echo $category_title;
- echo "</a><br />";
- }
- echo '</div>';
- }
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- echo '<div id=panel_title>Statistics</div><div id=panel_body>';
- echo "Total Entries: $count_latest_items";
- if (file_exists("data/hits.txt")) {
- echo '<br>Site Hits: ';
- readfile("data/hits.txt");
- }
- if (file_exists("data/google.txt")) {
- echo '<br>Google Visits: ';
- readfile("data/google.txt");
- }
- if (file_exists("data/rss-0.91.txt")) {
- echo '<br>RSS 0.91 Hits: ';
- readfile("data/rss-0.91.txt");
- }
- if (file_exists("data/rss-1.0.txt")) {
- echo '<br>RSS 1.0 Hits: ';
- readfile("data/rss-1.0.txt");
- }
- if (file_exists("data/rss-2.0.txt")) {
- echo '<br>RSS 2.0 Hits: ';
- readfile("data/rss-2.0.txt");
- }
- if (file_exists("data/sitemap.txt")) {
- echo '<br>Sitemap Requests: ';
- readfile("data/sitemap.txt");
- }
- echo '</div>';
- }
- }
- ?>
- <?php
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
- if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
- $show_pending_comment_flags[] = $entry_pending_comment_flags;
- }
- }
- closedir($dh_pending_comment_flags);
- }
- rsort($show_pending_comment_flags);
- reset($show_pending_comment_flags);
- $count_pending_comment_flags = count($show_pending_comment_flags);
- if (($count_latest_items > 0) and ($count_pending_comment_flags > 0)) {
- echo '<div id=panel_title>Pending Comments</div>';
- echo '<div id=panel_body>';
- if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
- while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
- if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' .$entry_list_pending_comment_flags . '&show=comments>';
- readfile("data/items/$entry_list_pending_comment_flags/title.txt");
- echo '</a><br><font style="font-size: 10px; color: #999999;">';
- $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
- $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
- if ($comment_count_value == 1) {
- echo ' ( ' . $comment_count_value . ' comment ) ';
- }
- elseif ($comment_count_value > 1) {
- echo ' ( ' . $comment_count_value . ' comments ) ';
- }
- else {
- echo '';
- }
- echo '</font><br>';
- }
- }
- closedir($dh_list_pending_comment_flags);
- }
- echo '</div>';
- }
- }
- ?>
- <?php
- if (file_exists("data/albums")) {
- if ($dh_album_list = opendir("data/albums")) {
- while (($entry_album_list = readdir($dh_album_list)) !== false) {
- if (file_exists("data/items/$entry_album_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $pull_cat_dir = file_get_contents("data/items/$entry_album_list/category.txt");
- if (file_exists("data/categories/$pull_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_album_list/cat.txt")) {
- continue;
- }
- if ($entry_album_list != "." && $entry_album_list != ".." && fnmatch("*", $entry_album_list)) {
- $show_album_list[] = $entry_album_list;
- }
- }
- closedir($dh_album_list);
- }
- rsort($show_album_list);
- reset($show_album_list);
- $count_album_list = count($show_album_list);
- if ($count_album_list > 0) {
- echo '<div id=panel_title>Albums</div>';
- echo '<div id=panel_body>';
- foreach ($show_album_list as $album_list_entry) {
- echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=';
- echo $album_list_entry;
- echo '&show=album>';
- readfile("data/items/$album_list_entry/title.txt");
- echo '</a><br>';
- }
- echo '</div>';
- }
- }
- ?>
- <?php
- if (file_exists("data/items")) {
- if ($dh_archive_list = opendir("data/items")) {
- while (($entry_archive_list = readdir($dh_archive_list)) !== false) {
- if (file_exists("data/xarc.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- if (file_exists("data/items/$entry_archive_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $get_cat_dir = file_get_contents("data/items/$entry_archive_list/category.txt");
- if (file_exists("data/categories/$get_cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_archive_list/cat.txt")) {
- continue;
- }
- if ($entry_archive_list != "." && $entry_archive_list != ".." && fnmatch("*", $entry_archive_list)) {
- $entry_archive_list = substr("$entry_archive_list",0,6);
- $show_archive_list[] = $entry_archive_list;
- }
- }
- closedir($dh_archive_list);
- }
- rsort($show_archive_list);
- reset($show_archive_list);
- $count_archive_list = count($show_archive_list);
- if ($count_archive_list > 0) {
- $archive_entries = implode(" ",$show_archive_list);
- $unique_archive_list = array_unique($show_archive_list);
- echo "<div id=panel_title>Archives ($count_archive_list)</div>";
- echo "<div id=panel_body>";
- foreach ($unique_archive_list as $archive_list_entry) {
- $archive_list_value = substr($archive_list_entry,0,6);
- $archive_list_year = substr($archive_list_entry,0,4);
- $archive_list_month = substr($archive_list_entry,4,2);
- echo "<a href=\"index.php?archive=$archive_list_value\">$archive_list_month $archive_list_year</a> (";
- echo substr_count($archive_entries,$archive_list_entry);
- echo ")<br>";
- }
- echo "</select></div></form>";
- }
- }
- ?>
- <?php
- if (file_exists("data/clustrmaps.php")) {
- echo '<div id=panel_title>ClustrMaps</div>';
- echo '<div id=panel_body><center>';
- include("data/clustrmaps.php");
- echo '</center></div>';
- }
- ?>
- <?php
- if (file_exists("data/adsense.php")) {
- echo '<div id=panel_title>AdSense</div>';
- echo '<div id=panel_body><center>';
- include("data/adsense.php");
- echo '</center></div>';
- }
- ?>
- <?php
- if ($count_latest_items > 0) {
- echo '<p><table border=0 cellspacing=2 cellpadding=0 width=100%>';
- echo '<tr><td align=center><a target="_button" href="http://engels.mortega.net/index.php?entry=20050521000019"><img src=images/button.maj.png border=0 width=80 height=15></a></td></tr>';
- echo '<tr><td align=center><a target="_button" rel="nofollow" href="http://php.net/"><img src=images/button.php.png border=0 width=80 height=15></a></td></tr>';
- $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
- $validate_uri = str_replace('//', '/', $validate_uri);
- $validate_uri = "http://" . $validate_uri;
- echo '<tr><td align=center><a target="_button" rel="nofollow" href="http://jigsaw.w3.org/css-validator/validator?uri=' . $validate_uri . '"><img src=images/button.w3c.css.png border=0 width=80 height=15></a></td></tr>';
- echo '<tr><td align=center><a target="_button" href="rss.php?ver=0.91"><img src=images/button.rss-0.91.png border=0 width=80 height=15></a></td></tr>';
- echo '<tr><td align=center><a target="_button" href="rss.php?ver=1.0"><img src=images/button.rss-1.0.png border=0 width=80 height=15></a></td></tr>';
- echo '<tr><td align=center><a target="_button" href="rss.php?ver=2.0"><img src=images/button.rss-2.0.png border=0 width=80 height=15></a></td></tr>';
- echo '<tr><td align=center><a target="_button" href="sitemap.php"><img src=images/button.sitemap.png border=0 width=80 height=15></a></td></tr>';
- if (file_exists("data/sfx.txt")) {
- echo '<tr><td align=center><a target="_button" rel="nofollow" href="http://www.spreadfirefox.com/?q=affiliates&id=' . $sfx . '&t=85"><img src=images/button.firefox.png border=0 width=80 height=15></a></td></tr>';
- }
- echo '</table></p>';
- }
- ?>
- <p></p>
- </td></tr>
- </table>
- <?php
- if (file_exists("footer.php")) {
- echo '<p></p>';
- include("footer.php");
- }
- ?>