From 1d53f10b0d0b9dee4d35ab357c495d50a1e0eb44 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 21 Jul 2022 07:17:24 -0400 Subject: [PATCH] Add files via upload --- removed_stuff/REMOVED_feed/ajextra.php | 98 ++ removed_stuff/REMOVED_feed/betafix.php | 474 ++++++++++ removed_stuff/REMOVED_feed/cajextra.php | 84 ++ removed_stuff/REMOVED_feed/cmtamnt.php | 6 + removed_stuff/REMOVED_feed/cmtp.php | 52 ++ removed_stuff/REMOVED_feed/comments.php | 112 +++ removed_stuff/REMOVED_feed/contamnt.php | 5 + removed_stuff/REMOVED_feed/count.php | 14 + removed_stuff/REMOVED_feed/dcount.php | 14 + removed_stuff/REMOVED_feed/delcmnt.php | 30 + removed_stuff/REMOVED_feed/delete.php | 39 + .../REMOVED_feed/dis_like_infosies.php | 43 + removed_stuff/REMOVED_feed/dislike.php | 50 ++ removed_stuff/REMOVED_feed/edit.php | 76 ++ removed_stuff/REMOVED_feed/editc.php | 76 ++ removed_stuff/REMOVED_feed/img_upload.php | 30 + removed_stuff/REMOVED_feed/index.php | 432 +++++++++ removed_stuff/REMOVED_feed/inner_comments.php | 92 ++ removed_stuff/REMOVED_feed/inner_poll.php | 247 +++++ .../REMOVED_feed/justaimg_upload.php | 20 + removed_stuff/REMOVED_feed/laziness.php | 23 + removed_stuff/REMOVED_feed/like.php | 50 ++ removed_stuff/REMOVED_feed/likecmt.php | 40 + removed_stuff/REMOVED_feed/morecmts.php | 77 ++ removed_stuff/REMOVED_feed/moreposts.php | 397 ++++++++ removed_stuff/REMOVED_feed/mpcomments.php | 12 + removed_stuff/REMOVED_feed/poll_vote.php | 29 + removed_stuff/REMOVED_feed/post.php | 845 ++++++++++++++++++ removed_stuff/REMOVED_feed/posts.php | 738 +++++++++++++++ removed_stuff/REMOVED_feed/ppost.php | 67 ++ removed_stuff/REMOVED_feed/pstlikes.php | 25 + removed_stuff/REMOVED_feed/share.php | 73 ++ removed_stuff/REMOVED_feed/stats.php | 21 + removed_stuff/REMOVED_feed/vid_upload.php | 30 + 34 files changed, 4421 insertions(+) create mode 100644 removed_stuff/REMOVED_feed/ajextra.php create mode 100644 removed_stuff/REMOVED_feed/betafix.php create mode 100644 removed_stuff/REMOVED_feed/cajextra.php create mode 100644 removed_stuff/REMOVED_feed/cmtamnt.php create mode 100644 removed_stuff/REMOVED_feed/cmtp.php create mode 100644 removed_stuff/REMOVED_feed/comments.php create mode 100644 removed_stuff/REMOVED_feed/contamnt.php create mode 100644 removed_stuff/REMOVED_feed/count.php create mode 100644 removed_stuff/REMOVED_feed/dcount.php create mode 100644 removed_stuff/REMOVED_feed/delcmnt.php create mode 100644 removed_stuff/REMOVED_feed/delete.php create mode 100644 removed_stuff/REMOVED_feed/dis_like_infosies.php create mode 100644 removed_stuff/REMOVED_feed/dislike.php create mode 100644 removed_stuff/REMOVED_feed/edit.php create mode 100644 removed_stuff/REMOVED_feed/editc.php create mode 100644 removed_stuff/REMOVED_feed/img_upload.php create mode 100644 removed_stuff/REMOVED_feed/index.php create mode 100644 removed_stuff/REMOVED_feed/inner_comments.php create mode 100644 removed_stuff/REMOVED_feed/inner_poll.php create mode 100644 removed_stuff/REMOVED_feed/justaimg_upload.php create mode 100644 removed_stuff/REMOVED_feed/laziness.php create mode 100644 removed_stuff/REMOVED_feed/like.php create mode 100644 removed_stuff/REMOVED_feed/likecmt.php create mode 100644 removed_stuff/REMOVED_feed/morecmts.php create mode 100644 removed_stuff/REMOVED_feed/moreposts.php create mode 100644 removed_stuff/REMOVED_feed/mpcomments.php create mode 100644 removed_stuff/REMOVED_feed/poll_vote.php create mode 100644 removed_stuff/REMOVED_feed/post.php create mode 100644 removed_stuff/REMOVED_feed/posts.php create mode 100644 removed_stuff/REMOVED_feed/ppost.php create mode 100644 removed_stuff/REMOVED_feed/pstlikes.php create mode 100644 removed_stuff/REMOVED_feed/share.php create mode 100644 removed_stuff/REMOVED_feed/stats.php create mode 100644 removed_stuff/REMOVED_feed/vid_upload.php diff --git a/removed_stuff/REMOVED_feed/ajextra.php b/removed_stuff/REMOVED_feed/ajextra.php new file mode 100644 index 0000000..ab016e2 --- /dev/null +++ b/removed_stuff/REMOVED_feed/ajextra.php @@ -0,0 +1,98 @@ + + diff --git a/removed_stuff/REMOVED_feed/betafix.php b/removed_stuff/REMOVED_feed/betafix.php new file mode 100644 index 0000000..8087724 --- /dev/null +++ b/removed_stuff/REMOVED_feed/betafix.php @@ -0,0 +1,474 @@ + + + + + Feed - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ + +
+ + + + +
+   tap to post +
+
+
+ + "; + require_once("posts.php"); + echo ""; + $cntq = mysqli_query($conx, "SELECT * FROM feed"); + $count = mysqli_num_rows($cntq); + if($count > 10) { + echo "
"; + } + require_once("../inc/footer.php"); + ?> +
+ +
+ +
+ + diff --git a/removed_stuff/REMOVED_feed/cajextra.php b/removed_stuff/REMOVED_feed/cajextra.php new file mode 100644 index 0000000..0c2ecdc --- /dev/null +++ b/removed_stuff/REMOVED_feed/cajextra.php @@ -0,0 +1,84 @@ + + diff --git a/removed_stuff/REMOVED_feed/cmtamnt.php b/removed_stuff/REMOVED_feed/cmtamnt.php new file mode 100644 index 0000000..449a7da --- /dev/null +++ b/removed_stuff/REMOVED_feed/cmtamnt.php @@ -0,0 +1,6 @@ + diff --git a/removed_stuff/REMOVED_feed/cmtp.php b/removed_stuff/REMOVED_feed/cmtp.php new file mode 100644 index 0000000..e818792 --- /dev/null +++ b/removed_stuff/REMOVED_feed/cmtp.php @@ -0,0 +1,52 @@ +$u_username commented on your post.','/feed/post.php?i=$getrstr','$tstamp')"); + } + } + header("location: /feed"); + exit(); +} +?> diff --git a/removed_stuff/REMOVED_feed/comments.php b/removed_stuff/REMOVED_feed/comments.php new file mode 100644 index 0000000..a76da68 --- /dev/null +++ b/removed_stuff/REMOVED_feed/comments.php @@ -0,0 +1,112 @@ + + + + + + +
$cmt_username
+ +
"; +if($cmt_edited == 'yes') { + echo "edited "; +} +else { + echo "posted "; +} +echo timeago($cmt_tstamp); echo" ago"; +if($cmt_uid == $u_uid) { + if($cmt_img != 'yes') { + echo "  - "; + } + else { + echo "  "; + } + echo ""; +} +if($cmt_uid != $u_uid && $u_rank == 'mod') { + echo "  "; +} +echo "
+
+
"; + echo bbc(atname(nl2br($string))); + echo "
+ + + + +
$likcnt_r like$ls
+

+"; +} +?> + diff --git a/removed_stuff/REMOVED_feed/contamnt.php b/removed_stuff/REMOVED_feed/contamnt.php new file mode 100644 index 0000000..71fe53d --- /dev/null +++ b/removed_stuff/REMOVED_feed/contamnt.php @@ -0,0 +1,5 @@ + diff --git a/removed_stuff/REMOVED_feed/count.php b/removed_stuff/REMOVED_feed/count.php new file mode 100644 index 0000000..6f72ab9 --- /dev/null +++ b/removed_stuff/REMOVED_feed/count.php @@ -0,0 +1,14 @@ + diff --git a/removed_stuff/REMOVED_feed/dcount.php b/removed_stuff/REMOVED_feed/dcount.php new file mode 100644 index 0000000..0217f4c --- /dev/null +++ b/removed_stuff/REMOVED_feed/dcount.php @@ -0,0 +1,14 @@ + diff --git a/removed_stuff/REMOVED_feed/delcmnt.php b/removed_stuff/REMOVED_feed/delcmnt.php new file mode 100644 index 0000000..31a9170 --- /dev/null +++ b/removed_stuff/REMOVED_feed/delcmnt.php @@ -0,0 +1,30 @@ + diff --git a/removed_stuff/REMOVED_feed/delete.php b/removed_stuff/REMOVED_feed/delete.php new file mode 100644 index 0000000..e33f8ab --- /dev/null +++ b/removed_stuff/REMOVED_feed/delete.php @@ -0,0 +1,39 @@ + diff --git a/removed_stuff/REMOVED_feed/dis_like_infosies.php b/removed_stuff/REMOVED_feed/dis_like_infosies.php new file mode 100644 index 0000000..5775110 --- /dev/null +++ b/removed_stuff/REMOVED_feed/dis_like_infosies.php @@ -0,0 +1,43 @@ +"; +} +$separator = ''; +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 $separator; + echo "$uusername"; + if (!$separator) $separator = ', '; +} +echo "
disliked by "; +$dcnt = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT uid FROM feed_dislikes WHERE post_id='$postid'")); +if($dcnt == '0') { + echo "nobody "; +} +$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 "$uusername"; + if (!$sseparator) $sseparator = ', '; +} +?> diff --git a/removed_stuff/REMOVED_feed/dislike.php b/removed_stuff/REMOVED_feed/dislike.php new file mode 100644 index 0000000..88bdf82 --- /dev/null +++ b/removed_stuff/REMOVED_feed/dislike.php @@ -0,0 +1,50 @@ + $likcnt_r dislike$lsz"; + } + else { + echo " $likcnt_r dislike$lsz"; + } + } + else { + if($amounttwo == 1) { + echo " undislike"; + } + else { + echo " dislike"; + } + } + } + else { + // redirect + header('Location: index.php'); + } +} +else { +die('Invalid token.'); +} +// dis code is end +?> diff --git a/removed_stuff/REMOVED_feed/edit.php b/removed_stuff/REMOVED_feed/edit.php new file mode 100644 index 0000000..c2c5209 --- /dev/null +++ b/removed_stuff/REMOVED_feed/edit.php @@ -0,0 +1,76 @@ + + + + + Feed - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ +
+
+ + + + +
+ +
+ + + +
+ +
+
+
+ +
+ + diff --git a/removed_stuff/REMOVED_feed/editc.php b/removed_stuff/REMOVED_feed/editc.php new file mode 100644 index 0000000..ab0f651 --- /dev/null +++ b/removed_stuff/REMOVED_feed/editc.php @@ -0,0 +1,76 @@ + + + + + Feed - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ +
+
+ + + + +
+ +
+ + + +
+ +
+
+
+ +
+ + diff --git a/removed_stuff/REMOVED_feed/img_upload.php b/removed_stuff/REMOVED_feed/img_upload.php new file mode 100644 index 0000000..55dacd9 --- /dev/null +++ b/removed_stuff/REMOVED_feed/img_upload.php @@ -0,0 +1,30 @@ + 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); +} +?> diff --git a/removed_stuff/REMOVED_feed/index.php b/removed_stuff/REMOVED_feed/index.php new file mode 100644 index 0000000..4d6d6bc --- /dev/null +++ b/removed_stuff/REMOVED_feed/index.php @@ -0,0 +1,432 @@ + + + + + Feed - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ + +
+ + + + +
+   tap to post +
+
+
+ + "; + require_once("posts.php"); + echo ""; + $cntq = mysqli_query($conx, "SELECT * FROM feed"); + $count = mysqli_num_rows($cntq); + if($count > 10) { + echo "
"; + } + require_once("../inc/footer.php"); + ?> +
+ +
+ +
+ + diff --git a/removed_stuff/REMOVED_feed/inner_comments.php b/removed_stuff/REMOVED_feed/inner_comments.php new file mode 100644 index 0000000..3147544 --- /dev/null +++ b/removed_stuff/REMOVED_feed/inner_comments.php @@ -0,0 +1,92 @@ + 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 = " "; + } + 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 ""; + echo "
+
+
$cmt_username $verif_check"; + echo " • "; + echo timeago($cmt_tstamp); + echo " ago  "; + if($cmt_uid == $u_uid) { + echo "   "; + echo ""; + } + echo "
"; echo bbc(atname(nl2br($string))); echo ""; + echo "
"; + } +} +?> diff --git a/removed_stuff/REMOVED_feed/inner_poll.php b/removed_stuff/REMOVED_feed/inner_poll.php new file mode 100644 index 0000000..c2fd8fc --- /dev/null +++ b/removed_stuff/REMOVED_feed/inner_poll.php @@ -0,0 +1,247 @@ + 0) { + if($weeks == 1) { echo "1$w_ago"; } + else { echo "$weeks$w_ago"; } + } +} +// Added Feed polls. 2021 +// Added Feed polls. 2021 +// Added Feed polls. 2021 +// Added Feed polls. 2021 + +$feed_q = mysqli_query($conx, "SELECT id,uid,post,tstamp,random_str,visibility,edited,img,allow_comments FROM feed WHERE random_str='$feed_randomstr'"); +while($feed_r = mysqli_fetch_assoc($feed_q)) { + // Feed data + $feed_id = $feed_r['id']; + $feed_uid = $feed_r['uid']; + $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_vrf = $usr_r['md_verf']; + if($feed_vrf == 'yes') { + $verif_check = ""; + } + else { + $verif_check = ""; + } + } + # 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']; + } +} + + # SELECT POLL DATA FOR THE POST + $fpoll_q = mysqli_query($conx, "SELECT * FROM feed_polls WHERE uqid='$feed_randomstr'"); + while($fpoll_r = mysqli_fetch_assoc($fpoll_q)) { + // poll data + $fpoll_question = $fpoll_r['poll_question']; + $fpoll_opt1 = $fpoll_r['poll_opt1']; + $fpoll_opt2 = $fpoll_r['poll_opt2']; + $fpoll_opt3 = $fpoll_r['poll_opt3']; + $fpoll_opt4 = $fpoll_r['poll_opt4']; + $fpoll_opt5 = $fpoll_r['poll_opt5']; + $fpoll_istimed = $fpoll_r['is_timed']; + $fpoll_tstmpend = $fpoll_r['tstamp_end']; + if(strlen($fpoll_opt1) >= 30) { + $fpoll_optc1 = trim(substr($fpoll_opt1,0,30)) . "..."; + } + else { + $fpoll_optc1 = $fpoll_opt1; + } + if(strlen($fpoll_opt2) >= 30) { + $fpoll_optc2 = trim(substr($fpoll_opt2,0,30)) . "..."; + } + else { + $fpoll_optc2 = $fpoll_opt2; + } + if(strlen($fpoll_opt3) >= 30) { + $fpoll_optc3 = trim(substr($fpoll_opt3,0,30)) . "..."; + } + else { + $fpoll_optc3 = $fpoll_opt3; + } + if(strlen($fpoll_opt4) >= 30) { + $fpoll_optc4 = trim(substr($fpoll_opt4,0,30)) . "..."; + } + else { + $fpoll_optc4 = $fpoll_opt4; + } + if(strlen($fpoll_opt5) >= 30) { + $fpoll_optc5 = trim(substr($fpoll_opt5,0,30)) . "..."; + } + else { + $fpoll_optc5 = $fpoll_opt5; + } + } + # SELECT RESPONSE DATA FOR THE POLL + $fpoll_response_q = mysqli_query($conx, "SELECT * FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && uid='$u_uid'"); + while($fpoll_response_r = mysqli_fetch_assoc($fpoll_response_q)) { + // poll response data + $fpoll_option_picked = $fpoll_response_r['option_picked']; + } + echo "
"; + + if($fpoll_option_picked != '') { + $current_can_vote = "no"; + } + else { + $current_can_vote = "yes"; + } + + // total vote count + $rest_c = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr'"); + $optt_cnt = mysqli_num_rows($rest_c); + + // count number of votes for each option + $res_c1 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='1'"); + $opt1_cnt = mysqli_num_rows($res_c1); + if($opt1_cnt != '1') { + $count1_s = "s"; + } + $res_c2 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='2'"); + $opt2_cnt = mysqli_num_rows($res_c2); + if($opt2_cnt != '1') { + $count2_s = "s"; + } + $res_c3 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='3'"); + $opt3_cnt = mysqli_num_rows($res_c3); + if($opt3_cnt != '1') { + $count3_s = "s"; + } + $res_c4 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='4'"); + $opt4_cnt = mysqli_num_rows($res_c4); + if($opt4_cnt != '1') { + $count4_s = "s"; + } + $res_c5 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='5'"); + $opt5_cnt = mysqli_num_rows($res_c5); + if($opt5_cnt != '1') { + $count5_s = "s"; + } + if($fpoll_option_picked == '1') { + $current_picked1 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '2') { + $current_picked2 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '3') { + $current_picked3 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '4') { + $current_picked4 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '5') { + $current_picked5 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + + echo "A poll has been attached to this post.
"; + if($fpoll_istimed == 'yes') { + echo "There is a time limit- it will stop accepting responses in "; + echo polltime($fpoll_tstmpend); + echo "."; + } + else { + echo "There is no time limit set- responses are always accepted."; + } + echo "

"; + echo ""; + echo "
"; + echo "$feed_username $verif_check
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "$fpoll_question"; + echo "
"; + echo "


"; + echo "Select your response by tapping one of the options below.
"; + if($current_can_vote == 'no') { + echo "You can change your response by tapping a new option.
"; + } + + echo "
"; + echo ""; + echo ""; + if($fpoll_opt3 != '') { + echo ""; + } + if($fpoll_opt4 != '') { + echo ""; + } + if($fpoll_opt5 != '') { + echo ""; + } + echo "
"; + echo "$fpoll_opt1"; + echo ""; + echo "$fpoll_opt2"; + echo ""; + echo "$fpoll_opt3"; + echo ""; + echo "$fpoll_opt4"; + echo ""; + echo "$fpoll_opt5"; + echo "
"; + + + echo "
"; + echo "
"; + echo "$opt1_cnt voted \"$fpoll_optc1\"
"; + echo "$opt2_cnt voted \"$fpoll_optc2\"
"; + if($fpoll_opt3 != '') { + echo "$opt3_cnt voted \"$fpoll_optc3\"
"; + } + if($fpoll_opt4 != '') { + echo "$opt4_cnt voted \"$fpoll_optc4\"
"; + } + if($fpoll_opt5 != '') { + echo "$opt5_cnt voted \"$fpoll_optc5\"
"; + } + echo "
Total Votes Received: $optt_cnt
"; + echo "
"; + + + +// Added Feed polls. 2021 +// Added Feed polls. 2021 +// Added Feed polls. 2021 +// Added Feed polls. 2021 +?> diff --git a/removed_stuff/REMOVED_feed/justaimg_upload.php b/removed_stuff/REMOVED_feed/justaimg_upload.php new file mode 100644 index 0000000..3694937 --- /dev/null +++ b/removed_stuff/REMOVED_feed/justaimg_upload.php @@ -0,0 +1,20 @@ + base64_encode($data) + ); + $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); +} +?> diff --git a/removed_stuff/REMOVED_feed/laziness.php b/removed_stuff/REMOVED_feed/laziness.php new file mode 100644 index 0000000..4e092a9 --- /dev/null +++ b/removed_stuff/REMOVED_feed/laziness.php @@ -0,0 +1,23 @@ +
+ + +
+ base64_encode($data) + ); + $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 $response; + curl_close ($curl); +} +?> diff --git a/removed_stuff/REMOVED_feed/like.php b/removed_stuff/REMOVED_feed/like.php new file mode 100644 index 0000000..03716f8 --- /dev/null +++ b/removed_stuff/REMOVED_feed/like.php @@ -0,0 +1,50 @@ + $likcnt_r like$lsz"; + } + else { + echo " $likcnt_r like$lsz"; + } + } + else { + if($amounttwo == 1) { + echo " unlike"; + } + else { + echo " like"; + } + } + } + else { + // redirect + header('Location: index.php'); + } +} +else { +die('Invalid token.'); +} +// dis code is end +?> diff --git a/removed_stuff/REMOVED_feed/likecmt.php b/removed_stuff/REMOVED_feed/likecmt.php new file mode 100644 index 0000000..18d5ca7 --- /dev/null +++ b/removed_stuff/REMOVED_feed/likecmt.php @@ -0,0 +1,40 @@ + $likcnt_r like$lsz"; + } + else { + echo " $likcnt_r like$lsz"; + } + } + else { + // redirect + header('location: index.php'); + } +} +else { +die('Invalid token.'); +} +// dis code is end +?> diff --git a/removed_stuff/REMOVED_feed/morecmts.php b/removed_stuff/REMOVED_feed/morecmts.php new file mode 100644 index 0000000..2071c28 --- /dev/null +++ b/removed_stuff/REMOVED_feed/morecmts.php @@ -0,0 +1,77 @@ + + + + + + +
$cmt_username
+ +
"; +if($cmt_edited == 'yes') { + echo "edited "; +} +else { + echo "posted "; +} +echo timeago($cmt_tstamp); echo" ago"; +if($cmt_uid == $u_uid) { + if($cmt_img != 'yes') { + echo "  - "; + } + else { + echo "  "; + } + echo ""; +} +if($cmt_uid != $u_uid && $u_rank == 'mod') { + echo "  "; +} +echo "
+
+
"; + echo bbc(atname(nl2br($string))); + echo "
+ + + + +
$likcnt_r like$ls
+

+"; +} +?> diff --git a/removed_stuff/REMOVED_feed/moreposts.php b/removed_stuff/REMOVED_feed/moreposts.php new file mode 100644 index 0000000..570230d --- /dev/null +++ b/removed_stuff/REMOVED_feed/moreposts.php @@ -0,0 +1,397 @@ + 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 = ""; + } + 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 ""; + } + // 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) + # BEGIN ECHOING THE FEED POSTS + if($feed_uid != '286') { + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + echo "
"; + echo "$feed_username $verif_check"; + echo "
"; + echo "
"; + // State whether or not a post has been edited. + if($feed_edited == 'yes') { + echo "edited "; + } + else { + echo "posted "; + } + // State the timestamp of the post. + echo timeago($feed_tstamp); echo" ago"; + // If the feed UID matches the current UID. + if($feed_uid == $u_uid) { + // Option to edit the post. + echo "    "; + // Option to remove the post. + echo ""; + } + // 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 "  "; + } + echo "  "; + ########## YOU WILL NEED TO MODIFY THIS CODE TO MATCH CANVAS STANDARDS FOR ROLES ########## + echo "
"; + echo "
"; + // Echo the post content. + echo bbc(atname(nl2br($string))); + + +if($feed_is_poll == 'yes') { + + + + echo "
"; + + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + + # SELECT POLL DATA FOR THE POST + $fpoll_q = mysqli_query($conx, "SELECT * FROM feed_polls WHERE uqid='$feed_randomstr'"); + while($fpoll_r = mysqli_fetch_assoc($fpoll_q)) { + // poll data + $fpoll_question = $fpoll_r['poll_question']; + $fpoll_opt1 = $fpoll_r['poll_opt1']; + $fpoll_opt2 = $fpoll_r['poll_opt2']; + $fpoll_opt3 = $fpoll_r['poll_opt3']; + $fpoll_opt4 = $fpoll_r['poll_opt4']; + $fpoll_opt5 = $fpoll_r['poll_opt5']; + $fpoll_istimed = $fpoll_r['is_timed']; + $fpoll_tstmpend = $fpoll_r['tstamp_end']; + if(strlen($fpoll_opt1) >= 30) { + $fpoll_optc1 = trim(substr($fpoll_opt1,0,30)) . "..."; + } + else { + $fpoll_optc1 = $fpoll_opt1; + } + if(strlen($fpoll_opt2) >= 30) { + $fpoll_optc2 = trim(substr($fpoll_opt2,0,30)) . "..."; + } + else { + $fpoll_optc2 = $fpoll_opt2; + } + if(strlen($fpoll_opt3) >= 30) { + $fpoll_optc3 = trim(substr($fpoll_opt3,0,30)) . "..."; + } + else { + $fpoll_optc3 = $fpoll_opt3; + } + if(strlen($fpoll_opt4) >= 30) { + $fpoll_optc4 = trim(substr($fpoll_opt4,0,30)) . "..."; + } + else { + $fpoll_optc4 = $fpoll_opt4; + } + if(strlen($fpoll_opt5) >= 30) { + $fpoll_optc5 = trim(substr($fpoll_opt5,0,30)) . "..."; + } + else { + $fpoll_optc5 = $fpoll_opt5; + } + } + # SELECT RESPONSE DATA FOR THE POLL + $fpoll_response_q = mysqli_query($conx, "SELECT * FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && uid='$u_uid'"); + while($fpoll_response_r = mysqli_fetch_assoc($fpoll_response_q)) { + // poll response data + $fpoll_option_picked = $fpoll_response_r['option_picked']; + } + echo "
"; + + if($fpoll_option_picked != '') { + $current_can_vote = "no"; + } + else { + $current_can_vote = "yes"; + } + + // total vote count + $rest_c = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr'"); + $optt_cnt = mysqli_num_rows($rest_c); + + // count number of votes for each option + $res_c1 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='1'"); + $opt1_cnt = mysqli_num_rows($res_c1); + if($opt1_cnt != '1') { + $count1_s = "s"; + } + $res_c2 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='2'"); + $opt2_cnt = mysqli_num_rows($res_c2); + if($opt2_cnt != '1') { + $count2_s = "s"; + } + $res_c3 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='3'"); + $opt3_cnt = mysqli_num_rows($res_c3); + if($opt3_cnt != '1') { + $count3_s = "s"; + } + $res_c4 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='4'"); + $opt4_cnt = mysqli_num_rows($res_c4); + if($opt4_cnt != '1') { + $count4_s = "s"; + } + $res_c5 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='5'"); + $opt5_cnt = mysqli_num_rows($res_c5); + if($opt5_cnt != '1') { + $count5_s = "s"; + } + if($fpoll_option_picked == '1') { + $current_picked1 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '2') { + $current_picked2 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '3') { + $current_picked3 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '4') { + $current_picked4 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '5') { + $current_picked5 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + + echo "A poll has been attached to this post.
"; + if($fpoll_istimed == 'yes') { + echo "There is a time limit- it will stop accepting responses in "; + echo polltime($fpoll_tstmpend); + echo "."; + } + else { + echo "There is no time limit set- responses are always accepted."; + } + echo "

"; + echo ""; + echo "
"; + echo "$feed_username $verif_check
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "$fpoll_question"; + echo "
"; + echo "


"; + echo "Select your response by tapping one of the options below.
"; + if($current_can_vote == 'no') { + echo "You can change your response by tapping a new option.
"; + } + + echo "
"; + echo ""; + echo ""; + if($fpoll_opt3 != '') { + echo ""; + } + if($fpoll_opt4 != '') { + echo ""; + } + if($fpoll_opt5 != '') { + echo ""; + } + echo "
"; + echo "$fpoll_opt1"; + echo ""; + echo "$fpoll_opt2"; + echo ""; + echo "$fpoll_opt3"; + echo ""; + echo "$fpoll_opt4"; + echo ""; + echo "$fpoll_opt5"; + echo "
"; + + + echo "
"; + echo "
"; + echo "$opt1_cnt voted \"$fpoll_optc1\"
"; + echo "$opt2_cnt voted \"$fpoll_optc2\"
"; + if($fpoll_opt3 != '') { + echo "$opt3_cnt voted \"$fpoll_optc3\"
"; + } + if($fpoll_opt4 != '') { + echo "$opt4_cnt voted \"$fpoll_optc4\"
"; + } + if($fpoll_opt5 != '') { + echo "$opt5_cnt voted \"$fpoll_optc5\"
"; + } + echo "
Total Votes Received: $optt_cnt
"; + echo "
"; + + + + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + + echo "
"; + + + +} + echo "
"; + echo "
"; + // Like count within the post. + echo ""; + echo "$likcnt_r like$ls"; + echo "    "; + // Dislike count within the post. + echo ""; + echo "$dlikcnt_r dislike$dls"; + echo ""; + // Comment count within the post. + echo ""; + echo "$comcnt_r comment$cs"; + echo "
"; + echo "
"; + echo ""; + echo "
"; + # Determine whether or not the current account has liked the post. + $gett = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id' && uid='$u_uid'"); + $isit = number_format(mysqli_num_rows($gett)); + if($isit == 0) { // Current account has not liked the post. + echo " like"; + } + else { // Current account has like the post. + echo " unlike"; + } + echo ""; + echo " "; + echo "comment"; + # Determine whether or not the current account has disliked the post. + $gett = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id' && uid='$u_uid'"); + $isit = number_format(mysqli_num_rows($gett)); + if($isit == "0") { // Current account has not disliked the post. + echo " dislike"; + } + else { // Current account has disliked the post. + echo " undislike"; + } + echo "
"; + echo "
"; + /* LIST OF LIKES */ + /* LIST OF LIKES */ + echo "
"; + include("dis_like_infosies.php"); + echo "
"; + /* LIST OF LIKES */ + /* LIST OF LIKES */ + echo "
"; + echo ""; + echo ""; + echo "
"; + echo ""; + // Write a comment. + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + echo "
"; + } +} +?> diff --git a/removed_stuff/REMOVED_feed/mpcomments.php b/removed_stuff/REMOVED_feed/mpcomments.php new file mode 100644 index 0000000..5e492dd --- /dev/null +++ b/removed_stuff/REMOVED_feed/mpcomments.php @@ -0,0 +1,12 @@ + diff --git a/removed_stuff/REMOVED_feed/poll_vote.php b/removed_stuff/REMOVED_feed/poll_vote.php new file mode 100644 index 0000000..4350d57 --- /dev/null +++ b/removed_stuff/REMOVED_feed/poll_vote.php @@ -0,0 +1,29 @@ + diff --git a/removed_stuff/REMOVED_feed/post.php b/removed_stuff/REMOVED_feed/post.php new file mode 100644 index 0000000..4ec2b1e --- /dev/null +++ b/removed_stuff/REMOVED_feed/post.php @@ -0,0 +1,845 @@ + + + + + Feed - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ 0) { + header("location: /feed"); + exit(); + } + $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) { + header("location: /feed"); + exit(); + } + // ************************ // + // *** 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 = ""; + } + 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 = "#FFA500"; } // 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 ""; + } + // 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 = "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 = "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 = "s"; } // dislike(s) + # BEGIN ECHOING THE FEED POSTS + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + echo "
"; + echo "$feed_username $verif_check"; + echo "
"; + echo "
"; + // State whether or not a post has been edited. + if($feed_edited == 'yes') { + echo "edited "; + } + else { + echo "posted "; + } + // State the timestamp of the post. + echo timeago($feed_tstamp); echo" ago"; + // If the feed UID matches the current UID. + if($feed_uid == $u_uid) { + // Option to edit the post. + echo "    "; + // Option to remove the post. + echo ""; + } + // 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 "  "; + } + ########## YOU WILL NEED TO MODIFY THIS CODE TO MATCH CANVAS STANDARDS FOR ROLES ########## + echo "
"; + echo "
"; + // Echo the post content. + echo bbc(atname(nl2br($string))); + +if($feed_ispoll == 'yes') { + +echo "
"; + + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + + # SELECT POLL DATA FOR THE POST + $fpoll_q = mysqli_query($conx, "SELECT * FROM feed_polls WHERE uqid='$feed_randomstr'"); + while($fpoll_r = mysqli_fetch_assoc($fpoll_q)) { + // poll data + $fpoll_question = $fpoll_r['poll_question']; + $fpoll_opt1 = $fpoll_r['poll_opt1']; + $fpoll_opt2 = $fpoll_r['poll_opt2']; + $fpoll_opt3 = $fpoll_r['poll_opt3']; + $fpoll_opt4 = $fpoll_r['poll_opt4']; + $fpoll_opt5 = $fpoll_r['poll_opt5']; + $fpoll_istimed = $fpoll_r['is_timed']; + $fpoll_tstmpend = $fpoll_r['tstamp_end']; + if(strlen($fpoll_opt1) >= 30) { + $fpoll_optc1 = trim(substr($fpoll_opt1,0,30)) . "..."; + } + else { + $fpoll_optc1 = $fpoll_opt1; + } + if(strlen($fpoll_opt2) >= 30) { + $fpoll_optc2 = trim(substr($fpoll_opt2,0,30)) . "..."; + } + else { + $fpoll_optc2 = $fpoll_opt2; + } + if(strlen($fpoll_opt3) >= 30) { + $fpoll_optc3 = trim(substr($fpoll_opt3,0,30)) . "..."; + } + else { + $fpoll_optc3 = $fpoll_opt3; + } + if(strlen($fpoll_opt4) >= 30) { + $fpoll_optc4 = trim(substr($fpoll_opt4,0,30)) . "..."; + } + else { + $fpoll_optc4 = $fpoll_opt4; + } + if(strlen($fpoll_opt5) >= 30) { + $fpoll_optc5 = trim(substr($fpoll_opt5,0,30)) . "..."; + } + else { + $fpoll_optc5 = $fpoll_opt5; + } + } + # SELECT RESPONSE DATA FOR THE POLL + $fpoll_response_q = mysqli_query($conx, "SELECT * FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && uid='$u_uid'"); + while($fpoll_response_r = mysqli_fetch_assoc($fpoll_response_q)) { + // poll response data + $fpoll_option_picked = $fpoll_response_r['option_picked']; + } + echo "
"; + + if($fpoll_option_picked != '') { + $current_can_vote = "no"; + } + else { + $current_can_vote = "yes"; + } + + // total vote count + $rest_c = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr'"); + $optt_cnt = mysqli_num_rows($rest_c); + + // count number of votes for each option + $res_c1 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='1'"); + $opt1_cnt = mysqli_num_rows($res_c1); + if($opt1_cnt != '1') { + $count1_s = "s"; + } + $res_c2 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='2'"); + $opt2_cnt = mysqli_num_rows($res_c2); + if($opt2_cnt != '1') { + $count2_s = "s"; + } + $res_c3 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='3'"); + $opt3_cnt = mysqli_num_rows($res_c3); + if($opt3_cnt != '1') { + $count3_s = "s"; + } + $res_c4 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='4'"); + $opt4_cnt = mysqli_num_rows($res_c4); + if($opt4_cnt != '1') { + $count4_s = "s"; + } + $res_c5 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='5'"); + $opt5_cnt = mysqli_num_rows($res_c5); + if($opt5_cnt != '1') { + $count5_s = "s"; + } + if($fpoll_option_picked == '1') { + $current_picked1 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '2') { + $current_picked2 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '3') { + $current_picked3 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '4') { + $current_picked4 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '5') { + $current_picked5 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + + echo "A poll has been attached to this post.
"; + if($fpoll_istimed == 'yes') { + echo "There is a time limit- it will stop accepting responses in "; + echo polltime($fpoll_tstmpend); + echo "."; + } + else { + echo "There is no time limit set- responses are always accepted."; + } + echo "

"; + echo ""; + echo "
"; + echo "$feed_username $verif_check
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "$fpoll_question"; + echo "
"; + echo "


"; + echo "Select your response by tapping one of the options below.
"; + if($current_can_vote == 'no') { + echo "You can change your response by tapping a new option.
"; + } + + echo "
"; + echo ""; + echo ""; + if($fpoll_opt3 != '') { + echo ""; + } + if($fpoll_opt4 != '') { + echo ""; + } + if($fpoll_opt5 != '') { + echo ""; + } + echo "
"; + echo "$fpoll_opt1"; + echo ""; + echo "$fpoll_opt2"; + echo ""; + echo "$fpoll_opt3"; + echo ""; + echo "$fpoll_opt4"; + echo ""; + echo "$fpoll_opt5"; + echo "
"; + + + echo "
"; + echo "
"; + echo "$opt1_cnt voted \"$fpoll_optc1\"
"; + echo "$opt2_cnt voted \"$fpoll_optc2\"
"; + if($fpoll_opt3 != '') { + echo "$opt3_cnt voted \"$fpoll_optc3\"
"; + } + if($fpoll_opt4 != '') { + echo "$opt4_cnt voted \"$fpoll_optc4\"
"; + } + if($fpoll_opt5 != '') { + echo "$opt5_cnt voted \"$fpoll_optc5\"
"; + } + echo "
Total Votes Received: $optt_cnt
"; + echo "
"; + + + + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + +echo "
"; + +} + + echo "
"; + echo "
"; + // Like count within the post. + echo ""; + echo "$likcnt_r like$ls"; + echo "    "; + // Dislike count within the post. + echo ""; + echo "$dlikcnt_r dislike$dls"; + echo ""; + // Comment count within the post. + echo ""; + echo "$comcnt_r comment$cs"; + echo "
"; + echo "
"; + echo ""; + echo "
"; + # Determine whether or not the current account has liked the post. + $gett = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id' && uid='$u_uid'"); + $isit = number_format(mysqli_num_rows($gett)); + if($isit == 0) { // Current account has not liked the post. + echo " like"; + } + else { // Current account has like the post. + echo " unlike"; + } + echo ""; + echo " "; + echo "comment"; + # Determine whether or not the current account has disliked the post. + $gett = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id' && uid='$u_uid'"); + $isit = number_format(mysqli_num_rows($gett)); + if($isit == "0") { // Current account has not disliked the post. + echo " dislike"; + } + else { // Current account has disliked the post. + echo " undislike"; + } + echo "
"; + echo "
"; + /* LIST OF LIKES */ + /* LIST OF LIKES */ + echo "
"; + include("dis_like_infosies.php"); + echo "
"; + /* LIST OF LIKES */ + /* LIST OF LIKES */ + echo "
"; + echo ""; + echo ""; + } + else { + echo "
"; + } + echo "
"; + echo ""; + // Write a comment. + // If commenting is available. + if($feed_allowcomments == 'yes') { + echo "
"; + if($feed_allowcomments == 'yes') { + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + echo "
"; + } + ?> + + + + diff --git a/removed_stuff/REMOVED_feed/posts.php b/removed_stuff/REMOVED_feed/posts.php new file mode 100644 index 0000000..f80eea0 --- /dev/null +++ b/removed_stuff/REMOVED_feed/posts.php @@ -0,0 +1,738 @@ + 0) { + if($weeks == 1) { echo "1$w_ago"; } + else { echo "$weeks$w_ago"; } + } +} + +# 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 DESC LIMIT 10"); +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 = ""; + } + 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 ""; + } + // 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) + # BEGIN ECHOING THE FEED POSTS + if($feed_uid != '286') { + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + echo "
"; + echo "$feed_username $verif_check"; + echo "
"; + echo "
"; + // State whether or not a post has been edited. + if($feed_edited == 'yes') { + echo "edited "; + } + else { + echo "posted "; + } + // State the timestamp of the post. + echo timeago($feed_tstamp); echo" ago"; + // If the feed UID matches the current UID. + if($feed_uid == $u_uid) { + // Option to edit the post. + echo "    "; + // Option to remove the post. + echo ""; + } + // 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 "    "; + } + echo "  "; + ########## YOU WILL NEED TO MODIFY THIS CODE TO MATCH CANVAS STANDARDS FOR ROLES ########## + echo "
"; + echo "
"; + // Echo the post content. + echo bbc(atname(nl2br($string))); + if($feed_is_poll == 'yes') { + echo "
"; + + + + + + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + + # SELECT POLL DATA FOR THE POST + $fpoll_q = mysqli_query($conx, "SELECT * FROM feed_polls WHERE uqid='$feed_randomstr'"); + while($fpoll_r = mysqli_fetch_assoc($fpoll_q)) { + // poll data + $fpoll_question = $fpoll_r['poll_question']; + $fpoll_opt1 = $fpoll_r['poll_opt1']; + $fpoll_opt2 = $fpoll_r['poll_opt2']; + $fpoll_opt3 = $fpoll_r['poll_opt3']; + $fpoll_opt4 = $fpoll_r['poll_opt4']; + $fpoll_opt5 = $fpoll_r['poll_opt5']; + $fpoll_istimed = $fpoll_r['is_timed']; + $fpoll_tstmpend = $fpoll_r['tstamp_end']; + if(strlen($fpoll_opt1) >= 30) { + $fpoll_optc1 = trim(substr($fpoll_opt1,0,30)) . "..."; + } + else { + $fpoll_optc1 = $fpoll_opt1; + } + if(strlen($fpoll_opt2) >= 30) { + $fpoll_optc2 = trim(substr($fpoll_opt2,0,30)) . "..."; + } + else { + $fpoll_optc2 = $fpoll_opt2; + } + if(strlen($fpoll_opt3) >= 30) { + $fpoll_optc3 = trim(substr($fpoll_opt3,0,30)) . "..."; + } + else { + $fpoll_optc3 = $fpoll_opt3; + } + if(strlen($fpoll_opt4) >= 30) { + $fpoll_optc4 = trim(substr($fpoll_opt4,0,30)) . "..."; + } + else { + $fpoll_optc4 = $fpoll_opt4; + } + if(strlen($fpoll_opt5) >= 30) { + $fpoll_optc5 = trim(substr($fpoll_opt5,0,30)) . "..."; + } + else { + $fpoll_optc5 = $fpoll_opt5; + } + } + # SELECT RESPONSE DATA FOR THE POLL + $fpoll_response_q = mysqli_query($conx, "SELECT * FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && uid='$u_uid'"); + while($fpoll_response_r = mysqli_fetch_assoc($fpoll_response_q)) { + // poll response data + $fpoll_option_picked = $fpoll_response_r['option_picked']; + } + echo "
"; + + if($fpoll_option_picked != '') { + $current_can_vote = "no"; + } + else { + $current_can_vote = "yes"; + } + + // total vote count + $rest_c = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr'"); + $optt_cnt = mysqli_num_rows($rest_c); + + // count number of votes for each option + $res_c1 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='1'"); + $opt1_cnt = mysqli_num_rows($res_c1); + if($opt1_cnt != '1') { + $count1_s = "s"; + } + $res_c2 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='2'"); + $opt2_cnt = mysqli_num_rows($res_c2); + if($opt2_cnt != '1') { + $count2_s = "s"; + } + $res_c3 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='3'"); + $opt3_cnt = mysqli_num_rows($res_c3); + if($opt3_cnt != '1') { + $count3_s = "s"; + } + $res_c4 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='4'"); + $opt4_cnt = mysqli_num_rows($res_c4); + if($opt4_cnt != '1') { + $count4_s = "s"; + } + $res_c5 = mysqli_query($conx, "SELECT uid FROM feed_poll_response WHERE poll_uqid='$feed_randomstr' && option_picked='5'"); + $opt5_cnt = mysqli_num_rows($res_c5); + if($opt5_cnt != '1') { + $count5_s = "s"; + } + if($fpoll_option_picked == '1') { + $current_picked1 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '2') { + $current_picked2 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '3') { + $current_picked3 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '4') { + $current_picked4 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + if($fpoll_option_picked == '5') { + $current_picked5 = "background-color: $username_color !important; color: $feed_tcolor !important"; + } + + echo "A poll has been attached to this post.
"; + if($fpoll_istimed == 'yes') { + echo "There is a time limit- it will stop accepting responses in "; + echo polltime($fpoll_tstmpend); + echo "."; + } + else { + echo "There is no time limit set- responses are always accepted."; + } + echo "

"; + echo ""; + echo "
"; + echo "$feed_username $verif_check
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "$fpoll_question"; + echo "
"; + echo "


"; + echo "Select your response by tapping one of the options below.
"; + if($current_can_vote == 'no') { + echo "You can change your response by tapping a new option.
"; + } + + echo "
"; + echo ""; + echo ""; + if($fpoll_opt3 != '') { + echo ""; + } + if($fpoll_opt4 != '') { + echo ""; + } + if($fpoll_opt5 != '') { + echo ""; + } + echo "
"; + echo "$fpoll_opt1"; + echo ""; + echo "$fpoll_opt2"; + echo ""; + echo "$fpoll_opt3"; + echo ""; + echo "$fpoll_opt4"; + echo ""; + echo "$fpoll_opt5"; + echo "
"; + + + echo "
"; + echo "
"; + echo "$opt1_cnt voted \"$fpoll_optc1\"
"; + echo "$opt2_cnt voted \"$fpoll_optc2\"
"; + if($fpoll_opt3 != '') { + echo "$opt3_cnt voted \"$fpoll_optc3\"
"; + } + if($fpoll_opt4 != '') { + echo "$opt4_cnt voted \"$fpoll_optc4\"
"; + } + if($fpoll_opt5 != '') { + echo "$opt5_cnt voted \"$fpoll_optc5\"
"; + } + echo "
Total Votes Received: $optt_cnt
"; + echo "
"; + + + + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + // Added Feed polls. 2021 + + + + + + echo "
"; + } + + echo "
"; + echo "
"; + // Like count within the post. + echo ""; + echo "$likcnt_r like$ls"; + echo "    "; + // Dislike count within the post. + echo ""; + echo "$dlikcnt_r dislike$dls"; + echo ""; + // Comment count within the post. + echo ""; + echo "$comcnt_r comment$cs"; + echo "
"; + echo "
"; + echo ""; + echo "
"; + # Determine whether or not the current account has liked the post. + $gett = mysqli_query($conx, "SELECT id FROM feed_likes WHERE post_id='$feed_id' && uid='$u_uid'"); + $isit = number_format(mysqli_num_rows($gett)); + if($isit == 0) { // Current account has not liked the post. + echo " like"; + } + else { // Current account has like the post. + echo " unlike"; + } + echo ""; + echo " "; + echo "comment"; + # Determine whether or not the current account has disliked the post. + $gett = mysqli_query($conx, "SELECT id FROM feed_dislikes WHERE post_id='$feed_id' && uid='$u_uid'"); + $isit = number_format(mysqli_num_rows($gett)); + if($isit == "0") { // Current account has not disliked the post. + echo " dislike"; + } + else { // Current account has disliked the post. + echo " undislike"; + } + echo "
"; + echo "
"; + /* LIST OF LIKES */ + /* LIST OF LIKES */ + echo "
"; + include("dis_like_infosies.php"); + echo "
"; + /* LIST OF LIKES */ + /* LIST OF LIKES */ + echo "
"; + echo ""; + echo ""; + } + else { + echo "
"; + } + echo "
"; + echo ""; + // Write a comment. + // If commenting is available. + if($feed_allowcomments == 'yes') { + echo "
"; + if($feed_allowcomments == 'yes') { + echo "
"; + echo "
"; + echo ""; + echo ""; + echo "
"; + echo "
"; + echo "
"; + echo "
"; + } +} +?> + + diff --git a/removed_stuff/REMOVED_feed/ppost.php b/removed_stuff/REMOVED_feed/ppost.php new file mode 100644 index 0000000..50d4a4a --- /dev/null +++ b/removed_stuff/REMOVED_feed/ppost.php @@ -0,0 +1,67 @@ + diff --git a/removed_stuff/REMOVED_feed/pstlikes.php b/removed_stuff/REMOVED_feed/pstlikes.php new file mode 100644 index 0000000..c37378b --- /dev/null +++ b/removed_stuff/REMOVED_feed/pstlikes.php @@ -0,0 +1,25 @@ +"; +} +while($like_r = mysqli_fetch_array($like_q)) { + $like_uid = $like_r['uid']; + // selects user data for each heart + $likeu_q = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$like_uid'"); + while($likeu_r = mysqli_fetch_array($likeu_q)) { + $like_username = $likeu_r['username']; + } + echo $separator; + echo "$like_username"; + if (!$separator) $separator = ', '; +} +?> diff --git a/removed_stuff/REMOVED_feed/share.php b/removed_stuff/REMOVED_feed/share.php new file mode 100644 index 0000000..377cdd8 --- /dev/null +++ b/removed_stuff/REMOVED_feed/share.php @@ -0,0 +1,73 @@ + + + + + Feed - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ +
+
share=true"> + + + + +
+ +
+ + + +
+ +
+
+
+ +
+ + diff --git a/removed_stuff/REMOVED_feed/stats.php b/removed_stuff/REMOVED_feed/stats.php new file mode 100644 index 0000000..a9f5cd9 --- /dev/null +++ b/removed_stuff/REMOVED_feed/stats.php @@ -0,0 +1,21 @@ +"; +} +*/ +?> diff --git a/removed_stuff/REMOVED_feed/vid_upload.php b/removed_stuff/REMOVED_feed/vid_upload.php new file mode 100644 index 0000000..5d80cd3 --- /dev/null +++ b/removed_stuff/REMOVED_feed/vid_upload.php @@ -0,0 +1,30 @@ + 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); +} +?>