From 06f98665a25591f5c7c5c98e35c4eb7a6927ece2 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 20 Jul 2022 09:30:14 -0400 Subject: [PATCH] Add files via upload --- hub/online_list.php | 228 ++++++++++++++++++++++++++++++++++++++++ hub/recently_active.php | 191 +++++++++++++++++++++++++++++++++ hub/shout.php | 150 ++++++++++++++++++++++++++ hub/shout_likedis.php | 40 +++++++ hub/shout_stats.php | 29 +++++ hub/shoutit.php | 73 +++++++++++++ hub/theme.php | 22 ++++ 7 files changed, 733 insertions(+) create mode 100644 hub/online_list.php create mode 100644 hub/recently_active.php create mode 100644 hub/shout.php create mode 100644 hub/shout_likedis.php create mode 100644 hub/shout_stats.php create mode 100644 hub/shoutit.php create mode 100644 hub/theme.php diff --git a/hub/online_list.php b/hub/online_list.php new file mode 100644 index 0000000..c25c48b --- /dev/null +++ b/hub/online_list.php @@ -0,0 +1,228 @@ +

$counter"; +if($counter >= 20) { + // Emoji+ replacement + //$string = " :heart-eyes:"; + $string = " \"\""; +} +elseif($counter >= 15) { + // Emoji+ replacement + //$string = " :halo:"; + $string = " \"\""; +} +elseif($counter >= 10) { + // Emoji+ replacement + //$string = " :drool:"; + $string = " \"\""; +} +elseif($counter >= 4) { + // Emoji+ replacement + //$string = " :smile:"; + $string = " \"\""; +} +elseif($counter <= 3) { + // Emoji+ replacement + $string = " \"\""; + //$string = ":sleep:"; +} +include("../inc/replace.php"); +echo $string; +echo "
[tap to show recently active]

"; +$musr_q = mysqli_query($conx, "SELECT uid,username,perk_levelone,picture,online_time,site_locdesc,site_locurl,who_can_mail,bot,comm_mang,cont_mang,design_police,peacekeeper,sticker,donor,md_verf FROM accounts WHERE lurker_mode='no' ORDER BY username ASC"); +while($musr_r = mysqli_fetch_assoc($musr_q)) { + $mmb_uid = $musr_r['uid']; + $mmb_username = $musr_r['username']; + $mmb_perk_levelone = $musr_r['perk_levelone']; + $mmb_picture = $musr_r['picture']; + $mmb_onltime = $musr_r['online_time']; + $mmb_locdesc = $musr_r['site_locdesc']; + $mmb_locurl = $musr_r['site_locurl']; + $mmb_whocan = $musr_r['who_can_mail']; + $mmb_bot = $musr_r['bot']; + $mmb_comm_mang = $musr_r['comm_mang']; + $mmb_cont_mang = $musr_r['cont_mang']; + $mmb_design_pol = $musr_r['design_police']; + $mmb_peacekpr = $musr_r['peacekeeper']; + $mmb_donor = $musr_r['donor']; + $mmb_sticker = $musr_r['sticker']; + $mmb_verif = $musr_r['md_verf']; + if($mmb_verif == 'yes') { + $verif_check = ""; + } + else { + $verif_check = ""; + } + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$mmb_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $mmb_uid = "286"; + } + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$mmb_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $mmb_uid = "286"; + } + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + // + // DATA SAVER + if($u_datasaver == 'on' && $mmb_uid != $u_uid) { + $mmb_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 + // + $usri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$mmb_uid' && theme_id='$g_themeid'"); + while($usri_r = mysqli_fetch_assoc($usri_q)) { + $username_color = $usri_r['username_color']; + $chat_tcolor = $usri_r['text_color']; + } + $HUAHHH = time() - $mmb_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"; + } + if($mens <= 1 OR $mens <= 2) { + if($mmb_uid != '286') { + echo "
+ + + + + +
+
+
+
+ +
+ "; + if($mmb_perk_levelone == 'yes') { + echo "VIP $mmb_username"; + } + else { + echo "$mmb_username $verif_check"; + } + if($mmb_sticker != '') { + echo "  \"\""; + } + echo "
+ $mmb_locdesc"; + echo "     "; + # If account is a bot. + if($mmb_bot == 'yes') { + echo " "; + } + # Display the appropriate badges earned by the user. + // Community Manager Badge. + if($mmb_comm_mang == 'yes') { + echo " "; + } + // Account Manager Badge. + if($mmb_cont_mang == 'yes') { + echo " "; + } + // Design Police Badge. + if($mmb_design_pol == 'yes') { + echo " "; + } + // Peacekeeper Badge. + if($mmb_peacekpr == 'yes') { + echo " "; + } + // Donor Badge. + if($mmb_donor == 'yes') { + echo " "; + } + echo "
"; + if($mmb_username != $u_username) { + if($mmb_whocan == 'nobody') { + echo ""; + } + if($mmb_whocan == 'friends') { + $ff_q = mysqli_query($conx, "SELECT uid_rec FROM friends WHERE uid_req='$u_uid' AND uid_rec='$mmb_uid' AND accepted='yes'"); + $fr_ct = mysqli_num_rows($ff_q); + if($fr_ct != '0') { + echo ""; + } + } + if($mmb_whocan == 'anyone') { + echo ""; + } + } + else { + echo ""; + } + echo "
+
"; + + + + } +} +} +$member_count = mysqli_num_rows(mysqli_query($conx, "SELECT username FROM accounts WHERE verified='yes'")); +$member_count = number_format($member_count); +$lt_mb = mysqli_query($conx, "SELECT username FROM accounts WHERE verified='yes' ORDER BY uid DESC LIMIT 1"); +$ltr_mb = mysqli_fetch_assoc($lt_mb); +$latest_member = $ltr_mb['username']; +$rq = mysqli_query($conx, "SELECT category FROM apps WHERE id='13'"); +$da = mysqli_fetch_array($rq); +$r_cnt = $da['category']; +$r_cnt = number_format($r_cnt); +echo "
+$latest_member is our newest member.
+Our record high of online users is $r_cnt.
+We currently have $member_count registered members. +
"; +?> + diff --git a/hub/recently_active.php b/hub/recently_active.php new file mode 100644 index 0000000..80e71f9 --- /dev/null +++ b/hub/recently_active.php @@ -0,0 +1,191 @@ + 6) { + $zcounter++; + } + +} +echo "

$zcounter"; +if($zcounter >= 20) { + // Emoji+ replacement + //$string = " :heart-eyes:"; + $string = " \"\""; +} +elseif($zcounter >= 15) { + // Emoji+ replacement + //$string = " :halo:"; + $string = " \"\""; +} +elseif($zcounter >= 10) { + // Emoji+ replacement + //$string = " :drool:"; + $string = " \"\""; +} +elseif($zcounter >= 4) { + // Emoji+ replacement + //$string = " :smile:"; + $string = " \"\""; +} +elseif($zcounter <= 3) { + // Emoji+ replacement + //$string = " :sleep:"; + $string = " \"\""; +} +include("../inc/replace.php"); +echo $string; +echo "
[tap to hide]

"; +echo "
"; +$zmusr_q = mysqli_query($conx, "SELECT uid,username,picture,online_time,site_locdesc,site_locurl,who_can_mail,bot,comm_mang,cont_mang,design_police,peacekeeper,sticker,donor,md_verf FROM accounts ORDER BY username ASC"); +while($zmusr_r = mysqli_fetch_assoc($zmusr_q)) { + $mmb_uid = $zmusr_r['uid']; + $mmb_username = $zmusr_r['username']; + $mmb_picture = $zmusr_r['picture']; + $mmb_onltime = $zmusr_r['online_time']; + $mmb_locdesc = $zmusr_r['site_locdesc']; + $mmb_locurl = $zmusr_r['site_locurl']; + $mmb_whocan = $zmusr_r['who_can_mail']; + $mmb_bot = $zmusr_r['bot']; + $mmb_comm_mang = $zmusr_r['comm_mang']; + $mmb_cont_mang = $zmusr_r['cont_mang']; + $mmb_design_pol = $zmusr_r['design_police']; + $mmb_peacekpr = $zmusr_r['peacekeeper']; + $mmb_donor = $zmusr_r['donor']; + $mmb_sticker = $zmusr_r['sticker']; + $mmb_verif = $zmusr_r['md_verf']; + if($mmb_verif == 'yes') { + $verif_check = ""; + } + else { + $verif_check = ""; + } + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$mmb_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $mmb_uid = "286"; + } + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$mmb_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $mmb_uid = "286"; + } + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + // + // DATA SAVER + if($u_datasaver == 'on' && $mmb_uid != $u_uid) { + $mmb_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 + // + $usri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$mmb_uid' && theme_id='$g_themeid'"); + while($usri_r = mysqli_fetch_assoc($usri_q)) { + $username_color = $usri_r['username_color']; + $chat_tcolor = $usri_r['text_color']; + } + $HUAHHH = time() - $mmb_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 = "#808080"; + //} + if($mens <= 2880 AND $mens > 6) { + if($mmb_uid != '286') { + echo "
+ + + + + +
+
+
+
+ +
+ $mmb_username $verif_check"; + if($mmb_sticker != '') { + echo "  \"\""; + } + echo "
+ active "; echo timeago($mmb_onltime); echo " ago"; + echo "     "; + # If account is a bot. + if($mmb_bot == 'yes') { + echo " "; + } + # Display the appropriate badges earned by the user. + // Community Manager Badge. + if($mmb_comm_mang == 'yes') { + echo " "; + } + // Account Manager Badge. + if($mmb_cont_mang == 'yes') { + echo " "; + } + // Design Police Badge. + if($mmb_design_pol == 'yes') { + echo " "; + } + // Peacekeeper Badge. + if($mmb_peacekpr == 'yes') { + echo " "; + } + // Donor Badge. + if($mmb_donor == 'yes') { + echo " "; + } + echo "
"; + if($mmb_username != $u_username) { + if($mmb_whocan == 'nobody') { + echo ""; + } + if($mmb_whocan == 'friends') { + $ff_q = mysqli_query($conx, "SELECT uid_rec FROM friends WHERE uid_req='$u_uid' AND uid_rec='$mmb_uid' AND accepted='yes'"); + $fr_ct = mysqli_num_rows($ff_q); + if($fr_ct != '0') { + echo ""; + } + } + if($mmb_whocan == 'anyone') { + echo ""; + } + } + else { + echo ""; + } + echo "
+
"; + } + } +} +?> +
+  +

diff --git a/hub/shout.php b/hub/shout.php new file mode 100644 index 0000000..b260546 --- /dev/null +++ b/hub/shout.php @@ -0,0 +1,150 @@ + 0) { + if($weeks == 1) { echo "1$w_ago"; } + else { echo "$weeks$w_ago"; } + } + } + if($shout_timeleft >= $tstamp) { + $shout_yn = "yes"; + } + else { + $shout_yn = "no"; + } + $shouuut_q = mysqli_query($conx, "SELECT username,md_verf FROM accounts WHERE uid='$shout_uid'"); + while($shouuut_r = mysqli_fetch_assoc($shouuut_q)) { + $shout_username = $shouuut_r['username']; + $shout_verf = $shouuut_r['md_verf']; + if($shout_verf == 'yes') { + $verif_check = ""; + } + else { + $verif_check = ""; + } + } + $usrrrrri_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$shout_uid' && theme_id='$g_themeid'"); + while($usrrrri_r = mysqli_fetch_assoc($usrrrrri_q)) { + $shoutusername_color = $usrrrri_r['username_color']; + $shoutchat_tcolor = $usrrrri_r['text_color']; + } + $string = $shout_text; + include("../inc/replace.php"); +if($shout_yn == "no") { + echo " +
+ + + + + + + +
+ There aren't any shouts right now. +
+ Tap to send a shout. +
+
+
"; + } + else { + $did_you_like = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT id FROM shout_likedis WHERE shout_id='$shout_id' && likedis='like' && uid='$u_uid'")); + if($did_you_like >= '1') { + $like_css = "border: 1px solid $shoutusername_color; background-color: $shoutchat_tcolor;"; + $like_font = "color: $shoutusername_color;"; + } + else { + $like_css = "border: 1px solid $shoutchat_tcolor; background-color: $shoutusername_color;"; + $like_font = "color: $shoutchat_tcolor;"; + } + $did_you_dislike = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT id FROM shout_likedis WHERE shout_id='$shout_id' && likedis='dislike' && uid='$u_uid'")); + if($did_you_dislike >= '1') { + $dislike_css = "border: 1px solid $shoutusername_color; background-color: $shoutchat_tcolor;"; + $dislike_font = "color: $shoutusername_color;"; + } + else { + $dislike_css = "border: 1px solid $shoutchat_tcolor; background-color: $shoutusername_color;"; + $dislike_font = "color: $shoutchat_tcolor;"; + } + echo " +
+
+
+
+ + + + + + + +
+ "; echo release_time($shout_timeleft); echo " left"; echo" +
+
+ $string
$verif_check $shout_username +
+
+
"; + $like_cnt = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT id FROM shout_likedis WHERE shout_id='$shout_id' && likedis='like'")); + $dislike_cnt = mysqli_num_rows($slcq = mysqli_query($conx, "SELECT id FROM shout_likedis WHERE shout_id='$shout_id' && likedis='dislike'")); + if($like_cnt == '0') { + $like_likes = "likes"; + } + elseif($like_cnt == '1') { + $like_likes = "like"; + } + else { + $like_likes = "likes"; + } + if($dislike_cnt == '0') { + $dislike_dislikes = "dislikes"; + } + elseif($dislike_cnt == '1') { + $dislike_dislikes = "dislike"; + } + else { + $dislike_dislikes = "dislikes"; + } + echo "$like_cnt $like_likes, $dislike_cnt $dislike_dislikes"; + echo "
+
"; + } + +} + ?> diff --git a/hub/shout_likedis.php b/hub/shout_likedis.php new file mode 100644 index 0000000..34ea475 --- /dev/null +++ b/hub/shout_likedis.php @@ -0,0 +1,40 @@ += '1') { + mysqli_query($conx, "DELETE FROM shout_likedis WHERE uid='$u_uid' && shout_id='$post_id' && likedis='like'"); + } + elseif($did_you_dislike >= '1') { + mysqli_query($conx, "DELETE FROM shout_likedis WHERE uid='$u_uid' && shout_id='$post_id' && likedis='dislike'"); + mysqli_query($conx, "INSERT INTO shout_likedis (shout_id, uid, likedis) VALUES ('$post_id', '$u_uid', '$post_likedis')"); + } + elseif($did_you_dislike == '0') { + mysqli_query($conx, "INSERT INTO shout_likedis (shout_id, uid, likedis) VALUES ('$post_id', '$u_uid', '$post_likedis')"); + } + } + if($post_likedis == 'dislike') { + if($did_you_dislike >= '1') { + mysqli_query($conx, "DELETE FROM shout_likedis WHERE uid='$u_uid' && shout_id='$post_id' && likedis='dislike'"); + } + elseif($did_you_like >= '1') { + mysqli_query($conx, "DELETE FROM shout_likedis WHERE uid='$u_uid' && shout_id='$post_id' && likedis='like'"); + mysqli_query($conx, "INSERT INTO shout_likedis (shout_id, uid, likedis) VALUES ('$post_id', '$u_uid', '$post_likedis')"); + } + elseif($did_you_like == '0') { + mysqli_query($conx, "INSERT INTO shout_likedis (shout_id, uid, likedis) VALUES ('$post_id', '$u_uid', '$post_likedis')"); + } + } +} +?> diff --git a/hub/shout_stats.php b/hub/shout_stats.php new file mode 100644 index 0000000..78cf9a2 --- /dev/null +++ b/hub/shout_stats.php @@ -0,0 +1,29 @@ + diff --git a/hub/shoutit.php b/hub/shoutit.php new file mode 100644 index 0000000..3a81ddb --- /dev/null +++ b/hub/shoutit.php @@ -0,0 +1,73 @@ += $tstamp) { + $shout_yn = "yes"; + } + else { + $shout_yn = "no"; + } + if (strlen($text)<80) { + $shout_goodboi = "yes"; +} + +// shout times and fees +// shout times and fees +// shout times and fees +if($shout_time_picked == '1') { + $shout_time_cost = "1000"; + $cost_mdf = "1,000"; + $time_left = $tstamp + 3600; +} +elseif($shout_time_picked == '2') { + $shout_time_cost = "2000"; + $cost_mdf = "2,000"; + $time_left = $tstamp + 7200; +} +elseif($shout_time_picked == '3') { + $shout_time_cost = "3000"; + $cost_mdf = "3,000"; + $time_left = $tstamp + 10800; +} +elseif($shout_time_picked == '4') { + $shout_time_cost = "4000"; + $cost_mdf = "4,000"; + $time_left = $tstamp + 14400; +} +elseif($shout_time_picked == '5') { + $shout_time_cost = "5000"; + $cost_mdf = "5,000"; + $time_left = $tstamp + 18000; +} +else { + $shout_time_cost = "1000"; + $cost_mdf = "1,000"; + $time_left = $tstamp + 3600; +} +// shout times and fees +// shout times and fees +// shout times and fees +if($u_funds >= $shout_time_cost && $shout_yn == 'no' && $shout_goodboi == 'yes') { +mysqli_query($conx, "INSERT INTO shouts (uid, texts, tstamp, time_left, mdf_cost) VALUES ('$u_uid','$text','$tstamp','$time_left','$cost_mdf')"); +mysqli_query($conx, "UPDATE account_figures SET activeness='$f_activeness'+.08 WHERE uid='$u_uid'"); +mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-$shout_time_cost WHERE uid='$u_uid'"); +header("location: /hub"); +exit(); +} +else { + exit(); +} +} +?> diff --git a/hub/theme.php b/hub/theme.php new file mode 100644 index 0000000..2869323 --- /dev/null +++ b/hub/theme.php @@ -0,0 +1,22 @@ +