This blob has been accessed 325 times via Git panel.
- <?php
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
- header("Location: login.php");
- }
- if (get_magic_quotes_gpc()) {
- function stripslashes_array($data) {
- if (is_array($data)) {
- foreach ($data as $key => $value) {
- $data[$key] = stripslashes_array($value);
- }
- return $data;
- }
- else {
- return stripslashes($data);
- }
- }
- $_POST = stripslashes_array($_POST);
- }
- if (file_exists("data/lite.txt")) {
- }
- if (!file_exists("data/bb.txt")) {
- }
- if (!isset($_REQUEST['id']) or empty($_REQUEST['id'])) {
- }
- if (isset($_REQUEST['id']) and ($_REQUEST['id'] != file_get_contents("data/username.txt")) and !file_exists("data/members/active/{$_REQUEST['id']}") and ($_REQUEST['id'] != "all")) {
- }
- $id = $_REQUEST['id'];
- $login_username = file_get_contents("data/username.txt");
- if (file_get_contents("data/username.txt") != $id) {
- $member_firstname = file_get_contents("data/members/active/$id/firstname.txt");
- $member_lastname = file_get_contents("data/members/active/$id/lastname.txt");
- }
- if ($id == "all") {
- echo "<title>Members</title>";
- }
- else {
- if ($id == $login_username) {
- $author = file_get_contents("data/author.txt");
- echo "<title>$author</title>";
- }
- else {
- echo "<title>$member_firstname $member_lastname</title>";
- }
- }
- ?>
- <style>
- body {
- color: #666666;
- margin: 0px 0px 10px 10px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- background-color: #FFFFFF;
- }
- p, td {
- font-size: 11px;
- }
- a {
- font-weight: bold;
- text-decoration: none;
- }
- a:link {
- color: #666666;
- }
- a:visited {
- color: #666666;
- }
- a:hover {
- color: #336699;
- }
- a:active {
- color: #336699;
- }
- #panel_title {
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: transparent;
- margin: 10px 0px 0px 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
- }
- #panel_body {
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$font_panel_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: transparent;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 1px 1px;
- border-style: solid solid solid solid;
- }
- #panel_footer {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_footer},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: transparent;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 0px 1px 1px 1px;
- border-style: none solid solid solid;
- text-align: right;
- }
- .submit {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 100%;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px
- }
- </style>
- <?php
- if ($id == "all") {
- if (isset($_POST['edit']) and !empty($_POST['edit']) and ($_POST['edit'] == "on") and isset($_POST['username']) and !empty($_POST['username']) and file_exists("data/members/active/{$_POST['username']}") and isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- if (isset($_POST['rw']) and !empty($_POST['rw']) and ($_POST['rw'] == "on") and !file_exists("data/members/active/{$_POST['username']}/rw.txt")) {
- touch("data/members/active/{$_POST['username']}/rw.txt");
- }
- if ((!isset($_POST['rw']) or empty($_POST['rw'])) and file_exists("data/members/active/{$_POST['username']}/rw.txt")) {
- unlink("data/members/active/{$_POST['username']}/rw.txt");
- }
- if (isset($_POST['ul']) and !empty($_POST['ul']) and ($_POST['ul'] == "on") and !file_exists("data/members/active/{$_POST['username']}/ul.txt")) {
- touch("data/members/active/{$_POST['username']}/ul.txt");
- }
- if ((!isset($_POST['ul']) or empty($_POST['ul'])) and file_exists("data/members/active/{$_POST['username']}/ul.txt")) {
- unlink("data/members/active/{$_POST['username']}/ul.txt");
- }
- if (isset($_POST['noml']) and !empty($_POST['noml']) and ($_POST['noml'] == "on") and !file_exists("data/members/active/{$_POST['username']}/noml.txt")) {
- touch("data/members/active/{$_POST['username']}/noml.txt");
- }
- if ((!isset($_POST['noml']) or empty($_POST['noml'])) and file_exists("data/members/active/{$_POST['username']}/noml.txt")) {
- unlink("data/members/active/{$_POST['username']}/noml.txt");
- }
- if (isset($_POST['rank']) and !empty($_POST['rank']) and (strtolower($_POST['rank']) != "member")) {
- $rank_file = "data/members/active/{$_POST['username']}/rank.txt";
- }
- if ((!isset($_POST['rank']) or empty($_POST['rank'])) and file_exists("data/members/active/{$_POST['username']}/rank.txt")) {
- unlink("data/members/active/{$_POST['username']}/rank.txt");
- }
- if (isset($_POST['category']) and !empty($_POST['category']) and (strtolower($_POST['category']) != "none") and (file_exists("data/categories/{$_POST['category']}"))) {
- $category_file = "data/members/active/{$_POST['username']}/category.txt";
- }
- if ((!isset($_POST['category']) or empty($_POST['category']) or ($_POST['category'] == "none")) and file_exists("data/members/active/{$_POST['username']}/category.txt")) {
- unlink("data/members/active/{$_POST['username']}/category.txt");
- }
- if (file_exists("data/members/active/{$_POST['username']}/ul.txt") and !file_exists("data/members/active/{$_POST['username']}/rw.txt") and !file_exists("data/members/active/{$_POST['username']}/category.txt")) {
- unlink("data/members/active/{$_POST['username']}/ul.txt");
- }
- if (isset($_POST['del']) and !empty($_POST['del']) and ($_POST['del'] == "on")) {
- 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);
- }
- rmdirr("data/members/active/{$_POST['username']}");
- }
- }
- ?>
- <tr><td bgcolor="#eeeeee" align="center">status</td><td bgcolor="#eeeeee" align="center">username</td><td bgcolor="#eeeeee" align="center">member since</td><td bgcolor="#eeeeee" align="center">logins</td><td bgcolor="#eeeeee" align="center">posts</td><?php
- if (isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- echo '<td bgcolor="#eeeeee" align="center">rw</td><td bgcolor="#eeeeee" align="center">ul</td><td bgcolor="#eeeeee" align="center">noml</td><td bgcolor="#eeeeee" align="center">delete</td><td bgcolor="#eeeeee" align="center">rank</td><td bgcolor="#eeeeee" align="center">category</td><td bgcolor="#eeeeee" align="center">action</td>';
- }
- ?></tr>
- <?php
- $show_member_list[] = file_get_contents("data/username.txt");
- if (file_exists("data/members/active")) {
- if ($dh_member_list = opendir("data/members/active")) {
- while (($entry_member_list = readdir($dh_member_list)) !== false) {
- if ($entry_member_list != "." && $entry_member_list != "..") {
- $show_member_list[] = $entry_member_list;
- }
- }
- closedir($dh_member_list);
- }
- sort($show_member_list);
- reset($show_member_list);
- $count_member_list = count($show_member_list);
- if ($count_member_list > 0) {
- $sess_dir = session_save_path();
- if (file_exists("data/bb-idle.txt")) {
- $idle = file_get_contents("data/bb-idle.txt");
- }
- else {
- $idle = 15;
- }
- foreach ($show_member_list as $member_list_entry) {
- echo "<tr><td bgcolor=#ffffff align=center>";
- $sess_count = 0;
- if (is_dir($sess_dir)) {
- if ($sess_dh = opendir($sess_dir)) {
- while (($sess_file = readdir($sess_dh)) !== false) {
- if ($sess_file != '.' && $sess_file != '..') {
- $sess_content = file_get_contents("$sess_dir/$sess_file");
- if (preg_match("/logged_in/",$sess_content)) {
- if (preg_match("/$member_list_entry/",$sess_content)) {
- $sess_count++;
- }
- }
- }
- }
- }
- closedir($sess_dh);
- }
- }
- if (($sess_count > 0) or (isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $member_list_entry))) {
- echo "<img src=images/smileys/smile.png>";
- }
- else {
- echo "<img src=images/smileys/offline.png>";
- }
- echo "</td><td bgcolor=#ffffff><a href=member.php?id=$member_list_entry>$member_list_entry</a></td>";
- if ($member_list_entry == file_get_contents("data/username.txt") or (file_exists("data/members/active/$member_list_entry") and !file_exists("data/members/active/$member_list_entry/timestamp.txt"))) {
- echo "<td bgcolor=#ffffff align=center><nobr><code>-</code></nobr></td>";
- }
- if (file_exists("data/members/active/$member_list_entry") and ($member_list_entry != file_get_contents("data/username.txt")) and file_exists("data/members/active/$member_list_entry/timestamp.txt")) {
- $joined = file_get_contents("data/members/active/$member_list_entry/timestamp.txt");
- $joined_year = substr($joined,0,4);
- $joined_month = substr($joined,4,2);
- $joined_day = substr($joined,6,2);
- echo "<td bgcolor=#ffffff align=center><nobr><code>$member_since</code></nobr></td>";
- }
- if ((file_get_contents("data/username.txt") == $member_list_entry) and file_exists("data/logins.txt")) {
- $logins = file_get_contents("data/logins.txt");
- echo "<td bgcolor=#ffffff align=right><code>$logins</code></td>";
- }
- elseif (file_exists("data/members/active/$member_list_entry") and file_exists("data/members/active/$member_list_entry/bb-logins.txt")) {
- $logins = file_get_contents("data/members/active/$member_list_entry/bb-logins.txt");
- echo "<td bgcolor=#ffffff align=right><code>$logins</code></td>";
- }
- if ((file_get_contents("data/username.txt") == $member_list_entry) and !file_exists("data/logins.txt")) {
- echo "<td bgcolor=#ffffff align=right><code>0</code></td>";
- }
- elseif (file_exists("data/members/active/$member_list_entry") and !file_exists("data/members/active/$member_list_entry/bb-logins.txt")) {
- echo "<td bgcolor=#ffffff align=right><code>0</code></td>";
- }
- if ($dh_posts_all = opendir("data/items")) {
- while (($member_posts = readdir($dh_posts_all)) !== false) {
- if ($member_posts != "." && $member_posts != "..") {
- if (file_exists("data/items/$member_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $private_cat = "0";
- if (file_exists("data/items/$member_posts/categories")) {
- if ($dh_member_posts_cat2 = opendir("data/items/$member_posts/categories")) {
- while (($member_posts_cat2 = readdir($dh_member_posts_cat2)) !== false) {
- if ($member_posts_cat2 != "." && $member_posts_cat2 != "..") {
- if (file_exists("data/categories/$member_posts_cat2/private.txt")) {
- $private_cat = $private_cat + 1;
- }
- }
- }
- closedir($dh_member_posts_cat2);
- }
- }
- if (($private_cat > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$member_posts/cat.txt")) {
- continue;
- }
- if (file_exists("data/members/active/$member_list_entry") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$member_posts/author.txt") and (file_get_contents("data/items/$member_posts/author.txt") == $member_list_entry)) {
- $items_posts[] = $member_posts;
- }
- }
- else {
- if (!file_exists("data/members/active/$member_list_entry") and (file_get_contents("data/username.txt") == $member_list_entry) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$member_posts/author.txt") and (file_get_contents("data/items/$member_posts/author.txt") == $member_list_entry)) {
- $items_posts[] = $member_posts;
- }
- }
- }
- }
- }
- closedir($dh_posts_all);
- }
- $posts = count($items_posts);
- echo "<td bgcolor=#ffffff align=right><code>$posts</code></td>";
- unset($items_posts);
- if (isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- if (($member_list_entry != file_get_contents("data/username.txt")) and file_exists("data/members/active/$member_list_entry")) {
- echo "<form action=member.php method=post><input type=hidden name=id value=all><input type=hidden name=edit value=on><input type=hidden name=username value=$member_list_entry>";
- echo "<td bgcolor=#ffffff align=center><input type=checkbox name=rw";
- if (file_exists("data/members/active/$member_list_entry/rw.txt")) {
- echo " checked";
- }
- echo "></td><td bgcolor=#ffffff align=center><input type=checkbox name=ul";
- if (file_exists("data/members/active/$member_list_entry/ul.txt")) {
- echo " checked";
- }
- echo "></td><td bgcolor=#ffffff align=center><input type=checkbox name=noml";
- if (file_exists("data/members/active/$member_list_entry/noml.txt")) {
- echo " checked";
- }
- echo "></td><td bgcolor=#ffffff align=center><input type=checkbox name=del></td><td bgcolor=#ffffff align=center><input class=submit type=text name=rank autocomplete=off value=\"";
- if (file_exists("data/members/active/$member_list_entry/rank.txt")) {
- readfile("data/members/active/$member_list_entry/rank.txt");
- }
- else {
- echo member;
- }
- echo "\"></td><td bgcolor=#ffffff><select name=category><option>none";
- if (file_exists("data/members/active/$member_list_entry/category.txt")) {
- $bb_cat = file_get_contents("data/members/active/$member_list_entry/category.txt");
- if (!file_exists("data/categories/$bb_cat")) {
- unlink("data/members/active/$member_list_entry/category.txt");
- }
- }
- if (file_exists("data/categories")) {
- if ($dh_cat = opendir("data/categories")) {
- while (($entry_cat = readdir($dh_cat)) !== false) {
- if ($entry_cat != "." && $entry_cat != "..") {
- $show_cat[] = $entry_cat;
- }
- }
- closedir($dh_cat);
- }
- sort($show_cat);
- reset($show_cat);
- foreach ($show_cat as $category) {
- echo "<option";
- if (file_get_contents("data/members/active/$member_list_entry/category.txt") == $category) {
- echo " selected";
- }
- echo ">";
- echo strtolower($category);
- unset($show_cat);
- }
- }
- echo "</select></td><td bgcolor=#ffffff align=center><input class=submit type=submit value=submit></td></form>";
- }
- if ($member_list_entry == file_get_contents("data/username.txt")) {
- echo "<td colspan=7 bgcolor=#ffffff align=center><a href=settings.php>administrator settings</a></td>";
- }
- }
- }
- }
- }
- ?>
- </table></div><div id="panel_footer"><font style="font-size: 10px; color: #999999;"><a href="index.php">home</a> | <a href="member.php?id=all">members</a> | <a href="login.php">
- <?php
- if (isset($_SESSION['logged_in'])) {
- echo "logout";
- }
- else {
- echo "login";
- }
- ?>
- </a></font></div>
- </td></tr></table>
- <table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" style="background-color: transparent;">
- <tr><td width="525">
- <?php
- if (file_get_contents("data/username.txt") == $id) {
- readfile("data/author.txt");
- if (isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and !file_exists("data/members/active/{$_SESSION['logged_in']}")) {
- echo " <";
- readfile("data/email.txt");
- echo " >";
- }
- }
- else {
- echo "$member_firstname $member_lastname";
- if (isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and !file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/members/active/$id/email.txt")) {
- $email = file_get_contents("data/members/active/$id/email.txt");
- echo " <$email>";
- }
- }
- ?>
- </div>
- <table border="0" cellspacing="0" cellpadding="0"><tr><td width="90" valign="top">
- <?php
- if ((file_get_contents("data/username.txt") == $id) and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
- if (file_exists("images/avatar.gif")) {
- $avatar_gif_image_size = getimagesize("images/avatar.gif");
- $avatar_gif_image_width = $avatar_gif_image_size[0];
- $avatar_gif_image_height = $avatar_gif_image_size[1];
- $max_avatar_gif_image_width = 80;
- if ($avatar_gif_image_width > $max_avatar_gif_image_width) {
- $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
- $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
- $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
- }
- if (file_exists("images/avatar.jpg")) {
- $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
- $avatar_jpg_image_width = $avatar_jpg_image_size[0];
- $avatar_jpg_image_height = $avatar_jpg_image_size[1];
- $max_avatar_jpg_image_width = 80;
- if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {
- $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
- $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
- $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
- }
- if (file_exists("images/avatar.png")) {
- $avatar_png_image_size = getimagesize("images/avatar.png");
- $avatar_png_image_width = $avatar_png_image_size[0];
- $avatar_png_image_height = $avatar_png_image_size[1];
- $max_avatar_png_image_width = 80;
- if ($avatar_png_image_width > $max_avatar_png_image_width) {
- $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
- $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
- $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
- }
- echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
- }
- echo "<br>";
- }
- else {
- if (file_exists("images/members/$id/avatar.jpg") or file_exists("images/members/$id/avatar.gif") or file_exists("images/members/$id/avatar.png")) {
- if (file_exists("images/members/$id/avatar.gif")) {
- $avatar_gif_image_size = getimagesize("images/members/$id/avatar.gif");
- $avatar_gif_image_width = $avatar_gif_image_size[0];
- $avatar_gif_image_height = $avatar_gif_image_size[1];
- $max_avatar_gif_image_width = 80;
- if ($avatar_gif_image_width > $max_avatar_gif_image_width) {
- $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
- $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
- $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
- }
- echo "<img src=\"images/members/$id/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
- }
- if (file_exists("images/members/$id/avatar.jpg")) {
- $avatar_jpg_image_size = getimagesize("images/members/$id/avatar.jpg");
- $avatar_jpg_image_width = $avatar_jpg_image_size[0];
- $avatar_jpg_image_height = $avatar_jpg_image_size[1];
- $max_avatar_jpg_image_width = 80;
- if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {
- $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
- $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
- $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
- }
- echo "<img src=\"images/members/$id/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
- }
- if (file_exists("images/members/$id/avatar.png")) {
- $avatar_png_image_size = getimagesize("images/members/$id/avatar.png");
- $avatar_png_image_width = $avatar_png_image_size[0];
- $avatar_png_image_height = $avatar_png_image_size[1];
- $max_avatar_png_image_width = 80;
- if ($avatar_png_image_width > $max_avatar_png_image_width) {
- $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
- $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
- $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
- }
- echo "<img src=\"images/members/$id/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
- }
- echo "<br>";
- }
- }
- echo "<b>$id</b><br>";
- if ((file_get_contents("data/username.txt") == $id) and file_exists("data/rank.txt")) {
- echo "administrator";
- }
- elseif (file_exists("data/members/active/$id/rank.txt") and file_exists("data/rank.txt")) {
- $rank = file_get_contents("data/members/active/$id/rank.txt");
- echo "$rank";
- }
- elseif (!file_exists("data/members/active/$id/rank.txt") and file_exists("data/rank.txt")) {
- echo "member";
- }
- ?>
- </td><td width="435" valign="top"><table border="0" cellspacing="0" cellpadding="2">
- <?php
- if ((file_get_contents("data/username.txt") == $id) and file_exists("data/url.txt") and isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in'])) {
- $member_url = file_get_contents("data/url.txt");
- echo "<tr><td width=90>website</td><td><a href=$member_url target=_majbb><code>$member_url</code></a></td></tr>";
- }
- elseif (file_exists("data/members/active/$id/url.txt") and isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in'])) {
- $member_url = file_get_contents("data/members/active/$id/url.txt");
- echo "<tr><td width=90>website</td><td><a href=$member_url target=_majbb><code>$member_url</code></a></td></tr>";
- }
- if (file_exists("data/members/active/$id/bday.txt") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
- $bday = file_get_contents("data/members/active/$id/bday.txt");
- $bday_year = substr($bday,0,4);
- $bday_month = substr($bday,4,2);
- $bday_day = substr($bday,6,2);
- echo "<tr><td width=90>birthdate</td><td><code>$bday</code></td></tr>";
- }
- if (file_exists("data/members/active/$id/timestamp.txt")) {
- $joined = file_get_contents("data/members/active/$id/timestamp.txt");
- $joined_year = substr($joined,0,4);
- $joined_month = substr($joined,4,2);
- $joined_day = substr($joined,6,2);
- $joined_hh = substr($joined,8,2);
- $joined_mm = substr($joined,10,2);
- $member_since = date("d M Y H:i", mktime($joined_hh, $joined_mm, 0, $joined_month, $joined_day, $joined_year));
- echo "<tr><td width=90>member since</td><td><code>$member_since</code></td></tr>";
- }
- if ((file_get_contents("data/username.txt") == $id) and file_exists("data/lastlog.txt")) {
- $lastlog = file_get_contents("data/lastlog.txt");
- $lastlog_year = substr($lastlog,0,4);
- $lastlog_month = substr($lastlog,4,2);
- $lastlog_day = substr($lastlog,6,2);
- $lastlog_hh = substr($lastlog,8,2);
- $lastlog_mm = substr($lastlog,10,2);
- $last_login = date("d M Y H:i", mktime($lastlog_hh, $lastlog_mm, 0, $lastlog_month, $lastlog_day, $lastlog_year));
- echo "<tr><td width=90>last login</td><td><code>$last_login</code></td></tr>";
- }
- elseif (file_exists("data/members/active/$id/bb-last.txt")) {
- $lastlog = file_get_contents("data/members/active/$id/bb-last.txt");
- $lastlog_year = substr($lastlog,0,4);
- $lastlog_month = substr($lastlog,4,2);
- $lastlog_day = substr($lastlog,6,2);
- $lastlog_hh = substr($lastlog,8,2);
- $lastlog_mm = substr($lastlog,10,2);
- $last_login = date("d M Y H:i", mktime($lastlog_hh, $lastlog_mm, 0, $lastlog_month, $lastlog_day, $lastlog_year));
- echo "<tr><td width=90>last login</td><td><code>$last_login</code></td></tr>";
- }
- if ((file_get_contents("data/username.txt") == $id) and file_exists("data/lastpost.txt")) {
- $lastpost = file_get_contents("data/lastpost.txt");
- $lastpost_year = substr($lastpost,0,4);
- $lastpost_month = substr($lastpost,4,2);
- $lastpost_day = substr($lastpost,6,2);
- $lastpost_hh = substr($lastpost,8,2);
- $lastpost_mm = substr($lastpost,10,2);
- $last_post = date("d M Y H:i", mktime($lastpost_hh, $lastpost_mm, 0, $lastpost_month, $lastpost_day, $lastpost_year));
- echo "<tr><td width=90>last post</td><td><code>$last_post</code></td></tr>";
- }
- elseif (file_exists("data/members/active/$id/bb-post.txt")) {
- $lastpost = file_get_contents("data/members/active/$id/bb-post.txt");
- $lastpost_year = substr($lastpost,0,4);
- $lastpost_month = substr($lastpost,4,2);
- $lastpost_day = substr($lastpost,6,2);
- $lastpost_hh = substr($lastpost,8,2);
- $lastpost_mm = substr($lastpost,10,2);
- $last_post = date("d M Y H:i", mktime($lastpost_hh, $lastpost_mm, 0, $lastpost_month, $lastpost_day, $lastpost_year));
- echo "<tr><td width=90>last post</td><td><code>$last_post</code></td></tr>";
- }
- if (file_get_contents("data/username.txt") == $id) {
- if (!file_exists("data/bb-views.txt")) {
- $views = 0;
- }
- else {
- $views = file_get_contents("data/bb-views.txt");
- }
- if (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
- $views = $views + 1;
- }
- echo "<tr><td width=90>profile views</td><td><code>$views</code></td></tr>";
- }
- elseif (file_exists("data/members/active/$id")) {
- if (!file_exists("data/members/active/$id/bb-views.txt")) {
- $views = 0;
- }
- else {
- $views = file_get_contents("data/members/active/$id/bb-views.txt");
- }
- if (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $id))) {
- if (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
- $views = $views + 1;
- }
- }
- echo "<tr><td width=90>profile views</td><td><code>$views</code></td></tr>";
- }
- if ((file_get_contents("data/username.txt") == $id) and file_exists("data/logins.txt")) {
- $logins = file_get_contents("data/logins.txt");
- echo "<tr><td width=90>total logins</td><td><code>$logins</code></td></tr>";
- }
- elseif (file_exists("data/members/active/$id") and file_exists("data/members/active/$id/bb-logins.txt")) {
- $logins = file_get_contents("data/members/active/$id/bb-logins.txt");
- echo "<tr><td width=90>total logins</td><td><code>$logins</code></td></tr>";
- }
- if ($dh_posts = opendir("data/items")) {
- while (($member_posts = readdir($dh_posts)) !== false) {
- if ($member_posts != "." && $member_posts != "..") {
- $total_posts[] = $member_posts;
- if (file_exists("data/items/$member_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
- continue;
- }
- $private_cat = "0";
- if (file_exists("data/items/$member_posts/categories")) {
- if ($dh_member_posts_cat2 = opendir("data/items/$member_posts/categories")) {
- while (($member_posts_cat2 = readdir($dh_member_posts_cat2)) !== false) {
- if ($member_posts_cat2 != "." && $member_posts_cat2 != "..") {
- if (file_exists("data/categories/$member_posts_cat2/private.txt")) {
- $private_cat = $private_cat + 1;
- }
- }
- }
- closedir($dh_member_posts_cat2);
- }
- }
- if (($private_cat > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$member_posts/cat.txt")) {
- continue;
- }
- if (file_exists("data/members/active/$id") and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$member_posts/author.txt") and (file_get_contents("data/items/$member_posts/author.txt") == $id)) {
- $items_posts[] = $member_posts;
- }
- }
- elseif (!file_exists("data/members/active/$id") and (file_get_contents("data/username.txt") == $id) and file_exists("data/bb.txt")) {
- if (file_exists("data/items/$member_posts/author.txt") and (file_get_contents("data/items/$member_posts/author.txt") == $id)) {
- $items_posts[] = $member_posts;
- }
- }
- }
- }
- closedir($dh_posts);
- }
- $posts = count($items_posts);
- $all_posts = count($total_posts);
- $ratio_posts = (($posts/$all_posts) * 100);
- $ratio_posts = number_format($ratio_posts,2);
- echo "<tr><td width=90>total posts</td><td><code>$posts</code></td></tr>";
- echo "<tr><td width=90> </td><td><code>{$ratio_posts}% of total</code></td></tr>";
- if ($posts > 0) {
- echo "<tr><td width=90> </td><td><a href=index.php?author=$id><code>find all posts by $id</code></a></td></tr>";
- }
- unset($items_posts);
- unset($total_posts);
- ?>
- <tr><td>permissions</td><td><code>
- <?php
- if ($id == file_get_contents("data/username.txt")) {
- echo "rw";
- }
- if (($id != file_get_contents("data/username.txt")) and file_exists("data/members/active/$id")) {
- if (file_exists("data/members/active/$id/rw.txt")) {
- echo "rw";
- }
- else {
- echo "ro";
- }
- }
- if (($id != file_get_contents("data/username.txt")) and file_exists("data/members/active/$id")) {
- if (file_exists("data/members/active/$id/ul.txt")) {
- echo " upload";
- }
- }
- ?>
- </code></td></tr>
- <?php
- if (($id != file_get_contents("data/username.txt")) and file_exists("data/members/active/$id")) {
- if (file_exists("data/members/active/$id/category.txt")) {
- $bb_cat = file_get_contents("data/members/active/$id/category.txt");
- if (!file_exists("data/categories/$bb_cat")) {
- unlink("data/members/active/$id/category.txt");
- }
- }
- if (file_exists("data/members/active/$id/category.txt")) {
- echo "<tr><td>group (rw)</td><td><code>";
- $category_name = file_get_contents("data/members/active/$id/category.txt");
- if (file_exists("data/categories/$category_name/title.txt")) {
- readfile("data/categories/$category_name/title.txt");
- }
- else {
- echo $category_name;
- }
- echo "</code></td></tr>";
- }
- }
- ?>
- <tr><td>status</td><td><code>
- <?php
- $sess_dir = session_save_path();
- if (file_exists("data/bb-idle.txt")) {
- $idle = file_get_contents("data/bb-idle.txt");
- }
- else {
- $idle = 15;
- }
- $sess_count = 0;
- if (is_dir($sess_dir)) {
- if ($sess_dh = opendir($sess_dir)) {
- while (($sess_file = readdir($sess_dh)) !== false) {
- if ($sess_file != '.' && $sess_file != '..') {
- $sess_content = file_get_contents("$sess_dir/$sess_file");
- if (preg_match("/logged_in/",$sess_content)) {
- if (preg_match("/$id/",$sess_content)) {
- $sess_count++;
- }
- }
- }
- }
- }
- closedir($sess_dh);
- }
- }
- if (($sess_count > 0) or (isset($_SESSION['logged_in']) and !empty($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $id))) {
- echo "online";
- }
- else {
- echo "offline";
- }
- ?>
- </code></td></tr>
- </table></td></tr></table></div>
- <div id="panel_footer"><font style="font-size: 10px; color: #999999;"><a href="index.php">home</a> | <a href="member.php?id=all">members</a> | <a href="login.php">
- <?php
- if (isset($_SESSION['logged_in'])) {
- echo "logout";
- }
- else {
- echo "login";
- }
- ?>
- </a></font></div>
- </td></tr></table>