Big changes
This commit is contained in:
parent
a26c3de40a
commit
ed9fbba4a3
13
bbcode.php
13
bbcode.php
@ -8,8 +8,17 @@
|
||||
// modified by www.vision.to
|
||||
// please keep credits, thank you :-)
|
||||
// document your changes.
|
||||
function bbcode_format($str) {
|
||||
function convertYoutubeURL($string) {
|
||||
preg_match(
|
||||
'/[\\?\\&]v=([^\\?\\&]+)/',
|
||||
$string,
|
||||
$matches
|
||||
);
|
||||
$id = $matches[0];
|
||||
return $id;
|
||||
}
|
||||
|
||||
function bbcode_format($str) {
|
||||
$simple_search = array(
|
||||
'/\[b\](.*?)\[\/b\]/is',
|
||||
'/\*\*\*(.*?)\*\*\*/is',
|
||||
@ -21,6 +30,7 @@ function bbcode_format($str) {
|
||||
'/\[url\](.*?)\[\/url\]/is',
|
||||
'/\[font\=(.*?)\](.*?)\[\/font\]/is',
|
||||
'/\[color\=(.*?)\](.*?)\[\/color\]/is',
|
||||
'~\[youtube]https?.*?(?:[/?&](?:e|vi?|ci)(?:[/=]|%3D)|youtu\.be/|embed/|/user/[^/]+#p/(?:[^/]+/)+)([\w-]{10,12}).*?\[/youtube]~i'
|
||||
);
|
||||
|
||||
$simple_replace = array(
|
||||
@ -34,6 +44,7 @@ function bbcode_format($str) {
|
||||
"<a href='$1' title='$1'>$1</a>",
|
||||
"<span style='font-family: $1;'>$2</span>",
|
||||
"<span style='color: $1;'>$2</span>",
|
||||
"<iframe width='560' height='315' src='https://youtube.com/embed/$1' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>",
|
||||
);
|
||||
|
||||
// Do simple BBCode's
|
||||
|
@ -8,23 +8,7 @@ include("bbcode.php");
|
||||
|
||||
if (!isset($_SESSION['ssb-user']) && !isset($_SESSION['ssb-pass'])) { echo "ERROR: Not logged in!"; header("Location: index.php"); exit(1); }
|
||||
|
||||
if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && !isset($_GET['friend'])){
|
||||
|
||||
$nick = $_GET['nick'];
|
||||
$msg = bbcode_format(nl2br(htmlentities(stripcslashes($_GET['msg']))));
|
||||
$line = "<table><tr><td style='vertical-align: top;'><img class='avatar_chat' src='?do=avatarlocation&user=" . $nick . "' title='User Avatar'></td><td class='message'><b>$nick</b>: $msg</td></tr></table>\n";
|
||||
$old_content = file_get_contents($chat_db);
|
||||
|
||||
$lines = count(file($chat_db));
|
||||
|
||||
if($lines>$server_msgcount) {
|
||||
$old_content = implode("\n", array_slice(explode("\n", $old_content), 1));
|
||||
}
|
||||
|
||||
file_put_contents($chat_db, $old_content.$line);
|
||||
echo $line;
|
||||
|
||||
} else if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && isset($_GET['friend'])){
|
||||
if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && isset($_GET['friend'])){
|
||||
|
||||
$friendNick = $_GET['friend'];
|
||||
$nick = $_SESSION['ssb-user'];
|
||||
@ -39,7 +23,7 @@ if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && !isset($_
|
||||
$msgCount = file_get_contents("ssb_db/friends/" . ${"friend_chat_db" . $x} . ".count");
|
||||
$msgCount = $msgCount + 1;
|
||||
$msg = bbcode_format(nl2br(htmlentities(stripcslashes($_GET['msg']))));
|
||||
$line_start = "<?php \$msg" . $msgCount . " = \"<table><tr><td style='vertical-align: top;'><img class='avatar_chat' src='?do=avatarlocation&user=" . $nick . "' title='User Avatar'></td><td class='message'><b>$nick</b>: $msg</td></tr></table>";
|
||||
$line_start = "<?php \$msg" . $msgCount . " = \"<table><tr><td style='vertical-align: top;'><img class='avatar_chat' src='index.php?do=avatarlocation&user=" . $nick . "' title='User Avatar'></td><td class='message'><b>$nick</b>: $msg</td></tr></table>";
|
||||
$line_end = "\"; ?>\n";
|
||||
|
||||
$old_content = file_get_contents("ssb_db/friends/" . ${"friend_chat_db" . $x} . ".php");
|
||||
@ -70,20 +54,5 @@ if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && !isset($_
|
||||
} //else { echo "Not friend!"; }
|
||||
//echo "Finding friend in slot " . $x;
|
||||
}
|
||||
} else if (isset($_GET['all'])) {
|
||||
//$content = file_get_contents($server_db);
|
||||
// This is faster
|
||||
$flag = file($chat_db);
|
||||
$content = "";
|
||||
foreach ($flag as $value) {
|
||||
$content .= $value;
|
||||
}
|
||||
echo $content;
|
||||
|
||||
}/* else if(isset($_GET['ping'])) {
|
||||
$username = $_GET['nick'];
|
||||
|
||||
} else if(isset($_GET['pong'])) {
|
||||
|
||||
}*/
|
||||
?>
|
||||
|
12
config.php
12
config.php
@ -6,13 +6,13 @@
|
||||
// Version: 2.1.0
|
||||
///////
|
||||
|
||||
$title = "Simple Social Board"; // SM title
|
||||
$desc = "Simple open source social media platform"; // platform description
|
||||
$domain = "sm.cddo.cf"; // where is SSB operating?
|
||||
$admin = "Username"; // Administrator account username
|
||||
$ssbtitle = "Secure Space"; // SM title
|
||||
$desc = "Simple, ad-free, yet flexible social media platform to the user; for the user! " . $ssbtitle . " is powered by SSB.<br /><br />With a fresh account, you'll need to send invites to friends that use this platform! After the friend requests are accepted, you'll have view of feed posts from friends including yourself by timestamp newest to oldest.<br /><b>NOTE:</b> The chat room is in no way private, and can be seen by anyone with an account! Please be cautious and safe online! Private messages are user to user and are safe with us!"; // platform description
|
||||
$domain = "secure.space.cddo.cc"; // where is SSB operating?
|
||||
$admin = "Chraas"; // Administrator account username
|
||||
$version = "2.1.0"; // version
|
||||
$chat_db = "ssb_db/friends/chatdb.txt"; //public chat db
|
||||
$chat_db = "ssb_db/friends/chatdb.txt"; //Temp chat db
|
||||
$server_msgcount = "52"; // for chat page
|
||||
$user_max_upload = "4194304";
|
||||
$user_max_upload = "422194304";
|
||||
|
||||
?>
|
||||
|
54
data/main.js
Normal file
54
data/main.js
Normal file
@ -0,0 +1,54 @@
|
||||
var elems = document.body.getElementsByTagName("video");
|
||||
for(var i = 0; i < elems.length; i++)
|
||||
{
|
||||
elems[i].setAttribute("preload","none");
|
||||
}
|
||||
|
||||
// Get the HTTP Object
|
||||
function getHTTPObject() {
|
||||
if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
else if (window.XMLHttpRequest) return new XMLHttpRequest();
|
||||
else {
|
||||
alert("Your browser does not support AJAX.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function wrapBBCode(tag) {
|
||||
var msgInput = document.getElementById('msg');
|
||||
var content = msgInput.value;
|
||||
var selectedContent = content.substring(msgInput.selectionStart, msgInput.selectionEnd);
|
||||
var beforeContent = content.substring(0, msgInput.selectionStart);
|
||||
var afterContent = content.substring(msgInput.selectionEnd, content.length);
|
||||
msgInput.value = beforeContent + '[' + tag + ']' + selectedContent + '[/' + tag + ']' + afterContent;
|
||||
}
|
||||
|
||||
function userTag(tag) {
|
||||
var msgInput = document.getElementById('msg');
|
||||
var content = msgInput.value;
|
||||
var beforeContent = content.substring(0, msgInput.selectionStart);
|
||||
var afterContent = content.substring(msgInput.selectionEnd, content.length);
|
||||
msgInput.value = beforeContent + '@' + tag + afterContent;
|
||||
}
|
||||
|
||||
// For dynamic reacting without leaving page.
|
||||
function userReact(user, postid) {
|
||||
ajaxGet = getHTTPObject();
|
||||
if (ajaxGet != null) {
|
||||
link = "index.php?do=react&user="+user+"&pid="+postid;
|
||||
ajaxGet.open("GET", link , true);
|
||||
ajaxGet.send(null);
|
||||
setTimeout(function(){ window.location.reload(); }, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
// For dynamic reacting without leaving page.
|
||||
function userClrNotifications() {
|
||||
ajaxGet = getHTTPObject();
|
||||
if (ajaxGet != null) {
|
||||
link = "index.php?do=clrnote";
|
||||
ajaxGet.open("GET", link , true);
|
||||
ajaxGet.send(null);
|
||||
setTimeout(function(){ window.location.reload(); }, 1000);
|
||||
}
|
||||
}
|
22
data/upload.js
Executable file
22
data/upload.js
Executable file
@ -0,0 +1,22 @@
|
||||
const url = 'chatserver.php?do=upload'
|
||||
const form = document.querySelector('form')
|
||||
|
||||
form.addEventListener('submit', (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
const files = document.querySelector('[type=file]').files
|
||||
const formData = new FormData()
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let file = files[i]
|
||||
|
||||
formData.append('files[]', file)
|
||||
}
|
||||
|
||||
fetch(url, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}).then((response) => {
|
||||
console.log(response)
|
||||
})
|
||||
})
|
267
forms.php
267
forms.php
@ -1,267 +0,0 @@
|
||||
<?php
|
||||
// SSB - Simple Social Board
|
||||
// (C) Chris Dorman, 2012 - 2020
|
||||
// License: CC-BY-NC-SA version 3.0
|
||||
// http://github.com/Pentium44/SSB
|
||||
|
||||
// get filesize for uploaded files
|
||||
function tomb($size, $precision = 2)
|
||||
{
|
||||
$base = log($size) / log(1024);
|
||||
$suffixes = array('', 'KB', 'MB', 'GB', 'TB');
|
||||
|
||||
return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];
|
||||
}
|
||||
|
||||
function loginForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="login">
|
||||
<a class="button" href="<?php echo $_SERVER['PHP_SELF']; ?>?forms=register">Register</a>
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=login" method="post">
|
||||
<table><tr><td>
|
||||
Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
|
||||
Password:</td><td> <input class="text" type="password" name="password"></td></tr></table>
|
||||
<input style="padding: 2px;" class="text" type="submit" name="submitBtn" value="Login">
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function changePassForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="chgpass">
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=changepass" method="post">
|
||||
<table><tr><td>
|
||||
Old password:</td><td> <input class="text" type="password" name="oldpass"></td></tr><tr><td>
|
||||
Password:</td><td> <input class="text" type="password" name="password"></td></tr><tr><td>
|
||||
Password Again:</td><td> <input class="text" type="password" name="password_again"></td></tr>
|
||||
</table>
|
||||
<input class="text" type="submit" name="submitBtn" value="Change">
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function uploadAvatarForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="upload">
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=avatarupload" method="post" enctype="multipart/form-data">
|
||||
Choose profile avatar: <br />
|
||||
<label class="input-upload">
|
||||
<input type="file" name="file[]" id="file" multiple>
|
||||
<i class="fa fa-cloud-upload"></i> Upload image
|
||||
</label>
|
||||
<input class="text" type="submit" name="submit" value="Set">
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/*function uploadForm() {
|
||||
|
||||
print <<<EOD
|
||||
Upload
|
||||
<table style="margin:auto;">
|
||||
|
||||
<form action="upload.php" method="post" enctype="multipart/form-data">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="file" name="file[]" id="file" multiple><br>
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" name="submit" value="Upload">
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
|
||||
</table>
|
||||
EOD;
|
||||
|
||||
}*/
|
||||
|
||||
function registerForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="login">
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=register" method="post">
|
||||
<table><tr><td>
|
||||
Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
|
||||
Full name:</td><td> <input class="text" type="text" name="fullname"></td></tr><tr><td>
|
||||
Password:</td><td> <input class="text" type="password" name="password"></td></tr><tr><td>
|
||||
Password Again:</td><td> <input class="text" type="password" name="password-again"></td></tr><tr><td>
|
||||
<label for="acct">Profile type:</label>
|
||||
<select id="acct" name="acct">
|
||||
<option value="private">Private</option>
|
||||
<option value="public">Public</option>
|
||||
</select></td><td>
|
||||
<input class="text" type="submit" name="submitBtn" value="Register">
|
||||
</td></tr></table>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function postForm() {
|
||||
print <<<EOD
|
||||
<button onclick="javascript:wrapBBCode('i');">Italic</button>
|
||||
<button onclick="javascript:wrapBBCode('u');">Underline</button>
|
||||
<button onclick="javascript:wrapBBCode('b');">Bold</button>
|
||||
<button onclick="javascript:wrapBBCode('url');">URL</button>
|
||||
<form action="?do=post" method="post" enctype="multipart/form-data">
|
||||
<label class="input-upload">
|
||||
<input type="file" name="file[]" id="file" multiple>
|
||||
<i class="fa fa-cloud-upload"></i> Upload image
|
||||
</label>
|
||||
<br /><textarea rows="5" cols="60" id="msg" name="body"></textarea><br />
|
||||
<input type="submit" name="post" value="Post">
|
||||
</form>
|
||||
EOD;
|
||||
}
|
||||
|
||||
function replyForm($id, $puser) {
|
||||
?>
|
||||
<button onclick="javascript:wrapBBCode('i');">Italic</button>
|
||||
<button onclick="javascript:wrapBBCode('u');">Underline</button>
|
||||
<button onclick="javascript:wrapBBCode('b');">Bold</button>
|
||||
<button onclick="javascript:wrapBBCode('url');">URL</button>
|
||||
<form action="?do=reply&pid=<?php echo $id; ?>&user=<?php echo $puser; ?>" method="post">
|
||||
<textarea rows="7" cols="60" id="msg" name="body">Reply</textarea><br />
|
||||
<input type="submit" name="reply" value="Reply">
|
||||
</form>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
function cleanForm() {
|
||||
?>
|
||||
|
||||
<br />
|
||||
<form action="?do=clean" method="post">
|
||||
Password: <input type="password" name="password" id="password"> <br />
|
||||
<input type="submit" name="post" value="Post">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
function friendReqForm() {
|
||||
?>
|
||||
|
||||
<h2>Request friendship!</h2>
|
||||
<form action="?do=sendfr" method="post">
|
||||
Username: <input type="text" name="user" id="user"> <br />
|
||||
<input type="submit" name="post" value="Send">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
function sendFriendRequest($user, $friend) {
|
||||
$friendLocation = "ssb_db/friends/" . $friend . ".pending";
|
||||
$handle = fopen($friendLocation, "r");
|
||||
if ($handle) {
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
if($line == $user) { break; } // request already pending
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
// Check if user is itself
|
||||
if($user == $friend) { header("Location: index.php?do=friends"); exit(1); } // dont request from self.
|
||||
|
||||
$friendc = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
include "ssb_db/friends/" . $user . ".php";
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
{
|
||||
if(${"friend" . $x} == $friend) { header("Location: index.php?do=friends"); echo "Already following!"; exit(1); }
|
||||
}
|
||||
|
||||
if(file_exists($friendLocation)) {
|
||||
$pending = file_get_contents("ssb_db/friends/" . $friend . ".pending");
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".pending", $pending . "\n" . $user);
|
||||
} else {
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".pending", $user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function acceptPublicFriendRequest($user, $friend) {
|
||||
$friendpending = "ssb_db/friends/" . $user . ".pending";
|
||||
$friendlist = file_get_contents("ssb_db/friends/" . $user . ".php");
|
||||
$frienddb = file_get_contents("ssb_db/friends/" . $friend . ".php");
|
||||
// check if already on friends list.
|
||||
|
||||
$friendc = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
include "ssb_db/friends/" . $user . ".php";
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
{
|
||||
if(${"friend" . $x} == $friend) { echo "Already following!"; exit(1); }
|
||||
}
|
||||
|
||||
// populate both users databases with each other.
|
||||
$friendcountFriend = file_get_contents("ssb_db/friends/" . $friend . ".count");
|
||||
$friendcountFriend = $friendcountFriend + 1;
|
||||
//echo $friendcountFriend;
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".php", $frienddb . "\n <?php \$friend" . $friendcountFriend ." = \"" . $user . "\";\n\$friend_chat_db" . $friendcountFriend . " = \"" . $user . $friend . "\";?>");
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
$friendcount = $friendcount + 1;
|
||||
//echo $friendcount;
|
||||
file_put_contents("ssb_db/friends/" . $user . ".php", $friendlist . "\n <?php \$friend" . $friendcount . " = \"" . $friend . "\";\n\$friend_chat_db" . $friendcount . " = \"" . $user . $friend . "\";?>");
|
||||
file_put_contents("ssb_db/friends/" . $user . ".count", $friendcount);
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".count", $friendcountFriend);
|
||||
file_put_contents("ssb_db/friends/" . $user . $friend . ".count", "1");
|
||||
file_put_contents("ssb_db/friends/" . $user . $friend . ".php", "<?php \$msg1 = \"" . $user . " and " . $friend . " are now friends!<br />\";?>");
|
||||
|
||||
}
|
||||
|
||||
function acceptFriendRequest($user, $friend) {
|
||||
$friendpending = "ssb_db/friends/" . $user . ".pending";
|
||||
$friendlist = file_get_contents("ssb_db/friends/" . $user . ".php");
|
||||
$frienddb = file_get_contents("ssb_db/friends/" . $friend . ".php");
|
||||
// check if friend request is really pending.
|
||||
|
||||
$friendc = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
include "ssb_db/friends/" . $user . ".php";
|
||||
for($x = 1; $x <= $friendc; $x++)
|
||||
{
|
||||
if(${"friend" . $x} == $friend) { echo "Already following!"; exit(1); }
|
||||
}
|
||||
|
||||
$handle = fopen($friendpending, "r");
|
||||
if ($handle) {
|
||||
$xx = 0;
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
if($xx >= "1") {
|
||||
$line = str_replace("\n","",$line);
|
||||
}
|
||||
$xx++;
|
||||
//echo $line . "<br />";
|
||||
//echo $friend . "<br />";
|
||||
if($friend == $line)
|
||||
{
|
||||
// populate both users databases with each other.
|
||||
$friendcountFriend = file_get_contents("ssb_db/friends/" . $friend . ".count");
|
||||
$friendcountFriend = $friendcountFriend + 1;
|
||||
//echo $friendcountFriend;
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".php", $frienddb . "\n <?php \$friend" . $friendcountFriend ." = \"" . $user . "\";\n\$friend_chat_db" . $friendcountFriend . " = \"" . $user . $friend . "\";?>");
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $user . ".count");
|
||||
$friendcount = $friendcount + 1;
|
||||
//echo $friendcount;
|
||||
file_put_contents("ssb_db/friends/" . $user . ".php", $friendlist . "\n <?php \$friend" . $friendcount . " = \"" . $friend . "\";\n\$friend_chat_db" . $friendcount . " = \"" . $user . $friend . "\";?>");
|
||||
file_put_contents("ssb_db/friends/" . $user . ".count", $friendcount);
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".count", $friendcountFriend);
|
||||
file_put_contents("ssb_db/friends/" . $user . $friend . ".count", "1");
|
||||
file_put_contents("ssb_db/friends/" . $user . $friend . ".php", "<?php \$msg1 = \"" . $user . " and " . $friend . " are now friends!<br />\";?>");
|
||||
}
|
||||
}
|
||||
fclose($handle);
|
||||
} else {
|
||||
echo "ERROR: Friend: " . $friend . " not found in friend pending database.<br />";
|
||||
}
|
||||
}
|
||||
?>
|
@ -5,6 +5,8 @@
|
||||
// http://github.com/Pentium44/SSB
|
||||
|
||||
// get filesize for uploaded files
|
||||
session_start();
|
||||
|
||||
function tomb($size, $precision = 2)
|
||||
{
|
||||
$base = log($size) / log(1024);
|
||||
@ -14,7 +16,7 @@ function tomb($size, $precision = 2)
|
||||
}
|
||||
|
||||
function getRandString($n) {
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_';
|
||||
$randomString = '';
|
||||
|
||||
for ($i = 0; $i < $n; $i++) {
|
||||
@ -33,11 +35,27 @@ function searchForUserTag($str) {
|
||||
}
|
||||
}
|
||||
|
||||
function checkLogin() {
|
||||
$username = $_SESSION['ssb-user'];
|
||||
$passSession = $_SESSION['ssb-pass'];
|
||||
if(!isset($username) || !isset($passSession)) { return false; }
|
||||
include "ssb_db/users/" . $username . ".php";
|
||||
|
||||
if($user_password === $passSession) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function loginForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="login">
|
||||
<a class="button" href="<?php echo $_SERVER['PHP_SELF']; ?>?forms=register">Register</a>
|
||||
<h3>Login</h3>
|
||||
New to <?php echo $ssbtitle; ?>? No problem,
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?forms=register">register</a>
|
||||
here and get started!<br /><br />
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=login" method="post">
|
||||
<table><tr><td>
|
||||
Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
|
||||
@ -52,6 +70,7 @@ function changePassForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="chgpass">
|
||||
<h3>Change password</h3>
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=changepass" method="post">
|
||||
<table><tr><td>
|
||||
Old password:</td><td> <input class="text" type="password" name="oldpass"></td></tr><tr><td>
|
||||
@ -64,6 +83,33 @@ function changePassForm() {
|
||||
<?php
|
||||
}
|
||||
|
||||
function getUserCount() {
|
||||
$user_count = "0";
|
||||
foreach(array_reverse(glob("ssb_db/users/*.name")) as $postfile) {
|
||||
$user_count++;
|
||||
}
|
||||
|
||||
echo "$user_count users";
|
||||
}
|
||||
|
||||
function getPostCount() {
|
||||
$post_count = "0";
|
||||
foreach(array_reverse(glob("ssb_db/posts/*.post")) as $postfile) {
|
||||
$post_count++;
|
||||
}
|
||||
|
||||
echo "$post_count posts";
|
||||
}
|
||||
|
||||
function getUploadFileCount() {
|
||||
$file_count = "0";
|
||||
foreach(array_reverse(glob("ssb_db/uploads/*")) as $postfile) {
|
||||
$file_count++;
|
||||
}
|
||||
|
||||
echo "$file_count uploads";
|
||||
}
|
||||
|
||||
function uploadAvatarForm() {
|
||||
?>
|
||||
<br />
|
||||
@ -107,6 +153,7 @@ function registerForm() {
|
||||
?>
|
||||
<br />
|
||||
<div class="login">
|
||||
<h3>Register</h3>
|
||||
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=register" method="post">
|
||||
<table><tr><td>
|
||||
Username:</td><td> <input class="text" type="text" name="username"></td></tr><tr><td>
|
||||
@ -127,14 +174,16 @@ function registerForm() {
|
||||
|
||||
function postForm() {
|
||||
print <<<EOD
|
||||
<h3>Create a post</h3>
|
||||
<button onclick="javascript:wrapBBCode('i');">Italic</button>
|
||||
<button onclick="javascript:wrapBBCode('u');">Underline</button>
|
||||
<button onclick="javascript:wrapBBCode('b');">Bold</button>
|
||||
<button onclick="javascript:wrapBBCode('url');">URL</button>
|
||||
<button onclick="javascript:wrapBBCode('youtube');">Youtube</button>
|
||||
<form action="?do=post" method="post" enctype="multipart/form-data">
|
||||
<label class="input-upload">
|
||||
<input type="file" name="file[]" id="file" multiple>
|
||||
<i class="fa fa-cloud-upload"></i> Upload image
|
||||
<i class="fa fa-cloud-upload"></i> Upload photo / video
|
||||
</label>
|
||||
<br /><textarea rows="5" cols="60" id="msg" name="body"></textarea><br />
|
||||
<input type="submit" name="post" value="Post">
|
||||
@ -148,6 +197,7 @@ function replyForm($id, $puser) {
|
||||
<button onclick="javascript:wrapBBCode('u');">Underline</button>
|
||||
<button onclick="javascript:wrapBBCode('b');">Bold</button>
|
||||
<button onclick="javascript:wrapBBCode('url');">URL</button>
|
||||
<button onclick="javascript:wrapBBCode('youtube');">Youtube</button>
|
||||
<form action="?do=reply&pid=<?php echo $id; ?>&user=<?php echo $puser; ?>" method="post">
|
||||
<textarea rows="7" cols="60" id="msg" name="body"></textarea><br />
|
||||
<input type="submit" name="reply" value="Reply">
|
||||
@ -170,7 +220,7 @@ function cleanForm() {
|
||||
function friendReqForm() {
|
||||
?>
|
||||
|
||||
<h2>Request friendship!</h2>
|
||||
<h3>Send a friend request</h3>
|
||||
<form action="?do=sendfr" method="post">
|
||||
Username: <input type="text" name="user" id="user"> <br />
|
||||
<input type="submit" name="post" value="Send">
|
||||
@ -180,13 +230,12 @@ function friendReqForm() {
|
||||
|
||||
|
||||
function sendFriendRequest($user, $friend) {
|
||||
$friendLocation = "ssb_db/friends/" . $friend . ".pending";
|
||||
$handle = fopen($friendLocation, "r");
|
||||
if ($handle) {
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
if($line == $user) { break; } // request already pending
|
||||
}
|
||||
fclose($handle);
|
||||
$friendLocation = "ssb_db/friends/" . $friend . ".notifications";
|
||||
$friendPending = "ssb_db/friends/" . $friend . ".pending";
|
||||
$handle = file_get_contents($friendLocation);
|
||||
if (strpos($handle, $user) !== FALSE) {
|
||||
echo "Friend request is send already and pending accept!<br />";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Check if user is itself
|
||||
@ -201,12 +250,18 @@ function sendFriendRequest($user, $friend) {
|
||||
}
|
||||
|
||||
if(file_exists($friendLocation)) {
|
||||
$pending = file_get_contents("ssb_db/friends/" . $friend . ".pending");
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".pending", $pending . "\n" . $user);
|
||||
$notifications = file_get_contents($friendLocation);
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".notifications", "Friend request from " . $user . "! <a class='button' href='?do=accfr&friend=" . $user . "&user=" . $friend . "'>Accept?</a>" . "\n" . $notifications);
|
||||
} else {
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".notifications", "Friend request from " . $user . "! <a class='button' href='?do=accfr&friend=" . $user . "&user=" . $friend . "'>Accept?</a>");
|
||||
}
|
||||
|
||||
if(file_exists($friendPending)) {
|
||||
$pending = file_get_contents($friendPending);
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".pending", $user . "\n" . $pending);
|
||||
} else {
|
||||
file_put_contents("ssb_db/friends/" . $friend . ".pending", $user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function acceptPublicFriendRequest($user, $friend) {
|
||||
|
584
index.php
584
index.php
@ -4,6 +4,7 @@
|
||||
// License: CC-BY-NC-SA version 3.0
|
||||
// http://github.com/Pentium44/SSB
|
||||
|
||||
//// For development debug.
|
||||
//error_reporting(E_ALL);
|
||||
//ini_set('display_errors', 1);
|
||||
|
||||
@ -12,6 +13,8 @@ include "config.php";
|
||||
include "functions.php";
|
||||
include "bbcode.php";
|
||||
|
||||
$loginCheck = checkLogin();
|
||||
|
||||
// check if flatfile database location is populated
|
||||
if(!file_exists("ssb_db"))
|
||||
{
|
||||
@ -48,101 +51,46 @@ $username = $_SESSION['ssb-user'];
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<title><?php echo htmlentities(stripslashes($ssbtitle)); ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<?php
|
||||
|
||||
if($_GET['do']!="post" && $_GET['do']!="reply" && $_GET['do']!="react" && $_GET['do']!="avatarupload" && $_GET['do']!="delpost") {
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
|
||||
}
|
||||
|
||||
?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=.55, shrink-to-fit=yes"><meta name="description" content="<?php echo htmlentities($ssbtitle) . " - " . $desc; ?>">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
</head>
|
||||
<body <?php if($_GET['do']=="pubmsg" || $_GET['do']=="privmsg") { echo "onload=\"UpdateTimer();\""; } ?>>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var elems = document.body.getElementsByTagName("video");
|
||||
for(var i = 0; i < elems.length; i++)
|
||||
{
|
||||
elems[i].setAttribute("preload","none");
|
||||
}
|
||||
|
||||
// Get the HTTP Object
|
||||
function getHTTPObject() {
|
||||
if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
|
||||
else if (window.XMLHttpRequest) return new XMLHttpRequest();
|
||||
else {
|
||||
alert("Your browser does not support AJAX.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function wrapBBCode(tag) {
|
||||
var msgInput = document.getElementById('msg');
|
||||
var content = msgInput.value;
|
||||
var selectedContent = content.substring(msgInput.selectionStart, msgInput.selectionEnd);
|
||||
var beforeContent = content.substring(0, msgInput.selectionStart);
|
||||
var afterContent = content.substring(msgInput.selectionEnd, content.length);
|
||||
msgInput.value = beforeContent + '[' + tag + ']' + selectedContent + '[/' + tag + ']' + afterContent;
|
||||
}
|
||||
|
||||
function userTag(tag) {
|
||||
var msgInput = document.getElementById('msg');
|
||||
var content = msgInput.value;
|
||||
var beforeContent = content.substring(0, msgInput.selectionStart);
|
||||
var afterContent = content.substring(msgInput.selectionEnd, content.length);
|
||||
msgInput.value = beforeContent + '@' + tag + afterContent;
|
||||
}
|
||||
|
||||
// For dynamic reacting without leaving page.
|
||||
function userReact(user, postid) {
|
||||
ajaxGet = getHTTPObject();
|
||||
if (ajaxGet != null) {
|
||||
link = "index.php?do=react&user="+user+"&pid="+postid;
|
||||
ajaxGet.open("GET", link , true);
|
||||
ajaxGet.send(null);
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
|
||||
// For dynamic reacting without leaving page.
|
||||
function userClrNotifications() {
|
||||
ajaxGet = getHTTPObject();
|
||||
if (ajaxGet != null) {
|
||||
link = "index.php?do=clrnote";
|
||||
ajaxGet.open("GET", link , true);
|
||||
ajaxGet.send(null);
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body <?php if($_GET['do']=="privmsg") { echo "onload=\"UpdateTimer();\""; } ?>>
|
||||
<div class="title"><?php echo $ssbtitle; ?></div>
|
||||
<div class="maincontain">
|
||||
<div id="navcontainer">
|
||||
<div id="navbar"><!--
|
||||
<table id="containtable">
|
||||
<tr><td id="navcontainer">
|
||||
<div id="navbar">
|
||||
<?php if(isset($_SESSION['ssb-user']) && isset($_SESSION['ssb-pass'])) { ?>
|
||||
--><a style="width:50px;" href="?forms=post" title="Post on your feed!"><i style="padding:2px 2px 2px 2px;" class="fa fa-plus-square"></i></a><!--
|
||||
--><a style="width:50px;" href="?do=pubmsg" title="Public chat!"><i style="padding:2px 2px 2px 2px;" class="fa fa-comments-o"></i></a><!--
|
||||
--><a style="width:50px;" href="?userfeed=<?php echo $username; ?>" title="Your profile!"><i style="padding:2px 2px 2px 2px;" class="fa fa-user"></i></a><!--
|
||||
--><a href="index.php">Feed</a><!--
|
||||
--><a href="?do=friends">Friends</a><!--
|
||||
--><a href="?do=about">About</a><!--
|
||||
--><a style="width:50px;" href="?do=users" title="Public users!"><i style="padding:2px 2px 2px 2px;" class="fa fa-users"></i></a><!--
|
||||
--><a style="width:50px;" href="?do=userctrl"><i style="padding:2px 2px 2px 2px;" class="fa fa-cog"></i></a><!--
|
||||
--><a style="width:50px;" href="?do=logout"><i style="padding:2px 2px 2px 2px;" class="fa fa-sign-out"></i></a><!--
|
||||
<a style="width:50px;" href="?forms=post" title="Post on your feed!">Make a post</a><br />
|
||||
<a style="width:50px;" href="?userfeed=<?php echo $username; ?>" title="Your profile!">Profile</a><br />
|
||||
<a href="index.php">Feed</a><br />
|
||||
<a href="?do=friends">Friends</a><br />
|
||||
<a href="?do=about">About</a><br />
|
||||
<a style="width:50px;" href="?do=users" title="Public users!">Public figures</a><br />
|
||||
<a style="width:50px;" href="?do=userctrl">Settings</a><br />
|
||||
<a style="width:50px;" href="?do=logout">Log out</a><br />
|
||||
<?php } else { ?>
|
||||
--><a href="?forms=login">Login</a><!--
|
||||
--><a href="?do=about">About</a><!--
|
||||
<a href="?forms=login">Login</a><br />
|
||||
<a href="?do=about">About</a><br />
|
||||
<?php } ?>
|
||||
--></div>
|
||||
</div>
|
||||
<div class='contain'>
|
||||
<div class='title'><?php echo $ssbtitle; ?></div>
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($username) && isset($_SESSION['ssb-pass']) && $_GET['do']!="avatarlocation") {
|
||||
if(($loginCheck == true) && $_GET['do']!="avatarlocation" && $_GET['do']!="reply" && $_GET['do']!="post" && $_GET['do']!="react" && $_GET['do']!="delpost") {
|
||||
// PM notifications
|
||||
$notifications = "ssb_db/friends/" . $username . ".notifications";
|
||||
$handle = fopen($notifications, "r");
|
||||
|
||||
echo "<div class='notifications'>";
|
||||
echo "<table><tr><td><a class='button' onclick=\"userClrNotifications();\">Clear notifications</a></td></tr>";
|
||||
echo "<table class='notifications'><tr><td>Notifications: <a class='button' onclick=\"userClrNotifications();\">Clear</a></td></tr>";
|
||||
|
||||
if ($handle) {
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
@ -153,9 +101,15 @@ if(isset($username) && isset($_SESSION['ssb-pass']) && $_GET['do']!="avatarlocat
|
||||
echo "<tr><td>No notifications</td></tr>";
|
||||
}
|
||||
|
||||
echo "</table></div><br />";
|
||||
echo "</table></td><td class='contain'>";
|
||||
} else {
|
||||
echo "</td><td class='contain'>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
if(isset($_GET['forms']))
|
||||
{
|
||||
$forms = $_GET['forms'];
|
||||
@ -167,22 +121,46 @@ if(isset($_GET['forms']))
|
||||
loginForm();
|
||||
}
|
||||
else if($forms=="friendreq") {
|
||||
if($loginCheck == true) {
|
||||
friendReqForm();
|
||||
} else {
|
||||
loginForm();
|
||||
}
|
||||
}
|
||||
else if($forms=="changepass") {
|
||||
if($loginCheck == true) {
|
||||
changePassForm();
|
||||
} else {
|
||||
loginForm();
|
||||
}
|
||||
}
|
||||
else if($forms=="deleteacct") {
|
||||
if($loginCheck == true) {
|
||||
deleteAcctForm();
|
||||
} else {
|
||||
loginForm();
|
||||
}
|
||||
}
|
||||
else if($forms=="avatarupload") {
|
||||
if($loginCheck == true) {
|
||||
uploadAvatarForm();
|
||||
} else {
|
||||
loginForm();
|
||||
}
|
||||
}
|
||||
else if($forms=="post") {
|
||||
if($loginCheck == true) {
|
||||
postForm();
|
||||
} else {
|
||||
loginForm();
|
||||
}
|
||||
}
|
||||
else if($forms=="clean") {
|
||||
if($loginCheck == true) {
|
||||
cleanForm();
|
||||
} else {
|
||||
loginForm();
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "ERROR: Unknown form-name<br>";
|
||||
@ -197,6 +175,8 @@ else if(isset($_GET['notify']))
|
||||
else if($notify=="4") { echo "Error: The provided passwords did not match"; }
|
||||
else if($notify=="5") { echo "Error: Special characters cannot be used in your username"; }
|
||||
else if($notify=="6") { echo "Error: This username is already in use"; }
|
||||
else if($notify=="7") { echo "Error: Current password incorrect!"; }
|
||||
else if($notify=="8") { echo "Success! Current password changed!"; }
|
||||
else { echo "Error: unknown error... this is quite unusual..."; }
|
||||
}
|
||||
else if(isset($_GET['userfeed']))
|
||||
@ -205,7 +185,7 @@ else if(isset($_GET['userfeed']))
|
||||
// Make sure we're friends or is my account.
|
||||
include "ssb_db/users/" . $userid . ".php";
|
||||
if ($accttype == "private") {
|
||||
if (isset($_SESSION['ssb-user']) || isset($_SESSION['ssb-pass'])) {
|
||||
if ($loginCheck == true) {
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $username . ".count");
|
||||
include "ssb_db/friends/" . $username . ".php";
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
@ -244,6 +224,7 @@ else if(isset($_GET['userfeed']))
|
||||
// Lets generate the users feed now.
|
||||
foreach(array_reverse(glob("ssb_db/posts/post_" . $userid . "_" . "*.php")) as $postfile) {
|
||||
//echo $postfile;
|
||||
unset($shared); // Keep clean variables
|
||||
include $postfile;
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
{
|
||||
@ -262,13 +243,20 @@ else if(isset($_GET['userfeed']))
|
||||
}
|
||||
echo "</div></div>";
|
||||
}
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a></h3></td></tr></table>";
|
||||
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=share&pid=$postid&user=$postowner' class='button'><i class='fa fa-share'></i> Share</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$postcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -317,12 +305,18 @@ else if(isset($_GET['userfeed']))
|
||||
echo "</div></div>";
|
||||
}
|
||||
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid ."');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a> <a href='index.php?do=delpost&user=$username&pid=$postid'><i class='fa fa-trash-o'></i></a></h3></td></tr></table>";
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=delpost&user=$username&pid=$postid' class='button'><i class='fa fa-trash-o'></i> Delete</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$postcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -360,8 +354,7 @@ else if(isset($_GET['userfeed']))
|
||||
{
|
||||
echo "<h3>User information</h3>";
|
||||
echo "<table><tr><td>";
|
||||
// Get user avatar if set
|
||||
if(isset($user_avatar)) { echo "<img class='avatar' src='ssb_db/uploads/" . $user_avatar . "' title='User Avatar'><br />"; }
|
||||
echo "<div class='avatar' style=\"background-image: url('index.php?do=avatarlocation&user=$userid');\" title='User Avatar'></div>";
|
||||
// DONE
|
||||
|
||||
echo "</td><td>";
|
||||
@ -387,6 +380,7 @@ else if(isset($_GET['userfeed']))
|
||||
|
||||
foreach(array_reverse(glob("ssb_db/posts/post_" . $userid . "_" . "*.php")) as $postfile) {
|
||||
include $postfile;
|
||||
unset($shared);
|
||||
echo "<div class='post'><table><tr><td><div class='avatar_small' style=\"background-image: url('index.php?do=avatarlocation&user=$postowner');\" title='User Avatar'></div></td><td><h3>$postowner<span class='date'>$postdate ";
|
||||
if(file_exists("ssb_db/posts/$postid.reactcount")) {
|
||||
$reacts = file_get_contents("ssb_db/posts/$postid.reactcount");
|
||||
@ -402,12 +396,18 @@ else if(isset($_GET['userfeed']))
|
||||
echo "</div></div>";
|
||||
}
|
||||
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a></h3></td></tr></table>";
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=share&pid=$postid&user=$postowner' class='button'><i class='fa fa-share'></i> Share</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$postcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -463,10 +463,18 @@ else if(isset($_GET['view']) && isset($_GET['user']))
|
||||
echo "</div></div>";
|
||||
}
|
||||
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\" class='reacts'><i class='fa fa-heart'></i></a></h3></td></tr></table>";
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=share&pid=$postid&user=$postowner' class='button'><i class='fa fa-share'></i> Share</a>";
|
||||
|
||||
echo "</div><br />\n";
|
||||
|
||||
for($x = 1; $x <= $postc; $x++) {
|
||||
@ -482,7 +490,7 @@ else if(isset($_GET['view']) && isset($_GET['user']))
|
||||
|
||||
echo "<br />";
|
||||
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) {
|
||||
if ($loginCheck != true) {
|
||||
echo "Login to reply...";
|
||||
} else {
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $username . ".count");
|
||||
@ -513,7 +521,7 @@ else if(isset($_GET['do']))
|
||||
$do = $_GET['do'];
|
||||
if($do=="post")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
$date = date("YmdHis"); // timestamp in year, month, date, hour, minute, and second.
|
||||
$titledate = date("m-d-Y h:i:sa"); // time stamp for people to read xD
|
||||
|
||||
@ -627,7 +635,7 @@ else if(isset($_GET['do']))
|
||||
file_put_contents("ssb_db/posts/" . $date . ".post", "post_" . $username . "_" . $date . ".php");
|
||||
file_put_contents("ssb_db/posts/reply_" . $username . "_" . $date . ".count", "0");
|
||||
echo "Post processed... if redirection fails, <a href=\"?view=$date&user=$username\">Click Here</a><br />";
|
||||
header( "refresh: 1;url=?view=$date&user=$username" );
|
||||
header("Location: index.php?view=$date&user=$username");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -638,7 +646,7 @@ else if(isset($_GET['do']))
|
||||
|
||||
if($do=="avatarupload")
|
||||
{
|
||||
if(isset($_FILES["file"]["name"]) && isset($username)) {
|
||||
if(isset($_FILES["file"]["name"]) && ($loginCheck == true)) {
|
||||
$date = date("YmdHis"); // timestamp in year, month, date, hour, minute, and second.
|
||||
|
||||
for($i=0; $i<count($_FILES["file"]["name"]); $i++)
|
||||
@ -688,27 +696,9 @@ else if(isset($_GET['do']))
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="users")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
include "ssb_db/users/" . $username . ".php";
|
||||
|
||||
echo "<h2>Community</h2>";
|
||||
foreach(array_reverse(glob("ssb_db/users/"."*.name")) as $userfile) {
|
||||
$userhandle = file_get_contents($userfile);
|
||||
include "ssb_db/users/" . $userhandle . ".php";
|
||||
if($accttype == "public") {
|
||||
echo "<div class='attachment'>";
|
||||
echo "<a href='index.php?userfeed=$userhandle'>$userhandle</a>";
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="reply")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
if(!isset($_GET['pid']) or !file_exists("ssb_db/posts/" . $_GET['pid'] . ".post")) { echo "ERROR: Post ID is not set, or invalid"; } else {
|
||||
if(isset($_POST['reply']) && isset($username) && $_POST['body']!="")
|
||||
{
|
||||
@ -744,7 +734,7 @@ else if(isset($_GET['do']))
|
||||
}
|
||||
|
||||
echo "If you're seeing this; redirection failed: <a href=\"?view=$pid&user=$postowner\">Click Here</a><br>";
|
||||
header( "refresh: 1;url=index.php?view=$pid&user=$postowner" );
|
||||
header("Location:index.php?view=$pid&user=$postowner");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -756,9 +746,7 @@ else if(isset($_GET['do']))
|
||||
|
||||
if($do=="delpost")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
include "ssb_db/users/" . $username . ".php";
|
||||
if($user_password === $_SESSION['ssb-pass']) {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
if(isset($_GET['user']) && $_GET['user']!="" && isset($_GET['pid']) && $_GET['pid']!="") {
|
||||
if(file_exists("ssb_db/posts/post_" . stripslashes($_GET['user']) . "_" . stripslashes($_GET['pid']) . ".php") && $username == stripslashes($_GET['user'])) {
|
||||
$postuser = $_GET['user'];
|
||||
@ -766,20 +754,68 @@ else if(isset($_GET['do']))
|
||||
unlink("ssb_db/posts/" . $pid . ".post");
|
||||
unlink("ssb_db/posts/post_" . $postuser . "_" . $pid . ".php");
|
||||
unlink("ssb_db/posts/reply_" . $postuser . "_" . $pid . ".count");
|
||||
echo "Post successfully deleted! <a href='index.php'>redirecting</a> in 3 seconds...<br />";
|
||||
header("refresh: 3;url=index.php");
|
||||
flush();
|
||||
header("refresh: 0;url=index.php");
|
||||
exit;
|
||||
} else { echo "ERROR: post doesn't exist or YOU ARE NOT THE OWNER OF SAID POST... THIS incident has been recorded!"; file_put_contents("ssb_db/log.txt", "Post deletion error: IP <" . $_SERVER['REMOTE_ADDR'] . "> post not found or not users post: post_" . $postuser . "_" . $pid . ".php\n"); }
|
||||
} else { echo "ERROR: USER and PID variables not set!"; }
|
||||
} else { echo "ERROR: PASSWORD FOR USER INCORRECT! IP LOGGED!"; file_put_contents("ssb_db/log.txt", "PASS MISMATCH: IP <" . $_SERVER['REMOTE_ADDR'] . "> Cookie spoofing detected from remote client!!!\n"); }
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="share")
|
||||
{
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
if(isset($_GET['user']) && $_GET['user']!="" && isset($_GET['pid']) && $_GET['pid']!="") {
|
||||
if(file_exists("ssb_db/posts/post_" . stripslashes($_GET['user']) . "_" . stripslashes($_GET['pid']) . ".php")) {
|
||||
$postuser = stripslashes($_GET['user']);
|
||||
$pid = stripslashes($_GET['pid']);
|
||||
$date = date("YmdHis"); // timestamp in year, month, date, hour, minute, and second.
|
||||
$titledate = date("m-d-Y h:i:sa"); // time stamp for people to read xD
|
||||
include("ssb_db/friends/" . $username . ".php");
|
||||
include("ssb_db/posts/post_" . $postuser . "_" . $pid . ".php");
|
||||
|
||||
if($accttype == "public") {
|
||||
$post_file = "ssb_db/posts/post_" . $username . "_" . $date . ".php";
|
||||
$post_attachments = "<br />";
|
||||
$post_string = "<?php\n\$postowner = \"" . $username . "\";\$postid=\"" . $date . "\";\$postdate=\"" . $titledate . "\";\$shared = \"1\";\$origowner = \"" . $postowner . "\";\$postcontent = \"" . $postcontent;
|
||||
$post_string_end = "\";\n?>\n";
|
||||
$notification = file_get_contents("ssb_db/friends/" . $postuser . ".notifications");
|
||||
file_put_contents("ssb_db/friends/" . $postuser . ".notifications", "<b>$username</b> <a href='index.php?view=$date&user=$username'>shared your post</a>\n" . $notification);
|
||||
file_put_contents($post_file, $post_string . $post_attachments . $post_string_end);
|
||||
file_put_contents("ssb_db/posts/" . $date . ".post", "post_" . $username . "_" . $date . ".php");
|
||||
file_put_contents("ssb_db/posts/reply_" . $username . "_" . $date . ".count", "0");
|
||||
flush();
|
||||
header("refresh: 0;url=index.php");
|
||||
exit;
|
||||
} else {
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $username . ".count");
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
{
|
||||
if($postowner == ${"friend" . $x}) {
|
||||
$foundfriend = 1;
|
||||
$post_file = "ssb_db/posts/post_" . $username . "_" . $date . ".php";
|
||||
$post_attachments = "<br />";
|
||||
$post_string = "<?php\n\$postowner = \"" . $username . "\";\$postid=\"" . $date . "\";\$postdate=\"" . $titledate . "\";\$shared = \"1\";\$origowner = \"" . $postowner . "\";\$postcontent = \"" . $postcontent;
|
||||
$post_string_end = "\";\n?>\n";
|
||||
$notification = file_get_contents("ssb_db/friends/" . $postuser . ".notifications");
|
||||
file_put_contents("ssb_db/friends/" . $postuser . ".notifications", "<b>$username</b> <a href='index.php?view=$date&user=$username'>shared your post</a>\n" . $notification);
|
||||
file_put_contents($post_file, $post_string . $post_attachments . $post_string_end);
|
||||
file_put_contents("ssb_db/posts/" . $date . ".post", "post_" . $username . "_" . $date . ".php");
|
||||
file_put_contents("ssb_db/posts/reply_" . $username . "_" . $date . ".count", "0");
|
||||
flush();
|
||||
header("refresh: 0;url=index.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { echo "ERROR: post doesn't exist or YOU ARE NOT THE OWNER OF SAID POST... THIS incident has been recorded!"; file_put_contents("ssb_db/log.txt", "Post deletion error: IP <" . $_SERVER['REMOTE_ADDR'] . "> post not found or not users post: post_" . $postuser . "_" . $pid . ".php\n"); }
|
||||
} else { echo "ERROR: USER and PID variables not set!"; }
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="react")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
include "ssb_db/users/" . $username . ".php";
|
||||
if($user_password === $_SESSION['ssb-pass']) {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
if(isset($_GET['user']) && $_GET['user']!="" && isset($_GET['pid']) && $_GET['pid']!="") {
|
||||
if(file_exists("ssb_db/posts/post_" . stripslashes($_GET['user']) . "_" . stripslashes($_GET['pid']) . ".php")) {
|
||||
$postuser = $_GET['user'];
|
||||
@ -822,35 +858,28 @@ else if(isset($_GET['do']))
|
||||
}
|
||||
|
||||
echo "Reacted! <a href='index.php'>Redirecting</a> in 1 second...";
|
||||
header("refresh: 1;url=index.php");
|
||||
header("Location:index.php");
|
||||
exit;
|
||||
} else { echo "ERROR: post doesn't exist..."; }
|
||||
} else { echo "ERROR: USER and PID variables not set!"; }
|
||||
} else { echo "ERROR: PASSWORD FOR USER INCORRECT! IP LOGGED!"; file_put_contents("ssb_db/log.txt", "PASS MISMATCH: IP <" . $_SERVER['REMOTE_ADDR'] . "> Cookie spoofing detected from remote client!!!\n"); }
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="clrnote")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
include "ssb_db/users/" . $username . ".php";
|
||||
if($user_password === $_SESSION['ssb-pass']) {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
unlink("ssb_db/friends/" . $username . ".notifications");
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
} else { echo "ERROR: PASSWORD FROM COOKIE INCORRECT! IP RECORDED!"; file_put_contents("ssb_db/log.txt", "PASS MISMATCH: IP <" . $_SERVER['REMOTE_ADDR'] . "> Cookie spoofing detected from remote client!!!\n"); }
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="clrpending")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
include "ssb_db/users/" . $username . ".php";
|
||||
if($user_password === $_SESSION['ssb-pass']) {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
unlink("ssb_db/friends/" . $username . ".pending");
|
||||
header("Location: index.php?do=friends");
|
||||
exit;
|
||||
} else { echo "ERROR: PASSWORD FROM COOKIE INCORRECT! IP RECORDED!"; file_put_contents("ssb_db/log.txt", "PASS MISMATCH: IP <" . $_SERVER['REMOTE_ADDR'] . "> Cookie spoofing detected from remote client!!!\n"); }
|
||||
}
|
||||
}
|
||||
|
||||
@ -876,7 +905,7 @@ else if(isset($_GET['do']))
|
||||
|
||||
// grab session values and send friend request functions.
|
||||
if($do=="sendfr") {
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
if(isset($_POST['user']) || isset($_GET['user'])) {
|
||||
|
||||
//check if user exists first lol
|
||||
@ -909,8 +938,9 @@ else if(isset($_GET['do']))
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="accfr") {
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if($do=="accfr")
|
||||
{
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
if(isset($_GET['user']) && isset($_GET['friend'])) {
|
||||
acceptFriendRequest(stripslashes($_GET['user']), stripslashes($_GET['friend']));
|
||||
echo "Accepted friend request from " . htmlentities(stripslashes($_GET['friend'])) . " <a href='?do=friends'>redirecting</a> in 3 seconds";
|
||||
@ -923,7 +953,7 @@ else if(isset($_GET['do']))
|
||||
|
||||
if($do=="userctrl")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
// Beginning of user control panel
|
||||
echo "<h3>User control panel</h3>";
|
||||
echo "<a class='button' href='?forms=changepass'>Change password</a><br />";
|
||||
@ -933,7 +963,7 @@ else if(isset($_GET['do']))
|
||||
|
||||
if($do=="changepass")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
// Beginning password change
|
||||
// inputs
|
||||
$oldPassInput = htmlentities(stripslashes($_POST['oldpass']));
|
||||
@ -954,114 +984,9 @@ else if(isset($_GET['do']))
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="pubmsg")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
var httpObject = null;
|
||||
var link = "";
|
||||
var timerID = 0;
|
||||
var nickName = "<?php echo $_SESSION['ssb-user']; ?>";
|
||||
var userColor = "<?php echo $_SESSION['ssb-color'];; ?>";
|
||||
|
||||
// Change the value of the outputText field
|
||||
function setHtml() {
|
||||
if(ajaxVar.readyState == 4){
|
||||
var response = ajaxVar.responseText;
|
||||
var msgBox = document.getElementById("msgs");
|
||||
msgBox.innerHTML += response;
|
||||
msgBox.scrollTop = msgBox.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// Change the value of the outputText field
|
||||
function setAll() {
|
||||
if(ajaxVar.readyState == 4){
|
||||
var response = ajaxVar.responseText;
|
||||
var msgBox = document.getElementById("msgs");
|
||||
msgBox.innerHTML = response;
|
||||
msgBox.scrollTop = msgBox.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
||||
// Implement business logic
|
||||
function serverWrite() {
|
||||
ajaxVar = getHTTPObject();
|
||||
if (ajaxVar != null) {
|
||||
link = "chatserver.php?nick="+nickName+"&msg="+document.getElementById('msg').value;
|
||||
ajaxVar.open("GET", link , true);
|
||||
ajaxVar.onreadystatechange = setHtml;
|
||||
ajaxVar.send(null);
|
||||
}
|
||||
}
|
||||
|
||||
function getInput() {
|
||||
// Send the server function the input
|
||||
var userInput = document.getElementById('msg');
|
||||
serverWrite(userInput.value);
|
||||
|
||||
// Clean out the input values
|
||||
var msgBar = document.getElementById("msg");
|
||||
msgBar.value = "";
|
||||
msgBar.focus();
|
||||
}
|
||||
|
||||
// Implement business logic
|
||||
function serverReload() {
|
||||
ajaxVar = getHTTPObject();
|
||||
//var randomnumber=Math.floor(Math.random()*10000);
|
||||
if (ajaxVar != null) {
|
||||
link = "chatserver.php?all=1";
|
||||
ajaxVar.open("GET", link , true);
|
||||
ajaxVar.onreadystatechange = setAll;
|
||||
ajaxVar.send(null);
|
||||
}
|
||||
}
|
||||
|
||||
function UpdateTimer() {
|
||||
serverReload();
|
||||
setTimeout(UpdateTimer, 1000);
|
||||
}
|
||||
|
||||
function keypressed(e) {
|
||||
if(e.keyCode=='13'){
|
||||
getInput();
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<div class="replycontain">
|
||||
<div id="msgs">
|
||||
<?php
|
||||
echo "<div class=\"msgbox\">";
|
||||
$get = file_get_contents($chat_db);
|
||||
echo $get;
|
||||
echo "</div>";
|
||||
?>
|
||||
</div>
|
||||
<div id="msgbox" onkeyup="keypressed(event);">
|
||||
|
||||
<button onclick="javascript:wrapBBCode('i');">Italic</button>
|
||||
<button onclick="javascript:wrapBBCode('u');">Underline</button>
|
||||
<button onclick="javascript:wrapBBCode('b');">Bold</button>
|
||||
<button onclick="javascript:wrapBBCode('url');">URL</button><br />
|
||||
<textarea style="width: 98%;" name="msg" id="msg"></textarea>
|
||||
<button style="width: 50px;" onclick="getInput();">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="privmsg")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
|
||||
//check if friend is set
|
||||
if(!isset($_GET['friend'])) { echo "ERROR: No username defined!"; exit(1); } else {
|
||||
@ -1180,6 +1105,79 @@ else if(isset($_GET['do']))
|
||||
} // session check end
|
||||
} // function end
|
||||
|
||||
if($do=="msghist")
|
||||
{
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
|
||||
//check if friend is set
|
||||
if(!isset($_GET['friend'])) { echo "ERROR: No username defined!"; exit(1); } else {
|
||||
// set friend username
|
||||
$friendNick = htmlentities(stripslashes($_GET['friend']));
|
||||
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $username . ".count");
|
||||
include "ssb_db/friends/" . $username . ".php";
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
{
|
||||
if($friendNick == ${"friend" . $x}) {
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
var httpObject = null;
|
||||
var link = "chatserver.php?get=<?php echo $friendNick; ?>";
|
||||
var timerID = 0;
|
||||
var friendNick = "<?php echo $friendNick; ?>";
|
||||
var nickName = "<?php echo $_SESSION['ssb-user']; ?>";
|
||||
var userColor = "<?php echo $_SESSION['ssb-color'];; ?>";
|
||||
|
||||
// Change the value of the outputText field
|
||||
function setAll() {
|
||||
if(ajaxVar.readyState == 4){
|
||||
var response = ajaxVar.responseText;
|
||||
var msgBox = document.getElementById("msgs");
|
||||
msgBox.innerHTML = response;
|
||||
msgBox.scrollTop = msgBox.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
||||
function serverLoad() {
|
||||
ajaxVar = getHTTPObject();
|
||||
//var randomnumber=Math.floor(Math.random()*10000);
|
||||
if (ajaxVar != null) {
|
||||
ajaxVar.open("GET", link , true);
|
||||
ajaxVar.onreadystatechange = setAll;
|
||||
ajaxVar.send(null);
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
serverLoad();
|
||||
});
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<div class="replycontain">
|
||||
<?php
|
||||
|
||||
// Header
|
||||
include "ssb_db/users/" . $friendNick . ".php";
|
||||
echo "<h3><a href='?userfeed=" . $friendNick . "'>" . $friendNick . ": Message history</a></h3>";
|
||||
|
||||
?>
|
||||
<div id="msgs">
|
||||
<?php
|
||||
echo "<div class=\"msgbox\" style=\"overflow-y: scroll;\">";
|
||||
echo "</div>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
} // Check friend end
|
||||
} // Check loop end
|
||||
} // GET friend set end
|
||||
} // session check end
|
||||
} // function end
|
||||
|
||||
// Push user avatar to specific avatar image location
|
||||
if($do=="avatarlocation")
|
||||
{
|
||||
@ -1215,29 +1213,30 @@ else if(isset($_GET['do']))
|
||||
echo "</p>";
|
||||
}
|
||||
|
||||
if($do=="users")
|
||||
{
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
echo "<h2>Community</h2>";
|
||||
foreach(array_reverse(glob("ssb_db/users/"."*.name")) as $userfile) {
|
||||
$userhandle = file_get_contents($userfile);
|
||||
include "ssb_db/users/" . $userhandle . ".php";
|
||||
if($accttype == "public") {
|
||||
echo "<table class='friendslist'><tr><td><div class='avatar_small' style=\"background-image: url('index.php?do=avatarlocation&user=$userhandle');\" title='User Avatar'></td>";
|
||||
echo "<td><a class='button' href='index.php?userfeed=$userhandle'>$userhandle</a> ~ $user_fullname</td>";
|
||||
echo "</td></tr></table>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($do=="friends")
|
||||
{
|
||||
if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass'])) { loginForm(); } else {
|
||||
|
||||
$friendpend = "ssb_db/friends/" . $username . ".pending";
|
||||
$handle = fopen($friendpend, "r");
|
||||
|
||||
echo "<h3>Friend requests</h3> <a class='button' href='?do=clrpending'>Clear history</a> <a class='button' href='?forms=friendreq'>Send friend request</a>";
|
||||
echo "<div class='notifications'>";
|
||||
|
||||
if ($handle) {
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
echo "Pending friend request from " . $line . "! <a class='button' href='?do=accfr&friend=" . $line . "&user=" . $username . "'>Accept</a><br />";
|
||||
}
|
||||
fclose($handle);
|
||||
} else {
|
||||
echo "No pending friend requests<br />";
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
if ($loginCheck != true) { loginForm(); } else {
|
||||
// Friends panel
|
||||
echo "<h3>Friends</h3><a href='?do=users' class='button'>Public users</a> <a class='button' href='?forms=friendreq'>Send friend request</a>";
|
||||
|
||||
// Friends list if you have any.
|
||||
echo "<h3>Friends list</h3><br />";
|
||||
echo "<br />";
|
||||
|
||||
$friendc = file_get_contents("ssb_db/friends/" . $username . ".count");
|
||||
if($friendc == "0")
|
||||
@ -1251,8 +1250,8 @@ else if(isset($_GET['do']))
|
||||
echo "<table class='friendslist'>";
|
||||
for($x = 1; $x <= $friendcount; $x++)
|
||||
{
|
||||
if(isset(${"friend" . $x})) {
|
||||
echo "<tr><td><div class='avatar_small' style=\"background-image: url('index.php?do=avatarlocation&user=" . ${"friend" . $x} . "');\" title='User Avatar'></div></td><td><a class='button' href='index.php?userfeed=" . ${"friend" . $x} . "'>" . ${"friend" . $x} . "</a></td><td><a class='button' href='?do=privmsg&friend=" . ${"friend" . $x} . "'>Private message</a></td></tr>";
|
||||
if(isset(${"friend" . $x}) && file_exists("ssb_db/users/" . ${"friend" . $x} . ".php")) {
|
||||
echo "<tr><td><div class='avatar_small' style=\"background-image: url('index.php?do=avatarlocation&user=" . ${"friend" . $x} . "');\" title='User Avatar'></div></td><td><a class='button' href='index.php?userfeed=" . ${"friend" . $x} . "'>" . ${"friend" . $x} . "</a></td><td><a class='button' href='?do=privmsg&friend=" . ${"friend" . $x} . "'>Private message</a> <a href='?do=msghist&friend=" . ${"friend" . $x} . "' class='button'>Message history</a></td></tr>";
|
||||
}
|
||||
}
|
||||
echo "</table>";
|
||||
@ -1314,10 +1313,11 @@ else if(isset($_GET['do']))
|
||||
} else {
|
||||
header("Location: index.php?notify=3");
|
||||
}
|
||||
header("Location: index.php");
|
||||
echo "<b>ERROR!</b>: Something weird just happened... please try registering again!!!...";
|
||||
//header("Location: index.php");
|
||||
}
|
||||
}
|
||||
else if (!isset($_SESSION['ssb-user']) || !isset($_SESSION['ssb-pass']))
|
||||
else if ($loginCheck != true)
|
||||
{
|
||||
loginForm();
|
||||
}
|
||||
@ -1346,6 +1346,7 @@ else
|
||||
|
||||
// Lets actually generate some feed now.
|
||||
foreach(array_reverse(glob("ssb_db/posts/*.post")) as $postfile) {
|
||||
unset($shared); // make sure its not being carried over after loop.
|
||||
$postphp = file_get_contents($postfile);
|
||||
include "ssb_db/posts/$postphp";
|
||||
$friendcount = file_get_contents("ssb_db/friends/" . $username . ".count");
|
||||
@ -1372,12 +1373,19 @@ else
|
||||
}
|
||||
echo "</div></div>";
|
||||
}
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a></h3></td></tr></table>";
|
||||
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=share&pid=$postid&user=$postowner' class='button'><i class='fa fa-share'></i> Share</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$pcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -1423,12 +1431,19 @@ else
|
||||
}
|
||||
echo "</div></div>";
|
||||
}
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a></h3></td></tr></table>";
|
||||
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=share&pid=$postid&user=$postowner' class='button'><i class='fa fa-share'></i> Share</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$pcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -1468,6 +1483,7 @@ else
|
||||
|
||||
if($poststart == "1" && $postcount < ($poststart + 15)) {
|
||||
echo "<div class='post'><table><tr><td><div class='avatar_small' style=\"background-image: url('index.php?do=avatarlocation&user=$postowner');\" title='User Avatar'></div></td><td><h3>$postowner<span class='date'>$postdate ";
|
||||
|
||||
if(file_exists("ssb_db/posts/$postid.reactcount")) {
|
||||
$reacts = file_get_contents("ssb_db/posts/$postid.reactcount");
|
||||
echo "<div class='reacts'><i class='fa fa-heart' style='color: red;'></i> $reacts <div class='react-list'>";
|
||||
@ -1481,12 +1497,19 @@ else
|
||||
}
|
||||
echo "</div></div>";
|
||||
}
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a> <a href='index.php?do=delpost&user=$username&pid=$postid'><i class='fa fa-trash-o'></i></a></h3></td></tr></table>";
|
||||
|
||||
if(isset($shared) && $shared == "1")
|
||||
{
|
||||
echo "<br />Originally posted by $origowner";
|
||||
}
|
||||
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=delpost&user=$username&pid=$postid' class='button'><i class='fa fa-trash-o'></i> Delete</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$pcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -1532,12 +1555,13 @@ else
|
||||
}
|
||||
echo "</div></div>";
|
||||
}
|
||||
echo "</span><br /><a onclick=\"userReact('" . $postowner . "', '" . $postid . "');\"><i class='fa fa-heart'></i></a> <a href='index.php?view=$postid&user=$postowner'><i class='fa fa-reply'></i></a> <a href='index.php?do=delpost&user=$username&pid=$postid'><i class='fa fa-trash-o'></i> </a></h3></td></tr></table>";
|
||||
echo "</span></h3></td></tr></table>";
|
||||
echo "" . bbcode_format($postcontent) . "";
|
||||
// Footer
|
||||
echo "<div class='post-footer'>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-reply'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' onclick=\"userReact('" . $postowner . "','" . $postid . "');\" class='button'><i class='fa fa-heart'></i> React</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?view=$postid&user=$postowner' class='button'><i class='fa fa-comment'></i> Comment</a>";
|
||||
echo "<a style='padding-top: 6px;' href='index.php?do=delpost&user=$username&pid=$postid' class='button'><i class='fa fa-trash-o'></i> Delete</a>";
|
||||
echo "<br />"; // line break
|
||||
if(file_exists("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count")) {
|
||||
$pcount = file_get_contents("ssb_db/posts/reply_" . $postowner . "_" . $postid . ".count");
|
||||
@ -1594,10 +1618,12 @@ else
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<br /><br />
|
||||
<center style="background-color: #555555; padding 3px;">Powered By SSB <?php echo $version; ?></center>
|
||||
</td></tr></table>
|
||||
<div id="footer">Powered By SSB <?php echo $version; ?></div>
|
||||
</div>
|
||||
</div> <!-- main contain -->
|
||||
|
||||
<!-- functions -->
|
||||
<script type="text/javascript" src="data/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
1
ssb_db/friends/Chraas.count
Normal file
1
ssb_db/friends/Chraas.count
Normal file
@ -0,0 +1 @@
|
||||
1
|
1
ssb_db/friends/Chraas.pending
Normal file
1
ssb_db/friends/Chraas.pending
Normal file
@ -0,0 +1 @@
|
||||
Pentium44
|
4
ssb_db/friends/Chraas.php
Normal file
4
ssb_db/friends/Chraas.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php ?>
|
||||
|
||||
<?php $friend1 = "Pentium44";
|
||||
$friend_chat_db1 = "ChraasPentium44";?>
|
1
ssb_db/friends/ChraasPentium44.count
Normal file
1
ssb_db/friends/ChraasPentium44.count
Normal file
@ -0,0 +1 @@
|
||||
1
|
1
ssb_db/friends/ChraasPentium44.php
Normal file
1
ssb_db/friends/ChraasPentium44.php
Normal file
@ -0,0 +1 @@
|
||||
<?php $msg1 = "Chraas and Pentium44 are now friends!<br />";?>
|
1
ssb_db/friends/Pentium44.count
Normal file
1
ssb_db/friends/Pentium44.count
Normal file
@ -0,0 +1 @@
|
||||
1
|
4
ssb_db/friends/Pentium44.php
Normal file
4
ssb_db/friends/Pentium44.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php ?>
|
||||
|
||||
<?php $friend1 = "Chraas";
|
||||
$friend_chat_db1 = "ChraasPentium44";?>
|
1
ssb_db/users/Chraas.name
Normal file
1
ssb_db/users/Chraas.name
Normal file
@ -0,0 +1 @@
|
||||
Chraas
|
5
ssb_db/users/Chraas.php
Normal file
5
ssb_db/users/Chraas.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$accttype = "private";
|
||||
$user_password = "4ea3488c4c0598f6fe74801098123f2e61d88b0f";
|
||||
$user_color = "ededed"; $user_fullname = "Chris Dorman"; $user_avatar = "../../data/defaultprofile.png";
|
||||
?>
|
1
ssb_db/users/Chraas.postnumber
Normal file
1
ssb_db/users/Chraas.postnumber
Normal file
@ -0,0 +1 @@
|
||||
0
|
1
ssb_db/users/Pentium44.name
Normal file
1
ssb_db/users/Pentium44.name
Normal file
@ -0,0 +1 @@
|
||||
Pentium44
|
5
ssb_db/users/Pentium44.php
Normal file
5
ssb_db/users/Pentium44.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$accttype = "private";
|
||||
$user_password = "4ea3488c4c0598f6fe74801098123f2e61d88b0f";
|
||||
$user_color = "ededed"; $user_fullname = "Chris Dorman"; $user_avatar = "../../data/defaultprofile.png";
|
||||
?>
|
1
ssb_db/users/Pentium44.postnumber
Normal file
1
ssb_db/users/Pentium44.postnumber
Normal file
@ -0,0 +1 @@
|
||||
0
|
135
style.css
135
style.css
@ -1,4 +1,61 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Ubuntu&display=swap');
|
||||
|
||||
@media only screen and (min-width: 2001px) {
|
||||
.maincontain { max-width: 1180px; }
|
||||
.contain { width: 1000px; }
|
||||
#msgs { width: 960px; }
|
||||
#navcontainer { width: 170px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 2000px) {
|
||||
.maincontain { max-width: 1180px; }
|
||||
.contain { width: 1000px; }
|
||||
#msgs { width: 960px; }
|
||||
#navcontainer { width: 170px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1400px) {
|
||||
.maincontain { max-width: 1180px; }
|
||||
.contain { width: 1000px; }
|
||||
#msgs { width: 960px; }
|
||||
#navcontainer { width: 170px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1200px) {
|
||||
.maincontain { max-width: 980px; }
|
||||
.contain { width: 800px; }
|
||||
#msgs { width: 740px; }
|
||||
#navcontainer { width: 170px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1000px) {
|
||||
.maincontain { max-width: 830px; }
|
||||
.contain { width: 650px; }
|
||||
#msgs { width: 610px; }
|
||||
#navcontainer { width: 170px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 900px) {
|
||||
.maincontain { max-width: 730px; }
|
||||
.contain { width: 550px; }
|
||||
#msgs { width: 510px; }
|
||||
#navcontainer { width: 170px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 800px) {
|
||||
.maincontain { max-width: 630px; }
|
||||
.contain { width: 460px; }
|
||||
#msgs { width: 410px; }
|
||||
#navcontainer { width: 160px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 700px) {
|
||||
.maincontain { max-width: 530px; }
|
||||
.contain { width: 360px; }
|
||||
#msgs { width: 340px; }
|
||||
#navcontainer { width: 160px; }
|
||||
}
|
||||
|
||||
html, body {
|
||||
background-color: #d5d5d5;
|
||||
background-repeat: no-repeat;
|
||||
@ -10,6 +67,7 @@ html, body {
|
||||
font-size: 18px;
|
||||
font-family: "Ubuntu", "Roboto", sans-serif;
|
||||
padding-bottom: 40px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
p {
|
||||
@ -21,15 +79,15 @@ h1 {
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 26px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 22px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
@ -48,46 +106,51 @@ h4 {
|
||||
margin: 0 auto;
|
||||
/*width: 100%;*/
|
||||
/*background-color: #ffffff;*/
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
padding-bottom: 0px;
|
||||
padding: 2px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#navcontainer {
|
||||
width: 702px;
|
||||
max-width: 702px;
|
||||
min-width: 702px;
|
||||
margin: 0 auto;
|
||||
background-color: #ffffff;
|
||||
background-color: #252525;
|
||||
box-shadow: inset -20px -20px 20px -10px #121212;
|
||||
border-radius: 8px 0 0 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
#navbar a {
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
font-family: "Ubuntu", "Roboto", sans-serif;
|
||||
font-size: 32px;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 5px;
|
||||
background-color: #ffffff;
|
||||
font-size: 14px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
color: #5577ff;
|
||||
width: 125px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#navbar a:hover {
|
||||
background-color: #999999;
|
||||
color: #323232;
|
||||
text-decoration: none;
|
||||
color: #99aaff;
|
||||
}
|
||||
|
||||
#footer {
|
||||
background-color: #121212;
|
||||
border-radius: 0 0 8px 8px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
text-align: center;
|
||||
color: #dddddd;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.notifications {
|
||||
background-color: #171717;
|
||||
border-radius: 4px;
|
||||
border: solid 1px #222222;
|
||||
padding: 4px;
|
||||
font-size: 14px;
|
||||
padding: 0px;
|
||||
margin: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table { padding: 1px; }
|
||||
tr, td { padding: 2px; }
|
||||
#containtable { padding: 0px; margin: 0; border-collapse: collapse; }
|
||||
#containtable tr, td { padding: 0px; margin: 0; vertical-align: top; }
|
||||
|
||||
textarea {
|
||||
background-color: #222222;
|
||||
@ -132,11 +195,10 @@ input, button, select, label {
|
||||
border: solid 1px #323232;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
font-size: 18px;
|
||||
border-radius: 6px;
|
||||
border-radius: 4px;
|
||||
color: #d7d7d7;
|
||||
margin: auto;
|
||||
padding: 4px;
|
||||
padding: 3px;
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -183,10 +245,9 @@ input, button, select, label {
|
||||
padding: 6px;
|
||||
border-radius: 5px 11px 11px;
|
||||
background-color: #2255ff;
|
||||
border: solid 1px #1865ff;
|
||||
margin: 2px;
|
||||
color: #ffffff;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
#msgs {
|
||||
@ -195,15 +256,12 @@ input, button, select, label {
|
||||
border: solid 1px #323232;
|
||||
padding: 6px;
|
||||
height: 400px;
|
||||
width: 578px;
|
||||
margin: auto;
|
||||
font-size: 16px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.replycontain {
|
||||
margin: 0 auto;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.attachment {
|
||||
@ -288,12 +346,9 @@ a:hover {
|
||||
}
|
||||
.contain {
|
||||
background-color: #121212;
|
||||
border: solid 1px #565656;
|
||||
width: 690px;
|
||||
max-width: 690px;
|
||||
min-width: 690px;
|
||||
margin: 0 auto;
|
||||
padding: 5px;
|
||||
border-radius: 0 8px 0 0;
|
||||
}
|
||||
|
||||
.friendslist {
|
||||
@ -314,5 +369,7 @@ a:hover {
|
||||
|
||||
.maincontain {
|
||||
margin: 0 auto;
|
||||
width: 702px;
|
||||
border: solid 1px #343434;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0px 0px 15px 5px #121212;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user