From 7b1edde46c8d8b0f74763a3905e93b65b89819cf Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 21 Jul 2022 07:19:06 -0400 Subject: [PATCH] Add files via upload --- .../REMOVED_forums/actual_threads.php | 189 ++++++ .../REMOVED_forums/draft_restore.php | 16 + removed_stuff/REMOVED_forums/img_upload.php | 23 + removed_stuff/REMOVED_forums/index.php | 128 +++++ removed_stuff/REMOVED_forums/more_threads.php | 115 ++++ removed_stuff/REMOVED_forums/push_thread.php | 29 + removed_stuff/REMOVED_forums/saved_drafts.php | 24 + removed_stuff/REMOVED_forums/settings.php | 0 removed_stuff/REMOVED_forums/spindles.php | 109 ++++ removed_stuff/REMOVED_forums/thread.php | 61 ++ removed_stuff/REMOVED_forums/thread_count.php | 6 + removed_stuff/REMOVED_forums/threads.php | 537 ++++++++++++++++++ removed_stuff/REMOVED_forums/weaves.php | 0 13 files changed, 1237 insertions(+) create mode 100644 removed_stuff/REMOVED_forums/actual_threads.php create mode 100644 removed_stuff/REMOVED_forums/draft_restore.php create mode 100644 removed_stuff/REMOVED_forums/img_upload.php create mode 100644 removed_stuff/REMOVED_forums/more_threads.php create mode 100644 removed_stuff/REMOVED_forums/push_thread.php create mode 100644 removed_stuff/REMOVED_forums/saved_drafts.php create mode 100644 removed_stuff/REMOVED_forums/settings.php create mode 100644 removed_stuff/REMOVED_forums/spindles.php create mode 100644 removed_stuff/REMOVED_forums/thread.php create mode 100644 removed_stuff/REMOVED_forums/thread_count.php create mode 100644 removed_stuff/REMOVED_forums/threads.php create mode 100644 removed_stuff/REMOVED_forums/weaves.php diff --git a/removed_stuff/REMOVED_forums/actual_threads.php b/removed_stuff/REMOVED_forums/actual_threads.php new file mode 100644 index 0000000..ba61be1 --- /dev/null +++ b/removed_stuff/REMOVED_forums/actual_threads.php @@ -0,0 +1,189 @@ +$subspindle_name"; + } + } +} + +echo "
+ + + + + +
+ $spindle_name"; + if($subspindle_name != '') { + echo "$subspindle_name"; + } + echo "
$spindle_desc +
+ +
+
+
+ + + + + + +
+ post + + refresh + + online +
+
"; +$threads_qnt = mysqli_query($conx, "SELECT * FROM forum_threads WHERE spindle_uqid='$default_spindle_uqid' && draft='no' ORDER BY id DESC"); +$thread_count = mysqli_num_rows($threads_qnt); +if($thread_count == 0) { + echo "
+ There aren't any threads here. +
"; +} + $threads_q = mysqli_query($conx, "SELECT * FROM forum_threads WHERE spindle_uqid='$default_spindle_uqid' && draft='no' ORDER BY id DESC LIMIT 10"); + while($threads_r = mysqli_fetch_assoc($threads_q)) { + $thread_id = $threads_r['id']; + $thread_uid = $threads_r['uid']; + /* GET USER INFO */ + $usr_q = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$thread_uid'"); + while($usr_r = mysqli_fetch_assoc($usr_q)) { + $thread_username = $usr_r['username']; + } + $usri_qq = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$thread_uid' && theme_id='$g_themeid'"); + while($usri_rr = mysqli_fetch_assoc($usri_qq)) { + $thread_color = $usri_rr['username_color']; + $thread_tcolor = $usri_rr['text_color']; + } + $thread_name = $threads_r['name']; + $thread_content = $threads_r['content']; + $spindle_desc = $threads_r['description']; + $sspindle_tstamp = $threads_r['tstamp']; + $sspindle_actstamp = time() - $sspindle_tstamp; + $sminutes = round($sspindle_actstamp / 60); + if($sminutes <= 10) { + $sspindle_actdot = "#00FF00"; + } + elseif($sminutes <= 20) { + $sspindle_actdot = "#FFA500"; + } + elseif($sminutes < 50) { + $sspindle_actdot = "#FF0000"; + } + else { + $sspindle_actdot = "#FF0000"; + } + /* GET A COUNT OF HOW MANY REPLIES THE THREAD HAS */ + $thread_reply_cont = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM forum_replies WHERE thread_id='$thread_id' ORDER BY id")); + $thread_reply_cont = number_format($thread_reply_cont); + /* REPLY COUNT GRAMMAR */ + if($thread_reply_cont != '1') { + $thread_reply_grammar = "replies"; + } + else { + $thread_reply_grammar = "reply"; + } + /* GET A COUNT OF HOW MANY VIEWS THE THREAD HAS */ + $thread_view_cont = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM forum_views WHERE thread_id='$thread_id' ORDER BY id")); + $thread_view_cont = number_format($thread_view_cont); + /* VIEW COUNT GRAMMAR */ + if($thread_view_cont != '1') { + $thread_view_grammar = "views"; + } + else { + $thread_view_grammar = "view"; + } + echo "
+ + + + + +
+ + $thread_name +
+ thread has $thread_reply_cont $thread_reply_grammar and $thread_view_cont $thread_view_grammar
+ created by $thread_username; "; + echo ""; + echo timeago($sspindle_tstamp); + echo " ago"; + /* forum latest reply */ + /* replier UID */ + $latest_q = mysqli_query($conx, "SELECT uid,tstamp FROM forum_replies WHERE thread_id='$thread_id' ORDER BY id DESC LIMIT 1"); + while($latest_r = mysqli_fetch_assoc($latest_q)) { + $replier_uid = $latest_r['uid']; + $reply_tstamp = $latest_r['tstamp']; + + /* replier username */ + $latest_qu = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$replier_uid'"); + while($latest_ru = mysqli_fetch_assoc($latest_qu)) { + $replier_username = $latest_ru['username']; + } + /* replier colors */ + $tusri_qq = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$replier_uid' && theme_id='$g_themeid'"); + while($tusri_rr = mysqli_fetch_assoc($tusri_qq)) { + $replier_color = $tusri_rr['username_color']; + $replier_tcolor = $tusri_rr['text_color']; + } + echo "
+ latest post by $replier_username; "; + echo ""; + echo timeago($reply_tstamp); + echo " ago"; + } + echo "
+
+ + +
+
+ + + + +
"; + echo nl2br($thread_content); + echo "
"; +} +?> diff --git a/removed_stuff/REMOVED_forums/draft_restore.php b/removed_stuff/REMOVED_forums/draft_restore.php new file mode 100644 index 0000000..1385aac --- /dev/null +++ b/removed_stuff/REMOVED_forums/draft_restore.php @@ -0,0 +1,16 @@ + diff --git a/removed_stuff/REMOVED_forums/img_upload.php b/removed_stuff/REMOVED_forums/img_upload.php new file mode 100644 index 0000000..d6ee64c --- /dev/null +++ b/removed_stuff/REMOVED_forums/img_upload.php @@ -0,0 +1,23 @@ + base64_encode($data), + 'key' => urlencode($required_key), + 'user' => urlencode($u_uid) + ); + $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_forums/index.php b/removed_stuff/REMOVED_forums/index.php index 8b13789..d21bc41 100644 --- a/removed_stuff/REMOVED_forums/index.php +++ b/removed_stuff/REMOVED_forums/index.php @@ -1 +1,129 @@ + + + + + Forums - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + + + + +
+ +
+ + + + + + +
+ Spindles + + Weaves + + Settings +
+

+ +
+ +
+ +
+ + + diff --git a/removed_stuff/REMOVED_forums/more_threads.php b/removed_stuff/REMOVED_forums/more_threads.php new file mode 100644 index 0000000..3d58fe0 --- /dev/null +++ b/removed_stuff/REMOVED_forums/more_threads.php @@ -0,0 +1,115 @@ + + + + + + +
+ + $thread_name +
+ thread has $thread_reply_cont $thread_reply_grammar and $thread_view_cont $thread_view_grammar
+ created by $thread_username; "; + echo ""; + echo timeago($sspindle_tstamp); + echo " ago"; + /* forum latest reply */ + /* replier UID */ + $latest_q = mysqli_query($conx, "SELECT uid,tstamp FROM forum_replies WHERE thread_id='$thread_id' ORDER BY id DESC LIMIT 1"); + while($latest_r = mysqli_fetch_assoc($latest_q)) { + $replier_uid = $latest_r['uid']; + $reply_tstamp = $latest_r['tstamp']; + + /* replier username */ + $latest_qu = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$replier_uid'"); + while($latest_ru = mysqli_fetch_assoc($latest_qu)) { + $replier_username = $latest_ru['username']; + } + /* replier colors */ + $tusri_qq = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$replier_uid' && theme_id='$g_themeid'"); + while($tusri_rr = mysqli_fetch_assoc($tusri_qq)) { + $replier_color = $tusri_rr['username_color']; + $replier_tcolor = $tusri_rr['text_color']; + } + echo "
+ latest post by $replier_username; "; + echo ""; + echo timeago($reply_tstamp); + echo " ago"; + } + echo "
+
+ + +
+
+ + + + +
"; + echo nl2br($thread_content); + echo "
"; +} +?> diff --git a/removed_stuff/REMOVED_forums/push_thread.php b/removed_stuff/REMOVED_forums/push_thread.php new file mode 100644 index 0000000..25e9bc8 --- /dev/null +++ b/removed_stuff/REMOVED_forums/push_thread.php @@ -0,0 +1,29 @@ + diff --git a/removed_stuff/REMOVED_forums/saved_drafts.php b/removed_stuff/REMOVED_forums/saved_drafts.php new file mode 100644 index 0000000..989421a --- /dev/null +++ b/removed_stuff/REMOVED_forums/saved_drafts.php @@ -0,0 +1,24 @@ + diff --git a/removed_stuff/REMOVED_forums/settings.php b/removed_stuff/REMOVED_forums/settings.php new file mode 100644 index 0000000..e69de29 diff --git a/removed_stuff/REMOVED_forums/spindles.php b/removed_stuff/REMOVED_forums/spindles.php new file mode 100644 index 0000000..aaa402c --- /dev/null +++ b/removed_stuff/REMOVED_forums/spindles.php @@ -0,0 +1,109 @@ + + + + + + + + +
+ + $spindle_name + + + +
+ + $spindle_desc +
"; + $subspindles_q = mysqli_query($conx, "SELECT * FROM forum_subspindles WHERE spindle_uqid='$spindle_uqid' ORDER BY id ASC"); + while($subspindles_r = mysqli_fetch_assoc($subspindles_q)) { + $s_spindle_uqid = $subspindles_r['spindle_uqid']; + $subspindle_uqid = $subspindles_r['uqid']; + $subspindle_name = $subspindles_r['name']; + $coolsplit = "1"; + echo " + $subspindle_name +
"; + } + echo ""; +} +?> + diff --git a/removed_stuff/REMOVED_forums/thread.php b/removed_stuff/REMOVED_forums/thread.php new file mode 100644 index 0000000..64a1f41 --- /dev/null +++ b/removed_stuff/REMOVED_forums/thread.php @@ -0,0 +1,61 @@ +refresh

"; +?> + +hi"; + } +} +?> + diff --git a/removed_stuff/REMOVED_forums/thread_count.php b/removed_stuff/REMOVED_forums/thread_count.php new file mode 100644 index 0000000..4237384 --- /dev/null +++ b/removed_stuff/REMOVED_forums/thread_count.php @@ -0,0 +1,6 @@ + diff --git a/removed_stuff/REMOVED_forums/threads.php b/removed_stuff/REMOVED_forums/threads.php new file mode 100644 index 0000000..b5341de --- /dev/null +++ b/removed_stuff/REMOVED_forums/threads.php @@ -0,0 +1,537 @@ +$subspindle_name"; + } + } +} +?> + + + +"; +require_once("actual_threads.php"); +echo ""; +if($thread_count > 10) { + echo "
"; + echo "
"; + echo "
"; +} +?> + + diff --git a/removed_stuff/REMOVED_forums/weaves.php b/removed_stuff/REMOVED_forums/weaves.php new file mode 100644 index 0000000..e69de29