From d163e1ced87ecdbc937f31b109060dc6e9af3515 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 20 Jul 2022 09:44:40 -0400 Subject: [PATCH] Add files via upload --- settings/2fa_update.php | 27 ++ settings/canvas_design.php | 16 ++ settings/change_email.php | 16 ++ settings/change_password.php | 34 +++ settings/change_theme.php | 27 ++ settings/change_username.php | 60 +++++ settings/chat-dark.php | 24 ++ settings/cust_arrange.php | 20 ++ settings/cust_update.php | 414 ++++++++++++++++++++++++++++ settings/custom_emoji.php | 8 + settings/customize.php | 493 ++++++++++++++++++++++++++++++++++ settings/customize_apps.php | 50 ++++ settings/destroy_sessions.php | 17 ++ settings/gen_update.php | 31 +++ settings/general.php | 287 ++++++++++++++++++++ settings/header-float.php | 24 ++ settings/index.php | 111 +++++++- settings/security.php | 260 ++++++++++++++++++ settings/telegram_link.php | 41 +++ settings/toggle_alerts.php | 17 ++ settings/toggle_hide.php | 20 ++ settings/unblock.php | 12 + 22 files changed, 2008 insertions(+), 1 deletion(-) create mode 100644 settings/2fa_update.php create mode 100644 settings/canvas_design.php create mode 100644 settings/change_email.php create mode 100644 settings/change_password.php create mode 100644 settings/change_theme.php create mode 100644 settings/change_username.php create mode 100644 settings/chat-dark.php create mode 100644 settings/cust_arrange.php create mode 100644 settings/cust_update.php create mode 100644 settings/custom_emoji.php create mode 100644 settings/customize.php create mode 100644 settings/customize_apps.php create mode 100644 settings/destroy_sessions.php create mode 100644 settings/gen_update.php create mode 100644 settings/general.php create mode 100644 settings/header-float.php create mode 100644 settings/security.php create mode 100644 settings/telegram_link.php create mode 100644 settings/toggle_alerts.php create mode 100644 settings/toggle_hide.php create mode 100644 settings/unblock.php diff --git a/settings/2fa_update.php b/settings/2fa_update.php new file mode 100644 index 0000000..261271f --- /dev/null +++ b/settings/2fa_update.php @@ -0,0 +1,27 @@ + diff --git a/settings/canvas_design.php b/settings/canvas_design.php new file mode 100644 index 0000000..4970afd --- /dev/null +++ b/settings/canvas_design.php @@ -0,0 +1,16 @@ + diff --git a/settings/change_email.php b/settings/change_email.php new file mode 100644 index 0000000..8cac1b3 --- /dev/null +++ b/settings/change_email.php @@ -0,0 +1,16 @@ + diff --git a/settings/change_password.php b/settings/change_password.php new file mode 100644 index 0000000..a9e0b35 --- /dev/null +++ b/settings/change_password.php @@ -0,0 +1,34 @@ + diff --git a/settings/change_theme.php b/settings/change_theme.php new file mode 100644 index 0000000..59ce345 --- /dev/null +++ b/settings/change_theme.php @@ -0,0 +1,27 @@ + diff --git a/settings/change_username.php b/settings/change_username.php new file mode 100644 index 0000000..3a75e36 --- /dev/null +++ b/settings/change_username.php @@ -0,0 +1,60 @@ + 0) { + header("location: /throw_error"); + exit(); + } + // If current password is correct + // hash the password + $password_hashed = hash("sha256",$u_username.$current_pass); + $new_password_hashed = hash("sha256",$new_uname.$current_pass); + if($password_hashed == $u_password) { + if($u_namechange == 'no') { + mysqli_query($conx, "UPDATE accounts SET username='$new_uname' WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET password='$new_password_hashed' WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET uname_change='yes' WHERE uid='$u_uid'"); + if($u_csplown == 'yes') { + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$new_uname' WHERE uid='$u_uid' && theme_id='1'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit2_name='' WHERE uid='$u_uid' && theme_id='1'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit3_name='' WHERE uid='$u_uid' && theme_id='1'"); + + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$new_uname' WHERE uid='$u_uid' && theme_id='2'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit2_name='' WHERE uid='$u_uid' && theme_id='2'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit3_name='' WHERE uid='$u_uid' && theme_id='2'"); + + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$new_uname' WHERE uid='$u_uid' && theme_id='3'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit2_name='' WHERE uid='$u_uid' && theme_id='3'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit3_name='' WHERE uid='$u_uid' && theme_id='3'"); + } + } + else { + header("location: /throw_error"); + } + } + else { + header("location: /throw_error"); + } +} +else { + header("location: /throw_error"); +} +?> diff --git a/settings/chat-dark.php b/settings/chat-dark.php new file mode 100644 index 0000000..1a82558 --- /dev/null +++ b/settings/chat-dark.php @@ -0,0 +1,24 @@ + diff --git a/settings/cust_arrange.php b/settings/cust_arrange.php new file mode 100644 index 0000000..4419d5a --- /dev/null +++ b/settings/cust_arrange.php @@ -0,0 +1,20 @@ + diff --git a/settings/cust_update.php b/settings/cust_update.php new file mode 100644 index 0000000..0334918 --- /dev/null +++ b/settings/cust_update.php @@ -0,0 +1,414 @@ + diff --git a/settings/custom_emoji.php b/settings/custom_emoji.php new file mode 100644 index 0000000..3ff2dcf --- /dev/null +++ b/settings/custom_emoji.php @@ -0,0 +1,8 @@ + Your emoji is currently a custom set from another app."; } +?> diff --git a/settings/customize.php b/settings/customize.php new file mode 100644 index 0000000..0531c48 --- /dev/null +++ b/settings/customize.php @@ -0,0 +1,493 @@ + +
+ no changes detected +
+
+ + + + + + + + + + + + + + + + +
+ + Emoji + +
+ + You can change the way you view emoji on the site here. + Your emoji is currently a custom set from another app."; } ?> + +
+ > + + + + + + + + +
+ > + + + + + + + + +
+ > + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Chat: Force Dark Mode + +
+ + Toggle whether or not Chat should be forced to use Dark Mode.
+ You must have Dark Mode purchased for the Chat to change this.
+ If you don't already have Dark Mode- buy it in Chat by clicking the "+" + +
+
+ > + on +
+ > + off

+
+ + Sticker + +
+ + You can change your site sticker here. Tap a sticker below or tap here to set your sticker to nothing. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Floating Header + +
+ + Enabling this will cause the Misdew header to stay at the top of the page as you scroll. Action bars do not float- they will go away as you scroll. Refresh or visit another page for the change to reflect. + +
+ > + enabled +
+ > + disabled
+
+ + Canvas Design + +
+ + Tap here to erase all of your Canvas CSS.
+ Tap here to erase everything from your Canvas Design Editor.
+
+
+ + Apps + +
+ + You can re-arrange, hide, and toggle alerts for your owned apps here. + +
+ +
+
+ +
+
+ diff --git a/settings/customize_apps.php b/settings/customize_apps.php new file mode 100644 index 0000000..c69c55b --- /dev/null +++ b/settings/customize_apps.php @@ -0,0 +1,50 @@ +"; +$query = mysqli_query($conx, "SELECT id,app_uqid,snooze,hidden FROM user_apps WHERE uid='$u_uid' ORDER BY arrange"); +while ($app = mysqli_fetch_assoc($query)) { + $uapp_id = $app['id']; + $app_uqid = $app['app_uqid']; + $app_snooze = $app['snooze']; + $app_hidden = $app['hidden']; + $appy = mysqli_query($conx, "SELECT uqid,title,app_color,app_titlecolor,link,icon FROM apps WHERE uqid='$app_uqid'"); + while($ap = mysqli_fetch_assoc($appy)) { + $app_uqqid = $ap['uqid']; + $app_color = $ap['app_color']; + $app_tcolor = $ap['app_titlecolor']; + $app_name = $ap['title']; + $app_link = $ap['link']; + $app_icon = $ap['icon']; + } + echo "$app_name
"; + if($app_snooze == 'yes') { + echo " snoozed"; + } + else { + echo " woke"; + } + echo "   |   "; + echo " move up"; + echo "   |   "; + echo " move down"; + echo "   |   "; + if($app_uqid != 'settings') { + if($app_hidden == 'yes') { + echo " hidden"; + } + else { + echo " visible"; + } + } + else { + echo " visible"; + } + echo "

"; + echo "
tap to launch this app
"; + echo "
"; +} +?> diff --git a/settings/destroy_sessions.php b/settings/destroy_sessions.php new file mode 100644 index 0000000..84181cd --- /dev/null +++ b/settings/destroy_sessions.php @@ -0,0 +1,17 @@ + diff --git a/settings/gen_update.php b/settings/gen_update.php new file mode 100644 index 0000000..0954f0e --- /dev/null +++ b/settings/gen_update.php @@ -0,0 +1,31 @@ + diff --git a/settings/general.php b/settings/general.php new file mode 100644 index 0000000..f33f85d --- /dev/null +++ b/settings/general.php @@ -0,0 +1,287 @@ + +
+ no changes detected +
+
+ + + + + + + + + + + + + "; + } + else { + echo " + + "; + } + ?> +
+ + Change Username + +
+ + You can change your username here. You can only do this once. + +
+
+
+ +
+
+
change
+
You have already changed your username once.
+ + + + + + + + + + "; + ?> +
+ + Change Email + +
+ + You can remove the email address linked to your account here. You will be taken to a page to enter and verify a new email address. + +
+
unlink email
+
+ + + + + + + + + + + + + +
+ + Telegram Bot / ID Link + +
+ + You can link your Telegram ID to your Misdew account here. This will allow you to enable special features from @Misdew_Bot on Telegram. To get started, send the /link command to the bot on Telegram. + +
+
+
+
link
+
+ + + + + + + + + + + + + + + + +
+ + Data Saver + +
+ + This option will prevent most images and videos from being loaded automatically. Instead, a link to the content will be displayed. + +
+ > on +
+ > off +
+
+ + + + + + + + + + + + + + + + +
+ + Straight to Hub + +
+ + This will automatically redirect you to the Hub from the main page [misdew.com]. + +
+ > on +
+ > off +
+
+ + + + + + + + + + +
+ + iSE-MD Link [coming never] + +
+ + This will link your Misdew.com account and data with iSEclipse.com
+ Your username and all account information will be linked.
+ This process cannot be undone and costs 100 MDF. +
+
+ +
+
+ diff --git a/settings/header-float.php b/settings/header-float.php new file mode 100644 index 0000000..7459874 --- /dev/null +++ b/settings/header-float.php @@ -0,0 +1,24 @@ + diff --git a/settings/index.php b/settings/index.php index 8b13789..46b10f6 100644 --- a/settings/index.php +++ b/settings/index.php @@ -1 +1,110 @@ - + + + + + Settings - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + +
+ +
+ + + + + + +
+ General + + Customize + + Security +
+

+ +
+ +
+ +
+ + + diff --git a/settings/security.php b/settings/security.php new file mode 100644 index 0000000..55fa5b1 --- /dev/null +++ b/settings/security.php @@ -0,0 +1,260 @@ + +
+ no changes detected +
+
+ + + + + + + + + + + + + +
+ + Change Password + +
+ + You can change your password here. + +
+
+
+ +
+
change
+
+ + + + + + + + + + + +
+ + Destroy Sessions + +
+ + This will require you to login again on any device you may currently be signed in to. Including this one. + +
+
destroy
+
+ + + + + + + + + + +
+ + 1 Two-Factor Authentication: App + +
+ + + This method is highly recommended.
+ You can only use one authentication method: app or email. Enabling one disables the other. +

+ Toggle two-factor authentication via an app of your choice for your Misdew account here. This will require you to enter a 6-digit code generated by your device. Currently, a code will not be required to login if you forgot your password and are logged in that way. +
+
+
manage
+
+ + + + + + + + +
+ + 2 Two-Factor Authentication: Email + +
+ + + Only use this option if you cannot use an app authenticator.
+ You can only use one authentication method: email or app. Enabling one disables the other. +

+ Toggle two-factor authentication via email for your Misdew account here. This will require you to enter a code sent to your linked email after successfully logging in. Currently, a code will not be required to login if you forgot your password and are logged in that way. 2FA requires a few extra steps to actually login since linked emails are encrypted; but it is more secure than only using a password to login. +
+
+ + + + + + + +
+ > enabled +
+ > disabled +

+ + + + + + + + + + +
+ + Blocking + +
+ + Accounts that you have previously blocked are listed below. You can unblock them here. + +
+ $blka_username   [ unblock ]
"; + } + ?> +
+
+ diff --git a/settings/telegram_link.php b/settings/telegram_link.php new file mode 100644 index 0000000..da99f56 --- /dev/null +++ b/settings/telegram_link.php @@ -0,0 +1,41 @@ + 0) { + exit(); + header("location: /"); + }*/ + +mysqli_query($conx, "UPDATE accounts SET telegram_id='$post_teleid' WHERE uid='$u_uid'"); +mysqli_query($conx, "UPDATE accounts SET telegram_verf='no' WHERE uid='$u_uid'"); +$bot_id = "1733434931:AAF8BccaB0eOldvq0QDcLphs6YOpF5g7sDQ"; + +# Note: you want to change the offset based on the last update_id you received +$url = 'https://api.telegram.org/bot' . $bot_id . '/getUpdates?offset=0'; +$result = file_get_contents($url); +$result = json_decode($result, true); + +foreach ($result['result'] as $message) { + //var_dump($message); +} +# The chat_id variable will be provided in the getUpdates result +$botmsg = "$u_username requested to link your Telegram ID with their Misdew account. Type '/verify' to accept and complete the link."; +$url = 'https://api.telegram.org/bot' . $bot_id . '/sendMessage?text='. $botmsg .'&chat_id=' . $post_teleid; +$result = file_get_contents($url); +$result = json_decode($result, true); + +//var_dump($result['result']); +} +else { + exit(); +} +?> diff --git a/settings/toggle_alerts.php b/settings/toggle_alerts.php new file mode 100644 index 0000000..0dd2988 --- /dev/null +++ b/settings/toggle_alerts.php @@ -0,0 +1,17 @@ + diff --git a/settings/toggle_hide.php b/settings/toggle_hide.php new file mode 100644 index 0000000..3ac6d2f --- /dev/null +++ b/settings/toggle_hide.php @@ -0,0 +1,20 @@ + diff --git a/settings/unblock.php b/settings/unblock.php new file mode 100644 index 0000000..19da25d --- /dev/null +++ b/settings/unblock.php @@ -0,0 +1,12 @@ +