Add files via upload
This commit is contained in:
parent
7f6bd9e44e
commit
d163e1ced8
22 changed files with 2008 additions and 1 deletions
27
settings/2fa_update.php
Normal file
27
settings/2fa_update.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// Update Data Saver
|
||||
$upd_2fa = safe($_POST['toggle2FA']);
|
||||
$tokenkey = safe($_POST['mdkey']);
|
||||
if($tokenkey != $u_token) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
if(isset($upd_2fa)) {
|
||||
// On
|
||||
if($upd_2fa == 'on') {
|
||||
$var_2fa = "enabled";
|
||||
mysqli_query($conx, "UPDATE accounts SET 2fa='$var_2fa' WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET auth_app='no' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Off
|
||||
if($upd_2fa == 'off') {
|
||||
$var_2fa = "disabled";
|
||||
mysqli_query($conx, "UPDATE accounts SET 2fa='$var_2fa' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
16
settings/canvas_design.php
Normal file
16
settings/canvas_design.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$cnv_type = safe($_POST['type']);
|
||||
$ptoken = safe($_POST['token']);
|
||||
if($ptoken != $u_token) {
|
||||
exit();
|
||||
}
|
||||
if($cnv_type == 'css') {
|
||||
mysqli_query($conx, "UPDATE accounts SET css='' WHERE uid='$u_uid'");
|
||||
}
|
||||
if($cnv_type == 'design') {
|
||||
mysqli_query($conx, "DELETE FROM canvas_design WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "INSERT INTO canvas_design (uid) VALUES ('$u_uid')");
|
||||
}
|
||||
exit();
|
||||
?>
|
||||
16
settings/change_email.php
Normal file
16
settings/change_email.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
# it looks like this file didnt even encrypt the emails here idk if this file is in use but GL and take note of that to fix that bug yw
|
||||
$gtoken = safe($_POST['token']);
|
||||
if($gtoken == $u_token) {
|
||||
mysqli_query($conx, "UPDATE accounts SET email_secure='' WHERE uid='$u_uid'");
|
||||
}
|
||||
else {
|
||||
header("location: /");
|
||||
}
|
||||
?>
|
||||
34
settings/change_password.php
Normal file
34
settings/change_password.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$gtoken = safe($_POST['token']);
|
||||
if($gtoken == $u_token) {
|
||||
$current_pass = safe($_POST['current']);
|
||||
$new_pass = safe($_POST['new_pass']);
|
||||
$conf_pass = safe($_POST['conf_pass']);
|
||||
$u_password = $y['password'];
|
||||
// If current password is correct
|
||||
// hash the password
|
||||
$password_hashed = hash("sha256",$u_username.$current_pass);
|
||||
if($password_hashed == $u_password) {
|
||||
if($new_pass == $conf_pass) {
|
||||
// hash the password
|
||||
$password_hashed = hash("sha256",$u_username.$new_pass);
|
||||
mysqli_query($conx, "UPDATE accounts SET password='$password_hashed' WHERE uid='$u_uid'");
|
||||
}
|
||||
else {
|
||||
header("location: /throw_error");
|
||||
}
|
||||
}
|
||||
else {
|
||||
header("location: /throw_error");
|
||||
}
|
||||
}
|
||||
else {
|
||||
header("location: /throw_error");
|
||||
}
|
||||
?>
|
||||
27
settings/change_theme.php
Normal file
27
settings/change_theme.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$gtoken = safe($_POST['token']);
|
||||
$gtheme = safe($_POST['theme']);
|
||||
if($gtoken == $u_token) {
|
||||
if($gtheme == '1') {
|
||||
mysqli_query($conx, "UPDATE accounts SET theme='$gtheme' WHERE uid='$u_uid'");
|
||||
exit();
|
||||
}
|
||||
if($gtheme == '2') {
|
||||
mysqli_query($conx, "UPDATE accounts SET theme='$gtheme' WHERE uid='$u_uid'");
|
||||
exit();
|
||||
}
|
||||
if($gtheme == '3') {
|
||||
mysqli_query($conx, "UPDATE accounts SET theme='$gtheme' WHERE uid='$u_uid'");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
else {
|
||||
header("location: /throw_error");
|
||||
}
|
||||
?>
|
||||
60
settings/change_username.php
Normal file
60
settings/change_username.php
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$gtoken = safe($_POST['token']);
|
||||
if($gtoken == $u_token) {
|
||||
$current_pass = safe($_POST['curr_passwd']);
|
||||
$new_uname = safe($_POST['new_uname']);
|
||||
$u_password = $y['password'];
|
||||
$u_namechange = $y['uname_change'];
|
||||
// numbers and letters only
|
||||
if(!ctype_alnum($new_uname)) {
|
||||
header("location: /throw_error");
|
||||
exit();
|
||||
}
|
||||
// if username already exists
|
||||
$q = mysqli_query($conx, "SELECT username FROM accounts WHERE username='$new_uname'");
|
||||
$c = mysqli_num_rows($q);
|
||||
if($c > 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");
|
||||
}
|
||||
?>
|
||||
24
settings/chat-dark.php
Normal file
24
settings/chat-dark.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
if($chat_dark == 'no') {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// Update Data Saver
|
||||
$chattheme = safe($_POST['chattheme']);
|
||||
$user_tokken = safe($_POST['token']);
|
||||
if(isset($chattheme)) {
|
||||
// On
|
||||
if($chattheme == 'yes' && $u_token == $user_tokken) {
|
||||
mysqli_query($conx, "UPDATE accounts SET u_chatdark_def='yes' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Off
|
||||
if($chattheme == 'no' && $u_token == $user_tokken) {
|
||||
mysqli_query($conx, "UPDATE accounts SET u_chatdark_def='no' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
20
settings/cust_arrange.php
Normal file
20
settings/cust_arrange.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// App ID to move
|
||||
$uapp_id = safe($_POST['app_id']);
|
||||
// Up or Down
|
||||
$move = safe($_POST['move']);
|
||||
$query = mysqli_query($conx, "SELECT arrange FROM user_apps WHERE id='$uapp_id'");
|
||||
$app = mysqli_fetch_assoc($query);
|
||||
$uapp_arrange = $app['arrange'];
|
||||
if($move == 'up') {
|
||||
mysqli_query($conx, "UPDATE user_apps SET arrange='$uapp_arrange'-1 WHERE id='$uapp_id' && uid='$u_uid'");
|
||||
}
|
||||
if($move == 'down') {
|
||||
mysqli_query($conx, "UPDATE user_apps SET arrange='$uapp_arrange'+1 WHERE id='$uapp_id' && uid='$u_uid'");
|
||||
}
|
||||
?>
|
||||
414
settings/cust_update.php
Normal file
414
settings/cust_update.php
Normal file
|
|
@ -0,0 +1,414 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// Update Emoji
|
||||
$upd_emoji = safe($_POST['emoji']);
|
||||
if(isset($upd_emoji)) {
|
||||
// Facebook
|
||||
if($upd_emoji == 'facebook') {
|
||||
mysqli_query($conx, "UPDATE accounts SET emoji_type='$upd_emoji' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Google
|
||||
if($upd_emoji == 'google') {
|
||||
mysqli_query($conx, "UPDATE accounts SET emoji_type='$upd_emoji' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Apple
|
||||
if($upd_emoji == 'apple') {
|
||||
mysqli_query($conx, "UPDATE accounts SET emoji_type='$upd_emoji' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
// Update Sticker
|
||||
$upd_sticker = safe($_POST['sticker']);
|
||||
if(isset($upd_sticker)) {
|
||||
// no icon
|
||||
if($upd_sticker == 'x') {
|
||||
$upd_sticker_url = "";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
|
||||
// kane
|
||||
if($upd_sticker == 'kane') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".gif";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
// egg1
|
||||
if($upd_sticker == 'egg-1') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// egg2
|
||||
if($upd_sticker == 'egg-2') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// ricardo
|
||||
if($upd_sticker == 'ricardo') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// ricardo-smile
|
||||
if($upd_sticker == 'ricardo-smile') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
|
||||
// meruem
|
||||
if($upd_sticker == 'meruem') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// hisoka
|
||||
if($upd_sticker == 'hisoka') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pouf
|
||||
if($upd_sticker == 'pouf') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// frodge
|
||||
if($upd_sticker == 'frodge') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// lovebirds
|
||||
if($upd_sticker == 'lovebirds') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
|
||||
// cake
|
||||
if($upd_sticker == 'cake') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
// pepe
|
||||
if($upd_sticker == 'pepe') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pepe
|
||||
if($upd_sticker == 'yak') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".gif";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
// santa
|
||||
if($upd_sticker == 'santa') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// tree
|
||||
if($upd_sticker == 'tree') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// snowman
|
||||
if($upd_sticker == 'snowman') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// jew
|
||||
if($upd_sticker == 'jew') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// atom
|
||||
if($upd_sticker == 'atom') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// banana
|
||||
if($upd_sticker == 'banana') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// basicbanana
|
||||
if($upd_sticker == 'basicbanana') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// bunny
|
||||
if($upd_sticker == 'bunny') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// cassette
|
||||
if($upd_sticker == 'cassette') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// cheshire
|
||||
if($upd_sticker == 'cheshire') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// clown
|
||||
if($upd_sticker == 'clown') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// coolcat
|
||||
if($upd_sticker == 'coolcat') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// cow
|
||||
if($upd_sticker == 'cow') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// crab
|
||||
if($upd_sticker == 'crab') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// crystals
|
||||
if($upd_sticker == 'crystals') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// doge
|
||||
if($upd_sticker == 'doge') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// donut
|
||||
if($upd_sticker == 'donut') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// duck
|
||||
if($upd_sticker == 'duck') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// elephant
|
||||
if($upd_sticker == 'elephant') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// fireguy
|
||||
if($upd_sticker == 'fireguy') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// flame
|
||||
if($upd_sticker == 'flame') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// fox
|
||||
if($upd_sticker == 'fox') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// gator
|
||||
if($upd_sticker == 'gator') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// gba
|
||||
if($upd_sticker == 'gba') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// ghosty
|
||||
if($upd_sticker == 'ghosty') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// globe
|
||||
if($upd_sticker == 'globe') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// greenbulb
|
||||
if($upd_sticker == 'greenbulb') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// grumpy
|
||||
if($upd_sticker == 'grumpy') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// highkitty
|
||||
if($upd_sticker == 'highkitty') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// icecream
|
||||
if($upd_sticker == 'icecream') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// illuminati
|
||||
if($upd_sticker == 'illuminati') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// jelly
|
||||
if($upd_sticker == 'jelly') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// knife
|
||||
if($upd_sticker == 'knife') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// leafy
|
||||
if($upd_sticker == 'leafy') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// loveballs
|
||||
if($upd_sticker == 'loveballs') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// mariostar
|
||||
if($upd_sticker == 'mariostar') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// monkee
|
||||
if($upd_sticker == 'monkee') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// motherboard
|
||||
if($upd_sticker == 'motherboard') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// nutella
|
||||
if($upd_sticker == 'nutella') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// owl
|
||||
if($upd_sticker == 'owl') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pacifier
|
||||
if($upd_sticker == 'pacifier') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pengiun
|
||||
if($upd_sticker == 'pengiun') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// picklerick
|
||||
if($upd_sticker == 'picklerick') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pikachu
|
||||
if($upd_sticker == 'pikachu') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pocketwatch
|
||||
if($upd_sticker == 'pocketwatch') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// poison
|
||||
if($upd_sticker == 'poison') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// poo
|
||||
if($upd_sticker == 'poo') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// popsicle
|
||||
if($upd_sticker == 'popsicle') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// pug
|
||||
if($upd_sticker == 'pug') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// puppy
|
||||
if($upd_sticker == 'puppy') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// rickandmorty
|
||||
if($upd_sticker == 'rickandmorty') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// rocket
|
||||
if($upd_sticker == 'rocket') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// ryuk
|
||||
if($upd_sticker == 'ryuk') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// scooter
|
||||
if($upd_sticker == 'scooter') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// shootingstar
|
||||
if($upd_sticker == 'shootingstar') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// siamese
|
||||
if($upd_sticker == 'siamese') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// skellington
|
||||
if($upd_sticker == 'skellington') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// squirrel
|
||||
if($upd_sticker == 'squirrel') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// totoro
|
||||
if($upd_sticker == 'totoro') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// wolf
|
||||
if($upd_sticker == 'wolf') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
// foxoroomba
|
||||
if($upd_sticker == 'foxoroomba') {
|
||||
$upd_sticker_url = "/img/stickers/" . $upd_sticker . ".png";
|
||||
mysqli_query($conx, "UPDATE accounts SET sticker='$upd_sticker_url' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
8
settings/custom_emoji.php
Normal file
8
settings/custom_emoji.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
if($u_emoji_type == 'custom') { echo "<br> Your emoji is currently a custom set from another app."; }
|
||||
?>
|
||||
493
settings/customize.php
Normal file
493
settings/customize.php
Normal file
|
|
@ -0,0 +1,493 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
<div id="settings_upd">
|
||||
no changes detected
|
||||
</div>
|
||||
<div class="settings_cont">
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Emoji
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
You can change the way you view emoji on the site here.
|
||||
<?php if($u_emoji_type == 'custom') { echo "<div id=\"custom_emoji\">Your emoji is currently a custom set from another app.</div>"; } ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updEmoji('facebook');" name="emoji" value="facebook" type="radio"<?php if($u_emoji_type == 'facebook') { echo " checked"; } ?>>
|
||||
<img src="/img/emojis/facebook/heart-eyes.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/smile.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/wink.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/drool.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/ghost.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/poo.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/heart_red.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/facebook/boi.png" alt="" style="width: 20px; height: 20px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updEmoji('google');" name="emoji" value="google" type="radio"<?php if($u_emoji_type == 'google') { echo " checked"; } ?>>
|
||||
<img src="/img/emojis/google/heart-eyes.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/smile.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/wink.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/drool.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/ghost.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/poo.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/heart_red.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/google/boi.png" alt="" style="width: 20px; height: 20px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updEmoji('apple');" name="emoji" value="apple" type="radio"<?php if($u_emoji_type == 'apple') { echo " checked"; } ?>>
|
||||
<img src="/img/emojis/apple/heart-eyes.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/smile.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/wink.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/drool.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/ghost.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/poo.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/heart_red.png" alt="" style="width: 20px; height: 20px;">
|
||||
<img src="/img/emojis/apple/boi.png" alt="" style="width: 20px; height: 20px;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Chat: Force Dark Mode
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
Toggle whether or not Chat should be forced to use Dark Mode. <br>
|
||||
You must have Dark Mode purchased for the Chat to change this. <br>
|
||||
If you don't already have Dark Mode- buy it in Chat by clicking the "+"
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updChatTheme('yes');" name="chattheme" value="chattheme" type="radio"<?php if($u_chatdark_def == 'yes') { echo " checked"; } ?>>
|
||||
on
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updChatTheme('no');" name="chattheme" value="chattheme" type="radio"<?php if($u_chatdark_def == 'no') { echo " checked"; } ?>>
|
||||
off<br><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Sticker
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
You can change your site sticker here. Tap a sticker below or tap <span onclick="updSticker('x')" style="text-decoration: underline;">here</span> to set your sticker to nothing.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img onclick="updSticker('kane')" src="/img/stickers/kane.gif" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('egg-1')" src="/img/stickers/egg-1.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('egg-2')" src="/img/stickers/egg-2.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('ricardo-smile')" src="/img/stickers/ricardo-smile.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('ricardo')" src="/img/stickers/ricardo.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('meruem')" src="/img/stickers/meruem.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('hisoka')" src="/img/stickers/hisoka.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pouf')" src="/img/stickers/pouf.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('frodge')" src="/img/stickers/frodge.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('lovebirds')" src="/img/stickers/lovebirds.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('cake')" src="/img/stickers/cake.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('yak')" src="/img/stickers/yak.gif" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pepe')" src="/img/stickers/pepe.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('santa')" src="/img/stickers/santa.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('tree')" src="/img/stickers/tree.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('snowman')" src="/img/stickers/snowman.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('jew')" src="/img/stickers/jew.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('atom')" src="/img/stickers/atom.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('banana')" src="/img/stickers/banana.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('basicbanana')" src="/img/stickers/basicbanana.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('bunny')" src="/img/stickers/bunny.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('cassette')" src="/img/stickers/cassette.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('cheshire')" src="/img/stickers/cheshire.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('clown')" src="/img/stickers/clown.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('coolcat')" src="/img/stickers/coolcat.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('cow')" src="/img/stickers/cow.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('crab')" src="/img/stickers/crab.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('crystals')" src="/img/stickers/crystals.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('doge')" src="/img/stickers/doge.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('donut')" src="/img/stickers/donut.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('duck')" src="/img/stickers/duck.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('elephant')" src="/img/stickers/elephant.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('fireguy')" src="/img/stickers/fireguy.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('flame')" src="/img/stickers/flame.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('fox')" src="/img/stickers/fox.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('gator')" src="/img/stickers/gator.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('gba')" src="/img/stickers/gba.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('ghosty')" src="/img/stickers/ghosty.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('globe')" src="/img/stickers/globe.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('greenbulb')" src="/img/stickers/greenbulb.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('grumpy')" src="/img/stickers/grumpy.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('highkitty')" src="/img/stickers/highkitty.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('icecream')" src="/img/stickers/icecream.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('illuminati')" src="/img/stickers/illuminati.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('jelly')" src="/img/stickers/jelly.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('knife')" src="/img/stickers/knife.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('leafy')" src="/img/stickers/leafy.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('loveballs')" src="/img/stickers/loveballs.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('mariostar')" src="/img/stickers/mariostar.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('monkee')" src="/img/stickers/monkee.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('motherboard')" src="/img/stickers/motherboard.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('nutella')" src="/img/stickers/nutella.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('owl')" src="/img/stickers/owl.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pacifier')" src="/img/stickers/pacifier.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pengiun')" src="/img/stickers/pengiun.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('picklerick')" src="/img/stickers/picklerick.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pikachu')" src="/img/stickers/pikachu.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pocketwatch')" src="/img/stickers/pocketwatch.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('poison')" src="/img/stickers/poison.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('poo')" src="/img/stickers/poo.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('popsicle')" src="/img/stickers/popsicle.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('pug')" src="/img/stickers/pug.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('puppy')" src="/img/stickers/puppy.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('rickandmorty')" src="/img/stickers/rickandmorty.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('rocket')" src="/img/stickers/rocket.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('ryuk')" src="/img/stickers/ryuk.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('scooter')" src="/img/stickers/scooter.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('shootingstar')" src="/img/stickers/shootingstar.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('siamese')" src="/img/stickers/siamese.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('skellington')" src="/img/stickers/skellington.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('squirrel')" src="/img/stickers/squirrel.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('totoro')" src="/img/stickers/totoro.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('wolf')" src="/img/stickers/wolf.png" alt="" style="height: 40px;">
|
||||
<img onclick="updSticker('foxoroomba')" src="/img/stickers/foxoroomba.png" alt="" style="height: 40px;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Floating Header
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
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.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="headerFloat('on');" name="headerfloat" value="headerfloat" type="radio"<?php if($u_header_float == 'on') { echo " checked"; } ?>>
|
||||
enabled
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="headerFloat('no');" name="headerfloat" value="headerfloat" type="radio"<?php if($u_header_float == 'no') { echo " checked"; } ?>>
|
||||
disabled<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Canvas Design
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
Tap <span onclick="eraseCSS()" style="text-decoration: underline;">here</span> to erase all of your Canvas CSS. <br>
|
||||
Tap <span onclick="eraseDesign()" style="text-decoration: underline;">here</span> to erase everything from your Canvas Design Editor. <br>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Apps
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
You can re-arrange, hide, and toggle alerts for your owned apps here.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="custom_apps">
|
||||
<?php require_once("customize_apps.php"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Themes
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
Change your theme by selecting one below. This will also redirect you to the Hub. <br><br> themes are currently NOT undergoing upgrades
|
||||
</span>
|
||||
</td>
|
||||
</tr>-->
|
||||
</table>
|
||||
<center>
|
||||
<!--<table style="width: 95%; max-width: 500px;">
|
||||
<tr>
|
||||
<td onclick="changeTheme('1');" style="width: 25%;">
|
||||
<img src="/img/themes/consistent.png" alt="" style="width: 100%; height: auto; display: block;"> <br>
|
||||
</td>
|
||||
<td onclick="changeTheme('2');" style="width: 25%;">
|
||||
<img src="/img/themes/colorful.png" alt="" style="width: 100%; height: auto; display: block;"> <br>
|
||||
</td>
|
||||
<td onclick="changeTheme('3');" style="width: 25%;">
|
||||
<img src="/img/themes/dark.png" alt="" style="width: 100%; height: auto; display: block;"> <br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>-->
|
||||
</center>
|
||||
</div>
|
||||
<script>
|
||||
function headerFloat(headerfloat) {
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'header-float.php',
|
||||
type: 'POST',
|
||||
data: { headerfloat: headerfloat, token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function updChatTheme(chattheme) {
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'chat-dark.php',
|
||||
type: 'POST',
|
||||
data: { chattheme: chattheme, token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function changeTheme(i) {
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'change_theme.php',
|
||||
type: 'POST',
|
||||
data: { token: token, theme: i },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
window.location.replace("/hub");
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
function eraseCSS() {
|
||||
if(confirm('!!! WARNING !!!\nThis will completely erase all CSS on your Canvas.\nThis cannot be undone.\nAre you sure?')) {
|
||||
if(confirm('Are you truly sure you want to erase it all?')) {
|
||||
if(confirm('Last check. Are you sure?')) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
var type = "css";
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'canvas_design.php',
|
||||
type: 'POST',
|
||||
data: { type: type, token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function eraseDesign() {
|
||||
if(confirm('!!! WARNING !!!\nThis will completely erase everything from your Canvas Design Editor.\nThis cannot be undone.\nAre you sure?')) {
|
||||
if(confirm('Are you truly sure you want to erase it all?')) {
|
||||
if(confirm('Last check. Are you sure?')) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
var type = "design";
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'canvas_design.php',
|
||||
type: 'POST',
|
||||
data: { type: type, token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function togHide(i) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'toggle_hide.php',
|
||||
type: 'POST',
|
||||
data: { i: i },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function togAlerts(i) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'toggle_alerts.php',
|
||||
type: 'POST',
|
||||
data: { i: i },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function updSticker(i) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'cust_update.php',
|
||||
type: 'POST',
|
||||
data: { sticker: i },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function updApps() {
|
||||
$.get("customize_apps.php", function(d) {
|
||||
$("#custom_apps").html(d);
|
||||
});
|
||||
}
|
||||
function appUp(i) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
var move = "up";
|
||||
$.ajax({
|
||||
url: 'cust_arrange.php',
|
||||
type: 'POST',
|
||||
data: { app_id: i, move: move },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function appDown(i) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
var move = "down";
|
||||
$.ajax({
|
||||
url: 'cust_arrange.php',
|
||||
type: 'POST',
|
||||
data: { app_id: i, move: move },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
updApps();
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function updEmoji(style) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'cust_update.php',
|
||||
type: 'POST',
|
||||
data: { emoji: style },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
$.get("custom_emoji.php", function(d) {
|
||||
$("#custom_emoji").html(d);
|
||||
});
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
50
settings/customize_apps.php
Normal file
50
settings/customize_apps.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
echo "<br>";
|
||||
$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 "<span style=\"color: $app_color; font-weight: bold; font-size: 18px;\">$app_name</span><br>";
|
||||
if($app_snooze == 'yes') {
|
||||
echo "<span onclick=\"togAlerts('$app_uqid')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-bell-slash\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">snoozed</span></span>";
|
||||
}
|
||||
else {
|
||||
echo "<span onclick=\"togAlerts('$app_uqid')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-bell\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">woke</span></span>";
|
||||
}
|
||||
echo " <span style=\"color: $app_color; font-weight: bold;\">|</span> ";
|
||||
echo "<span onclick=\"appUp('$uapp_id')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-arrow-circle-up\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">move up</span></span>";
|
||||
echo " <span style=\"color: $app_color; font-weight: bold;\">|</span> ";
|
||||
echo "<span onclick=\"appDown('$uapp_id')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-arrow-circle-down\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">move down</span></span>";
|
||||
echo " <span style=\"color: $app_color; font-weight: bold;\">|</span> ";
|
||||
if($app_uqid != 'settings') {
|
||||
if($app_hidden == 'yes') {
|
||||
echo "<span onclick=\"togHide('$app_uqid')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">hidden</span></span>";
|
||||
}
|
||||
else {
|
||||
echo "<span onclick=\"togHide('$app_uqid')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">visible</span></span>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "<span onclick=\"alert('You cannot hide settings.')\" style=\"color: $app_color; font-size: 12px; font-weight: bold;\"><i class=\"fa fa-times-circle\" aria-hidden=\"true\"></i> <span style=\"color: $app_color; font-size: 12px;\">visible</span></span>";
|
||||
}
|
||||
echo "<br><br>";
|
||||
echo "<div onclick=\"window.location='$app_link';\" style=\"background-color: $app_color; color: $app_tcolor; padding: 10px; font-weight: bold; text-align: center;\">tap to launch this app</div>";
|
||||
echo "<br>";
|
||||
}
|
||||
?>
|
||||
17
settings/destroy_sessions.php
Normal file
17
settings/destroy_sessions.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$gtoken = safe($_POST['token']);
|
||||
if($gtoken == $u_token) {
|
||||
function genRand1($length = 50) {
|
||||
return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
|
||||
}
|
||||
$genran_str1 = genRand1();
|
||||
mysqli_query($conx, "UPDATE accounts SET rstringa='$genran_str1' WHERE uid='$u_uid'");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
31
settings/gen_update.php
Normal file
31
settings/gen_update.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// Update Data Saver
|
||||
$upd_datasaver = safe($_POST['datasaver']);
|
||||
if(isset($upd_datasaver)) {
|
||||
// On
|
||||
if($upd_datasaver == 'on') {
|
||||
mysqli_query($conx, "UPDATE accounts SET data_saver='$upd_datasaver' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Off
|
||||
if($upd_datasaver == 'off') {
|
||||
mysqli_query($conx, "UPDATE accounts SET data_saver='$upd_datasaver' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
// Update Hubmain
|
||||
$upd_hubmain = safe($_POST['hubmain']);
|
||||
if(isset($upd_hubmain)) {
|
||||
// On
|
||||
if($upd_hubmain == 'on') {
|
||||
mysqli_query($conx, "UPDATE accounts SET hubmain='$upd_hubmain' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Off
|
||||
if($upd_hubmain == 'off') {
|
||||
mysqli_query($conx, "UPDATE accounts SET hubmain='$upd_hubmain' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
287
settings/general.php
Normal file
287
settings/general.php
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// User theme colors
|
||||
$usri_q2 = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$u_uid' && theme_id='$g_themeid'");
|
||||
$usri_r2 = mysqli_fetch_assoc($usri_q2);
|
||||
$username_color = $usri_r2['username_color'];
|
||||
$username_tcolor = $usri_r2['text_color'];
|
||||
// Have they changed their username?
|
||||
$u_namechange = $y['uname_change'];
|
||||
?>
|
||||
<div id="settings_upd">
|
||||
no changes detected
|
||||
</div>
|
||||
<div class="settings_cont">
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Change Username
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if($u_namechange == 'no') {
|
||||
echo "<tr>
|
||||
<td>
|
||||
<span class=\"settings_desc\">
|
||||
You can change your username here. You can only do this once.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form autocomplete=\"off\">
|
||||
<input autocomplete=\"off\" type=\"text\" id=\"new_uname\" name=\"new_uname\" class=\"settings_input\" placeholder=\"New Username\"> <br>
|
||||
<input autocomplete=\"new-password\" type=\"password\" id=\"curr_passwd\" name=\"curr_passwd\" class=\"settings_input\" placeholder=\"Current Password\">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick=\"changeUsername();\">
|
||||
<center><div class=\"change_uname_btn\">change</div></center>
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
else {
|
||||
echo "<tr>
|
||||
<td class=\"uname_changed\">You have already changed your username once.</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Change Email
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
echo "<tr>
|
||||
<td>
|
||||
<span class=\"settings_desc\">
|
||||
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.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick=\"changeEmail();\">
|
||||
<center><div class=\"change_uname_btn\">unlink email</div></center>
|
||||
</td>
|
||||
</tr>";
|
||||
?>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Telegram Bot / ID Link
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
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.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input autocomplete="off" type="text" id="telegramid" name="telegramid" class="settings_input" placeholder="Enter Telegram ID"> <br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick="linkTelegramID();">
|
||||
<center><div class="change_uname_btn">link</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Data Saver
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
This option will prevent most images and videos from being loaded automatically. Instead, a link to the content will be displayed.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updDataSaver('on');" name="datasaver" value="on" type="radio"<?php if($u_datasaver == 'on') { echo " checked"; } ?>> on
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updDataSaver('off');" name="datasaver" value="off" type="radio"<?php if($u_datasaver == 'off') { echo " checked"; } ?>> off
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Straight to Hub
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
This will automatically redirect you to the Hub from the main page [misdew.com].
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updHubMain('on');" name="hubmain" value="on" type="radio"<?php if($u_hubmain == 'on') { echo " checked"; } ?>> on
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="updHubMain('off');" name="hubmain" value="off" type="radio"<?php if($u_hubmain == 'off') { echo " checked"; } ?>> off
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
iSE-MD Link [coming never]
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
This will link your Misdew.com account and data with iSEclipse.com <br>
|
||||
Your username and all account information will be linked. <br>
|
||||
This process cannot be undone and costs 100 MDF.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
function linkTelegramID() {
|
||||
if(confirm('Link this Telegram ID to your Misdew account? You can change it at any time.')) {
|
||||
var telegramid = document.getElementById('telegramid').value;
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'telegram_link.php',
|
||||
type: 'POST',
|
||||
data: { token: token, telegramid: telegramid },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
var telegramid = document.getElementById('telegramid').value = '';
|
||||
alert('If all went well, you should have gotten a message from @Misdew_Bot on Telegram asking for confirmation.');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function changeUsername() {
|
||||
var new_uname = document.getElementById('new_uname').value;
|
||||
var curr_uname = "<?php echo $u_username; ?>";
|
||||
if(confirm('Your username will change from\n--> ' + curr_uname + '\nto\n--> ' + new_uname + '\nYOU CAN ONLY CHANGE YOUR USERNAME ONCE.\nAre you sure?')) {
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
var curr_passwd = document.getElementById('curr_passwd').value;
|
||||
$.ajax({
|
||||
url: 'change_username.php',
|
||||
type: 'POST',
|
||||
data: { token: token, curr_passwd: curr_passwd, new_uname: new_uname },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('new_uname').value = '';
|
||||
document.getElementById('curr_passwd').value = '';
|
||||
alert('Your username has been changed.');
|
||||
window.location.replace("/settings");
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function changeEmail() {
|
||||
if(confirm('Are you sure? \n This will unlink your current email address. You will be taken to a page to verify your new email address.')) {
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'change_email.php',
|
||||
type: 'POST',
|
||||
data: { token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
alert('Unlinked. Redirecting you to the checkpoint page..');
|
||||
window.location.replace("/checkpoint/2-23-21");
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function updDataSaver(datasaver) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'gen_update.php',
|
||||
type: 'POST',
|
||||
data: { datasaver: datasaver },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
function updHubMain(hubmain) {
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: 'gen_update.php',
|
||||
type: 'POST',
|
||||
data: { hubmain: hubmain },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
24
settings/header-float.php
Normal file
24
settings/header-float.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
if($chat_dark == 'no') {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// Update Data Saver
|
||||
$headerfloat = safe($_POST['headerfloat']);
|
||||
$user_tokken = safe($_POST['token']);
|
||||
if(isset($headerfloat)) {
|
||||
// On
|
||||
if($headerfloat == 'on' && $u_token == $user_tokken) {
|
||||
mysqli_query($conx, "UPDATE accounts SET header_float='on' WHERE uid='$u_uid'");
|
||||
}
|
||||
// Off
|
||||
if($headerfloat == 'no' && $u_token == $user_tokken) {
|
||||
mysqli_query($conx, "UPDATE accounts SET header_float='no' WHERE uid='$u_uid'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1 +1,110 @@
|
|||
|
||||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
# # # # # # #
|
||||
# WEBSITE LOCATION #
|
||||
# # # # # # #
|
||||
if($u_siteloc != '/settings') {
|
||||
$loc_desc = "updatin\' some settings";
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locdesc='$loc_desc' WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locurl='/settings' WHERE uid='$u_uid'");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Settings - Misdew</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="We are a fairly cool social network.">
|
||||
<meta name="keywords" content="Misdew, MD, Social, Network, Communication, 3DS, DSi, Nintendo">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta name="theme-color" content="<?php echo $meta_theme_color; ?>">
|
||||
<?php
|
||||
if($css_type == "sheet") {
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$g_sheet\">";
|
||||
}
|
||||
if($css_type == "raw") {
|
||||
echo "<style type=\"text/css\">$g_raw</style>";
|
||||
}
|
||||
?>
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<link rel="apple-touch-icon" href="/img/logo.png">
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: <?php echo $bgcolor; ?>;
|
||||
}
|
||||
#header_tds {
|
||||
color: <?php echo $tdcolor; ?> !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<?php
|
||||
$back_button = true;
|
||||
$linebreak = false;
|
||||
$alerts = false;
|
||||
require_once("../inc/header.php");
|
||||
?>
|
||||
<div id="action_bar" class="settings_actbar">
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<td id="generalTab" onclick="toGeneral()" class="action_bar_tab" style="border-bottom: 1px solid #fff;">
|
||||
General
|
||||
</td>
|
||||
<td id="customizeTab" onclick="toCustomize()" class="action_bar_tab">
|
||||
Customize
|
||||
</td>
|
||||
<td id="securityTab" onclick="toSecurity()" class="action_bar_tab">
|
||||
Security
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div> <br>
|
||||
<?php //require_once("../inc/load_alerts.php"); ?>
|
||||
<div id="action_bar_page">
|
||||
<?php require_once("general.php"); ?>
|
||||
</div>
|
||||
<?php
|
||||
require_once("../inc/footer.php");
|
||||
?>
|
||||
</center>
|
||||
<script>
|
||||
function toGeneral() {
|
||||
document.getElementById('generalTab').innerHTML = "General..";
|
||||
$.get("general.php", function(d) {
|
||||
document.getElementById('generalTab').innerHTML = "General";
|
||||
document.getElementById("generalTab").style.borderBottom = '1px solid #fff';
|
||||
document.getElementById("customizeTab").style.borderBottom = 'none';
|
||||
document.getElementById("securityTab").style.borderBottom = 'none';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toCustomize() {
|
||||
document.getElementById('customizeTab').innerHTML = "Customize..";
|
||||
$.get("customize.php", function(d) {
|
||||
document.getElementById('customizeTab').innerHTML = "Customize";
|
||||
document.getElementById("generalTab").style.borderBottom = 'none';
|
||||
document.getElementById("customizeTab").style.borderBottom = '1px solid #fff';
|
||||
document.getElementById("securityTab").style.borderBottom = 'none';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toSecurity() {
|
||||
document.getElementById('securityTab').innerHTML = "Security..";
|
||||
$.get("security.php", function(d) {
|
||||
document.getElementById('securityTab').innerHTML = "Security";
|
||||
document.getElementById("generalTab").style.borderBottom = 'none';
|
||||
document.getElementById("customizeTab").style.borderBottom = 'none';
|
||||
document.getElementById("securityTab").style.borderBottom = '1px solid #fff';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
260
settings/security.php
Normal file
260
settings/security.php
Normal file
|
|
@ -0,0 +1,260 @@
|
|||
<?php
|
||||
$this_page = "settings";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
<div id="settings_upd">
|
||||
no changes detected
|
||||
</div>
|
||||
<div class="settings_cont">
|
||||
<table style="width: 100%; padding: 8px; padding-bottom: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="change_pass" class="settings_title">
|
||||
Change Password
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
You can change your password here.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input autocomplete="off" type="password" id="curr_passwd" name="curr_passwd" class="settings_input" placeholder="Current Password"> <br>
|
||||
<input autocomplete="off" type="password" id="new_passwd" name="new_passwd" class="settings_input" placeholder="New Password"> <br>
|
||||
<input autocomplete="off" type="password" id="conf_passwd" name="conf_passwd" class="settings_input" placeholder="Confirm Password">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick="changePass();">
|
||||
<center><div class="change_pass_btn">change</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <table style="width: 100%; padding: 8px; padding-bottom: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span id="change_pass" class="settings_title">
|
||||
Change Email - coming soon
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
You can change your linked email address here. You will have to click the verification link sent to both email addresses in order to confirm and update it.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input autocomplete="off" type="text" id="curr_email" name="curr_email" class="settings_input" placeholder="Current Email"> <br>
|
||||
<input autocomplete="off" type="text" id="new_email" name="new_email" class="settings_input" placeholder="New Email"> <br>
|
||||
<input autocomplete="off" type="text" id="conf_passwd" name="conf_email" class="settings_input" placeholder="Confirm Email">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick="alert('coming soon')">
|
||||
<center><div class="change_pass_btn">Change</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>-->
|
||||
<table style="width: 100%; padding: 8px; padding-top: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title" id="destroy_sess">
|
||||
Destroy Sessions
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
This will require you to login again on any device you may currently be signed in to. Including this one.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick="destroySess();">
|
||||
<center><div class="destroy_btn">destroy</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="width: 100%; padding: 8px; padding-top: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title" id="destroy_sess">
|
||||
<sup style="font-size: 12px;">1</sup> Two-Factor Authentication: App
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
<span style="font-weight: bold; font-size: 12px;">
|
||||
This method is highly recommended.<br>
|
||||
You can only use one authentication method: app or email. Enabling one disables the other.
|
||||
</span><br>
|
||||
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.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick="window.open('totp');">
|
||||
<center><div class="change_pass_btn">manage</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width: 100%; padding: 8px; padding-top: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title" id="destroy_sess">
|
||||
<sup style="font-size: 12px;">2</sup> Two-Factor Authentication: Email
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
<span style="font-weight: bold; font-size: 12px;">
|
||||
Only use this option if you cannot use an app authenticator.<br>
|
||||
You can only use one authentication method: email or app. Enabling one disables the other.
|
||||
</span><br>
|
||||
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.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="toggle2FA('on');" name="toggle2FA" value="on" type="radio"<?php if($u_2fa == 'enabled') { echo " checked"; } ?>> enabled
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input onchange="toggle2FA('off');" name="toggle2FA" value="off" type="radio"<?php if($u_2fa == 'disabled') { echo " checked"; } ?>> disabled
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
<table style="width: 100%; padding: 8px; padding-top: 0px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title" id="destroy_sess">
|
||||
Blocking
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
Accounts that you have previously blocked are listed below. You can unblock them here.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$blks_s = mysqli_query($conx, "SELECT id,blocked_uid FROM blocking WHERE uid='$u_uid' ORDER BY tstamp DESC");
|
||||
while($blks_r = mysqli_fetch_assoc($blks_s)) {
|
||||
$blks_id = $blks_r['id'];
|
||||
$blks_uid = $blks_r['blocked_uid'];
|
||||
$blka_s = mysqli_query($conx, "SELECT username FROM accounts WHERE uid='$blks_uid'");
|
||||
while($blka_r = mysqli_fetch_assoc($blka_s)) {
|
||||
$blka_username = $blka_r['username'];
|
||||
}
|
||||
echo "<span style=\"font-weight: bold;\">$blka_username</span> <span onclick=\"unblock('$blks_id')\" style=\"font-size: 12px;\">[ unblock ]</span> <br>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
function toggle2FA(toggle2FA) {
|
||||
if(confirm('Are you sure? If you cancel, the selected option will change but it will not actually save.')) {
|
||||
var mdkey = "<?php echo $u_token; ?>";
|
||||
document.getElementById('settings_upd').innerHTML = 'saving changes...';
|
||||
$.ajax({
|
||||
url: '2fa_update.php',
|
||||
type: 'POST',
|
||||
data: { toggle2FA: toggle2FA, mdkey: mdkey },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('settings_upd').innerHTML = 'changes saved';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
document.getElementById('settings_upd').innerHTML = 'save failed';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function unblock(i) {
|
||||
if(confirm('Unblock?')) {
|
||||
$.ajax({
|
||||
url: 'unblock.php',
|
||||
type: 'POST',
|
||||
data: { i: i },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
toSecurity();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function changePass() {
|
||||
if(confirm('Are you sure?')) {
|
||||
var current = document.getElementById('curr_passwd').value;
|
||||
var new_pass = document.getElementById('new_passwd').value;
|
||||
var conf_pass = document.getElementById('conf_passwd').value;
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'change_password.php',
|
||||
type: 'POST',
|
||||
data: { token: token, current: current, new_pass: new_pass, conf_pass: conf_pass },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
var current = document.getElementById('curr_passwd').value = '';
|
||||
var new_pass = document.getElementById('new_passwd').value = '';
|
||||
var conf_pass = document.getElementById('conf_passwd').value = '';
|
||||
alert('Your password has been changed.');
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function destroySess() {
|
||||
if(confirm('Are you sure?')) {
|
||||
var token = "<?php echo $u_token; ?>";
|
||||
$.ajax({
|
||||
url: 'destroy_sessions.php',
|
||||
type: 'POST',
|
||||
data: { token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
window.location.replace("/");
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
41
settings/telegram_link.php
Normal file
41
settings/telegram_link.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$post_token = safe($_POST['token']);
|
||||
$post_teleid = safe($_POST['telegramid']);
|
||||
|
||||
if($u_token == $post_token) {
|
||||
$q = mysqli_query($conx, "SELECT username FROM accounts WHERE telegram_id='$post_teleid'");
|
||||
$c = mysqli_num_rows($q);
|
||||
/*if($c > 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();
|
||||
}
|
||||
?>
|
||||
17
settings/toggle_alerts.php
Normal file
17
settings/toggle_alerts.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$napp_uqid = safe($_POST['i']);
|
||||
if($napp_uqid) {
|
||||
$toggleit = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE snooze='yes' && uid='$u_uid' && app_uqid='$napp_uqid'"));
|
||||
if($toggleit == 1) {
|
||||
mysqli_query($conx, "UPDATE user_apps SET snooze='no' WHERE uid='$u_uid' && app_uqid='$napp_uqid'");
|
||||
}
|
||||
elseif($toggleit == 0) {
|
||||
mysqli_query($conx, "UPDATE user_apps SET snooze='yes' WHERE uid='$u_uid' && app_uqid='$napp_uqid'");
|
||||
}
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
20
settings/toggle_hide.php
Normal file
20
settings/toggle_hide.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$napp_uqid = safe($_POST['i']);
|
||||
if($napp_uqid == 'settings') {
|
||||
exit();
|
||||
}
|
||||
if($napp_uqid) {
|
||||
$toggleit = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE hidden='yes' && uid='$u_uid' && app_uqid='$napp_uqid'"));
|
||||
if($toggleit == 1) {
|
||||
mysqli_query($conx, "UPDATE user_apps SET hidden='no' WHERE uid='$u_uid' && app_uqid='$napp_uqid'");
|
||||
}
|
||||
elseif($toggleit == 0) {
|
||||
mysqli_query($conx, "UPDATE user_apps SET hidden='yes' WHERE uid='$u_uid' && app_uqid='$napp_uqid'");
|
||||
}
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
12
settings/unblock.php
Normal file
12
settings/unblock.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// Get Block ID
|
||||
$blockid = safe($_POST['i']);
|
||||
if(isset($blockid)) {
|
||||
mysqli_query($conx, "DELETE FROM blocking WHERE id='$blockid' && uid='$u_uid'");
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue