Add files via upload
This commit is contained in:
parent
0525b27115
commit
6ed09106d4
18 changed files with 2340 additions and 0 deletions
660
feed-plus/beta-testing.php
Normal file
660
feed-plus/beta-testing.php
Normal file
|
|
@ -0,0 +1,660 @@
|
|||
<?php
|
||||
$this_page = "feed";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
# # # # # # #
|
||||
# WEBSITE LOCATION #
|
||||
# # # # # # #
|
||||
if($u_siteloc != '/feed-plus') {
|
||||
$loc_desc = "browsin\' feed+ beta";
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locdesc='$loc_desc' WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locurl='/feed-plus' WHERE uid='$u_uid'");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Feed+ | Misdew.com</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="We are a fairly cool social network.">
|
||||
<meta name="keywords" content="Misdew, MD, Social, Network, Communication, 3DS, DSi, Nintendo">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta name="theme-color" content="<?php echo $meta_theme_color; ?>">
|
||||
<?php
|
||||
if($css_type == "sheet") {
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$g_sheet\">";
|
||||
}
|
||||
if($css_type == "raw") {
|
||||
echo "<style type=\"text/css\">$g_raw</style>";
|
||||
}
|
||||
?>
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<link rel="apple-touch-icon" href="/img/logo.png">
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: <?php echo $bgcolor; ?>;
|
||||
}
|
||||
#header_tds {
|
||||
color: <?php echo $tdcolor; ?> !important;
|
||||
}
|
||||
.header {
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 4px 4px rgba(0,0,0,0.23);
|
||||
}
|
||||
.feed_new_tds {
|
||||
padding: 10px;
|
||||
border-radius: 5em;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
.shout_div_contain {
|
||||
position: relative;
|
||||
width: 95%;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
border-radius: 50px;
|
||||
}
|
||||
.shout_dislike {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
bottom: -40%;
|
||||
right: 0%;
|
||||
z-index: 3;
|
||||
}
|
||||
.shout_like {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
bottom: -40%;
|
||||
left: 0%;
|
||||
z-index: 3;
|
||||
}
|
||||
.feed_cmt_btn {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
position: absolute;
|
||||
padding: 10px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
bottom: -40%;
|
||||
left:0%;
|
||||
right:0%;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
z-index: 3;
|
||||
}
|
||||
#fp_2 {
|
||||
background-color: #f7f7f7;
|
||||
background-image: url('/img/hub-bg1.png');
|
||||
background-repeat: repeat;
|
||||
}
|
||||
.feed_post, .ptb3_td1, .ptb3_td2, .ptb3_td3 {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
.feed_parea {
|
||||
background-image: url('/img/hub-bg1.png');
|
||||
background-repeat: repeat;
|
||||
background-color: #f7f7f7;
|
||||
color: #000;
|
||||
}
|
||||
::-webkit-input-placeholder {
|
||||
color: #808080;
|
||||
}
|
||||
:-moz-placeholder {
|
||||
color: #808080;
|
||||
opacity: 1;
|
||||
}
|
||||
::-moz-placeholder {
|
||||
color: #808080;
|
||||
opacity: 1;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
color: #808080;
|
||||
}
|
||||
.feed_search {
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
width: 90%;
|
||||
font-family: 'Dosis', sans-serif;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
padding: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<?php
|
||||
$back_button = true;
|
||||
$linebreak = true;
|
||||
$alerts = true;
|
||||
require_once("../inc/header.php");
|
||||
?>
|
||||
<div id="feed_search_bar" style="display: none; padding-bottom: 10px;">
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; border-radius: 20px; color: #808080; padding: 3px; padding-left: 8px;padding-right: 8px;background-color: #fff;text-align: center;width: 90%; max-width: 300px;">
|
||||
<table style="border-radius: 20px; color: #808080; border-spacing: 0px; padding: 3px; padding-left: 8px;padding-right: 8px;background-color: #fff;text-align: center;width: 90%; max-width: 300px;">
|
||||
<tr>
|
||||
<td style="border-radius: 20px;text-align: center; background-color: #fff;">
|
||||
<i class="fa fa-search"></i>
|
||||
</td>
|
||||
<td style="border-radius: 20px;width: 100%; text-align: center; background-color: #fff;">
|
||||
<input name="search_input" id="search_input" class="feed_search" type="text" placeholder="search for posts, tags, users">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="feed_sresults" style="display: none;">
|
||||
<table style="border-top: 1px solid #e7e7e7; border-spacing: 0px; padding-top: 0px; padding-left: 8px;padding-right: 8px;text-align: center;width: 100%;">
|
||||
<tr>
|
||||
<td style="font-size: 12px; width: 100%; text-align: left; background-color: #fff;">
|
||||
coming soon
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="postIt" style="display: none; padding-bottom: 10px;">
|
||||
<form id="feed_form" method="post" action="ppost.php">
|
||||
<table class="postbox_tb" style="border-top-left-radius: 1em; border-top-right-radius: 1em; background-color: #f7f7f7; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<tr>
|
||||
<td>
|
||||
<textarea id="fpostb" name="post" rows="4" class="feed_parea" placeholder="type something..."></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="postbox_tb" id="postbox_tb2" style="background-color: <?php echo $u_ucolor; ?> !important; color: <?php echo $u_tcolor; ?> !important; border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; padding-top: 5px; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<td class="postbox2_td">
|
||||
<span id="vloader"><i onclick="var log_conf=confirm('Upload a video?\nMP4 Files Only');if(log_conf == true){selectVid();};" id="vPath" class="fa fa-film" aria-hidden="true" style="color: <?php echo $u_tcolor; ?> !important;"></i></span>
|
||||
</td>
|
||||
<td class="postbox2_td2">
|
||||
<input type="submit" value="post" class="postbox_sub" style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: <?php echo $u_ucolor; ?> !important; color: <?php echo $u_tcolor; ?> !important; border: 1px solid <?php echo $u_tcolor; ?> !important;">
|
||||
</td>
|
||||
<td class="postbox2_td">
|
||||
<span id="loader"><i onclick="var log_conf=confirm('Upload an image?');if(log_conf == true){selectFile();};" id="fPath" class="fa fa-image" aria-hidden="true" style="color: <?php echo $u_tcolor; ?> !important;"></i></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="newPstBar" style="display: visible;">
|
||||
<table style="width: 80%; max-width: 400px; border-spacing: 10px; font-family: 'Dosis', sans-serif; text-align: center;">
|
||||
<tr>
|
||||
<td onclick="writePost();fpostb.focus();" class="feed_new_tds" style="background-color: #ff3c64;">
|
||||
<i class="fa fa-align-left"></i> Post
|
||||
</td>
|
||||
<td onclick="alert('Polls are being upgraded.');" class="feed_new_tds" style="background-color: #ff3c64;">
|
||||
<i class="fa fa-bar-chart"></i> Poll
|
||||
</td>
|
||||
<td onclick="XpandSearch('feed_search_bar');" class="feed_new_tds" style="background-color: #ff3c64;">
|
||||
<i class="fa fa-search"></i> Search
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="font-size: 12px; font-family: 'Dosis', sans-serif; color: #808080; padding-top: 8px; width: 95%; max-width: 500px;">
|
||||
<i class="fa fa-rss"></i> sorted by newest <br>
|
||||
<!--<i class="fa fa-clock-o"></i> sorted by oldest-->
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-top-left-radius: 1em;border-top-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #53c5bf; width: 95%; max-width: 500px; background-color: #333;">
|
||||
<table style="width: 100%; padding: 10px; padding-top: 5px; padding-bottom: 5px;text-align: left;">
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-align-left"></i>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<div style="position: relative; width: 36px; height: 36px; border-radius: 50px;">
|
||||
<div style="background-color: #00FF00; border: 2px solid #333; position: absolute; width: 8px; height: 8px; border-radius: 50px; display: inline-block; bottom: 0; right: 0; z-index: 3;">
|
||||
</div>
|
||||
<img onclick="window.location='/canvas/Lock';" src="https://misdew.com/img/uploads/51__pjKI3mMhNEnbiA.gif" class="list_picture">
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 100%;font-weight: bold;text-align: left;">
|
||||
Lock <i class="fa fa-check-circle"></i> <span style="font-weight: normal; font-size: 12px;">• 32m ago</span>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;"></td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-trash"></i>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;"></td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-external-link-square"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;">
|
||||
<table style="width: 100%; padding: 10px; text-align: left;">
|
||||
<tr>
|
||||
<td>
|
||||
Hello, <br> welcome to the new feed. <br> This post isn't real and was made by <b>@Seledity</b>. <br><br> G'day.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #cecece; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #808080; width: 95%; max-width: 500px; background-color: #E5E5E5;">
|
||||
<table style="font-size: 13px; color: #808080; text-align: center; width: 100%; padding: 10px; padding-bottom: 0px; padding-top: 0px; text-align: left;">
|
||||
<tr>
|
||||
<td style="text-align: left; width: 33.3333333333%;">
|
||||
<b>2</b> likes
|
||||
</td>
|
||||
<td style="text-align: center; width: 33.3333333333%;">
|
||||
<b>0</b> comments
|
||||
</td>
|
||||
<td style="text-align: right; width: 33.3333333333%;">
|
||||
<b>2</b> dislikes
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shout_div_contain">
|
||||
<div class="shout_like" style="background-color: #53c5bf;"><i class="fa fa-thumbs-up" style="color: #333;"></i></div>
|
||||
<div onclick="showComments('show_comments_1234','1234','#333','#53c5bf');" id="cmtbtn_1234" class="feed_cmt_btn" style="background-color: #333"><i id="cmtbtxt_1234" class="fa fa-comment" style="color: #53c5bf;"></i></div>
|
||||
<div class="shout_dislike" style="background-color: #333;"><i class="fa fa-thumbs-down" style="color: #53c5bf;"></i></div>
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: #333; font-family: 'Dosis', sans-serif; padding: 8px; color: #fff;">
|
||||
|
||||
</div></div>
|
||||
<div id="show_comments_1234" style="display: none; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-bottom-left-radius: 1em;border-bottom-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;">
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #333; width: 100%; background-color: #53c5bf;">
|
||||
<table style="width: 100%; text-align: left;padding-top: 12px;">
|
||||
<tr>
|
||||
<td style="color: #333; font-size: 12px;">
|
||||
liked by <b>Seledity</b>, <b>Lock</b> <br>
|
||||
disliked by <b>Makari</b>, <b>R</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="box-shadow: 0 1px 6px rgba(0,0,0,0.16), 0 1px 6px rgba(0,0,0,0.23);padding-top: 4px; padding-bottom: 4px;text-align: left;font-family: 'Dosis', sans-serif; color: #53c5bf; width: 100%; background-color: #333;">
|
||||
<table style="width: 100%; color: #53c5bf; padding-right: 8px; padding-left: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-image"></i>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<i class="fa fa-film"></i>
|
||||
</td>
|
||||
<td style="width: 100%;word-break:break-word;">
|
||||
<div name="body" class="comment_" id="comment_" placeholder="write a comment..." style="width: 98%;padding: 8px;font-family: 'Dosis', sans-serif; font-size: 15px; color: #53c5bf; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: none; background-color: #333; outline: none; text-align: left;" contenteditable>
|
||||
write something...
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left: 8px;">
|
||||
<i class="fa fa-paper-plane"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
comments will look the same
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-top-left-radius: 1em;border-top-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #F9F891; width: 95%; max-width: 500px; background-color: #15284F;">
|
||||
<table style="width: 100%; padding: 10px; padding-top: 5px; padding-bottom: 5px;text-align: left;">
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-bar-chart"></i>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<div style="position: relative; width: 36px; height: 36px; border-radius: 50px;">
|
||||
<div style="background-color: #00FF00; border: 2px solid #15284F; position: absolute; width: 8px; height: 8px; border-radius: 50px; display: inline-block; bottom: 0; right: 0; z-index: 3;">
|
||||
</div>
|
||||
<img onclick="window.location='/canvas/Seledity';" src="https://misdew.com/img/uploads/1__cByPFJDLVQTiK3.jpeg" class="list_picture">
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 100%;font-weight: bold;text-align: left;">
|
||||
Seledity <i class="fa fa-check-circle"></i> <span style="font-weight: normal; font-size: 12px;">• 1h ago</span>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-trash"></i>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-external-link-square"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;">
|
||||
<table style="width: 100%; padding: 10px; padding-bottom: 0px; text-align: left;">
|
||||
<tr>
|
||||
<td>
|
||||
What do you think about Feed+ so far?
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="color: #5d5d5d; border-collapse:separate; border-spacing:0 10px;width: 100%; padding: 10px; padding-top: 0px; padding-bottom: 0px; text-align: left;">
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #c0c0c0; border: 1px solid #a6a6a6; padding: 8px; border-radius: 10px;box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<span style="font-weight: normal; font-size: 12px;">50% •</span> I think that it's pretty cool.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #e1e1e1; padding: 8px; border-radius: 10px;box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<span style="font-weight: normal; font-size: 12px;">30% •</span> Ugly as fuck. Feed>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #e1e1e1; padding: 8px; border-radius: 10px;box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<span style="font-weight: normal; font-size: 12px;">20% •</span> Idgaf. Kill yourself, faggot.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 10px; padding-top: 0px; text-align: left;">
|
||||
<tr>
|
||||
<td style="font-size: 12px; color: #808080;">
|
||||
17 total votes - no time limit
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #cecece; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #808080; width: 95%; max-width: 500px; background-color: #E5E5E5;">
|
||||
<table style="font-size: 13px; color: #808080; text-align: center; width: 100%; padding: 10px; padding-bottom: 0px; padding-top: 0px; text-align: left;">
|
||||
<tr>
|
||||
<td style="text-align: left; width: 33.3333333333%;">
|
||||
<b>4</b> likes
|
||||
</td>
|
||||
<td style="text-align: center; width: 33.3333333333%;">
|
||||
<b>0</b> comments
|
||||
</td>
|
||||
<td style="text-align: right; width: 33.3333333333%;">
|
||||
<b>7</b> dislikes
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shout_div_contain">
|
||||
<div class="shout_like" style="background-color: #F9F891;"><i class="fa fa-thumbs-up" style="color: #15284F;"></i></div>
|
||||
<div onclick="showComments('show_comments_5678','5678','#15284F','#F9F891');" id="cmtbtn_5678" class="feed_cmt_btn" style="background-color: #15284F"><i id="cmtbtxt_5678" class="fa fa-comment" style="color: #F9F891;"></i></div>
|
||||
<div class="shout_dislike" style="background-color: #15284F;"><i class="fa fa-thumbs-down" style="color: #F9F891;"></i></div>
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: #15284F; font-family: 'Dosis', sans-serif; padding: 8px; color: #fff;">
|
||||
|
||||
</div></div>
|
||||
<div id="show_comments_5678" style="display: none; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-bottom-left-radius: 1em;border-bottom-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;">
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #15284F; width: 100%; background-color: #F9F891;">
|
||||
<table style="width: 100%; text-align: left;padding-top: 12px;">
|
||||
<tr>
|
||||
<td style="color: #15284F; font-size: 12px;">
|
||||
liked by <b>Seledity</b>, <b>Lock</b>, <b>Yak</b>, <b>Makari</b> <br>
|
||||
disliked by <b>xperttheef</b>, <b>R</b>, <b>sbus</b>, <b>narjis321</b>, <b>Deku</b>, <b>cooldude101</b>, <b>Todoroki</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="box-shadow: 0 1px 6px rgba(0,0,0,0.16), 0 1px 6px rgba(0,0,0,0.23);padding-top: 4px; padding-bottom: 4px;text-align: left;font-family: 'Dosis', sans-serif; color: #F9F891; width: 100%; background-color: #15284F;">
|
||||
<table style="width: 100%; color: #F9F891; padding-right: 8px; padding-left: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-image"></i>
|
||||
</td>
|
||||
<td>
|
||||
<i class="fa fa-film"></i>
|
||||
</td>
|
||||
<td style="width: 100%;word-break:break-word;">
|
||||
<div name="body" class="comment_" id="comment_" placeholder="write a comment..." style="width: 98%;padding: 8px;font-family: 'Dosis', sans-serif; font-size: 15px; color: #F9F891; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: none; background-color: #15284F; outline: none; text-align: left;" contenteditable>
|
||||
write something...
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left: 8px;">
|
||||
<i class="fa fa-paper-plane"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
comments will look the same
|
||||
</div> <br><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-top-left-radius: 1em;border-top-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #fff; width: 95%; max-width: 500px; background-color: blue;">
|
||||
<table style="width: 100%; padding: 10px; padding-top: 5px; padding-bottom: 5px;text-align: left;">
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-align-left"></i>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<div style="position: relative; width: 36px; height: 36px; border-radius: 50px;">
|
||||
<div style="background-color: #00FF00; border: 2px solid blue; position: absolute; width: 8px; height: 8px; border-radius: 50px; display: inline-block; bottom: 0; right: 0; z-index: 3;">
|
||||
</div>
|
||||
<img onclick="window.location='/canvas/xperttheef';" src="/img/logo.png" class="list_picture">
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 100%;font-weight: bold;text-align: left;">
|
||||
xperttheef <span style="font-weight: normal; font-size: 12px;">• 3h ago</span>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;"></td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-trash"></i>
|
||||
</td>
|
||||
<td style="font-weight: bold;text-align: right;"></td>
|
||||
<td style="font-weight: bold;text-align: right;">
|
||||
<i class="fa fa-external-link-square"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;">
|
||||
<table style="width: 100%; padding: 10px; text-align: left;">
|
||||
<tr>
|
||||
<td>
|
||||
plz help mi acount was haked this isnt mi <br> plez disable nordvpn hacks *cries* <br><br> This post isn't real and was made by <b>@Seledity</b>. <br><br> G'day.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="border-top: 1px solid #cecece; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #808080; width: 95%; max-width: 500px; background-color: #E5E5E5;">
|
||||
<table style="font-size: 13px; color: #808080; text-align: center; width: 100%; padding: 10px; padding-bottom: 0px; padding-top: 0px; text-align: left;">
|
||||
<tr>
|
||||
<td style="text-align: left; width: 33.3333333333%;">
|
||||
<b>1</b> like
|
||||
</td>
|
||||
<td style="text-align: center; width: 33.3333333333%;">
|
||||
<b>0</b> comments
|
||||
</td>
|
||||
<td style="text-align: right; width: 33.3333333333%;">
|
||||
<b>1</b> dislike
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="shout_div_contain">
|
||||
<div class="shout_like" style="background-color: blue;"><i class="fa fa-thumbs-up" style="color: #fff;"></i></div>
|
||||
<div onclick="showComments('show_comments_8765','8765','blue','#fff');" id="cmtbtn_8765" class="feed_cmt_btn" style="background-color: blue"><i id="cmtbtxt_8765" class="fa fa-comment" style="color: #fff;"></i></div>
|
||||
<div class="shout_dislike" style="background-color: #fff;"><i class="fa fa-thumbs-down" style="color: blue;"></i></div>
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: blue; font-family: 'Dosis', sans-serif; padding: 8px; color: #fff;">
|
||||
|
||||
</div></div>
|
||||
<div id="show_comments_8765" style="display: none; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-bottom-left-radius: 1em;border-bottom-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;">
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: blue; width: 100%; background-color: #fff;">
|
||||
<table style="width: 100%; text-align: left;padding-top: 12px;">
|
||||
<tr>
|
||||
<td style="color: blue; font-size: 12px;">
|
||||
liked by <b>xperttheef</b><br>
|
||||
disliked by <b>ponything</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="box-shadow: 0 1px 6px rgba(0,0,0,0.16), 0 1px 6px rgba(0,0,0,0.23);padding-top: 4px; padding-bottom: 4px;text-align: left;font-family: 'Dosis', sans-serif; color: #fff; width: 100%; background-color: blue;">
|
||||
<table style="width: 100%; color: #fff; padding-right: 8px; padding-left: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa fa-image"></i>
|
||||
</td>
|
||||
<td>
|
||||
<i class="fa fa-film"></i>
|
||||
</td>
|
||||
<td style="width: 100%;word-break:break-word;">
|
||||
<div name="body" class="comment_" id="comment_" placeholder="write a comment..." style="width: 98%;padding: 8px;font-family: 'Dosis', sans-serif; font-size: 15px; color: #fff; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: none; background-color: blue; outline: none; text-align: left;" contenteditable>
|
||||
write something...
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left: 8px;">
|
||||
<i class="fa fa-paper-plane"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
comments will look the same
|
||||
</div>
|
||||
|
||||
<br><div id="sdf">
|
||||
<table style="width: 60%; max-width: 300px; border-spacing: 10px; font-family: 'Dosis', sans-serif; text-align: center;">
|
||||
<tr>
|
||||
<td class="feed_new_tds" style="background-color: #ff3c64; font-size: 20px;">
|
||||
<i class="fa fa-chevron-circle-down fa-lg"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
require_once("../inc/footer.php");
|
||||
?>
|
||||
</center>
|
||||
</div>
|
||||
<script>
|
||||
function writePost() {
|
||||
Xpand('postIt');
|
||||
}
|
||||
function showComments(id, post_id, bgcolor, txtcolor) {
|
||||
var e = document.getElementById(id);
|
||||
var did = "#" + id;
|
||||
var cmt_btn_did = "cmtbtn_" + post_id;
|
||||
var cmt_btn_txt_did = "cmtbtxt_" + post_id;
|
||||
if(e.style.display == '') {
|
||||
$(did).slideUp(500);
|
||||
document.getElementById(cmt_btn_did).style.backgroundColor = bgcolor;
|
||||
document.getElementById(cmt_btn_txt_did).style.color = txtcolor;
|
||||
}
|
||||
else {
|
||||
$(did).slideDown(500);
|
||||
document.getElementById(cmt_btn_did).style.backgroundColor = txtcolor;
|
||||
document.getElementById(cmt_btn_txt_did).style.color = bgcolor;
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function Xpand(id) {
|
||||
var e = document.getElementById(id);
|
||||
var slid = "#" + id;
|
||||
if(e.style.display == '') {
|
||||
$(slid).slideUp(100);
|
||||
}
|
||||
else {
|
||||
$(slid).slideDown(100);
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function XpandSearch(id) {
|
||||
var e = document.getElementById(id);
|
||||
var hidden_id = "#" + id;
|
||||
if(e.style.display == '') {
|
||||
$(hidden_id).slideUp(100);
|
||||
}
|
||||
else {
|
||||
$(hidden_id).slideDown(100);
|
||||
document.getElementById("search_input").focus();
|
||||
e.style.display = '';
|
||||
alert('Search does not work yet.');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
56
feed-plus/button_bar.php
Normal file
56
feed-plus/button_bar.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$post_id = safe($_GET['i']);
|
||||
$feed_q = mysqli_query($conx, "SELECT * FROM feed WHERE id='$post_id'");
|
||||
$feed_r = mysqli_fetch_assoc($feed_q);
|
||||
$feed_id = $feed_r['id'];
|
||||
$feed_uid = $feed_r['uid'];
|
||||
$usri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$feed_uid' && theme_id='$g_themeid'");
|
||||
$usri_r = mysqli_fetch_assoc($usri_q);
|
||||
$username_color = $usri_r['username_color'];
|
||||
$feed_tcolor = $usri_r['text_color'];
|
||||
// If a post has more than one comment, set an 's' variable
|
||||
$comcnt_q = mysqli_query($conx, "SELECT id FROM feed_comments WHERE post_id='$feed_id'");
|
||||
$comcnt_r = number_format(mysqli_num_rows($comcnt_q));
|
||||
if($comcnt_r == '1') { $cs = ""; } else { $cs = "s"; } // comment(s)
|
||||
// If a post has more than one like, set an 's' variable
|
||||
$likcnt_q = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id'");
|
||||
$likcnt_r = number_format(mysqli_num_rows($likcnt_q));
|
||||
if($likcnt_r == '1') { $ls = ""; } else { $ls = "s"; } // like(s)
|
||||
// If a post has more than one dislike, set an 's' variable
|
||||
$dlikcnt_q = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id'");
|
||||
$dlikcnt_r = number_format(mysqli_num_rows($dlikcnt_q));
|
||||
if($dlikcnt_r == '1') { $dls = ""; } else { $dls = "s"; } // dislike(s)
|
||||
# SEE IF A USER HAS LIKED OR DISLIKED POSTS
|
||||
# SET THE COLOR OF THE BUBBLES ACCORDINGLY
|
||||
$did_user_like = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id' && uid='$u_uid'"));
|
||||
if($did_user_like >= '1') {
|
||||
$post_like_color = "$username_color";
|
||||
$post_like_bgcolor = "$feed_tcolor";
|
||||
}
|
||||
else {
|
||||
$post_like_color = "$feed_tcolor";
|
||||
$post_like_bgcolor = "$username_color";
|
||||
}
|
||||
$did_user_dislike = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id' && uid='$u_uid'"));
|
||||
if($did_user_dislike >= '1') {
|
||||
$post_dislike_color = "$username_color";
|
||||
$post_dislike_bgcolor = "$feed_tcolor";
|
||||
}
|
||||
else {
|
||||
$post_dislike_color = "$feed_tcolor";
|
||||
$post_dislike_bgcolor = "$username_color";
|
||||
}
|
||||
echo "
|
||||
|
||||
<div onclick=\"postLike('$feed_id')\" id=\"lpost_id_$feed_id\" class=\"feedp_like\" style=\"background-color: $post_like_bgcolor;\"><i class=\"fa fa-thumbs-up\" style=\"color: $post_like_color;\"></i></div>
|
||||
<div onclick=\"showComments('show_comments_$feed_id','$feed_id','$username_color','$feed_tcolor');\" id=\"cmtbtn_$feed_id\" class=\"feed_cmt_btn\" style=\"background-color: $username_color\"><i id=\"cmtbtxt_$feed_id\" class=\"fa fa-comment\" style=\"color: $feed_tcolor;\"></i></div>
|
||||
<div onclick=\"postDislike('$feed_id')\" id=\"dpost_id_$feed_id\" class=\"feedp_dislike\" style=\"background-color: $post_dislike_bgcolor;\"><i class=\"fa fa-thumbs-down\" style=\"color: $post_dislike_color;\"></i></div>
|
||||
|
||||
";
|
||||
|
||||
?>
|
||||
5
feed-plus/contamnt.php
Normal file
5
feed-plus/contamnt.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$cntq = mysqli_query($conx, "SELECT id FROM feed");
|
||||
echo mysqli_num_rows($cntq);
|
||||
?>
|
||||
14
feed-plus/count.php
Normal file
14
feed-plus/count.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
/* Coded by Neonacid64 */
|
||||
require_once("../inc/conx.php");
|
||||
$id = safe($_GET['id']);
|
||||
|
||||
$likcnt_q = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$id'");
|
||||
$likcnt_r = number_format(mysqli_num_rows($likcnt_q));
|
||||
if($likcnt_r != '1') {
|
||||
$dlsz = "s";
|
||||
}
|
||||
|
||||
echo "<span style=\"font-weight: bold;\">$likcnt_r</span> like$dlsz";
|
||||
|
||||
?>
|
||||
14
feed-plus/dcount.php
Normal file
14
feed-plus/dcount.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
/* Coded by Neonacid64 */
|
||||
require_once("../inc/conx.php");
|
||||
$id = safe($_GET['id']);
|
||||
|
||||
$dislikcnt_q = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$id'");
|
||||
$dislikcnt_r = number_format(mysqli_num_rows($dislikcnt_q));
|
||||
if($dislikcnt_r != '1') {
|
||||
$dlsz = "s";
|
||||
}
|
||||
|
||||
echo "<span style=\"font-weight: bold;\">$dislikcnt_r</span> dislike$dlsz";
|
||||
|
||||
?>
|
||||
39
feed-plus/delete.php
Normal file
39
feed-plus/delete.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
//header("location: /");
|
||||
exit();
|
||||
}
|
||||
$id = safe($_GET['id']);
|
||||
$powner = mysqli_num_rows((mysqli_query($conx, "SELECT id FROM feed WHERE uid='$u_uid' && id='$id'")));
|
||||
$psqlr = mysqli_fetch_assoc($pselc);
|
||||
if($powner == '1' && $u_cont_mang != 'yes') {
|
||||
mysqli_query($conx, "UPDATE account_figures SET activeness='$f_activeness'-.05 WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-.25 WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "DELETE FROM feed WHERE id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feed_likes WHERE post_id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feed_comments WHERE post_id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feedcmt_likes WHERE post_id='$id'");
|
||||
//header("location: /feed");
|
||||
exit();
|
||||
}
|
||||
elseif($powner == '1' && $u_cont_mang == 'yes') {
|
||||
mysqli_query($conx, "UPDATE account_figures SET activeness='$f_activeness'-.05 WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-.25 WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "DELETE FROM feed WHERE id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feed_likes WHERE post_id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feed_comments WHERE post_id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feedcmt_likes WHERE post_id='$id'");
|
||||
//header("location: /feed");
|
||||
exit();
|
||||
}
|
||||
elseif($powner != '1' && $u_cont_mang == 'yes') {
|
||||
mysqli_query($conx, "DELETE FROM feed WHERE id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feed_likes WHERE post_id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feed_comments WHERE post_id='$id'");
|
||||
mysqli_query($conx, "DELETE FROM feedcmt_likes WHERE post_id='$id'");
|
||||
//header("location: /feed");
|
||||
exit();
|
||||
}
|
||||
exit();
|
||||
?>
|
||||
27
feed-plus/dislike.php
Normal file
27
feed-plus/dislike.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/* Coded by Neonacid64 */
|
||||
require_once("../inc/conx.php");
|
||||
$id = safe($_GET['id']);
|
||||
$is_post = safe($_GET['post']);
|
||||
|
||||
$query = mysqli_query($conx, "SELECT * FROM feed_dislikes WHERE post_id = '$id' && uid = '$u_uid'");
|
||||
$amount = mysqli_num_rows($query);
|
||||
if($u_token == safe($_GET['token'])){
|
||||
if($amount == 0){
|
||||
mysqli_query($conx, "INSERT INTO feed_dislikes (uid, post_id) VALUES ('$u_uid', '$id')");
|
||||
}else{
|
||||
mysqli_query($conx, "DELETE FROM feed_dislikes WHERE uid = '".$u_uid."' AND post_id = '$id'");
|
||||
}
|
||||
$querytwo = mysqli_query($conx, "SELECT * FROM feed_dislikes WHERE post_id = '$id' && uid = '".$u_uid."'");
|
||||
$amounttwo = mysqli_num_rows($querytwo);
|
||||
$likcnt_q = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$id'");
|
||||
$likcnt_r = number_format(mysqli_num_rows($likcnt_q));
|
||||
if($likcnt_r != '1') {
|
||||
$lsz = "s";
|
||||
}
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
// dis code is end
|
||||
?>
|
||||
93
feed-plus/feed_comments.php
Normal file
93
feed-plus/feed_comments.php
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$post_id = safe($_GET['i']);
|
||||
# SELECT COMMENTS
|
||||
$cmt_cnt = mysqli_num_rows($cmt_q = mysqli_query($conx, "SELECT id,uid,post,tstamp,random_str,edited FROM feed_comments WHERE post_rstr='$post_id' ORDER BY id DESC"));
|
||||
if($cmt_cnt == 0) {
|
||||
echo "<div style=\"padding: 8px; color: #808080;\">no comments <i class=\"fa fa-frown-o\" aria-hidden=\"true\"></i></div>";
|
||||
exit();
|
||||
}
|
||||
while($cmt_r = mysqli_fetch_assoc($cmt_q)) {
|
||||
$cmt_id = $cmt_r['id'];
|
||||
$cmt_uid = $cmt_r['uid'];
|
||||
$string = $cmt_r['post'];
|
||||
$cmt_tstamp = $cmt_r['tstamp'];
|
||||
$cmt_randomstr = $cmt_r['random_str'];
|
||||
$cmt_edited = $cmt_r['edited'];
|
||||
// ************************ //
|
||||
// *** BLOCKING SYSTEM *** //
|
||||
// ************************ //
|
||||
$blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$cmt_uid'");
|
||||
$blkc = mysqli_num_rows($blks);
|
||||
if($blkc > 0) {
|
||||
$cmt_uid = "286";
|
||||
}
|
||||
$blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$cmt_uid'");
|
||||
$blkc = mysqli_num_rows($blks);
|
||||
if($blkc > 0) {
|
||||
$cmt_uid = "286";
|
||||
}
|
||||
// ************************ //
|
||||
// *** BLOCKING SYSTEM *** //
|
||||
// ************************ //
|
||||
include("../inc/replace.php");
|
||||
$usr_q = mysqli_query($conx, "SELECT username,picture,online_time,md_verf FROM accounts WHERE uid='$cmt_uid'");
|
||||
while($usr_r = mysqli_fetch_assoc($usr_q)) {
|
||||
$cmt_username = $usr_r['username'];
|
||||
$cmt_pic = $usr_r['picture'];
|
||||
$cmt_onltime = $usr_r['online_time'];
|
||||
$feed_vrf = $usr_r['md_verf'];
|
||||
if($feed_vrf == 'yes') {
|
||||
$verif_check = "<i style=\"font-size: 14px;\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i> ";
|
||||
}
|
||||
else {
|
||||
$verif_check = "";
|
||||
}
|
||||
//
|
||||
// DATA SAVER
|
||||
if($u_datasaver == 'on') {
|
||||
$cmt_pic = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABtklEQVR4AW1TNXgUYRC9HqdvoYW+PT/c3Z0KWvqWLp7drCvuDg3uVNEGh3hyro8ZLGuz31v7n/waW33i9H/oq7SlxmrjCOGBudocI5T5yd/8n9u9fI9QX0GEG0SuEPAbq/j5F/yf2pnnE9OPldT4gQAvzu88D3ON/x/zmP9brP3p6nUvwcgZuHLsCj49/4RrJ67xt8+A+ayL0cvRYFftjRZG7o+Aa+TBCMwNofQK61h83+e6ysCLzhdo1Brg4uejs4+gZJRg+v0YvYx6u3vz1E0Uxgrw1sTnCej7dch+g1EWlzxuGLg5gKh67bxGZ6ITSlb9Jy7PJfNYt9oYGx5DVH0f+I7edQJ6UwLUnMpBo3NjJrG11cLo8Gi0ePA7hPUihJQIKSuzwV3fbNP045X5Ci26gvXMeIbuZA+kjAwlpxTVVco+3zrzTGtbNby79g6lfAnNZhPF2SJeX3mN3o29ENN9LIS6SnWVVfLC0A5jA2mNBOOkAeeMC+mIjPZ0B3cXclYGJT4hLPfvbTbw7G0tq0FIiuhO9HAij7NIqSYJl3n3ttcgdKpoYsb6MtIdKSvtknPSfC//FxxTQV29mEp6AAAAAElFTkSuQmCC";
|
||||
}
|
||||
// DATA SAVER
|
||||
//
|
||||
$HUAHHH = time() - $cmt_onltime;
|
||||
$mens = round($HUAHHH / 60);
|
||||
if($mens <= 1) {
|
||||
$cv_activeness = "#00FF00";
|
||||
}
|
||||
elseif($mens <= 2) {
|
||||
$cv_activeness = "#FFA500";
|
||||
}
|
||||
elseif($mens < 5) {
|
||||
$cv_activeness = "#FF0000";
|
||||
}
|
||||
else {
|
||||
$cv_activeness = "#FF0000";
|
||||
}
|
||||
$usri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$cmt_uid' && theme_id='$g_themeid'");
|
||||
while($usri_r = mysqli_fetch_assoc($usri_q)) {
|
||||
$username_color = $usri_r['username_color'];
|
||||
$cmt_tcolor = $usri_r['text_color'];
|
||||
}
|
||||
}
|
||||
if($cmt_uid != '286') {
|
||||
echo "<table style=\"padding-bottom: 5px; padding-top: 5px; font-family: 'Dosis', sans-serif; width: 100%;\"><tr><td>
|
||||
<div style=\"position: relative; width: 36px; height: 36px; border-radius: 50px;\">
|
||||
<div style=\"background-color: $cv_activeness; border: 2px solid #fff; position: absolute; width: 8px; height: 8px; border-radius: 50px; display: inline-block; bottom: 0; right: 0; z-index: 3;\"></div> <img onclick=\"window.open('/canvas/$cmt_username');\" src=\"$cmt_pic\" class=\"list_picture\"></div></td>";
|
||||
echo "<td style=\"width: 100%; text-align: left;\"><span onclick=\"window.open('/canvas/$cmt_username');\" style=\"color: $username_color; font-weight: bold;\">$cmt_username $verif_check</span>";
|
||||
echo "<span class=\"tago\" style=\"font-size: 9px;\"> • ";
|
||||
echo timeago($cmt_tstamp);
|
||||
echo " ago</span> ";
|
||||
if($cmt_uid == $u_uid) {
|
||||
echo " <i onclick=\"window.open('edit_comment.php?i=$cmt_randomstr');\" class=\"fa fa-pencil\" aria-hidden=\"true\" style=\"font-size: 13px; color: $username_color\"></i> ";
|
||||
echo "<i onclick=\"dComment('$post_id', '$cmt_id');\" class=\"fa fa-trash\" aria-hidden=\"true\" style=\"font-size: 13px; color: $username_color\"></i>";
|
||||
}
|
||||
echo "<br><span style=\"font-size: 14px;\">"; echo bbc(atname(nl2br($string))); echo "</span>";
|
||||
echo "</td></tr></table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
30
feed-plus/img_upload.php
Normal file
30
feed-plus/img_upload.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$uploc = "Feed";
|
||||
if ( isset($_FILES['img']) ) {
|
||||
$filename = $_FILES['img']['tmp_name'];
|
||||
$handle = fopen($filename, "r");
|
||||
$data = fread($handle, filesize($filename));
|
||||
$required_key = "ur own key here please edit it";
|
||||
$POST_DATA = array(
|
||||
'file' => base64_encode($data),
|
||||
'key' => urlencode($required_key),
|
||||
'user' => urlencode($u_uid),
|
||||
'imagetype' => urlencode($u_uid),
|
||||
'imaeg' => urlencode($u_cloudterms),
|
||||
'fieltyp' => urlencode($u_cloudterms),
|
||||
'usernaem' => urlencode($u_username),
|
||||
'filextension' => urlencode($u_username),
|
||||
'uvia' => urlencode($uploc)
|
||||
);
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, 'https://upl.justa.us/image.php');
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $POST_DATA);
|
||||
$response = curl_exec($curl);
|
||||
echo trim($response);
|
||||
curl_close ($curl);
|
||||
}
|
||||
?>
|
||||
|
|
@ -1 +1,626 @@
|
|||
<?php
|
||||
$this_page = "feed";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
# # # # # # #
|
||||
# WEBSITE LOCATION #
|
||||
# # # # # # #
|
||||
if($u_siteloc != '/feed-plus') {
|
||||
$loc_desc = "browsin\' feed+ beta";
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locdesc='$loc_desc' WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locurl='/feed-plus' WHERE uid='$u_uid'");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Feed+ | Misdew.com</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="We are a fairly cool social network.">
|
||||
<meta name="keywords" content="Misdew, MD, Social, Network, Communication, 3DS, DSi, Nintendo">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta name="theme-color" content="<?php echo $meta_theme_color; ?>">
|
||||
<?php
|
||||
if($css_type == "sheet") {
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$g_sheet\">";
|
||||
}
|
||||
if($css_type == "raw") {
|
||||
echo "<style type=\"text/css\">$g_raw</style>";
|
||||
}
|
||||
?>
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<link rel="apple-touch-icon" href="/img/logo.png">
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: <?php echo $bgcolor; ?>;
|
||||
}
|
||||
#header_tds {
|
||||
color: <?php echo $tdcolor; ?> !important;
|
||||
}
|
||||
.header {
|
||||
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 4px 4px rgba(0,0,0,0.23);
|
||||
}
|
||||
.feed_new_tds {
|
||||
padding: 10px;
|
||||
border-radius: 5em;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
.feedp_div_contain {
|
||||
position: relative;
|
||||
width: 95%;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
border-radius: 50px;
|
||||
}
|
||||
.feedp_dislike {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
bottom: -90%;
|
||||
right: 0%;
|
||||
z-index: 3;
|
||||
}
|
||||
.feedp_like {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
bottom: -90%;
|
||||
left: 0%;
|
||||
z-index: 3;
|
||||
}
|
||||
.feed_cmt_btn {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
position: absolute;
|
||||
padding: 10px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
font-size: 20px;
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
bottom: -90%;
|
||||
left:0%;
|
||||
right:0%;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
z-index: 3;
|
||||
}
|
||||
#fp_2 {
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
.feed_post, .ptb3_td1, .ptb3_td2, .ptb3_td3 {
|
||||
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
|
||||
}
|
||||
.feed_parea {
|
||||
background-color: #f7f7f7;
|
||||
color: #000;
|
||||
}
|
||||
::-webkit-input-placeholder {
|
||||
color: #808080;
|
||||
}
|
||||
:-moz-placeholder {
|
||||
color: #808080;
|
||||
opacity: 1;
|
||||
}
|
||||
::-moz-placeholder {
|
||||
color: #808080;
|
||||
opacity: 1;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
color: #808080;
|
||||
}
|
||||
.feed_search {
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
width: 90%;
|
||||
font-family: 'Dosis', sans-serif;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
padding: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<?php
|
||||
$back_button = true;
|
||||
$linebreak = true;
|
||||
$alerts = true;
|
||||
require_once("../inc/header.php");
|
||||
?>
|
||||
<div id="feed_search_bar" style="display: none; padding-bottom: 10px;">
|
||||
<div style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; border-radius: 20px; color: #808080; padding: 3px; padding-left: 8px;padding-right: 8px;background-color: #fff;text-align: center;width: 90%; max-width: 300px;">
|
||||
<table style="border-radius: 20px; color: #808080; border-spacing: 0px; padding: 3px; padding-left: 8px;padding-right: 8px;background-color: #fff;text-align: center;width: 90%; max-width: 300px;">
|
||||
<tr>
|
||||
<td style="border-radius: 20px;text-align: center; background-color: #fff;">
|
||||
<i class="fa fa-search"></i>
|
||||
</td>
|
||||
<td style="border-radius: 20px;width: 100%; text-align: center; background-color: #fff;">
|
||||
<input name="search_input" id="search_input" class="feed_search" type="text" placeholder="search for posts, tags, users">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="feed_sresults" style="display: none;">
|
||||
<table style="border-top: 1px solid #e7e7e7; border-spacing: 0px; padding-top: 0px; padding-left: 8px;padding-right: 8px;text-align: center;width: 100%;">
|
||||
<tr>
|
||||
<td style="font-size: 12px; width: 100%; text-align: left; background-color: #fff;">
|
||||
coming soon
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="postIt" style="display: none; padding-bottom: 10px;">
|
||||
<form id="feed_form" method="post" action="submit_post.php">
|
||||
<table class="postbox_tb" style="border-top-left-radius: 1em; border-top-right-radius: 1em; background-color: #f7f7f7; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<tr>
|
||||
<td>
|
||||
<textarea id="fpostb" name="post" rows="4" class="feed_parea" placeholder="type something..."></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="postbox_tb" id="postbox_tb2" style="background-color: <?php echo $u_ucolor; ?> !important; color: <?php echo $u_tcolor; ?> !important; border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; padding-top: 5px; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);">
|
||||
<td class="postbox2_td">
|
||||
<span id="vloader"><i onclick="selectVid();" id="vPath" class="fa fa-film" aria-hidden="true" style="color: <?php echo $u_tcolor; ?> !important;"></i></span>
|
||||
</td>
|
||||
<td class="postbox2_td2">
|
||||
<input type="submit" value="post" class="postbox_sub" style="box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: <?php echo $u_ucolor; ?> !important; color: <?php echo $u_tcolor; ?> !important; border: 1px solid <?php echo $u_tcolor; ?> !important;">
|
||||
</td>
|
||||
<td class="postbox2_td">
|
||||
<span id="loader"><i onclick="selectFile();" id="fPath" class="fa fa-image" aria-hidden="true" style="color: <?php echo $u_tcolor; ?> !important;"></i></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<form id="imgUpl" action="img_upload.php" enctype="multipart/form-data" method="post">
|
||||
<input id="fBrowse" name="img" type="file" style="display: none;">
|
||||
</form>
|
||||
<form id="vidUpl" action="vid_upload.php" enctype="multipart/form-data" method="post">
|
||||
<input id="vBrowse" name="vid" type="file" style="display: none;">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="newPstBar" style="display: visible;">
|
||||
<table style="width: 80%; max-width: 400px; border-spacing: 10px; font-family: 'Dosis', sans-serif; text-align: center;">
|
||||
<tr>
|
||||
<td onclick="XpandPosting('postIt');" class="feed_new_tds" style="background-color: #ff3c64;">
|
||||
<i class="fa fa-align-left"></i> Post
|
||||
</td>
|
||||
<td onclick="alert('Polls are being upgraded.');" class="feed_new_tds" style="background-color: #ff3c64;">
|
||||
<i class="fa fa-bar-chart"></i> Poll
|
||||
</td>
|
||||
<td onclick="XpandSearch('feed_search_bar');" class="feed_new_tds" style="background-color: #ff3c64;">
|
||||
<i class="fa fa-search"></i> Search
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div onclick="toggleSort();" style="font-size: 12px; font-family: 'Dosis', sans-serif; color: #808080; padding-top: 8px; width: 95%; max-width: 500px;">
|
||||
<span id="feedp_sort_toggled">
|
||||
<i class="fa fa-rss"></i> sorted by newest <br>
|
||||
</span>
|
||||
<input type="text" value="newest" name="feedp_sort" id="feedp_sort" style="display: none;">
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
echo "<div id=\"contained_posts\">";
|
||||
$asc_or_dsc = "ASC";
|
||||
require_once("posts.php");
|
||||
echo "</div>";
|
||||
?>
|
||||
|
||||
<input id="amount" type="hidden" value="15">
|
||||
<div id="load_more">
|
||||
<table onclick="morePosts();" style="width: 60%; max-width: 300px; border-spacing: 10px; font-family: 'Dosis', sans-serif; text-align: center;">
|
||||
<tr>
|
||||
<td class="feed_new_tds" style="background-color: #ff3c64; font-size: 20px;">
|
||||
<i class="fa fa-chevron-circle-down fa-lg"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("../inc/footer.php");
|
||||
?>
|
||||
</center>
|
||||
</div>
|
||||
<script>
|
||||
// THE FOLLOWING SCRIPT WAS
|
||||
// MADE BY MARIOERMANDO
|
||||
// GIVEN BY ANGEL
|
||||
// PERFECTED BY JUSTIN
|
||||
function postLike(id,poster_bgcolor,poster_txtcolor) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
var a = new XMLHttpRequest();
|
||||
var btnbar = new XMLHttpRequest();
|
||||
var likes = id;
|
||||
var count = document.getElementById("likecnt_" + likes);
|
||||
var buttnbar = document.getElementById("pbutton_bar_" + likes);
|
||||
xhr.open("GET", "like.php?id=" + likes + "&_t=" + Math.random() + "&token=<?php echo $u_token; ?>", true);
|
||||
xhr.onreadystatechange = function(){
|
||||
if (xhr.readyState == 4)
|
||||
if(xhr.status == 200) {
|
||||
//btn.innerHTML = xhr.responseText;
|
||||
}
|
||||
a.open("GET", "count.php?id=" + likes, true);
|
||||
a.onreadystatechange = function(){
|
||||
if (a.readyState == 4)
|
||||
if(a.status == 200) {
|
||||
var post_cmt_id = "show_comments_" + likes;
|
||||
closeComments(post_cmt_id, likes, poster_bgcolor, poster_txtcolor);
|
||||
count.innerHTML = a.responseText;
|
||||
updLiked(likes);
|
||||
//updInfosies(btn.id.match(/([0-9]*)$/)[0]);
|
||||
}
|
||||
else{
|
||||
count.innerHTML = a.responseText;
|
||||
updLiked(likes);
|
||||
//updInfosies(btn.id.match(/([0-9]*)$/)[0]);
|
||||
//alert("error");
|
||||
//count.innerHTML = "error";
|
||||
}
|
||||
};
|
||||
a.send();
|
||||
// button bar color changing vvv
|
||||
btnbar.open("GET", "button_bar.php?i=" + likes, true);
|
||||
btnbar.onreadystatechange = function(){
|
||||
if (btnbar.readyState == 4)
|
||||
if(btnbar.status == 200) {
|
||||
buttnbar.innerHTML = btnbar.responseText;
|
||||
//
|
||||
}
|
||||
else{
|
||||
//count.innerHTML = btnbar.responseText;
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
//count.innerHTML = "error";
|
||||
}
|
||||
};
|
||||
btnbar.send();
|
||||
// button bar color changing ^^^
|
||||
};
|
||||
xhr.send();
|
||||
count.innerHTML = "...";
|
||||
return false;
|
||||
}
|
||||
function postDislike(id,poster_bgcolor,poster_txtcolor) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
var a = new XMLHttpRequest();
|
||||
var btnbar = new XMLHttpRequest();
|
||||
var likes = id;
|
||||
var count = document.getElementById("dlikecnt_" + likes);
|
||||
var buttnbar = document.getElementById("pbutton_bar_" + likes);
|
||||
xhr.open("GET", "dislike.php?id=" + likes + "&_t=" + Math.random() + "&token=<?php echo $u_token; ?>", true);
|
||||
xhr.onreadystatechange = function(){
|
||||
if (xhr.readyState == 4)
|
||||
if(xhr.status == 200) {
|
||||
//btn.innerHTML = xhr.responseText;
|
||||
}
|
||||
a.open("GET", "dcount.php?id=" + likes, true);
|
||||
a.onreadystatechange = function(){
|
||||
if (a.readyState == 4)
|
||||
if(a.status == 200) {
|
||||
var post_cmt_id = "show_comments_" + likes;
|
||||
closeComments(post_cmt_id, likes, poster_bgcolor, poster_txtcolor);
|
||||
count.innerHTML = a.responseText;
|
||||
updDisliked(likes);
|
||||
//updInfosies(btn.id.match(/([0-9]*)$/)[0]);
|
||||
}
|
||||
else{
|
||||
count.innerHTML = a.responseText;
|
||||
updDisliked(likes);
|
||||
//updInfosies(btn.id.match(/([0-9]*)$/)[0]);
|
||||
//alert("error");
|
||||
//count.innerHTML = "error";
|
||||
}
|
||||
};
|
||||
a.send();
|
||||
// button bar color changing vvv
|
||||
btnbar.open("GET", "button_bar.php?i=" + likes, true);
|
||||
btnbar.onreadystatechange = function(){
|
||||
if (btnbar.readyState == 4)
|
||||
if(btnbar.status == 200) {
|
||||
buttnbar.innerHTML = btnbar.responseText;
|
||||
//
|
||||
}
|
||||
else{
|
||||
//count.innerHTML = btnbar.responseText;
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
//count.innerHTML = "error";
|
||||
}
|
||||
};
|
||||
btnbar.send();
|
||||
// button bar color changing ^^^
|
||||
};
|
||||
xhr.send();
|
||||
count.innerHTML = "...";
|
||||
return false;
|
||||
}
|
||||
var Del = document.querySelectorAll("i[id^=pdel_]");
|
||||
[].forEach.call(Del, function(dt){
|
||||
dt.onclick = function(e){
|
||||
if (confirm("Delete?")) {
|
||||
var dto = new XMLHttpRequest();
|
||||
dto.open("GET", "delete.php?id=" + dt.id.match(/([0-9]*)$/)[0], true);
|
||||
dto.onreadystatechange = function(){
|
||||
if (dto.readyState == 4)
|
||||
if(dto.status == 200) {
|
||||
upPosts();
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
};
|
||||
dto.send();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
});
|
||||
function toggleSort() {
|
||||
var sort_view = document.getElementById("feedp_sort").value;
|
||||
if(sort_view === "newest") {
|
||||
document.getElementById("amount").value = Number(15);
|
||||
document.getElementById("feedp_sort").value = "oldest";
|
||||
document.getElementById('feedp_sort_toggled').innerHTML = "<i class=\"fa fa-clock-o\"></i> sorted by oldest <br>";
|
||||
$.get("posts.php?s=ASC", function(d) {
|
||||
$("#contained_posts").html(d);
|
||||
});
|
||||
}
|
||||
if(sort_view === "oldest") {
|
||||
document.getElementById("amount").value = Number(15);
|
||||
document.getElementById("feedp_sort").value = "newest";
|
||||
document.getElementById('feedp_sort_toggled').innerHTML = "<i class=\"fa fa-rss\"></i> sorted by newest <br>";
|
||||
$.get("posts.php?s=DESC", function(d) {
|
||||
$("#contained_posts").html(d);
|
||||
});
|
||||
}
|
||||
}
|
||||
$("#feed_form").submit(function(e){
|
||||
e.preventDefault();
|
||||
if($("textarea[name=post]").val().trim() == "")
|
||||
return;
|
||||
$.post("submit_post.php", {
|
||||
body: $("textarea[name=post]").val(),
|
||||
submit: "send"}, function(data) {
|
||||
if(data != '') {
|
||||
upPosts();
|
||||
$("textarea[name=post]").val("");
|
||||
XpandPosting('postIt');
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
});
|
||||
});
|
||||
function upPosts() {
|
||||
$.get("posts.php?s=DESC", function(d) {
|
||||
document.getElementById("amount").value = Number(15);
|
||||
$("#contained_posts").html(d);
|
||||
});
|
||||
}
|
||||
function XpandPosting(id) {
|
||||
var e = document.getElementById(id);
|
||||
var hidden_id = "#" + id;
|
||||
if(e.style.display == '') {
|
||||
$(hidden_id).slideUp(100);
|
||||
}
|
||||
else {
|
||||
$(hidden_id).slideDown(100);
|
||||
document.getElementById("fpostb").focus();
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function showComments(id, post_id, bgcolor, txtcolor, rstr) {
|
||||
var e = document.getElementById(id);
|
||||
var did = "#" + id;
|
||||
var cmt_btn_did = "cmtbtn_" + post_id;
|
||||
var cmt_btn_txt_did = "cmtbtxt_" + post_id;
|
||||
if(e.style.display == '') {
|
||||
$(did).slideUp(500);
|
||||
document.getElementById(cmt_btn_did).style.backgroundColor = bgcolor;
|
||||
document.getElementById(cmt_btn_txt_did).style.color = txtcolor;
|
||||
}
|
||||
else {
|
||||
$(did).slideDown(500);
|
||||
document.getElementById(cmt_btn_did).style.backgroundColor = txtcolor;
|
||||
document.getElementById(cmt_btn_txt_did).style.color = bgcolor;
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function loadComments(cmnt_id, feedid) {
|
||||
updLiked(feedid);
|
||||
updDisliked(feedid);
|
||||
// Fetch comments for the post
|
||||
var getcmts = new XMLHttpRequest();
|
||||
getcmts.open("GET", "feed_comments.php?i=" + cmnt_id, true);
|
||||
getcmts.onreadystatechange = function(){
|
||||
if(getcmts.readyState == 4)
|
||||
if(getcmts.status == 200) {
|
||||
var inn_comments = getcmts.responseText;
|
||||
document.getElementById("load_comments_" + feedid).innerHTML = inn_comments;
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
};
|
||||
getcmts.send();
|
||||
return false;
|
||||
}
|
||||
function updDisliked(feedid) {
|
||||
// Fetch comments for the post
|
||||
var getcmts = new XMLHttpRequest();
|
||||
getcmts.open("GET", "who_disliked.php?i=" + feedid, true);
|
||||
getcmts.onreadystatechange = function(){
|
||||
if(getcmts.readyState == 4)
|
||||
if(getcmts.status == 200) {
|
||||
var inn_comments = getcmts.responseText;
|
||||
document.getElementById("dislikedby_" + feedid).innerHTML = inn_comments;
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
};
|
||||
getcmts.send();
|
||||
return false;
|
||||
}
|
||||
function updLiked(feedid) {
|
||||
// Fetch comments for the post
|
||||
var getcmts = new XMLHttpRequest();
|
||||
getcmts.open("GET", "who_liked.php?i=" + feedid, true);
|
||||
getcmts.onreadystatechange = function(){
|
||||
if(getcmts.readyState == 4)
|
||||
if(getcmts.status == 200) {
|
||||
var inn_comments = getcmts.responseText;
|
||||
document.getElementById("likedby_" + feedid).innerHTML = inn_comments;
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
};
|
||||
getcmts.send();
|
||||
return false;
|
||||
}
|
||||
function closeComments(id, post_id, bgcolor, txtcolor) {
|
||||
var e = document.getElementById(id);
|
||||
var did = "#" + id;
|
||||
var cmt_btn_did = "cmtbtn_" + post_id;
|
||||
var cmt_btn_txt_did = "cmtbtxt_" + post_id;
|
||||
$(did).slideUp(500);
|
||||
document.getElementById(cmt_btn_did).style.backgroundColor = bgcolor;
|
||||
document.getElementById(cmt_btn_txt_did).style.color = txtcolor;
|
||||
}
|
||||
function Xpand(id) {
|
||||
var e = document.getElementById(id);
|
||||
var slid = "#" + id;
|
||||
if(e.style.display == '') {
|
||||
$(slid).slideUp(100);
|
||||
}
|
||||
else {
|
||||
$(slid).slideDown(100);
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function XpandSearch(id) {
|
||||
var e = document.getElementById(id);
|
||||
var hidden_id = "#" + id;
|
||||
if(e.style.display == '') {
|
||||
$(hidden_id).slideUp(100);
|
||||
}
|
||||
else {
|
||||
$(hidden_id).slideDown(100);
|
||||
document.getElementById("search_input").focus();
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function selectFile() {
|
||||
document.getElementById('fBrowse').click();
|
||||
document.getElementById('fPath').value = document.getElementById('fBrowse').value;
|
||||
}
|
||||
var form = document.forms.namedItem("imgUpl");
|
||||
form.addEventListener('change', function(ev) {
|
||||
var username_color = "<?php echo $u_tcolor; ?>";
|
||||
var oOutput = document.querySelector("div"),
|
||||
oData = new FormData(form);
|
||||
var oReq = new XMLHttpRequest();
|
||||
if(confirm('Upload this image?')) {
|
||||
document.getElementById('loader').innerHTML = "<img src='https://i.imgur.com/pvQ0NaJ.gif' height='12' width='12' alt='' style='border:0;'>";
|
||||
oReq.open("POST", "img_upload.php", true);
|
||||
}
|
||||
else {
|
||||
form.reset();
|
||||
}
|
||||
oReq.onload = function(oEvent) {
|
||||
if(oReq.status == 200) {
|
||||
var img_url = oReq.responseText;
|
||||
if(img_url != '') {
|
||||
document.getElementById('loader').innerHTML = "<i onclick='selectFile();' id='fPath' class='fa fa-image' aria-hidden='true' style='color: " + username_color + ";'></i>";
|
||||
var atoinp = "[img]" + img_url + "[/img]";
|
||||
document.getElementById("fpostb").value = document.getElementById("fpostb").value + atoinp;
|
||||
document.getElementById("fpostb").focus();
|
||||
}
|
||||
else {
|
||||
document.getElementById('loader').innerHTML = "<i onclick='selectFile();' id='fPath' class='fa fa-exclamation' aria-hidden='true' style='color: " + username_color + ";'></i>";
|
||||
}
|
||||
upPosts();
|
||||
form.reset();
|
||||
}
|
||||
};
|
||||
oReq.send(oData);
|
||||
ev.preventDefault();
|
||||
}, false);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function selectVid() {
|
||||
document.getElementById('vBrowse').click();
|
||||
document.getElementById('vPath').value = document.getElementById('vBrowse').value;
|
||||
}
|
||||
var vform = document.forms.namedItem("vidUpl");
|
||||
vform.addEventListener('change', function(ev) {
|
||||
var username_color = "<?php echo $u_tcolor; ?>";
|
||||
var oOutput = document.querySelector("div"),
|
||||
oData = new FormData(vform);
|
||||
var oReq = new XMLHttpRequest();
|
||||
if(confirm('Upload this video?')) {
|
||||
document.getElementById('vloader').innerHTML = "<img src='https://i.imgur.com/pvQ0NaJ.gif' height='12' width='12' alt='' style='border:0;'>";
|
||||
oReq.open("POST", "vid_upload.php", true);
|
||||
}
|
||||
else {
|
||||
vform.reset();
|
||||
}
|
||||
oReq.onload = function(oEvent) {
|
||||
if(oReq.status == 200) {
|
||||
var vid_url = oReq.responseText;
|
||||
if(vid_url != '') {
|
||||
document.getElementById('vloader').innerHTML = "<i onclick='selectVid();' id='vPath' class='fa fa-film' aria-hidden='true' style='color: " + username_color + ";'></i>";
|
||||
var atoinp = "[video]" + vid_url + "[/video]";
|
||||
document.getElementById("fpostb").value = document.getElementById("fpostb").value + atoinp;
|
||||
document.getElementById("fpostb").focus();
|
||||
}
|
||||
else {
|
||||
document.getElementById('vloader').innerHTML = "<i onclick='selectVid();' id='vPath' class='fa fa-exclamation' aria-hidden='true' style='color: " + username_color + ";'></i>";
|
||||
}
|
||||
upPosts();
|
||||
vform.reset();
|
||||
}
|
||||
};
|
||||
oReq.send(oData);
|
||||
ev.preventDefault();
|
||||
}, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
27
feed-plus/like.php
Normal file
27
feed-plus/like.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/* Coded by Neonacid64 */
|
||||
require_once("../inc/conx.php");
|
||||
$id = safe($_GET['id']);
|
||||
$is_post = safe($_GET['post']);
|
||||
|
||||
$query = mysqli_query($conx, "SELECT * FROM feed_likes WHERE post_id = '$id' && uid = '$u_uid'");
|
||||
$amount = mysqli_num_rows($query);
|
||||
if($u_token == safe($_GET['token'])){
|
||||
if($amount == 0){
|
||||
mysqli_query($conx, "INSERT INTO feed_likes (uid, post_id) VALUES ('$u_uid', '$id')");
|
||||
}else{
|
||||
mysqli_query($conx, "DELETE FROM feed_likes WHERE uid = '".$u_uid."' AND post_id = '$id'");
|
||||
}
|
||||
$querytwo = mysqli_query($conx, "SELECT * FROM feed_likes WHERE post_id = '$id' && uid = '".$u_uid."'");
|
||||
$amounttwo = mysqli_num_rows($querytwo);
|
||||
$likcnt_q = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$id'");
|
||||
$likcnt_r = number_format(mysqli_num_rows($likcnt_q));
|
||||
if($likcnt_r != '1') {
|
||||
$lsz = "s";
|
||||
}
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
// dis code is end
|
||||
?>
|
||||
302
feed-plus/more_posts.php
Normal file
302
feed-plus/more_posts.php
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$sort_dora = safe($_GET['sort']);
|
||||
if($sort_dora == 'newest') { $sort_dora = "DESC"; } elseif($sort_dora == 'oldest') { $sort_dora = "ASC"; }
|
||||
$asc_or_dsc = $sort_dora;
|
||||
if($asc_or_dsc == '') {
|
||||
$asc_or_dsc = "DESC";
|
||||
}
|
||||
$amount = safe($_GET['amntcnt']);
|
||||
|
||||
# SELECT TEN POSTS FROM FEED
|
||||
$feed_q = mysqli_query($conx, "SELECT id,is_poll,uid,post,tstamp,random_str,visibility,edited,img,allow_comments FROM feed ORDER BY id $asc_or_dsc LIMIT $amount,15");
|
||||
while($feed_r = mysqli_fetch_assoc($feed_q)) {
|
||||
// Feed data
|
||||
$feed_id = $feed_r['id'];
|
||||
$feed_uid = $feed_r['uid'];
|
||||
$string = $feed_r['post'];
|
||||
$feed_tstamp = $feed_r['tstamp'];
|
||||
$feed_randomstr = $feed_r['random_str'];
|
||||
$feed_visibility = $feed_r['visibility'];
|
||||
$feed_edited = $feed_r['edited'];
|
||||
$feed_img = $feed_r['img'];
|
||||
$feed_allowcomments = $feed_r['allow_comments'];
|
||||
$feed_is_poll = $feed_r['is_poll'];
|
||||
// ************************ //
|
||||
// *** BLOCKING SYSTEM *** //
|
||||
// ************************ //
|
||||
$blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$feed_uid'");
|
||||
$blkc = mysqli_num_rows($blks);
|
||||
if($blkc > 0) {
|
||||
$feed_uid = "286";
|
||||
}
|
||||
$blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$feed_uid'");
|
||||
$blkc = mysqli_num_rows($blks);
|
||||
if($blkc > 0) {
|
||||
$feed_uid = "286";
|
||||
}
|
||||
// ************************ //
|
||||
// *** BLOCKING SYSTEM *** //
|
||||
// ************************ //
|
||||
// Emoji+ replacement
|
||||
include("../inc/replace.php");
|
||||
# SELECT ACCOUNT DATA FOR FEED POSTS
|
||||
$usr_q = mysqli_query($conx, "SELECT username,picture,online_time,md_verf FROM accounts WHERE uid='$feed_uid'");
|
||||
while($usr_r = mysqli_fetch_assoc($usr_q)) {
|
||||
// Account data
|
||||
$feed_username = $usr_r['username'];
|
||||
$feed_picture = $usr_r['picture'];
|
||||
$feed_onltime = $usr_r['online_time'];
|
||||
$feed_vrf = $usr_r['md_verf'];
|
||||
if($feed_vrf == 'yes') {
|
||||
$verif_check = "<i style=\"font-size: 14px;\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
$verif_check = "";
|
||||
}
|
||||
//
|
||||
// DATA SAVER
|
||||
if($u_datasaver == 'on') {
|
||||
$feed_picture = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABtklEQVR4AW1TNXgUYRC9HqdvoYW+PT/c3Z0KWvqWLp7drCvuDg3uVNEGh3hyro8ZLGuz31v7n/waW33i9H/oq7SlxmrjCOGBudocI5T5yd/8n9u9fI9QX0GEG0SuEPAbq/j5F/yf2pnnE9OPldT4gQAvzu88D3ON/x/zmP9brP3p6nUvwcgZuHLsCj49/4RrJ67xt8+A+ayL0cvRYFftjRZG7o+Aa+TBCMwNofQK61h83+e6ysCLzhdo1Brg4uejs4+gZJRg+v0YvYx6u3vz1E0Uxgrw1sTnCej7dch+g1EWlzxuGLg5gKh67bxGZ6ITSlb9Jy7PJfNYt9oYGx5DVH0f+I7edQJ6UwLUnMpBo3NjJrG11cLo8Gi0ePA7hPUihJQIKSuzwV3fbNP045X5Ci26gvXMeIbuZA+kjAwlpxTVVco+3zrzTGtbNby79g6lfAnNZhPF2SJeX3mN3o29ENN9LIS6SnWVVfLC0A5jA2mNBOOkAeeMC+mIjPZ0B3cXclYGJT4hLPfvbTbw7G0tq0FIiuhO9HAij7NIqSYJl3n3ttcgdKpoYsb6MtIdKSvtknPSfC//FxxTQV29mEp6AAAAAElFTkSuQmCC";
|
||||
}
|
||||
// DATA SAVER
|
||||
//
|
||||
// Activity Dot
|
||||
$new_time = time() - $feed_onltime;
|
||||
$mens = round($new_time / 60);
|
||||
if($mens <= 1) { $cv_activeness = "#00FF00"; } // Active within one minute
|
||||
elseif($mens <= 2) { $cv_activeness = "#FFA500"; } // Active within two minutes
|
||||
elseif($mens < 5) { $cv_activeness = "#FF0000"; } // Active within five minutes
|
||||
else { $cv_activeness = "#FF0000"; } // Active over five minutes
|
||||
# SELECT THEME COLORS FOR ACCOUNTS
|
||||
$usri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$feed_uid' && theme_id='$g_themeid'");
|
||||
while($usri_r = mysqli_fetch_assoc($usri_q)) {
|
||||
// Theme data
|
||||
$username_color = $usri_r['username_color'];
|
||||
$feed_tcolor = $usri_r['text_color'];
|
||||
}
|
||||
// Styling for the comment placeholders of each account attached to a post.
|
||||
echo "<style type=\"text/css\">";
|
||||
echo ".comment_$feed_username";
|
||||
echo "[placeholder]:empty:before {";
|
||||
echo "content: attr(placeholder);";
|
||||
echo "color: $feed_tcolor; }</style>";
|
||||
}
|
||||
// If a post has more than one comment, set an 's' variable
|
||||
$comcnt_q = mysqli_query($conx, "SELECT id FROM feed_comments WHERE post_id='$feed_id'");
|
||||
$comcnt_r = number_format(mysqli_num_rows($comcnt_q));
|
||||
if($comcnt_r == '1') { $cs = ""; } else { $cs = "s"; } // comment(s)
|
||||
// If a post has more than one like, set an 's' variable
|
||||
$likcnt_q = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id'");
|
||||
$likcnt_r = number_format(mysqli_num_rows($likcnt_q));
|
||||
if($likcnt_r == '1') { $ls = ""; } else { $ls = "s"; } // like(s)
|
||||
// If a post has more than one dislike, set an 's' variable
|
||||
$dlikcnt_q = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id'");
|
||||
$dlikcnt_r = number_format(mysqli_num_rows($dlikcnt_q));
|
||||
if($dlikcnt_r == '1') { $dls = ""; } else { $dls = "s"; } // dislike(s)
|
||||
# SEE IF A USER HAS LIKED OR DISLIKED POSTS
|
||||
# SET THE COLOR OF THE BUBBLES ACCORDINGLY
|
||||
$did_user_like = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id' && uid='$u_uid'"));
|
||||
if($did_user_like >= '1') {
|
||||
$post_like_color = "$username_color";
|
||||
$post_like_bgcolor = "$feed_tcolor";
|
||||
}
|
||||
else {
|
||||
$post_like_color = "$feed_tcolor";
|
||||
$post_like_bgcolor = "$username_color";
|
||||
}
|
||||
$did_user_dislike = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id' && uid='$u_uid'"));
|
||||
if($did_user_dislike >= '1') {
|
||||
$post_dislike_color = "$username_color";
|
||||
$post_dislike_bgcolor = "$feed_tcolor";
|
||||
}
|
||||
else {
|
||||
$post_dislike_color = "$feed_tcolor";
|
||||
$post_dislike_bgcolor = "$username_color";
|
||||
}
|
||||
# BEGIN ECHOING THE FEED POSTS
|
||||
if($feed_uid != '286') {
|
||||
if($feed_is_poll == 'yes') {
|
||||
echo "poll post faggot <br><br>";
|
||||
}
|
||||
else {
|
||||
echo "
|
||||
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-top-left-radius: 1em;border-top-right-radius: 1em; font-family: 'Dosis', sans-serif; color: $feed_tcolor; width: 95%; max-width: 500px; background-color: $username_color;\">
|
||||
<table style=\"width: 100%; padding: 10px; padding-top: 5px; padding-bottom: 5px;text-align: left;\">
|
||||
<tr>
|
||||
<td>
|
||||
<i class=\"fa fa-align-left\"></i>
|
||||
</td>
|
||||
<td style=\"text-align: left;\">
|
||||
<div style=\"position: relative; width: 36px; height: 36px; border-radius: 50px;\">
|
||||
<div style=\"background-color: $cv_activeness; border: 2px solid $username_color; position: absolute; width: 8px; height: 8px; border-radius: 50px; display: inline-block; bottom: 0; right: 0; z-index: 3;\">
|
||||
</div>
|
||||
<img onclick=\"window.open('/canvas/$feed_username');\" src=\"$feed_picture\" class=\"list_picture\">
|
||||
</div>
|
||||
</td>
|
||||
<td style=\"width: 100%;font-weight: bold;text-align: left;\">
|
||||
<span onclick=\"window.open('/canvas/$feed_username');\">$feed_username</span> $verif_check <span style=\"font-weight: normal; font-size: 12px;\">• "; if($feed_edited == 'yes') { echo "<span style=\"font-weight: normal; font-size: 12px;\">edited</span> "; } echo timeago($feed_tstamp); echo " ago</span>
|
||||
</td>";
|
||||
if($feed_uid == $u_uid) {
|
||||
// Option to edit the post.
|
||||
echo "<td style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-pencil\"></i>
|
||||
</td>
|
||||
<td style=\"font-weight: bold;text-align: right;\"></td>";
|
||||
// Option to remove the post.
|
||||
echo "<td style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-trash\" id=\"pdel_$feed_id\"></i>
|
||||
</td>
|
||||
<td style=\"font-weight: bold;text-align: right;\"></td>";
|
||||
}
|
||||
// If the feed UID does not match the current UID, but the current account is a content manager.
|
||||
########## YOU WILL NEED TO MODIFY THIS CODE TO MATCH CANVAS STANDARDS FOR ROLES ##########
|
||||
if($feed_uid != $u_uid && $u_cont_mang == 'yes') {
|
||||
echo "<td style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-trash\" id=\"pdel_$feed_id\"></i>
|
||||
</td>
|
||||
<td style=\"font-weight: bold;text-align: right;\"></td>";
|
||||
}
|
||||
echo "<td onclick=\"window.open('post.php?i=$feed_randomstr');\" style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-external-link-square\"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;\">
|
||||
<table style=\"word-break: break-word; overflow: auto;width: 100%; padding: 10px; text-align: left;\">
|
||||
<tr>
|
||||
<td>";
|
||||
echo bbc(atname(nl2br($string)));
|
||||
echo "</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style=\"border-top: 1px solid #cecece; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #808080; width: 95%; max-width: 500px; background-color: #E5E5E5;\">
|
||||
<table style=\"font-size: 13px; color: #808080; text-align: center; width: 100%; padding: 10px; padding-bottom: 0px; padding-top: 0px; text-align: left;\">
|
||||
<tr>
|
||||
<td style=\"text-align: left; width: 33.3333333333%;\">
|
||||
<span id=\"likecnt_$feed_id\"><span style=\"font-weight: bold;\">$likcnt_r</span> like$ls</span>
|
||||
</td>
|
||||
<td style=\"text-align: center; width: 33.3333333333%;\">
|
||||
<span id=\"cmtcnt_$feed_id\"><span style=\"font-weight: bold;\">$comcnt_r</span> comment$cs</span>
|
||||
</td>
|
||||
<td style=\"text-align: right; width: 33.3333333333%;\">
|
||||
<span id=\"dlikecnt_$feed_id\"><span style=\"font-weight: bold;\">$dlikcnt_r</span> dislike$dls</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class=\"feedp_div_contain\">
|
||||
<div id=\"pbutton_bar_$feed_id\">
|
||||
<div onclick=\"postLike('$feed_id')\" id=\"lpost_id_$feed_id\" class=\"feedp_like\" style=\"background-color: $post_like_bgcolor;\"><i class=\"fa fa-thumbs-up\" style=\"color: $post_like_color;\"></i></div>
|
||||
<div onclick=\"loadComments('$feed_randomstr', '$feed_id');showComments('show_comments_$feed_id','$feed_id','$username_color','$feed_tcolor','$feed_randomstr');\" id=\"cmtbtn_$feed_id\" class=\"feed_cmt_btn\" style=\"background-color: $username_color\"><i id=\"cmtbtxt_$feed_id\" class=\"fa fa-comment\" style=\"color: $feed_tcolor;\"></i></div>
|
||||
<div onclick=\"postDislike('$feed_id','$username_color','$feed_tcolor')\" id=\"dpost_id_$feed_id\" class=\"feedp_dislike\" style=\"background-color: $post_dislike_bgcolor;\"><i class=\"fa fa-thumbs-down\" style=\"color: $post_dislike_color;\"></i></div>
|
||||
</div>
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: $username_color; font-family: 'Dosis', sans-serif; padding: 2px; color: #fff;\">
|
||||
|
||||
</div></div>
|
||||
<div id=\"show_comments_$feed_id\" style=\"display: none; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-bottom-left-radius: 1em;border-bottom-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;\">
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: $username_color; width: 100%; background-color: $feed_tcolor;\">
|
||||
<table style=\"width: 100%; text-align: left;padding-top: 18px;\">
|
||||
<tr>
|
||||
<td style=\"color: $username_color; font-size: 12px;\">
|
||||
liked by <span id=\"likedby_$feed_id\" style=\"font-weight: bold;color:$username_color !important;\">...</span><br>
|
||||
disliked by <span id=\"dislikedby_$feed_id\" style=\"font-weight: bold;color:$username_color !important;\">...</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style=\"box-shadow: 0 1px 6px rgba(0,0,0,0.16), 0 1px 6px rgba(0,0,0,0.23);padding-top: 4px; padding-bottom: 4px;text-align: left;font-family: 'Dosis', sans-serif; color: $feed_tcolor; width: 100%; background-color: $username_color;\">
|
||||
<table style=\"width: 100%; color: $feed_tcolor; padding-right: 8px; padding-left: 8px;\">
|
||||
<tr>
|
||||
<td>
|
||||
<i class=\"fa fa-image\"></i>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<i class=\"fa fa-film\"></i>
|
||||
</td>
|
||||
<td style=\"width: 100%;word-break:break-word;\">
|
||||
<div name=\"body\" class=\"comment_$feed_username\" id=\"comment_\" placeholder=\"write a comment...\" style=\"width: 98%;padding: 8px;font-family: 'Dosis', sans-serif; font-size: 15px; color: $feed_tcolor; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: none; background-color: $username_color; outline: none; text-align: left;\" contenteditable></div>
|
||||
</td>
|
||||
<td style=\"padding-left: 8px;\">
|
||||
<i class=\"fa fa-paper-plane\"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id=\"load_comments_$feed_id\" style=\"word-wrap: break-word; overflow: auto;\">
|
||||
<div style=\"padding: 8px; color: #808080;\">loading comments...</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
function morePosts() {
|
||||
var sort_view = document.getElementById("feedp_sort").value;
|
||||
document.getElementById("load_more").innerHTML = '<div id=\"load_more\"> <table onclick=\"morePosts();\" style=\"width: 60%; max-width: 300px; border-spacing: 10px; text-align: center;\"> <tr> <td class=\"feed_new_tds\" style=\"background-color: #ff3c64; font-size: 20px;\"> <img src=\"https://i.imgur.com/pvQ0NaJ.gif\" height=\"16\" width=\"16\" alt=\"\" style=\"border:0;\"> </td> </tr> </table> </div>';
|
||||
var amount = document.getElementById("amount").value;
|
||||
var content = document.getElementById("contained_posts");
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: 'more_posts.php',
|
||||
data: {
|
||||
amntcnt:amount,sort:sort_view
|
||||
},
|
||||
success: function(more_content) {
|
||||
content.innerHTML = content.innerHTML+more_content;
|
||||
document.getElementById("amount").value = Number(amount)+15;
|
||||
}
|
||||
});
|
||||
var getcount = new XMLHttpRequest();
|
||||
getcount.open("GET", "contamnt.php", true);
|
||||
getcount.onreadystatechange = function(){
|
||||
if(getcount.readyState == 4)
|
||||
if(getcount.status == 200) {
|
||||
document.getElementById("load_more").innerHTML = '<div id=\"load_more\"> <table onclick=\"morePosts();\" style=\"width: 60%; max-width: 300px; border-spacing: 10px; text-align: center;\"> <tr> <td class=\"feed_new_tds\" style=\"background-color: #ff3c64; font-size: 20px;\"> <i class=\"fa fa-chevron-circle-down fa-lg\"></i> </td> </tr> </table> </div>';
|
||||
var numCont = getcount.responseText;
|
||||
if(numCont <= Number(amount) + 15) {
|
||||
document.getElementById("load_more").innerHTML = "";
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert("getcount error");
|
||||
document.getElementById("load_more").innerHTML = '<div id=\"load_more\"> <table onclick=\"morePosts();\" style=\"width: 60%; max-width: 300px; border-spacing: 10px;text-align: center;\"> <tr> <td class=\"feed_new_tds\" style=\"background-color: #ff3c64; font-size: 20px;\"> <i class=\"fa fa-chevron-circle-down fa-lg\"></i> </td> </tr> </table> </div>';
|
||||
}
|
||||
};
|
||||
getcount.send();
|
||||
return false;
|
||||
}
|
||||
var Del = document.querySelectorAll("i[id^=pdel_]");
|
||||
[].forEach.call(Del, function(dt){
|
||||
dt.onclick = function(e){
|
||||
if (confirm("Delete?")) {
|
||||
var dto = new XMLHttpRequest();
|
||||
dto.open("GET", "delete.php?id=" + dt.id.match(/([0-9]*)$/)[0], true);
|
||||
dto.onreadystatechange = function(){
|
||||
if (dto.readyState == 4)
|
||||
if(dto.status == 200) {
|
||||
upPosts();
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
};
|
||||
dto.send();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
1
feed-plus/post.php
Normal file
1
feed-plus/post.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
soon
|
||||
298
feed-plus/posts.php
Normal file
298
feed-plus/posts.php
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$asc_or_dsc = safe($_GET['s']);
|
||||
if($asc_or_dsc == '') {
|
||||
$asc_or_dsc = "DESC";
|
||||
}
|
||||
# SELECT TEN POSTS FROM FEED
|
||||
$feed_q = mysqli_query($conx, "SELECT id,is_poll,uid,post,tstamp,random_str,visibility,edited,img,allow_comments FROM feed ORDER BY id $asc_or_dsc LIMIT 15");
|
||||
while($feed_r = mysqli_fetch_assoc($feed_q)) {
|
||||
// Feed data
|
||||
$feed_id = $feed_r['id'];
|
||||
$feed_uid = $feed_r['uid'];
|
||||
$string = $feed_r['post'];
|
||||
$feed_tstamp = $feed_r['tstamp'];
|
||||
$feed_randomstr = $feed_r['random_str'];
|
||||
$feed_visibility = $feed_r['visibility'];
|
||||
$feed_edited = $feed_r['edited'];
|
||||
$feed_img = $feed_r['img'];
|
||||
$feed_allowcomments = $feed_r['allow_comments'];
|
||||
$feed_is_poll = $feed_r['is_poll'];
|
||||
// ************************ //
|
||||
// *** BLOCKING SYSTEM *** //
|
||||
// ************************ //
|
||||
$blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$feed_uid'");
|
||||
$blkc = mysqli_num_rows($blks);
|
||||
if($blkc > 0) {
|
||||
$feed_uid = "286";
|
||||
}
|
||||
$blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$feed_uid'");
|
||||
$blkc = mysqli_num_rows($blks);
|
||||
if($blkc > 0) {
|
||||
$feed_uid = "286";
|
||||
}
|
||||
// ************************ //
|
||||
// *** BLOCKING SYSTEM *** //
|
||||
// ************************ //
|
||||
// Emoji+ replacement
|
||||
include("../inc/replace.php");
|
||||
# SELECT ACCOUNT DATA FOR FEED POSTS
|
||||
$usr_q = mysqli_query($conx, "SELECT username,picture,online_time,md_verf FROM accounts WHERE uid='$feed_uid'");
|
||||
while($usr_r = mysqli_fetch_assoc($usr_q)) {
|
||||
// Account data
|
||||
$feed_username = $usr_r['username'];
|
||||
$feed_picture = $usr_r['picture'];
|
||||
$feed_onltime = $usr_r['online_time'];
|
||||
$feed_vrf = $usr_r['md_verf'];
|
||||
if($feed_vrf == 'yes') {
|
||||
$verif_check = "<i style=\"font-size: 14px;\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
$verif_check = "";
|
||||
}
|
||||
//
|
||||
// DATA SAVER
|
||||
if($u_datasaver == 'on') {
|
||||
$feed_picture = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAABtklEQVR4AW1TNXgUYRC9HqdvoYW+PT/c3Z0KWvqWLp7drCvuDg3uVNEGh3hyro8ZLGuz31v7n/waW33i9H/oq7SlxmrjCOGBudocI5T5yd/8n9u9fI9QX0GEG0SuEPAbq/j5F/yf2pnnE9OPldT4gQAvzu88D3ON/x/zmP9brP3p6nUvwcgZuHLsCj49/4RrJ67xt8+A+ayL0cvRYFftjRZG7o+Aa+TBCMwNofQK61h83+e6ysCLzhdo1Brg4uejs4+gZJRg+v0YvYx6u3vz1E0Uxgrw1sTnCej7dch+g1EWlzxuGLg5gKh67bxGZ6ITSlb9Jy7PJfNYt9oYGx5DVH0f+I7edQJ6UwLUnMpBo3NjJrG11cLo8Gi0ePA7hPUihJQIKSuzwV3fbNP045X5Ci26gvXMeIbuZA+kjAwlpxTVVco+3zrzTGtbNby79g6lfAnNZhPF2SJeX3mN3o29ENN9LIS6SnWVVfLC0A5jA2mNBOOkAeeMC+mIjPZ0B3cXclYGJT4hLPfvbTbw7G0tq0FIiuhO9HAij7NIqSYJl3n3ttcgdKpoYsb6MtIdKSvtknPSfC//FxxTQV29mEp6AAAAAElFTkSuQmCC";
|
||||
}
|
||||
// DATA SAVER
|
||||
//
|
||||
// Activity Dot
|
||||
$new_time = time() - $feed_onltime;
|
||||
$mens = round($new_time / 60);
|
||||
if($mens <= 1) { $cv_activeness = "#00FF00"; } // Active within one minute
|
||||
elseif($mens <= 2) { $cv_activeness = "#FFA500"; } // Active within two minutes
|
||||
elseif($mens < 5) { $cv_activeness = "#FF0000"; } // Active within five minutes
|
||||
else { $cv_activeness = "#FF0000"; } // Active over five minutes
|
||||
# SELECT THEME COLORS FOR ACCOUNTS
|
||||
$usri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$feed_uid' && theme_id='$g_themeid'");
|
||||
while($usri_r = mysqli_fetch_assoc($usri_q)) {
|
||||
// Theme data
|
||||
$username_color = $usri_r['username_color'];
|
||||
$feed_tcolor = $usri_r['text_color'];
|
||||
}
|
||||
// Styling for the comment placeholders of each account attached to a post.
|
||||
echo "<style type=\"text/css\">";
|
||||
echo ".comment_$feed_username";
|
||||
echo "[placeholder]:empty:before {";
|
||||
echo "content: attr(placeholder);";
|
||||
echo "color: $feed_tcolor; }</style>";
|
||||
}
|
||||
// If a post has more than one comment, set an 's' variable
|
||||
$comcnt_q = mysqli_query($conx, "SELECT id FROM feed_comments WHERE post_id='$feed_id'");
|
||||
$comcnt_r = number_format(mysqli_num_rows($comcnt_q));
|
||||
if($comcnt_r == '1') { $cs = ""; } else { $cs = "s"; } // comment(s)
|
||||
// If a post has more than one like, set an 's' variable
|
||||
$likcnt_q = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id'");
|
||||
$likcnt_r = number_format(mysqli_num_rows($likcnt_q));
|
||||
if($likcnt_r == '1') { $ls = ""; } else { $ls = "s"; } // like(s)
|
||||
// If a post has more than one dislike, set an 's' variable
|
||||
$dlikcnt_q = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id'");
|
||||
$dlikcnt_r = number_format(mysqli_num_rows($dlikcnt_q));
|
||||
if($dlikcnt_r == '1') { $dls = ""; } else { $dls = "s"; } // dislike(s)
|
||||
# SEE IF A USER HAS LIKED OR DISLIKED POSTS
|
||||
# SET THE COLOR OF THE BUBBLES ACCORDINGLY
|
||||
$did_user_like = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id' && uid='$u_uid'"));
|
||||
if($did_user_like >= '1') {
|
||||
$post_like_color = "$username_color";
|
||||
$post_like_bgcolor = "$feed_tcolor";
|
||||
}
|
||||
else {
|
||||
$post_like_color = "$feed_tcolor";
|
||||
$post_like_bgcolor = "$username_color";
|
||||
}
|
||||
$did_user_dislike = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id' && uid='$u_uid'"));
|
||||
if($did_user_dislike >= '1') {
|
||||
$post_dislike_color = "$username_color";
|
||||
$post_dislike_bgcolor = "$feed_tcolor";
|
||||
}
|
||||
else {
|
||||
$post_dislike_color = "$feed_tcolor";
|
||||
$post_dislike_bgcolor = "$username_color";
|
||||
}
|
||||
# BEGIN ECHOING THE FEED POSTS
|
||||
if($feed_uid != '286') {
|
||||
if($feed_is_poll == 'yes') {
|
||||
echo "poll post faggot <br><br>";
|
||||
}
|
||||
else {
|
||||
echo "
|
||||
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-top-left-radius: 1em;border-top-right-radius: 1em; font-family: 'Dosis', sans-serif; color: $feed_tcolor; width: 95%; max-width: 500px; background-color: $username_color;\">
|
||||
<table style=\"width: 100%; padding: 10px; padding-top: 5px; padding-bottom: 5px;text-align: left;\">
|
||||
<tr>
|
||||
<td>
|
||||
<i class=\"fa fa-align-left\"></i>
|
||||
</td>
|
||||
<td style=\"text-align: left;\">
|
||||
<div style=\"position: relative; width: 36px; height: 36px; border-radius: 50px;\">
|
||||
<div style=\"background-color: $cv_activeness; border: 2px solid $username_color; position: absolute; width: 8px; height: 8px; border-radius: 50px; display: inline-block; bottom: 0; right: 0; z-index: 3;\">
|
||||
</div>
|
||||
<img onclick=\"window.open('/canvas/$feed_username');\" src=\"$feed_picture\" class=\"list_picture\">
|
||||
</div>
|
||||
</td>
|
||||
<td style=\"width: 100%;font-weight: bold;text-align: left;\">
|
||||
<span onclick=\"window.open('/canvas/$feed_username');\">$feed_username</span> $verif_check <span style=\"font-weight: normal; font-size: 12px;\">• "; if($feed_edited == 'yes') { echo "<span style=\"font-weight: normal; font-size: 12px;\">edited</span> "; } echo timeago($feed_tstamp); echo " ago</span>
|
||||
</td>";
|
||||
if($feed_uid == $u_uid) {
|
||||
// Option to edit the post.
|
||||
echo "<td style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-pencil\"></i>
|
||||
</td>
|
||||
<td style=\"font-weight: bold;text-align: right;\"></td>";
|
||||
// Option to remove the post.
|
||||
echo "<td style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-trash\" id=\"pdel_$feed_id\"></i>
|
||||
</td>
|
||||
<td style=\"font-weight: bold;text-align: right;\"></td>";
|
||||
}
|
||||
// If the feed UID does not match the current UID, but the current account is a content manager.
|
||||
########## YOU WILL NEED TO MODIFY THIS CODE TO MATCH CANVAS STANDARDS FOR ROLES ##########
|
||||
if($feed_uid != $u_uid && $u_cont_mang == 'yes') {
|
||||
echo "<td style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-trash\" id=\"pdel_$feed_id\"></i>
|
||||
</td>
|
||||
<td style=\"font-weight: bold;text-align: right;\"></td>";
|
||||
}
|
||||
echo "<td onclick=\"window.open('post.php?i=$feed_randomstr');\" style=\"font-weight: bold;text-align: right;\">
|
||||
<i class=\"fa fa-external-link-square\"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;\">
|
||||
<table style=\"word-break: break-word; overflow: auto;width: 100%; padding: 10px; text-align: left;\">
|
||||
<tr>
|
||||
<td>";
|
||||
echo bbc(atname(nl2br($string)));
|
||||
echo "</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style=\"border-top: 1px solid #cecece; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: #808080; width: 95%; max-width: 500px; background-color: #E5E5E5;\">
|
||||
<table style=\"font-size: 13px; color: #808080; text-align: center; width: 100%; padding: 10px; padding-bottom: 0px; padding-top: 0px; text-align: left;\">
|
||||
<tr>
|
||||
<td style=\"text-align: left; width: 33.3333333333%;\">
|
||||
<span id=\"likecnt_$feed_id\"><span style=\"font-weight: bold;\">$likcnt_r</span> like$ls</span>
|
||||
</td>
|
||||
<td style=\"text-align: center; width: 33.3333333333%;\">
|
||||
<span id=\"cmtcnt_$feed_id\"><span style=\"font-weight: bold;\">$comcnt_r</span> comment$cs</span>
|
||||
</td>
|
||||
<td style=\"text-align: right; width: 33.3333333333%;\">
|
||||
<span id=\"dlikecnt_$feed_id\"><span style=\"font-weight: bold;\">$dlikcnt_r</span> dislike$dls</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class=\"feedp_div_contain\">
|
||||
<div id=\"pbutton_bar_$feed_id\">
|
||||
<div onclick=\"postLike('$feed_id')\" id=\"lpost_id_$feed_id\" class=\"feedp_like\" style=\"background-color: $post_like_bgcolor;\"><i class=\"fa fa-thumbs-up\" style=\"color: $post_like_color;\"></i></div>
|
||||
<div onclick=\"loadComments('$feed_randomstr', '$feed_id');showComments('show_comments_$feed_id','$feed_id','$username_color','$feed_tcolor','$feed_randomstr');\" id=\"cmtbtn_$feed_id\" class=\"feed_cmt_btn\" style=\"background-color: $username_color\"><i id=\"cmtbtxt_$feed_id\" class=\"fa fa-comment\" style=\"color: $feed_tcolor;\"></i></div>
|
||||
<div onclick=\"postDislike('$feed_id','$username_color','$feed_tcolor')\" id=\"dpost_id_$feed_id\" class=\"feedp_dislike\" style=\"background-color: $post_dislike_bgcolor;\"><i class=\"fa fa-thumbs-down\" style=\"color: $post_dislike_color;\"></i></div>
|
||||
</div>
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);background-color: $username_color; font-family: 'Dosis', sans-serif; padding: 2px; color: #fff;\">
|
||||
|
||||
</div></div>
|
||||
<div id=\"show_comments_$feed_id\" style=\"display: none; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);border-bottom-left-radius: 1em;border-bottom-right-radius: 1em; font-family: 'Dosis', sans-serif; color: #000; width: 95%; max-width: 500px; background-color: #f7f7f7;\">
|
||||
<div style=\"box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);font-family: 'Dosis', sans-serif; color: $username_color; width: 100%; background-color: $feed_tcolor;\">
|
||||
<table style=\"width: 100%; text-align: left;padding-top: 18px;\">
|
||||
<tr>
|
||||
<td style=\"color: $username_color; font-size: 12px;\">
|
||||
liked by <span id=\"likedby_$feed_id\" style=\"font-weight: bold;color:$username_color !important;\">...</span><br>
|
||||
disliked by <span id=\"dislikedby_$feed_id\" style=\"font-weight: bold;color:$username_color !important;\">...</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style=\"box-shadow: 0 1px 6px rgba(0,0,0,0.16), 0 1px 6px rgba(0,0,0,0.23);padding-top: 4px; padding-bottom: 4px;text-align: left;font-family: 'Dosis', sans-serif; color: $feed_tcolor; width: 100%; background-color: $username_color;\">
|
||||
<table style=\"width: 100%; color: $feed_tcolor; padding-right: 8px; padding-left: 8px;\">
|
||||
<tr>
|
||||
<td>
|
||||
<i class=\"fa fa-image\"></i>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<i class=\"fa fa-film\"></i>
|
||||
</td>
|
||||
<td style=\"width: 100%;word-break:break-word;\">
|
||||
<div name=\"body\" class=\"comment_$feed_username\" id=\"comment_\" placeholder=\"write a comment...\" style=\"width: 98%;padding: 8px;font-family: 'Dosis', sans-serif; font-size: 15px; color: $feed_tcolor; -webkit-appearance: none; -moz-appearance: none; appearance: none; border: none; background-color: $username_color; outline: none; text-align: left;\" contenteditable></div>
|
||||
</td>
|
||||
<td style=\"padding-left: 8px;\">
|
||||
<i class=\"fa fa-paper-plane\"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id=\"load_comments_$feed_id\" style=\"word-wrap: break-word; overflow: auto;\">
|
||||
<div style=\"padding: 8px; color: #808080;\">loading comments...</div>
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
|
||||
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
function morePosts() {
|
||||
var sort_view = document.getElementById("feedp_sort").value;
|
||||
document.getElementById("load_more").innerHTML = '<div id=\"load_more\"> <table onclick=\"morePosts();\" style=\"width: 60%; max-width: 300px; border-spacing: 10px; text-align: center;\"> <tr> <td class=\"feed_new_tds\" style=\"background-color: #ff3c64; font-size: 20px;\"> <img src=\"https://i.imgur.com/pvQ0NaJ.gif\" height=\"16\" width=\"16\" alt=\"\" style=\"border:0;\"> </td> </tr> </table> </div>';
|
||||
var amount = document.getElementById("amount").value;
|
||||
var content = document.getElementById("contained_posts");
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: 'more_posts.php',
|
||||
data: {
|
||||
amntcnt:amount,sort:sort_view
|
||||
},
|
||||
success: function(more_content) {
|
||||
content.innerHTML = content.innerHTML+more_content;
|
||||
document.getElementById("amount").value = Number(amount)+15;
|
||||
}
|
||||
});
|
||||
var getcount = new XMLHttpRequest();
|
||||
getcount.open("GET", "contamnt.php", true);
|
||||
getcount.onreadystatechange = function(){
|
||||
if(getcount.readyState == 4)
|
||||
if(getcount.status == 200) {
|
||||
document.getElementById("load_more").innerHTML = '<div id=\"load_more\"> <table onclick=\"morePosts();\" style=\"width: 60%; max-width: 300px; border-spacing: 10px; text-align: center;\"> <tr> <td class=\"feed_new_tds\" style=\"background-color: #ff3c64; font-size: 20px;\"> <i class=\"fa fa-chevron-circle-down fa-lg\"></i> </td> </tr> </table> </div>';
|
||||
var numCont = getcount.responseText;
|
||||
if(numCont <= Number(amount) + 15) {
|
||||
document.getElementById("load_more").innerHTML = "";
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert("getcount error");
|
||||
document.getElementById("load_more").innerHTML = '<div id=\"load_more\"> <table onclick=\"morePosts();\" style=\"width: 60%; max-width: 300px; border-spacing: 10px;text-align: center;\"> <tr> <td class=\"feed_new_tds\" style=\"background-color: #ff3c64; font-size: 20px;\"> <i class=\"fa fa-chevron-circle-down fa-lg\"></i> </td> </tr> </table> </div>';
|
||||
}
|
||||
};
|
||||
getcount.send();
|
||||
return false;
|
||||
}
|
||||
var Del = document.querySelectorAll("i[id^=pdel_]");
|
||||
[].forEach.call(Del, function(dt){
|
||||
dt.onclick = function(e){
|
||||
if (confirm("Delete?")) {
|
||||
var dto = new XMLHttpRequest();
|
||||
dto.open("GET", "delete.php?id=" + dt.id.match(/([0-9]*)$/)[0], true);
|
||||
dto.onreadystatechange = function(){
|
||||
if (dto.readyState == 4)
|
||||
if(dto.status == 200) {
|
||||
upPosts();
|
||||
}
|
||||
else {
|
||||
alert('Feed request failed. Please check your connection and try again.');
|
||||
}
|
||||
};
|
||||
dto.send();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
});
|
||||
</script>
|
||||
67
feed-plus/submit_post.php
Normal file
67
feed-plus/submit_post.php
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: https://misdew.com");
|
||||
exit();
|
||||
}
|
||||
$id = mysqli_real_escape_string($conx, htmlentities($_POST['body']));
|
||||
$edit = mysqli_real_escape_string($conx, htmlentities($_POST['edit']));
|
||||
|
||||
|
||||
$pollquest = mysqli_real_escape_string($conx, htmlentities($_POST['pollquest']));
|
||||
$pollquest = trim($pollquest);
|
||||
$pollopt1 = mysqli_real_escape_string($conx, htmlentities($_POST['pollopt1']));
|
||||
$pollopt1 = trim($pollopt1);
|
||||
$pollopt2 = mysqli_real_escape_string($conx, htmlentities($_POST['pollopt2']));
|
||||
$pollopt2 = trim($pollopt2);
|
||||
$pollopt3 = mysqli_real_escape_string($conx, htmlentities($_POST['pollopt3']));
|
||||
$pollopt3 = trim($pollopt3);
|
||||
$pollopt4 = mysqli_real_escape_string($conx, htmlentities($_POST['pollopt4']));
|
||||
$pollopt4 = trim($pollopt4);
|
||||
$pollopt5 = mysqli_real_escape_string($conx, htmlentities($_POST['pollopt5']));
|
||||
$pollopt5 = trim($pollopt5);
|
||||
|
||||
|
||||
$getrstr = safe($_GET['i']);
|
||||
$getshare = safe($_GET['share']);
|
||||
$getidq = mysqli_query($conx, "SELECT id FROM feed WHERE random_str='$getrstr'");
|
||||
$getidr = mysqli_fetch_assoc($getidq);
|
||||
$getsid = $getidr['id'];
|
||||
$edited = "";
|
||||
function genRand($length = 15) {
|
||||
return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
|
||||
}
|
||||
$rstr = genRand();
|
||||
$rstr = $u_uid.$rstr;
|
||||
if($edit) {
|
||||
$id = $edit;
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM feed WHERE random_str='$getrstr' && uid='$u_uid'")) == '1') {
|
||||
mysqli_query($conx, "UPDATE feed SET post='$id' WHERE random_str='$getrstr' && uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE feed SET edited='yes' WHERE random_str='$getrstr' && uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE feed SET tstamp='$tstamp' WHERE random_str='$getrstr' && uid='$u_uid'");
|
||||
}
|
||||
header("location: https://misdew.com/feed/post.php?i=$getrstr");
|
||||
exit();
|
||||
}
|
||||
elseif($getshare) {
|
||||
if($getsid == '') {
|
||||
header("location: https://misdew.com/feed");
|
||||
exit();
|
||||
}
|
||||
mysqli_query($conx, "INSERT INTO feed (uid, post, tstamp, random_str, visibility, shared_id, shared_rstr) VALUES ('$u_uid','$id','$tstamp','$rstr','public','$getsid','$getrstr')");
|
||||
mysqli_query($conx, "UPDATE account_figures SET activeness='$f_activeness'+.05 WHERE uid='$u_uid'");
|
||||
header("location: https://misdew.com/feed");
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
mysqli_query($conx, "INSERT INTO feed (uid, post, tstamp, random_str, visibility) VALUES ('$u_uid','$id','$tstamp','$rstr','public')");
|
||||
if($pollquest != '') {
|
||||
mysqli_query($conx, "UPDATE feed SET is_poll='yes' WHERE random_str='$rstr'");
|
||||
mysqli_query($conx, "INSERT INTO feed_polls (uid, uqid, tstamp, poll_question, poll_opt1, poll_opt2, poll_opt3, poll_opt4, poll_opt5, is_timed) VALUES ('$u_uid','$rstr','$tstamp','$pollquest','$pollopt1','$pollopt2','$pollopt3','$pollopt4','$pollopt5','no')");
|
||||
}
|
||||
mysqli_query($conx, "UPDATE account_figures SET activeness='$f_activeness'+.05 WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'+.25 WHERE uid='$u_uid'");
|
||||
header("location: https://misdew.com/feed");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
30
feed-plus/vid_upload.php
Normal file
30
feed-plus/vid_upload.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$uploc = "Feed";
|
||||
if ( isset($_FILES['vid']) ) {
|
||||
$filename = $_FILES['vid']['tmp_name'];
|
||||
$handle = fopen($filename, "r");
|
||||
$data = fread($handle, filesize($filename));
|
||||
$required_key = "make ur own";
|
||||
$POST_DATA = array(
|
||||
'file' => base64_encode($data),
|
||||
'key' => urlencode($required_key),
|
||||
'user' => urlencode($u_uid),
|
||||
'imagetype' => urlencode($u_uid),
|
||||
'imaeg' => urlencode($u_cloudterms),
|
||||
'fieltyp' => urlencode($u_cloudterms),
|
||||
'usernaem' => urlencode($u_username),
|
||||
'filextension' => urlencode($u_username),
|
||||
'uvia' => urlencode($uploc)
|
||||
);
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, 'https://upl.justa.us/video.php');
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $POST_DATA);
|
||||
$response = curl_exec($curl);
|
||||
echo trim($response);
|
||||
curl_close ($curl);
|
||||
}
|
||||
?>
|
||||
26
feed-plus/who_disliked.php
Normal file
26
feed-plus/who_disliked.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$postid = safe($_GET['i']);
|
||||
if($feed_id) {
|
||||
$postid = $feed_id;
|
||||
}
|
||||
$dcnt = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT uid FROM feed_dislikes WHERE post_id='$postid'"));
|
||||
if($dcnt == '0') {
|
||||
echo "nobody <i class=\"fa fa-smile-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$sseparator = '';
|
||||
while($slcr = mysqli_fetch_assoc($slcq)) {
|
||||
$uuid = $slcr['uid'];
|
||||
$sslcq = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$uuid'");
|
||||
while($sslcr = mysqli_fetch_assoc($sslcq)) {
|
||||
$uusername = $sslcr['username'];
|
||||
}
|
||||
echo $sseparator;
|
||||
echo "<span onclick=\"window.open('/canvas/$uusername');\">$uusername</span>";
|
||||
if (!$sseparator) $sseparator = ', ';
|
||||
}
|
||||
?>
|
||||
26
feed-plus/who_liked.php
Normal file
26
feed-plus/who_liked.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$postid = safe($_GET['i']);
|
||||
if($feed_id) {
|
||||
$postid = $feed_id;
|
||||
}
|
||||
$dcnt = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT uid FROM feed_likes WHERE post_id='$postid'"));
|
||||
if($dcnt == '0') {
|
||||
echo "nobody <i class=\"fa fa-frown-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$sseparator = '';
|
||||
while($slcr = mysqli_fetch_assoc($slcq)) {
|
||||
$uuid = $slcr['uid'];
|
||||
$sslcq = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$uuid'");
|
||||
while($sslcr = mysqli_fetch_assoc($sslcq)) {
|
||||
$uusername = $sslcr['username'];
|
||||
}
|
||||
echo $sseparator;
|
||||
echo "<span onclick=\"window.open('/canvas/$uusername');\">$uusername</span>";
|
||||
if (!$sseparator) $sseparator = ', ';
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue